Skip to content

Commit

Permalink
compute submit abi data() on demand
Browse files Browse the repository at this point in the history
  • Loading branch information
rachel-bousfield committed Mar 29, 2022
1 parent 8822fe5 commit 680666b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions core/types/arb_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ type ArbitrumSubmitRetryableTx struct {
MaxSubmissionFee *big.Int
FeeRefundAddr common.Address
RetryData []byte // contract invocation input data
Data []byte
}

func (tx *ArbitrumSubmitRetryableTx) txType() byte { return ArbitrumSubmitRetryableTxType }
Expand All @@ -228,7 +227,6 @@ func (tx *ArbitrumSubmitRetryableTx) copy() TxData {
MaxSubmissionFee: new(big.Int),
FeeRefundAddr: tx.FeeRefundAddr,
RetryData: common.CopyBytes(tx.RetryData),
Data: tx.Data,
}
if tx.ChainId != nil {
cpy.ChainId.Set(tx.ChainId)
Expand All @@ -254,7 +252,6 @@ func (tx *ArbitrumSubmitRetryableTx) copy() TxData {

func (tx *ArbitrumSubmitRetryableTx) chainID() *big.Int { return tx.ChainId }
func (tx *ArbitrumSubmitRetryableTx) accessList() AccessList { return nil }
func (tx *ArbitrumSubmitRetryableTx) data() []byte { return tx.Data }
func (tx *ArbitrumSubmitRetryableTx) gas() uint64 { return tx.Gas }
func (tx *ArbitrumSubmitRetryableTx) gasPrice() *big.Int { return tx.GasFeeCap }
func (tx *ArbitrumSubmitRetryableTx) gasTipCap() *big.Int { return big.NewInt(0) }
Expand All @@ -268,6 +265,12 @@ func (tx *ArbitrumSubmitRetryableTx) rawSignatureValues() (v, r, s *big.Int) {
func (tx *ArbitrumSubmitRetryableTx) setSignatureValues(chainID, v, r, s *big.Int) {}
func (tx *ArbitrumSubmitRetryableTx) isFake() bool { return true }

var ArbitrumSubmitRetryableTxDataHook func(*ArbitrumSubmitRetryableTx) []byte

func (tx *ArbitrumSubmitRetryableTx) data() []byte {
return ArbitrumSubmitRetryableTxDataHook(tx)
}

type ArbitrumDepositTx struct {
ChainId *big.Int
L1RequestId common.Hash
Expand Down

0 comments on commit 680666b

Please sign in to comment.