Skip to content

Commit

Permalink
Merge pull request ethereum#78 from OffchainLabs/retrydata-field
Browse files Browse the repository at this point in the history
Retrydata field
  • Loading branch information
rachel-bousfield authored Mar 29, 2022
2 parents dbd2a7f + 680666b commit 60244e7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
11 changes: 8 additions & 3 deletions core/types/arb_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ type ArbitrumSubmitRetryableTx struct {
Beneficiary common.Address
MaxSubmissionFee *big.Int
FeeRefundAddr common.Address
Data []byte // contract invocation input data
RetryData []byte // contract invocation input data
}

func (tx *ArbitrumSubmitRetryableTx) txType() byte { return ArbitrumSubmitRetryableTxType }
Expand All @@ -226,7 +226,7 @@ func (tx *ArbitrumSubmitRetryableTx) copy() TxData {
Beneficiary: tx.Beneficiary,
MaxSubmissionFee: new(big.Int),
FeeRefundAddr: tx.FeeRefundAddr,
Data: common.CopyBytes(tx.Data),
RetryData: common.CopyBytes(tx.RetryData),
}
if tx.ChainId != nil {
cpy.ChainId.Set(tx.ChainId)
Expand All @@ -252,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 @@ -266,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
8 changes: 8 additions & 0 deletions core/vm/evm_arbitrum.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ func (evm *EVM) Depth() int {
return evm.depth
}

func (evm *EVM) IncrementDepth() {
evm.depth += 1
}

func (evm *EVM) DecrementDepth() {
evm.depth += 1
}

type TxProcessingHook interface {
StartTxHook() (bool, uint64, error, []byte) // return 4-tuple rather than *struct to avoid an import cycle
GasChargingHook(gasRemaining *uint64) (*common.Address, error)
Expand Down

0 comments on commit 60244e7

Please sign in to comment.