Skip to content

Commit

Permalink
Reorder mint tx instructions to mimic spl-token
Browse files Browse the repository at this point in the history
Signed-off-by: Lee Smet <[email protected]>
  • Loading branch information
LeeSmet committed Dec 23, 2024
1 parent b698acc commit 6c5e176
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bridges/stellar-solana/solana/solana.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ func (sol *Solana) MintTokens(ctx context.Context, info MintInfo) error {
spew.Dump(mint)

tx, err := solana.NewTransaction([]solana.Instruction{
memo.NewMemoInstruction([]byte(info.TxID), sol.account.PublicKey()).Build(),
token.NewMintToCheckedInstruction(info.Amount, mint.Decimals, tftAddress, to, *mint.MintAuthority, nil).Build(),
// TODO: Compute actual limit
budget.NewSetComputeUnitLimitInstruction(40000).Build(),
memo.NewMemoInstruction([]byte(info.TxID), sol.account.PublicKey()).Build(),
token.NewMintToCheckedInstruction(info.Amount, mint.Decimals, tftAddress, to, *mint.MintAuthority, nil).Build(),
}, recent.Value.Blockhash, solana.TransactionPayer(sol.account.PublicKey()))
if err != nil {
return errors.Wrap(err, "failed to create mint transaction")
Expand Down

0 comments on commit 6c5e176

Please sign in to comment.