Conversation
|
| func GetOrCreateATAIx( | ||
| ctx context.Context, | ||
| client client.MultiClient, | ||
| mint, owner, payer solana.PublicKey, |
There was a problem hiding this comment.
I think we'll also want a tokenProgram solana.PublicKey in the signature too
| mint, owner, payer solana.PublicKey, | ||
| ) (ata solana.PublicKey, ix solana.Instruction, err error) { | ||
| // Derive ATA | ||
| ata, _, err = solana.FindAssociatedTokenAddress(owner, mint) |
There was a problem hiding this comment.
The naming is kind of confusing but I think we'll want the tokens.FindAssociatedTokenAddress here instead. The import being "github.com/smartcontractkit/chainlink-ccip/chains/solana/utils/tokens"
| client client.MultiClient, | ||
| mint, owner, payer solana.PublicKey, | ||
| ) (ata solana.PublicKey, ix solana.Instruction, err error) { | ||
| // Derive ATA |
There was a problem hiding this comment.
Maybe it's overkill but in our existing ChainWriter code we also validate that the mint is a valid one before continuing. Maybe we can add that here too for safety.
chainlink-solana/pkg/solana/chainwriter/ata_creation.go
Lines 61 to 69 in acc1c8e
| } | ||
|
|
||
| // Build ATA creation since Probe doesn't exists | ||
| ix = associatedtokenaccount.NewCreateInstruction( |
There was a problem hiding this comment.
I think we want to stick to the tokens package and use tokens.CreateAssociatedTokenAccount here instead also
|
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days. |


Description
Requires Dependencies
Resolves Dependencies