Commit 7cfeb99f authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub

Merge pull request #3719 from ethereum-optimism/e2e/set-calldata

op-e2e: user action allow set calldata
parents 39e1d598 358f3ad5
......@@ -149,6 +149,13 @@ func (s *BasicUser[B]) ActRandomTxToAddr(t Testing) {
s.txToAddr = to
}
func (s *BasicUser[B]) ActSetTxCalldata(calldata []byte) Action {
return func(t Testing) {
require.NotNil(t, calldata)
s.txCallData = calldata
}
}
func (s *BasicUser[B]) ActSetTxToAddr(to *common.Address) Action {
return func(t Testing) {
s.txToAddr = to
......@@ -216,10 +223,13 @@ func (s *BasicUser[B]) ActMakeTx(t Testing) {
ChainID: s.env.Signer.ChainID(),
Nonce: s.PendingNonce(t),
Gas: gas,
Data: s.txCallData,
})
err = s.env.EthCl.SendTransaction(t.Ctx(), tx)
require.NoError(t, err, "must send tx")
s.lastTxHash = tx.Hash()
// reset the calldata
s.txCallData = []byte{}
}
func (s *BasicUser[B]) ActCheckReceiptStatusOfLastTx(success bool) func(t Testing) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment