From 01f39ebbf334d4e34185cdad1efb53c2131848eb Mon Sep 17 00:00:00 2001 From: yashnevatia Date: Tue, 7 Jan 2025 12:40:07 +0000 Subject: [PATCH] Adding decimal const --- deployment/common/changeset/deploy_link_token.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/deployment/common/changeset/deploy_link_token.go b/deployment/common/changeset/deploy_link_token.go index 4c4d844b26f..eb6a38f6a58 100644 --- a/deployment/common/changeset/deploy_link_token.go +++ b/deployment/common/changeset/deploy_link_token.go @@ -18,6 +18,10 @@ import ( var _ deployment.ChangeSet[[]uint64] = DeployLinkToken +const ( + TokenDecimalsSolana = 9 +) + // DeployLinkToken deploys a link token contract to the chain identified by the ChainSelector. func DeployLinkToken(e deployment.Environment, chains []uint64) (deployment.ChangesetOutput, error) { for _, chain := range chains { @@ -86,13 +90,13 @@ func deployLinkTokenContractSolana( chain deployment.SolChain, ab deployment.AddressBook, ) error { - decimals := uint8(0) + adminPublicKey := chain.DeployerKey.PublicKey() mint, _ := solana.NewRandomPrivateKey() // this is the token address mintPublicKey := mint.PublicKey() instructions, err := solTokenUtil.CreateToken( - context.Background(), solana.Token2022ProgramID, mintPublicKey, adminPublicKey, decimals, chain.Client, solRpc.CommitmentConfirmed, + context.Background(), solana.Token2022ProgramID, mintPublicKey, adminPublicKey, TokenDecimalsSolana, chain.Client, solRpc.CommitmentConfirmed, ) if err != nil { lggr.Errorw("Failed to generate instructions for link token deployment", "chain", chain.String(), "err", err)