Skip to content

Commit

Permalink
v3: fix guest module call
Browse files Browse the repository at this point in the history
  • Loading branch information
attente committed Mar 7, 2025
1 parent 5fd5aa6 commit 6747b7b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions transactions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -975,7 +975,7 @@ func TestTransactionToGuestModuleDeployAndCall(t *testing.T) {
signedExecdata, err := contracts.V3.WalletStage1Module.Encode("execute", encodedData, signedWalletBundle.Signature)
assert.NoError(t, err)

guestBundle := sequence.Transactions{
guestBundle := []v3.Call{
{
To: walletFactoryAddress,
Data: walletDeployData,
Expand All @@ -986,15 +986,12 @@ func TestTransactionToGuestModuleDeployAndCall(t *testing.T) {
},
}

encodedTxns, err := guestBundle.EncodedTransactions()
assert.NoError(t, err)

execdata, err := contracts.V2.WalletGuestModule.Encode("execute", encodedTxns, big.NewInt(0), []byte{})
guestAddress := testChain.V3SequenceContext().GuestModuleAddress
execdata, err := v3.Encode(v3.DecodedPayload{Kind: v3.KindTransactions, Calls: guestBundle}, &guestAddress)
assert.NoError(t, err)

// Relay the txn manually, directly to the guest module
sender := testChain.GetRelayerWallet()
guestAddress := testChain.V3SequenceContext().GuestModuleAddress
ntx, err := sender.NewTransaction(context.Background(), &ethtxn.TransactionRequest{
To: &guestAddress,
Data: execdata,
Expand Down

0 comments on commit 6747b7b

Please sign in to comment.