Skip to content

Commit

Permalink
Adding decimal const
Browse files Browse the repository at this point in the history
  • Loading branch information
yashnevatia committed Jan 7, 2025
1 parent 1c41814 commit 01f39eb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions deployment/common/changeset/deploy_link_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -86,13 +90,13 @@ func deployLinkTokenContractSolana(
chain deployment.SolChain,
ab deployment.AddressBook,
) error {

Check failure on line 92 in deployment/common/changeset/deploy_link_token.go

View workflow job for this annotation

GitHub Actions / GolangCI Lint (deployment)

unnecessary leading newline (whitespace)
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)
Expand Down

0 comments on commit 01f39eb

Please sign in to comment.