Skip to content

Commit 31f1e09

Browse files
feat: return full transaction data instead of hashes only (#257)
This pull request focuses on changing the return type of several methods from `string` to `types.TransactionResult` across multiple files to improve consistency and clarity in handling transaction data. The most important changes include updates to method signatures, test cases, and related function calls. ### Method Signature Updates: * Changed the return type of `SetConfig` in `sdk/configurer.go` to `types.MinedTransaction` [[1]](diffhunk://#diff-77955b40ad4798ce453e03b09fb04927044a5d5a73371015e4064c10ffaf6570L10-R10) [[2]](diffhunk://#diff-6b3de348a297b177e712c1e8a3c1a0f785ab569fbb44a169c9af04aa2778ba7aL32-R40). * Updated the `SetRoot` and `Execute` methods in `executable.go` to return `types.MinedTransaction` instead of `string` [[1]](diffhunk://#diff-4786426524a45aded810b56bbd0870ea6b2704d9fc9b114a22068470cb2efc67L56-R71) [[2]](diffhunk://#diff-4786426524a45aded810b56bbd0870ea6b2704d9fc9b114a22068470cb2efc67L93-R110). * Modified the `ExecuteOperation` and `SetRoot` methods in `sdk/evm/executor.go` to return `types.MinedTransaction` [[1]](diffhunk://#diff-dad84c0fda98fb7df28eb97781c597f1c0634aa07e51ee35d1ddc9ad2259dd79L36-R62) [[2]](diffhunk://#diff-dad84c0fda98fb7df28eb97781c597f1c0634aa07e51ee35d1ddc9ad2259dd79L69-R84). ### Test Case Adjustments: * Updated test cases in `sdk/evm/configurer_test.go` to validate the new return type `types.MinedTransaction`. * Adjusted test cases in `sdk/evm/executor_test.go` to check for `tx.Hash` instead of `txHash` [[1]](diffhunk://#diff-e6dfdd05c6490abd35c142afb88593f28c19bd3252e8d32b59855ea1b4e93695L186-R188) [[2]](diffhunk://#diff-e6dfdd05c6490abd35c142afb88593f28c19bd3252e8d32b59855ea1b4e93695L338-R344). ### Function Call Changes: * Replaced `txHash` with `tx.Hash` in various test functions in `e2e/tests/evm/executable.go` [[1]](diffhunk://#diff-bbe2ffda1b9ebcc15c396ab8d7423168da6a71a0939b685bbf7c8fb98b85c85fL205-R209) [[2]](diffhunk://#diff-bbe2ffda1b9ebcc15c396ab8d7423168da6a71a0939b685bbf7c8fb98b85c85fL219-R223) [[3]](diffhunk://#diff-bbe2ffda1b9ebcc15c396ab8d7423168da6a71a0939b685bbf7c8fb98b85c85fL327-R331) [[4]](diffhunk://#diff-bbe2ffda1b9ebcc15c396ab8d7423168da6a71a0939b685bbf7c8fb98b85c85fL341-R345) [[5]](diffhunk://#diff-bbe2ffda1b9ebcc15c396ab8d7423168da6a71a0939b685bbf7c8fb98b85c85fL429-R433) [[6]](diffhunk://#diff-bbe2ffda1b9ebcc15c396ab8d7423168da6a71a0939b685bbf7c8fb98b85c85fL446-R450). * Updated function calls in `executable_test.go` to use `tx.Hash` [[1]](diffhunk://#diff-a58de0dcac6ed4265c64734bdd796348f6d4b120c6abd6a099b3e96ee64bbf7fL193-R195) [[2]](diffhunk://#diff-a58de0dcac6ed4265c64734bdd796348f6d4b120c6abd6a099b3e96ee64bbf7fL205-R207) [[3]](diffhunk://#diff-a58de0dcac6ed4265c64734bdd796348f6d4b120c6abd6a099b3e96ee64bbf7fL317-R319) [[4]](diffhunk://#diff-a58de0dcac6ed4265c64734bdd796348f6d4b120c6abd6a099b3e96ee64bbf7fL329-R331) [[5]](diffhunk://#diff-a58de0dcac6ed4265c64734bdd796348f6d4b120c6abd6a099b3e96ee64bbf7fL448-R450) [[6]](diffhunk://#diff-a58de0dcac6ed4265c64734bdd796348f6d4b120c6abd6a099b3e96ee64bbf7fL462-R464) [[7]](diffhunk://#diff-a58de0dcac6ed4265c64734bdd796348f6d4b120c6abd6a099b3e96ee64bbf7fL588-R590) [[8]](diffhunk://#diff-a58de0dcac6ed4265c64734bdd796348f6d4b120c6abd6a099b3e96ee64bbf7fL603-R605). ### Documentation Update: * Changed the example in `docs/usage/set-config.md` to reflect the updated return type of `SetConfig`. --------- Co-authored-by: Gustavo Gama <[email protected]>
1 parent 671cf97 commit 31f1e09

32 files changed

+312
-213
lines changed

.changeset/tidy-actors-tie.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@smartcontractkit/mcms": minor
3+
---
4+
5+
Return generic transaction object instead of just hash

docs/usage/set-config.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -50,22 +50,22 @@ func main() {
5050
backend := backends.SimulatedBackend{}
5151
auth := &bind.TransactOpts{}
5252
configurerEVM := evm.NewConfigurer(backend, auth)
53-
txHash, err := configurerEVM.SetConfig(ctx, mcmsContractAddr, &config, false)
53+
tx, err := configurerEVM.SetConfig(ctx, mcmsContractAddr, &config, false)
5454
if err != nil {
5555
log.Fatalf("failed to set config: %v", err)
5656
}
57-
log.Printf("set config evm tx hash: %s\n", txHash)
57+
log.Printf("set config evm tx hash: %s\n", tx.Hash)
5858

5959
// On Solana
6060
mcmsContractID := "6UmMZr5MEqiKWD5jqTJd1WCR5kT8oZuFYBLJFi1o6GQX"
6161
rpc := rpc2.New("https://api.devnet.solana.com")
6262
wallet := solana.NewWallet()
6363
configurerSolana := mcmsSolana.NewConfigurer(rpc, wallet.PrivateKey, types.ChainSelector(solanaSelector))
64-
txHash, err = configurerSolana.SetConfig(ctx, mcmsContractID, &config, false)
64+
tx, err = configurerSolana.SetConfig(ctx, mcmsContractID, &config, false)
6565
if err != nil {
6666
log.Fatalf("failed to set config: %v", err)
6767
}
68-
log.Printf("set config solana tx hash: %s\n", txHash)
68+
log.Printf("set config solana tx hash: %s\n", tx.Hash)
6969
}
7070

7171
```

e2e/tests/evm/executable.go

+18-18
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,11 @@ func (s *ExecutionTestSuite) TestExecuteProposal() {
202202
s.Require().NoError(err)
203203

204204
// SetRoot on the contract
205-
txHash, err := executable.SetRoot(ctx, s.chainSelector)
205+
tx, err := executable.SetRoot(ctx, s.chainSelector)
206206
s.Require().NoError(err)
207-
s.Require().NotEmpty(txHash)
207+
s.Require().NotEmpty(tx.Hash)
208208

209-
receipt, err := testutils.WaitMinedWithTxHash(context.Background(), s.Client, common.HexToHash(txHash))
209+
receipt, err := testutils.WaitMinedWithTxHash(context.Background(), s.Client, common.HexToHash(tx.Hash))
210210
s.Require().NoError(err, "Failed to mine deployment transaction")
211211
s.Require().Equal(types.ReceiptStatusSuccessful, receipt.Status)
212212

@@ -216,11 +216,11 @@ func (s *ExecutionTestSuite) TestExecuteProposal() {
216216
s.Require().Equal(root.ValidUntil, proposal.ValidUntil)
217217

218218
// Execute the proposal
219-
txHash, err = executable.Execute(ctx, 0)
219+
tx, err = executable.Execute(ctx, 0)
220220
s.Require().NoError(err)
221-
s.Require().NotEmpty(txHash)
221+
s.Require().NotEmpty(tx.Hash)
222222

223-
receipt, err = testutils.WaitMinedWithTxHash(context.Background(), s.Client, common.HexToHash(txHash))
223+
receipt, err = testutils.WaitMinedWithTxHash(context.Background(), s.Client, common.HexToHash(tx.Hash))
224224
s.Require().NoError(err, "Failed to mine deployment transaction")
225225
s.Require().Equal(types.ReceiptStatusSuccessful, receipt.Status)
226226

@@ -324,11 +324,11 @@ func (s *ExecutionTestSuite) TestExecuteProposalMultiple() {
324324
s.Require().NoError(err)
325325

326326
// SetRoot on the contract
327-
txHash, err := executable.SetRoot(ctx, s.chainSelector)
327+
tx, err := executable.SetRoot(ctx, s.chainSelector)
328328
s.Require().NoError(err)
329-
s.Require().NotEmpty(txHash)
329+
s.Require().NotEmpty(tx.Hash)
330330

331-
receipt, err := testutils.WaitMinedWithTxHash(context.Background(), s.Client, common.HexToHash(txHash))
331+
receipt, err := testutils.WaitMinedWithTxHash(context.Background(), s.Client, common.HexToHash(tx.Hash))
332332
s.Require().NoError(err, "Failed to mine deployment transaction")
333333
s.Require().Equal(types.ReceiptStatusSuccessful, receipt.Status)
334334

@@ -338,11 +338,11 @@ func (s *ExecutionTestSuite) TestExecuteProposalMultiple() {
338338
s.Require().Equal(root.ValidUntil, proposal.ValidUntil)
339339

340340
// Execute the proposal
341-
txHash, err = executable.Execute(ctx, 0)
341+
tx, err = executable.Execute(ctx, 0)
342342
s.Require().NoError(err)
343-
s.Require().NotEmpty(txHash)
343+
s.Require().NotEmpty(tx.Hash)
344344

345-
receipt, err = testutils.WaitMinedWithTxHash(context.Background(), s.Client, common.HexToHash(txHash))
345+
receipt, err = testutils.WaitMinedWithTxHash(context.Background(), s.Client, common.HexToHash(tx.Hash))
346346
s.Require().NoError(err, "Failed to mine deployment transaction")
347347
s.Require().Equal(types.ReceiptStatusSuccessful, receipt.Status)
348348

@@ -426,11 +426,11 @@ func (s *ExecutionTestSuite) TestExecuteProposalMultiple() {
426426
s.Require().NoError(err)
427427

428428
// SetRoot on the contract
429-
txHash, err = executable2.SetRoot(ctx, s.chainSelector)
429+
tx, err = executable2.SetRoot(ctx, s.chainSelector)
430430
s.Require().NoError(err)
431-
s.Require().NotEmpty(txHash)
431+
s.Require().NotEmpty(tx.Hash)
432432

433-
receipt, err = testutils.WaitMinedWithTxHash(context.Background(), s.Client, common.HexToHash(txHash))
433+
receipt, err = testutils.WaitMinedWithTxHash(context.Background(), s.Client, common.HexToHash(tx.Hash))
434434
s.Require().NoError(err, "Failed to mine deployment transaction")
435435
s.Require().Equal(types.ReceiptStatusSuccessful, receipt.Status)
436436

@@ -443,11 +443,11 @@ func (s *ExecutionTestSuite) TestExecuteProposalMultiple() {
443443
s.Require().Equal(root.ValidUntil, proposal2.ValidUntil)
444444

445445
// Execute the proposal
446-
txHash, err = executable2.Execute(ctx, 0)
446+
tx, err = executable2.Execute(ctx, 0)
447447
s.Require().NoError(err)
448-
s.Require().NotEmpty(txHash)
448+
s.Require().NotEmpty(tx.Hash)
449449

450-
receipt, err = testutils.WaitMinedWithTxHash(context.Background(), s.Client, common.HexToHash(txHash))
450+
receipt, err = testutils.WaitMinedWithTxHash(context.Background(), s.Client, common.HexToHash(tx.Hash))
451451
s.Require().NoError(err, "Failed to mine deployment transaction")
452452
s.Require().Equal(types.ReceiptStatusSuccessful, receipt.Status)
453453

e2e/tests/evm/set_root.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,11 @@ func (s *SetRootTestSuite) TestSetRootProposal() {
175175
s.Require().NoError(err)
176176

177177
// Call SetRoot
178-
txHash, err := executable.SetRoot(ctx, s.chainSelector)
178+
tx, err := executable.SetRoot(ctx, s.chainSelector)
179179
s.Require().NoError(err)
180-
s.Require().NotEmpty(txHash)
180+
s.Require().NotEmpty(tx.Hash)
181181

182-
receipt, err := testutils.WaitMinedWithTxHash(ctx, s.Client, common.HexToHash(txHash))
182+
receipt, err := testutils.WaitMinedWithTxHash(ctx, s.Client, common.HexToHash(tx.Hash))
183183
s.Require().NoError(err, "Failed to mine deployment transaction")
184184
s.Require().Equal(types.ReceiptStatusSuccessful, receipt.Status)
185185
}
@@ -259,11 +259,11 @@ func (s *SetRootTestSuite) TestSetRootTimelockProposal() {
259259
executable, err := mcms.NewExecutable(&proposal, executorsMap)
260260
s.Require().NoError(err)
261261
// Call SetRoot
262-
txHash, err := executable.SetRoot(ctx, s.chainSelector)
262+
tx, err := executable.SetRoot(ctx, s.chainSelector)
263263
s.Require().NoError(err)
264-
s.Require().NotEmpty(txHash)
264+
s.Require().NotEmpty(tx.Hash)
265265
// Check receipt
266-
receipt, err := testutils.WaitMinedWithTxHash(context.Background(), s.Client, common.HexToHash(txHash))
266+
receipt, err := testutils.WaitMinedWithTxHash(context.Background(), s.Client, common.HexToHash(tx.Hash))
267267
s.Require().NoError(err, "Failed to mine deployment transaction")
268268
s.Require().Equal(types.ReceiptStatusSuccessful, receipt.Status)
269269
}

e2e/tests/solana/execute.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,13 @@ func (s *SolanaTestSuite) Test_Solana_Execute() {
107107
s.Require().NoError(err)
108108
signature, err := executable.SetRoot(ctx, s.ChainSelector)
109109
s.Require().NoError(err)
110-
_, err = solana.SignatureFromBase58(signature)
110+
_, err = solana.SignatureFromBase58(signature.Hash)
111111
s.Require().NoError(err)
112112

113113
// --- act: call Execute ---
114114
signature, err = executable.Execute(ctx, 0)
115115
s.Require().NoError(err)
116-
_, err = solana.SignatureFromBase58(signature)
116+
_, err = solana.SignatureFromBase58(signature.Hash)
117117
s.Require().NoError(err)
118118

119119
// --- assert balances

e2e/tests/solana/set_config.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func (s *SolanaTestSuite) Test_Solana_SetConfig() {
7373
configurer := mcmsSolana.NewConfigurer(s.SolanaClient, auth, s.ChainSelector)
7474
signature, err := configurer.SetConfig(ctx, mcmAddress, &config, true)
7575
s.Require().NoError(err)
76-
_, err = solana.SignatureFromBase58(signature)
76+
_, err = solana.SignatureFromBase58(signature.Hash)
7777
s.Require().NoError(err)
7878

7979
// --- assert ---

e2e/tests/solana/set_root.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func (s *SolanaTestSuite) Test_Solana_SetRoot() {
7979
s.Require().NoError(err)
8080

8181
// --- assert ---
82-
_, err = solana.SignatureFromBase58(signature)
82+
_, err = solana.SignatureFromBase58(signature.Hash)
8383
s.Require().NoError(err)
8484

8585
gotRoot, gotValidUntil, err := inspectors[s.ChainSelector].GetRoot(ctx, mcmAddress)

e2e/tests/solana/timelock_converter.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -535,14 +535,14 @@ func (s *SolanaTestSuite) executeTimelockProposal(
535535
timelockExecutable, err := mcms.NewTimelockExecutable(timelockProposal, timelockExecutors)
536536
s.Require().NoError(err)
537537

538-
signature, err := timelockExecutable.Execute(ctx, 0)
538+
tx, err := timelockExecutable.Execute(ctx, 0)
539539
s.Require().NoError(err)
540-
s.Require().Contains(getTransactionLogs(s.T(), ctx, s.SolanaClient, signature), "Called `empty`")
541-
s.Require().Contains(getTransactionLogs(s.T(), ctx, s.SolanaClient, signature), "Called `u8_instruction_data`")
540+
s.Require().Contains(getTransactionLogs(s.T(), ctx, s.SolanaClient, tx.Hash), "Called `empty`")
541+
s.Require().Contains(getTransactionLogs(s.T(), ctx, s.SolanaClient, tx.Hash), "Called `u8_instruction_data`")
542542

543-
signature, err = timelockExecutable.Execute(ctx, 1)
543+
tx, err = timelockExecutable.Execute(ctx, 1)
544544
s.Require().NoError(err)
545-
s.Require().Contains(getTransactionLogs(s.T(), ctx, s.SolanaClient, signature), "Called `account_mut`")
545+
s.Require().Contains(getTransactionLogs(s.T(), ctx, s.SolanaClient, tx.Hash), "Called `account_mut`")
546546
}
547547

548548
func newRandomAccount(t *testing.T) (solana.PrivateKey, solana.PublicKey) { //nolint:unused

executable.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -53,22 +53,22 @@ func NewExecutable(
5353
}, nil
5454
}
5555

56-
func (e *Executable) SetRoot(ctx context.Context, chainSelector types.ChainSelector) (string, error) {
56+
func (e *Executable) SetRoot(ctx context.Context, chainSelector types.ChainSelector) (types.TransactionResult, error) {
5757
metadata := e.proposal.ChainMetadata[chainSelector]
5858

5959
metadataHash, err := e.encoders[chainSelector].HashMetadata(metadata)
6060
if err != nil {
61-
return "", err
61+
return types.TransactionResult{}, err
6262
}
6363

6464
proof, err := e.tree.GetProof(metadataHash)
6565
if err != nil {
66-
return "", err
66+
return types.TransactionResult{}, err
6767
}
6868

6969
hash, err := e.proposal.SigningHash()
7070
if err != nil {
71-
return "", err
71+
return types.TransactionResult{}, err
7272
}
7373

7474
// Sort signatures by recovered address
@@ -90,24 +90,24 @@ func (e *Executable) SetRoot(ctx context.Context, chainSelector types.ChainSelec
9090
)
9191
}
9292

93-
func (e *Executable) Execute(ctx context.Context, index int) (string, error) {
93+
func (e *Executable) Execute(ctx context.Context, index int) (types.TransactionResult, error) {
9494
op := e.proposal.Operations[index]
9595
chainSelector := op.ChainSelector
9696
metadata := e.proposal.ChainMetadata[chainSelector]
9797

9898
txNonce, err := safecast.Uint64ToUint32(e.txNonces[index])
9999
if err != nil {
100-
return "", err
100+
return types.TransactionResult{}, err
101101
}
102102

103103
operationHash, err := e.encoders[chainSelector].HashOperation(txNonce, metadata, op)
104104
if err != nil {
105-
return "", err
105+
return types.TransactionResult{}, err
106106
}
107107

108108
proof, err := e.tree.GetProof(operationHash)
109109
if err != nil {
110-
return "", err
110+
return types.TransactionResult{}, err
111111
}
112112

113113
return e.executors[chainSelector].ExecuteOperation(

executable_test.go

+32-16
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,11 @@ func TestExecutor_ExecuteE2E_SingleChainSingleSignerSingleTX_Success(t *testing.
190190
require.NoError(t, err)
191191

192192
// SetRoot on the contract
193-
txHash, err := executable.SetRoot(ctx, chaintest.Chain1Selector)
193+
tx, err := executable.SetRoot(ctx, chaintest.Chain1Selector)
194194
require.NoError(t, err)
195-
require.NotEmpty(t, txHash)
195+
require.NotNil(t, tx)
196+
require.NotEmpty(t, tx.Hash)
197+
require.NotNil(t, tx.RawTransaction)
196198
sim.Backend.Commit()
197199

198200
// Validate Contract State and verify root was set
@@ -202,9 +204,11 @@ func TestExecutor_ExecuteE2E_SingleChainSingleSignerSingleTX_Success(t *testing.
202204
require.Equal(t, root.ValidUntil, proposal.ValidUntil)
203205

204206
// Execute the proposal
205-
txHash, err = executable.Execute(ctx, 0)
207+
tx, err = executable.Execute(ctx, 0)
206208
require.NoError(t, err)
207-
require.NotEmpty(t, txHash)
209+
require.NotNil(t, tx)
210+
require.NotEmpty(t, tx.Hash)
211+
require.NotNil(t, tx.RawTransaction)
208212
sim.Backend.Commit()
209213

210214
// Check the state of the MCMS contract
@@ -314,9 +318,11 @@ func TestExecutor_ExecuteE2E_SingleChainMultipleSignerSingleTX_Success(t *testin
314318
require.NoError(t, err)
315319

316320
// SetRoot on the contract
317-
txHash, err := executable.SetRoot(ctx, chaintest.Chain1Selector)
321+
tx, err := executable.SetRoot(ctx, chaintest.Chain1Selector)
318322
require.NoError(t, err)
319-
require.NotEmpty(t, txHash)
323+
require.NotNil(t, tx)
324+
require.NotEmpty(t, tx.Hash)
325+
require.NotNil(t, tx.RawTransaction)
320326
sim.Backend.Commit()
321327

322328
// Validate Contract State and verify root was set
@@ -326,9 +332,11 @@ func TestExecutor_ExecuteE2E_SingleChainMultipleSignerSingleTX_Success(t *testin
326332
require.Equal(t, root.ValidUntil, proposal.ValidUntil)
327333

328334
// Execute the proposal
329-
txHash, err = executable.Execute(ctx, 0)
335+
tx, err = executable.Execute(ctx, 0)
330336
require.NoError(t, err)
331-
require.NotEqual(t, "", txHash)
337+
require.NotNil(t, tx)
338+
require.NotNil(t, tx.RawTransaction)
339+
require.NotEqual(t, "", tx.Hash)
332340
sim.Backend.Commit()
333341

334342
// Check the state of the MCMS contract
@@ -445,9 +453,11 @@ func TestExecutor_ExecuteE2E_SingleChainSingleSignerMultipleTX_Success(t *testin
445453
require.NoError(t, err)
446454

447455
// SetRoot on the contract
448-
txHash, err := executable.SetRoot(ctx, chaintest.Chain1Selector)
456+
tx, err := executable.SetRoot(ctx, chaintest.Chain1Selector)
449457
require.NoError(t, err)
450-
require.NotEmpty(t, txHash)
458+
require.NotNil(t, tx)
459+
require.NotNil(t, tx.RawTransaction)
460+
require.NotEmpty(t, tx.Hash)
451461
sim.Backend.Commit()
452462

453463
// Validate Contract State and verify root was set
@@ -459,9 +469,11 @@ func TestExecutor_ExecuteE2E_SingleChainSingleSignerMultipleTX_Success(t *testin
459469
// Execute the proposal
460470
for i := range 4 {
461471
// Execute the proposal
462-
txHash, err = executable.Execute(ctx, i)
472+
tx, err = executable.Execute(ctx, i)
463473
require.NoError(t, err)
464-
require.NotEqual(t, "", txHash)
474+
require.NotNil(t, tx)
475+
require.NotNil(t, tx.RawTransaction)
476+
require.NotEqual(t, "", tx.Hash)
465477

466478
sim.Backend.Commit()
467479
}
@@ -585,9 +597,11 @@ func TestExecutor_ExecuteE2E_SingleChainMultipleSignerMultipleTX_Success(t *test
585597
require.NoError(t, err)
586598

587599
// SetRoot on the contract
588-
txHash, err := executable.SetRoot(ctx, chaintest.Chain1Selector)
600+
tx, err := executable.SetRoot(ctx, chaintest.Chain1Selector)
589601
require.NoError(t, err)
590-
require.NotEmpty(t, txHash)
602+
require.NotNil(t, tx)
603+
require.NotNil(t, tx.RawTransaction)
604+
require.NotEmpty(t, tx.Hash)
591605

592606
sim.Backend.Commit()
593607

@@ -600,9 +614,11 @@ func TestExecutor_ExecuteE2E_SingleChainMultipleSignerMultipleTX_Success(t *test
600614
// Execute the proposal
601615
for i := range 4 {
602616
// Execute the proposal
603-
txHash, err = executable.Execute(ctx, i)
617+
tx, err = executable.Execute(ctx, i)
604618
require.NoError(t, err)
605-
require.NotEqual(t, "", txHash)
619+
require.NotNil(t, tx)
620+
require.NotNil(t, tx.RawTransaction)
621+
require.NotEqual(t, "", tx.Hash)
606622

607623
sim.Backend.Commit()
608624
}

sdk/configurer.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ import (
77
)
88

99
type Configurer interface {
10-
SetConfig(ctx context.Context, mcmAddr string, cfg *types.Config, clearRoot bool) (string, error)
10+
SetConfig(ctx context.Context, mcmAddr string, cfg *types.Config, clearRoot bool) (types.TransactionResult, error)
1111
}

0 commit comments

Comments
 (0)