Skip to content

Commit

Permalink
add action test
Browse files Browse the repository at this point in the history
  • Loading branch information
envestcc committed Jun 18, 2024
1 parent c44e2a4 commit 0fda2c4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions action/rlp_tx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -824,6 +824,18 @@ func TestEthTxDecodeVerifyV2(t *testing.T) {
action: MustNoErrorV(NewExecution(to, nonce, amount, gasLimit, gasPrice, data)),
builder: elpbuilder.BuildExecution,
},
{
name: "StakeMigrate",
encoding: iotextypes.Encoding_ETHEREUM_EIP155,
txto: MustNoErrorV(address.FromBytes(address.StakingProtocolAddrHash[:])).String(),
txamount: big.NewInt(0),
txdata: append(
migrateStakeMethod.ID,
MustNoErrorV(migrateStakeMethod.Inputs.Pack(uint64(1)))...,
),
action: MustNoErrorV(NewMigrateStake(nonce, 1, gasLimit, gasPrice)),
builder: elpbuilder.BuildStakingAction,
},
}

verifytx := func(tx *types.Transaction, enc iotextypes.Encoding, amount *big.Int, data []byte, to string, sigv *big.Int) {
Expand Down

0 comments on commit 0fda2c4

Please sign in to comment.