chore: update go-ethereum

This commit is contained in:
Anthony Laibe 2023-02-13 11:02:28 +01:00 committed by Anthony Laibe
parent ca36285d78
commit 51f99a2631
6 changed files with 79 additions and 5 deletions

2
go.mod
View File

@ -2,7 +2,7 @@ module github.com/status-im/status-go
go 1.18
replace github.com/ethereum/go-ethereum v1.10.26 => github.com/status-im/go-ethereum v1.10.25-status.3
replace github.com/ethereum/go-ethereum v1.10.26 => github.com/status-im/go-ethereum v1.10.25-status.4
replace github.com/docker/docker => github.com/docker/engine v1.4.2-0.20190717161051-705d9623b7c1

4
go.sum
View File

@ -1958,8 +1958,8 @@ github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/y
github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=
github.com/status-im/doubleratchet v3.0.0+incompatible h1:aJ1ejcSERpSzmWZBgtfYtiU2nF0Q8ZkGyuEPYETXkCY=
github.com/status-im/doubleratchet v3.0.0+incompatible/go.mod h1:1sqR0+yhiM/bd+wrdX79AOt2csZuJOni0nUDzKNuqOU=
github.com/status-im/go-ethereum v1.10.25-status.3 h1:otbW2SCLmNNXAT8uqtrhxq0jRlwQeDA3Tqrhz+LMX3M=
github.com/status-im/go-ethereum v1.10.25-status.3/go.mod h1:Dt4K5JYMhJRdtXJwBEyGZLZn9iz/chSOZyjVmt5ZhwQ=
github.com/status-im/go-ethereum v1.10.25-status.4 h1:Ff35UseaP49DK2RRpSLo3DL7NUmMKzicQ/7/yub6gfU=
github.com/status-im/go-ethereum v1.10.25-status.4/go.mod h1:Dt4K5JYMhJRdtXJwBEyGZLZn9iz/chSOZyjVmt5ZhwQ=
github.com/status-im/go-multiaddr-ethv4 v1.2.4 h1:7fw0Y48TJXEqx4fOHlDOUiM/uBq9zG5w4x975Mjh4E0=
github.com/status-im/go-multiaddr-ethv4 v1.2.4/go.mod h1:PDh4D7h5CvecPIy0ji0rLNwTnzzEcyz9uTPHD42VyH4=
github.com/status-im/gomoji v1.1.3-0.20220213022530-e5ac4a8732d4 h1:CtobZoiNdHpx+xurFxnuJ1xsGm3oKMfcZkB3vmomJmA=

View File

@ -0,0 +1,65 @@
package types
import (
"math/big"
"github.com/ethereum/go-ethereum/common"
)
type OptimismDepositTx struct {
ChainID *big.Int
From common.Address
To common.Address
Mint *big.Int
Value *big.Int
Data []byte
GasLimit uint64
}
func (d *OptimismDepositTx) txType() byte {
return OptimismDepositTxType
}
func (d *OptimismDepositTx) copy() TxData {
tx := &OptimismDepositTx{
From: d.From,
To: d.To,
Mint: new(big.Int),
Value: new(big.Int),
ChainID: new(big.Int),
Data: d.Data,
GasLimit: d.GasLimit,
}
if d.Value != nil {
tx.Value.Set(d.Value)
}
if d.ChainID != nil {
tx.Value.Set(d.ChainID)
}
if d.Mint != nil {
tx.Value.Set(d.Mint)
}
return tx
}
func (d *OptimismDepositTx) chainID() *big.Int { return d.ChainID }
func (d *OptimismDepositTx) accessList() AccessList { return nil }
func (d *OptimismDepositTx) data() []byte { return nil }
func (d *OptimismDepositTx) gas() uint64 { return 0 }
func (d *OptimismDepositTx) gasPrice() *big.Int { return bigZero }
func (d *OptimismDepositTx) gasTipCap() *big.Int { return bigZero }
func (d *OptimismDepositTx) gasFeeCap() *big.Int { return bigZero }
func (d *OptimismDepositTx) value() *big.Int { return d.Value }
func (d *OptimismDepositTx) nonce() uint64 { return 0 }
func (d *OptimismDepositTx) to() *common.Address { return &d.To }
func (d *OptimismDepositTx) isFake() bool { return true }
func (d *OptimismDepositTx) rawSignatureValues() (v, r, s *big.Int) {
return bigZero, bigZero, bigZero
}
func (d *OptimismDepositTx) setSignatureValues(chainID, v, r, s *big.Int) {
}

View File

@ -52,6 +52,7 @@ const (
ArbitrumSubmitRetryableTxType = 105
ArbitrumInternalTxType = 106
ArbitrumLegacyTxType = 120
OptimismDepositTxType = 126
)
// Transaction is an Ethereum transaction.

View File

@ -624,7 +624,15 @@ func (t *Transaction) UnmarshalJSON(input []byte) error {
FeeRefundAddr: *dec.RefundTo,
RetryData: *dec.RetryData,
}
case OptimismDepositTxType:
inner = &OptimismDepositTx{
ChainID: big.NewInt(0),
From: *dec.From,
To: *dec.To,
Mint: new(big.Int),
Value: (*big.Int)(dec.Value),
Data: *dec.Data,
}
default:
return ErrTxTypeNotSupported
}

2
vendor/modules.txt vendored
View File

@ -187,7 +187,7 @@ github.com/edsrzf/mmap-go
## explicit; go 1.14
github.com/elastic/gosigar
github.com/elastic/gosigar/sys/windows
# github.com/ethereum/go-ethereum v1.10.26 => github.com/status-im/go-ethereum v1.10.25-status.3
# github.com/ethereum/go-ethereum v1.10.26 => github.com/status-im/go-ethereum v1.10.25-status.4
## explicit; go 1.17
github.com/ethereum/go-ethereum
github.com/ethereum/go-ethereum/accounts