Skip to content

Commit 637d057

Browse files
fix(solana): fix accounts added to BypassExecute instruction (#366)
After investigating issues with the RMNRemote curse integration tests, we realized that we were mishandling the accounts that are passed to the BypassExecuteBatch instruction. This PR fixes that, by implementing the following changes: * add the Program ID to the list of "remaining accounts" * de-duplicate the accounts in the "remaining accounts" slice, ensuring the "signer" attribute is unset * adjust the writable attribute of the non-remaining accounts of the BypassExecuteBatch instruction itself In addition, the PR also fixes the predecessor value used when computing the operation id -- since bypass executions don't respect the predecessor value, the operation id computed by the onchain Solana program assumes that the predecessor is always "null". [DX-610](https://smartcontract-it.atlassian.net/browse/DX-610) [DX-610]: https://smartcontract-it.atlassian.net/browse/DX-610?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
1 parent a9c237a commit 637d057

File tree

11 files changed

+251
-206
lines changed

11 files changed

+251
-206
lines changed

.changeset/pretty-flies-chew.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@smartcontractkit/mcms": minor
3+
---
4+
5+
fix(solana): fix the accounts added to the BypassExecuteBatch instruction

e2e/config.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ public_key ="9n1pyVGGo6V4mpiSDMVay5As9NurEkY283wwRk1Kto2C"
3535

3636

3737
[solana_config.solana_programs]
38-
mcm = "6UmMZr5MEqiKWD5jqTJd1WCR5kT8oZuFYBLJFi1o6GQX"
39-
timelock = "LoCoNsJFuhTkSQjfdDfn3yuwqhSYoPujmviRHVCzsqn"
40-
access_controller = "9xi644bRR8birboDGdTiwBq3C7VEeR7VuamRYYXCubUW"
41-
external_program_cpi_stub = "4HeqEoSyfYpeC2goFLj9eHgkxV33mR5G7JYAbRsN14uQ"
38+
mcm = "5vNJx78mz7KVMjhuipyr9jKBKcMrKYGdjGkgE4LUmjKk"
39+
timelock = "DoajfR5tK24xVw51fWcawUZWhAXD8yrBJVacc13neVQA"
40+
access_controller = "6KsN58MTnRQ8FfPaXHiFPPFGDRioikj9CdPvPxZJdCjb"
41+
external_program_cpi_stub = "2zZwzyptLqwFJFEFxjPvrdhiGpH9pJ3MfrrmZX6NTKxm"
4242

4343
[aptos_config]
4444
type = "aptos"

e2e/tests/solana/set_root.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ func (s *SolanaTestSuite) Test_Solana_SetRoot() {
2626
// --- arrange ---
2727
ctx := context.Background()
2828
s.SetupMCM(testPDASeedSetRootTest)
29+
s.SetupTimelock(testPDASeedSetRootTest, 1*time.Second)
2930

3031
mcmAddress := solanasdk.ContractAddress(s.MCMProgramID, testPDASeedSetRootTest)
3132

@@ -92,6 +93,6 @@ func (s *SolanaTestSuite) Test_Solana_SetRoot() {
9293

9394
gotRoot, gotValidUntil, err := inspectors[s.ChainSelector].GetRoot(ctx, mcmAddress)
9495
s.Require().NoError(err)
95-
s.Require().Equal(common.HexToHash("0x11329486f2a7bb589320f2a8e9fad50fd5ed9ceeb3c1e2f71491d5ab848c7f60"), gotRoot)
96+
s.Require().Equal(common.HexToHash("0x2b970fa3b929cafc45e8740e5123ebf150c519813bcf4d9c7284518fd5720108"), gotRoot)
9697
s.Require().Equal(uint32(validUntil), gotValidUntil)
9798
}

e2e/tests/solana/timelock_converter.go

Lines changed: 101 additions & 58 deletions
Large diffs are not rendered by default.

e2e/tests/solana/timelock_execution.go

Lines changed: 64 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,18 @@ package solanae2e
55

66
import (
77
"context"
8+
"testing"
9+
"time"
810

911
"github.com/gagliardetto/solana-go"
1012
"github.com/gagliardetto/solana-go/programs/token"
1113
"github.com/gagliardetto/solana-go/rpc"
1214
"github.com/smartcontractkit/chainlink-ccip/chains/solana/contracts/tests/testutils"
13-
"github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings/access_controller"
15+
"github.com/stretchr/testify/require"
16+
1417
"github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings/timelock"
15-
timelockutils "github.com/smartcontractkit/chainlink-ccip/chains/solana/utils/timelock"
1618

19+
e2eutils "github.com/smartcontractkit/mcms/e2e/utils/solana"
1720
mcmsSolana "github.com/smartcontractkit/mcms/sdk/solana"
1821
"github.com/smartcontractkit/mcms/types"
1922
)
@@ -25,117 +28,61 @@ const BatchAddAccessChunkSize = 24
2528
// Test_Solana_TimelockExecute tests the timelock Execute functionality by scheduling a mint tokens transaction and
2629
// executing it via the timelock ExecuteBatch
2730
func (s *SolanaTestSuite) Test_Solana_TimelockExecute() {
31+
// --- arrange ---
32+
ctx, cancel := context.WithTimeout(context.Background(), 60*time.Second)
33+
s.T().Cleanup(cancel)
34+
35+
token.SetProgramID(solana.Token2022ProgramID)
36+
s.SetupMCM(testTimelockExecuteID)
2837
s.SetupTimelock(testTimelockExecuteID, 1)
29-
// Get required programs and accounts
30-
ctx := context.Background()
31-
timelock.SetProgramID(s.TimelockProgramID)
32-
access_controller.SetProgramID(s.AccessControllerProgramID)
3338

34-
// Fund the auth private key
39+
// Create auth and executor private keys
3540
auth, err := solana.PrivateKeyFromBase58(privateKey)
3641
s.Require().NoError(err)
37-
38-
// Setup SPL token for testing a mint via timelock
39-
mintKeypair, err := solana.NewRandomPrivateKey()
40-
s.Require().NoError(err)
41-
mint := mintKeypair.PublicKey()
42-
// set up the token program
43-
signerPDA, err := mcmsSolana.FindTimelockSignerPDA(s.TimelockProgramID, testTimelockExecuteID)
42+
proposerAndExecutorKey, err := solana.NewRandomPrivateKey()
4443
s.Require().NoError(err)
45-
receiverATA := s.setupTokenProgram(ctx, auth, signerPDA, mintKeypair)
46-
47-
// Get receiverATA initial balance
48-
initialBalance, err := s.SolanaClient.GetTokenAccountBalance(
49-
context.Background(),
50-
receiverATA, // The associated token account address
51-
rpc.CommitmentProcessed,
52-
)
44+
mintKey, err := solana.NewRandomPrivateKey()
5345
s.Require().NoError(err)
5446

55-
// Set propose roles
56-
proposerAndExecutorKey := s.setProposerAndExecutor(ctx, auth, s.Roles)
57-
s.Require().NotNil(proposerAndExecutorKey)
47+
e2eutils.FundAccounts(s.T(), ctx, []solana.PublicKey{auth.PublicKey(), proposerAndExecutorKey.PublicKey()}, 1, s.SolanaClient)
5848

59-
// Schedule the mint tx
60-
var predecessor [32]byte
61-
salt := [32]byte{123}
62-
mintIx, operationID := s.scheduleMintTx(ctx,
63-
mint,
64-
receiverATA,
65-
s.Roles[timelock.Proposer_Role].AccessController.PublicKey(),
66-
signerPDA,
67-
*proposerAndExecutorKey,
68-
predecessor,
69-
salt)
49+
s.AssignRoleToAccounts(ctx, testTimelockExecuteID, auth, []solana.PublicKey{proposerAndExecutorKey.PublicKey()},
50+
timelock.Proposer_Role)
51+
s.AssignRoleToAccounts(ctx, testTimelockExecuteID, auth, []solana.PublicKey{proposerAndExecutorKey.PublicKey()},
52+
timelock.Executor_Role)
7053

71-
// --- act: call Timelock Execute ---
72-
executor := mcmsSolana.NewTimelockExecutor(s.SolanaClient, *proposerAndExecutorKey)
73-
contractID := mcmsSolana.ContractAddress(s.TimelockProgramID, testTimelockExecuteID)
74-
ixData, err := mintIx.Data()
75-
s.Require().NoError(err)
76-
accounts := mintIx.Accounts()
77-
accounts = append(accounts, &solana.AccountMeta{PublicKey: solana.Token2022ProgramID, IsSigner: false, IsWritable: false})
78-
solanaTx, err := mcmsSolana.NewTransaction(solana.Token2022ProgramID.String(), ixData, nil, accounts, "Token", []string{})
79-
s.Require().NoError(err)
80-
batchOp := types.BatchOperation{
81-
Transactions: []types.Transaction{solanaTx},
82-
ChainSelector: s.ChainSelector,
83-
}
84-
// --- Wait for the operation to be ready ---
85-
s.waitForOperationToBeReady(ctx, testTimelockExecuteID, operationID)
86-
signature, err := executor.Execute(ctx, batchOp, contractID, predecessor, salt)
87-
s.Require().NoError(err)
88-
s.Require().NotEqual(signature, "")
89-
90-
// --- assert balances
91-
finalBalance, err := s.SolanaClient.GetTokenAccountBalance(
92-
ctx,
93-
receiverATA,
94-
rpc.CommitmentProcessed,
95-
)
54+
signerPDA, err := mcmsSolana.FindTimelockSignerPDA(s.TimelockProgramID, testTimelockExecuteID)
9655
s.Require().NoError(err)
9756

98-
// final balance should be 1000000000000 more units
99-
s.Require().Equal(initialBalance.Value.Amount, "0")
100-
s.Require().Equal(finalBalance.Value.Amount, "1000000000000")
101-
}
57+
// Setup SPL token for testing a mint via timelock
58+
receiverATA := s.setupTokenProgram(ctx, auth, signerPDA, mintKey)
59+
60+
predecessor := [32]byte{}
61+
salt := [32]byte{123}
62+
executor := mcmsSolana.NewTimelockExecutor(s.SolanaClient, proposerAndExecutorKey)
63+
timelockAddress := mcmsSolana.ContractAddress(s.TimelockProgramID, testTimelockExecuteID)
10264

103-
// setProposerAndExecutor sets the proposer for the timelock
104-
func (s *SolanaTestSuite) setProposerAndExecutor(ctx context.Context, auth solana.PrivateKey, roleMap timelockutils.RoleMap) *solana.PrivateKey {
105-
proposerAndExecutorKey := solana.NewWallet()
106-
testutils.FundAccounts(ctx, []solana.PrivateKey{proposerAndExecutorKey.PrivateKey}, s.SolanaClient, s.T())
65+
initialBalance := getBalance(ctx, s.T(), s.SolanaClient, receiverATA)
10766

108-
// Add proposers to the timelock program
109-
batchAddAccessIxs, err := timelockutils.GetBatchAddAccessIxs(
110-
ctx,
111-
testTimelockExecuteID,
112-
roleMap[timelock.Proposer_Role].AccessController.PublicKey(),
113-
timelock.Proposer_Role,
114-
[]solana.PublicKey{proposerAndExecutorKey.PublicKey()},
115-
auth,
116-
BatchAddAccessChunkSize,
117-
s.SolanaClient)
67+
// schedule mint transaction and build batch operation from the returned ScheduleBatch instruction
68+
mintIx, operationID := s.scheduleMintTx(ctx, mintKey.PublicKey(), receiverATA,
69+
s.Roles[timelock.Proposer_Role].AccessController.PublicKey(), signerPDA, proposerAndExecutorKey,
70+
predecessor, salt)
71+
s.waitForOperationToBeReady(ctx, testTimelockExecuteID, operationID)
72+
73+
// --- act: call Timelock Execute ---
74+
mcmsTransaction, err := mcmsSolana.NewTransactionFromInstruction(mintIx, "Token", nil)
11875
s.Require().NoError(err)
119-
for _, ix := range batchAddAccessIxs {
120-
testutils.SendAndConfirm(ctx, s.T(), s.SolanaClient, []solana.Instruction{ix}, auth, rpc.CommitmentConfirmed)
121-
}
76+
batchOp := types.BatchOperation{Transactions: []types.Transaction{mcmsTransaction}, ChainSelector: s.ChainSelector}
12277

123-
// Add executor to the timelock program
124-
batchAddAccessIxs, err = timelockutils.GetBatchAddAccessIxs(
125-
ctx,
126-
testTimelockExecuteID,
127-
roleMap[timelock.Executor_Role].AccessController.PublicKey(),
128-
timelock.Executor_Role,
129-
[]solana.PublicKey{proposerAndExecutorKey.PublicKey()},
130-
auth,
131-
BatchAddAccessChunkSize,
132-
s.SolanaClient)
78+
signature, err := executor.Execute(ctx, batchOp, timelockAddress, predecessor, salt)
13379
s.Require().NoError(err)
134-
for _, ix := range batchAddAccessIxs {
135-
testutils.SendAndConfirm(ctx, s.T(), s.SolanaClient, []solana.Instruction{ix}, auth, rpc.CommitmentConfirmed)
136-
}
80+
s.Require().NotEqual("", signature)
13781

138-
return &proposerAndExecutorKey.PrivateKey
82+
// --- assert ---
83+
finalBalance := getBalance(ctx, s.T(), s.SolanaClient, receiverATA)
84+
s.Require().Equal("0", initialBalance)
85+
s.Require().Equal("1000000000000", finalBalance)
13986
}
14087

14188
// scheduleMintTx schedules a MintTx on the timelock
@@ -151,7 +98,9 @@ func (s *SolanaTestSuite) scheduleMintTx(
15198
// and not the deployer account.
15299
authPublicKey solana.PublicKey,
153100
auth solana.PrivateKey, // The account to sign the init, append schedule instructions.
154-
predecessor, salt [32]byte) (instruction *token.Instruction, operationID [32]byte) {
101+
predecessor,
102+
salt [32]byte,
103+
) (instruction *token.Instruction, operationID [32]byte) {
155104
amount := 1000 * solana.LAMPORTS_PER_SOL
156105
mintIx, err := token.NewMintToInstruction(amount, mint, receiverATA, authPublicKey, nil).ValidateAndBuild()
157106
s.Require().NoError(err)
@@ -160,31 +109,27 @@ func (s *SolanaTestSuite) scheduleMintTx(
160109
acc.IsSigner = false
161110
}
162111
}
163-
s.Require().NoError(err)
112+
164113
// Get the operation ID
165114
ixData, err := mintIx.Data()
166115
s.Require().NoError(err)
167-
accounts := make([]timelock.InstructionAccount, 0, len(mintIx.Accounts())+1)
168-
for _, account := range mintIx.Accounts() {
169-
accounts = append(accounts, timelock.InstructionAccount{
116+
accounts := make([]timelock.InstructionAccount, len(mintIx.Accounts()))
117+
for i, account := range mintIx.Accounts() {
118+
accounts[i] = timelock.InstructionAccount{
170119
Pubkey: account.PublicKey,
171120
IsSigner: account.IsSigner,
172121
IsWritable: account.IsWritable,
173-
})
122+
}
174123
}
175-
accounts = append(accounts, timelock.InstructionAccount{
176-
Pubkey: solana.Token2022ProgramID,
177-
IsSigner: false,
178-
IsWritable: false,
179-
})
180-
opInstructions := []timelock.InstructionData{{Data: ixData, ProgramId: solana.Token2022ProgramID, Accounts: accounts}}
124+
opInstructions := []timelock.InstructionData{{Data: ixData, ProgramId: mintIx.ProgramID(), Accounts: accounts}}
125+
181126
operationID, err = mcmsSolana.HashOperation(opInstructions, predecessor, salt)
182127
s.Require().NoError(err)
128+
183129
operationPDA, err := mcmsSolana.FindTimelockOperationPDA(s.TimelockProgramID, testTimelockExecuteID, operationID)
184130
s.Require().NoError(err)
185131
configPDA, err := mcmsSolana.FindTimelockConfigPDA(s.TimelockProgramID, testTimelockExecuteID)
186132
s.Require().NoError(err)
187-
188133
proposerAC := s.Roles[timelock.Proposer_Role].AccessController.PublicKey()
189134

190135
// Preload and Init Operation
@@ -257,6 +202,7 @@ func (s *SolanaTestSuite) scheduleMintTx(
257202
s.Require().NoError(err)
258203
ixs = append(ixs, finOpIx)
259204
testutils.SendAndConfirm(ctx, s.T(), s.SolanaClient, ixs, auth, rpc.CommitmentConfirmed)
205+
260206
// Schedule the operation
261207
scheduleIx, err := timelock.NewScheduleBatchInstruction(
262208
testTimelockExecuteID,
@@ -272,3 +218,12 @@ func (s *SolanaTestSuite) scheduleMintTx(
272218

273219
return mintIx, operationID
274220
}
221+
222+
func getBalance(ctx context.Context, t *testing.T, client *rpc.Client, account solana.PublicKey) string {
223+
t.Helper()
224+
225+
balance, err := client.GetTokenAccountBalance(ctx, account, rpc.CommitmentProcessed)
226+
require.NoError(t, err)
227+
228+
return balance.Value.Amount
229+
}

go.mod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ require (
1717
github.com/karalabe/hid v1.0.1-0.20240306101548-573246063e52
1818
github.com/smartcontractkit/chain-selectors v1.0.48
1919
github.com/smartcontractkit/chainlink-aptos v0.0.0-20250414155853-651b4e583ee9
20-
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250226104101-11778f2ead98
20+
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250422205932-c33527859fd6
2121
github.com/smartcontractkit/chainlink-testing-framework/framework v0.4.7
2222
github.com/spf13/cast v1.7.1
2323
github.com/stretchr/testify v1.10.0
@@ -30,6 +30,7 @@ require (
3030
filippo.io/edwards25519 v1.1.0 // indirect
3131
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect
3232
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
33+
github.com/BurntSushi/toml v1.4.0 // indirect
3334
github.com/DataDog/zstd v1.5.2 // indirect
3435
github.com/Microsoft/go-winio v0.6.2 // indirect
3536
github.com/VictoriaMetrics/fastcache v1.12.2 // indirect

go.sum

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ github.com/AlekSi/pointer v1.1.0/go.mod h1:y7BvfRI3wXPWKXEBhU71nbnIEEZX0QTSB2Bj4
1010
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0=
1111
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
1212
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
13+
github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0=
14+
github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
1315
github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8=
1416
github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw=
1517
github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
@@ -597,8 +599,8 @@ github.com/smartcontractkit/chain-selectors v1.0.48 h1:wa03tlcGj08qZfv1p+LXZIimp
597599
github.com/smartcontractkit/chain-selectors v1.0.48/go.mod h1:xsKM0aN3YGcQKTPRPDDtPx2l4mlTN1Djmg0VVXV40b8=
598600
github.com/smartcontractkit/chainlink-aptos v0.0.0-20250414155853-651b4e583ee9 h1:lw8RZ8IR4UX1M7djAB3IuMtcAqFX4Z4bzQczClfb8bs=
599601
github.com/smartcontractkit/chainlink-aptos v0.0.0-20250414155853-651b4e583ee9/go.mod h1:Sq/ddMOYch6ZuAnW2k5u9V4+TlGKFzuHQnTM8JXEU+g=
600-
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250226104101-11778f2ead98 h1:uHdawaiGBA3Xmju92tzbQ2SwsG2DDVJS5E+Jm5QnsQg=
601-
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250226104101-11778f2ead98/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60=
602+
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250422205932-c33527859fd6 h1:EWpKT2h/jyqCcblfmtHuY5oN2k8k2Mrmi5KqX+hc2lo=
603+
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250422205932-c33527859fd6/go.mod h1:k3/Z6AvwurPUlfuDFEonRbkkiTSgNSrtVNhJEWNlUZA=
602604
github.com/smartcontractkit/chainlink-common v0.6.1-0.20250329081313-84ec641e0758 h1:SyaVoJtYZ54dO4HyUcfWsuvC0hRsjk+Lyy/k++WQc7Y=
603605
github.com/smartcontractkit/chainlink-common v0.6.1-0.20250329081313-84ec641e0758/go.mod h1:ASXpANdCfcKd+LF3Vhz37q4rmJ/XYQKEQ3La1k7idp0=
604606
github.com/smartcontractkit/chainlink-testing-framework/framework v0.4.7 h1:E7k5Sym9WnMOc4X40lLnQb6BMosxi8DfUBU9pBJjHOQ=
@@ -922,6 +924,8 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T
922924
golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8=
923925
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da h1:noIWHXmPHxILtqtCOPIhSt0ABwskkZKjD3bXGnZGpNY=
924926
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90=
927+
gonum.org/v1/gonum v0.15.1 h1:FNy7N6OUZVUaWG9pTiD+jlhdQ3lMP+/LcTpJ6+a8sQ0=
928+
gonum.org/v1/gonum v0.15.1/go.mod h1:eZTZuRFrzu5pcyjN5wJhcIhnUdNijYxX1T2IcrOGY0o=
925929
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
926930
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
927931
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=

sdk/solana/executor.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,16 +97,15 @@ func (e *Executor) ExecuteOperation(
9797
uint64(nonce),
9898
op.Transaction.Data,
9999
byteProof,
100-
101100
configPDA,
102101
rootMetadataPDA,
103102
expiringRootAndOpCountPDA,
104103
toProgramID,
105104
signedPDA,
106105
e.auth.PublicKey(),
107106
)
108-
// Append the accounts from the AdditionalFields
109107
ix.AccountMetaSlice = append(ix.AccountMetaSlice, additionalFields.Accounts...)
108+
110109
signature, tx, err := e.sendAndConfirm(ctx, e.client, e.auth, ix, rpc.CommitmentConfirmed)
111110
if err != nil {
112111
return types.TransactionResult{}, fmt.Errorf("unable to call execute operation instruction: %w", err)

0 commit comments

Comments
 (0)