mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-15 17:30:44 +00:00
parent
510be504ef
commit
e2da8daab4
9 changed files with 86 additions and 92 deletions
|
|
@ -91,7 +91,7 @@ func TestStateProcessorErrors(t *testing.T) {
|
||||||
}), signer, key1)
|
}), signer, key1)
|
||||||
return tx
|
return tx
|
||||||
}
|
}
|
||||||
var mkSetCodeTx = func(nonce uint64, to common.Address, gasLimit uint64, gasTipCap, gasFeeCap *big.Int, authlist []types.Authorization) *types.Transaction {
|
var mkSetCodeTx = func(nonce uint64, to common.Address, gasLimit uint64, gasTipCap, gasFeeCap *big.Int, authlist []types.SetCodeAuthorization) *types.Transaction {
|
||||||
tx, err := types.SignTx(types.NewTx(&types.SetCodeTx{
|
tx, err := types.SignTx(types.NewTx(&types.SetCodeTx{
|
||||||
Nonce: nonce,
|
Nonce: nonce,
|
||||||
GasTipCap: uint256.MustFromBig(gasTipCap),
|
GasTipCap: uint256.MustFromBig(gasTipCap),
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ func (result *ExecutionResult) Revert() []byte {
|
||||||
}
|
}
|
||||||
|
|
||||||
// IntrinsicGas computes the 'intrinsic gas' for a message with the given data.
|
// IntrinsicGas computes the 'intrinsic gas' for a message with the given data.
|
||||||
func IntrinsicGas(data []byte, accessList types.AccessList, authList []types.Authorization, isContractCreation, isHomestead bool, isEIP3860 bool) (uint64, error) {
|
func IntrinsicGas(data []byte, accessList types.AccessList, authList []types.SetCodeAuthorization, isContractCreation, isHomestead bool, isEIP3860 bool) (uint64, error) {
|
||||||
// Set the starting gas for the raw transaction
|
// Set the starting gas for the raw transaction
|
||||||
var gas uint64
|
var gas uint64
|
||||||
if isContractCreation && isHomestead {
|
if isContractCreation && isHomestead {
|
||||||
|
|
@ -130,7 +130,7 @@ type Message struct {
|
||||||
BalanceTokenFee *big.Int
|
BalanceTokenFee *big.Int
|
||||||
Data []byte
|
Data []byte
|
||||||
AccessList types.AccessList
|
AccessList types.AccessList
|
||||||
AuthList []types.Authorization
|
AuthList []types.SetCodeAuthorization
|
||||||
|
|
||||||
// When SkipNonceChecks is true, the message nonce is not checked against the
|
// When SkipNonceChecks is true, the message nonce is not checked against the
|
||||||
// account nonce in state.
|
// account nonce in state.
|
||||||
|
|
@ -483,7 +483,7 @@ func (st *StateTransition) TransitionDb(owner common.Address) (*ExecutionResult,
|
||||||
}
|
}
|
||||||
|
|
||||||
// validateAuthorization validates an EIP-7702 authorization against the state.
|
// validateAuthorization validates an EIP-7702 authorization against the state.
|
||||||
func (st *StateTransition) validateAuthorization(auth *types.Authorization) (authority common.Address, err error) {
|
func (st *StateTransition) validateAuthorization(auth *types.SetCodeAuthorization) (authority common.Address, err error) {
|
||||||
// Verify chain ID is 0 or equal to current chain ID.
|
// Verify chain ID is 0 or equal to current chain ID.
|
||||||
if auth.ChainID != 0 && st.evm.ChainConfig().ChainID.Uint64() != auth.ChainID {
|
if auth.ChainID != 0 && st.evm.ChainConfig().ChainID.Uint64() != auth.ChainID {
|
||||||
return authority, ErrAuthorizationWrongChainID
|
return authority, ErrAuthorizationWrongChainID
|
||||||
|
|
@ -514,7 +514,7 @@ func (st *StateTransition) validateAuthorization(auth *types.Authorization) (aut
|
||||||
}
|
}
|
||||||
|
|
||||||
// applyAuthorization applies an EIP-7702 code delegation to the state.
|
// applyAuthorization applies an EIP-7702 code delegation to the state.
|
||||||
func (st *StateTransition) applyAuthorization(msg *Message, auth *types.Authorization) error {
|
func (st *StateTransition) applyAuthorization(msg *Message, auth *types.SetCodeAuthorization) error {
|
||||||
authority, err := st.validateAuthorization(auth)
|
authority, err := st.validateAuthorization(auth)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,8 @@ import (
|
||||||
var _ = (*authorizationMarshaling)(nil)
|
var _ = (*authorizationMarshaling)(nil)
|
||||||
|
|
||||||
// MarshalJSON marshals as JSON.
|
// MarshalJSON marshals as JSON.
|
||||||
func (a Authorization) MarshalJSON() ([]byte, error) {
|
func (s SetCodeAuthorization) MarshalJSON() ([]byte, error) {
|
||||||
type Authorization struct {
|
type SetCodeAuthorization struct {
|
||||||
ChainID hexutil.Uint64 `json:"chainId" gencodec:"required"`
|
ChainID hexutil.Uint64 `json:"chainId" gencodec:"required"`
|
||||||
Address common.Address `json:"address" gencodec:"required"`
|
Address common.Address `json:"address" gencodec:"required"`
|
||||||
Nonce hexutil.Uint64 `json:"nonce" gencodec:"required"`
|
Nonce hexutil.Uint64 `json:"nonce" gencodec:"required"`
|
||||||
|
|
@ -23,19 +23,19 @@ func (a Authorization) MarshalJSON() ([]byte, error) {
|
||||||
R hexutil.U256 `json:"r" gencodec:"required"`
|
R hexutil.U256 `json:"r" gencodec:"required"`
|
||||||
S hexutil.U256 `json:"s" gencodec:"required"`
|
S hexutil.U256 `json:"s" gencodec:"required"`
|
||||||
}
|
}
|
||||||
var enc Authorization
|
var enc SetCodeAuthorization
|
||||||
enc.ChainID = hexutil.Uint64(a.ChainID)
|
enc.ChainID = hexutil.Uint64(s.ChainID)
|
||||||
enc.Address = a.Address
|
enc.Address = s.Address
|
||||||
enc.Nonce = hexutil.Uint64(a.Nonce)
|
enc.Nonce = hexutil.Uint64(s.Nonce)
|
||||||
enc.V = hexutil.Uint64(a.V)
|
enc.V = hexutil.Uint64(s.V)
|
||||||
enc.R = hexutil.U256(a.R)
|
enc.R = hexutil.U256(s.R)
|
||||||
enc.S = hexutil.U256(a.S)
|
enc.S = hexutil.U256(s.S)
|
||||||
return json.Marshal(&enc)
|
return json.Marshal(&enc)
|
||||||
}
|
}
|
||||||
|
|
||||||
// UnmarshalJSON unmarshals from JSON.
|
// UnmarshalJSON unmarshals from JSON.
|
||||||
func (a *Authorization) UnmarshalJSON(input []byte) error {
|
func (s *SetCodeAuthorization) UnmarshalJSON(input []byte) error {
|
||||||
type Authorization struct {
|
type SetCodeAuthorization struct {
|
||||||
ChainID *hexutil.Uint64 `json:"chainId" gencodec:"required"`
|
ChainID *hexutil.Uint64 `json:"chainId" gencodec:"required"`
|
||||||
Address *common.Address `json:"address" gencodec:"required"`
|
Address *common.Address `json:"address" gencodec:"required"`
|
||||||
Nonce *hexutil.Uint64 `json:"nonce" gencodec:"required"`
|
Nonce *hexutil.Uint64 `json:"nonce" gencodec:"required"`
|
||||||
|
|
@ -43,33 +43,33 @@ func (a *Authorization) UnmarshalJSON(input []byte) error {
|
||||||
R *hexutil.U256 `json:"r" gencodec:"required"`
|
R *hexutil.U256 `json:"r" gencodec:"required"`
|
||||||
S *hexutil.U256 `json:"s" gencodec:"required"`
|
S *hexutil.U256 `json:"s" gencodec:"required"`
|
||||||
}
|
}
|
||||||
var dec Authorization
|
var dec SetCodeAuthorization
|
||||||
if err := json.Unmarshal(input, &dec); err != nil {
|
if err := json.Unmarshal(input, &dec); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if dec.ChainID == nil {
|
if dec.ChainID == nil {
|
||||||
return errors.New("missing required field 'chainId' for Authorization")
|
return errors.New("missing required field 'chainId' for SetCodeAuthorization")
|
||||||
}
|
}
|
||||||
a.ChainID = uint64(*dec.ChainID)
|
s.ChainID = uint64(*dec.ChainID)
|
||||||
if dec.Address == nil {
|
if dec.Address == nil {
|
||||||
return errors.New("missing required field 'address' for Authorization")
|
return errors.New("missing required field 'address' for SetCodeAuthorization")
|
||||||
}
|
}
|
||||||
a.Address = *dec.Address
|
s.Address = *dec.Address
|
||||||
if dec.Nonce == nil {
|
if dec.Nonce == nil {
|
||||||
return errors.New("missing required field 'nonce' for Authorization")
|
return errors.New("missing required field 'nonce' for SetCodeAuthorization")
|
||||||
}
|
}
|
||||||
a.Nonce = uint64(*dec.Nonce)
|
s.Nonce = uint64(*dec.Nonce)
|
||||||
if dec.V == nil {
|
if dec.V == nil {
|
||||||
return errors.New("missing required field 'v' for Authorization")
|
return errors.New("missing required field 'v' for SetCodeAuthorization")
|
||||||
}
|
}
|
||||||
a.V = uint8(*dec.V)
|
s.V = uint8(*dec.V)
|
||||||
if dec.R == nil {
|
if dec.R == nil {
|
||||||
return errors.New("missing required field 'r' for Authorization")
|
return errors.New("missing required field 'r' for SetCodeAuthorization")
|
||||||
}
|
}
|
||||||
a.R = uint256.Int(*dec.R)
|
s.R = uint256.Int(*dec.R)
|
||||||
if dec.S == nil {
|
if dec.S == nil {
|
||||||
return errors.New("missing required field 's' for Authorization")
|
return errors.New("missing required field 's' for SetCodeAuthorization")
|
||||||
}
|
}
|
||||||
a.S = uint256.Int(*dec.S)
|
s.S = uint256.Int(*dec.S)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -393,7 +393,7 @@ func (tx *Transaction) EffectiveGasTipIntCmp(other *big.Int, baseFee *big.Int) i
|
||||||
}
|
}
|
||||||
|
|
||||||
// AuthList returns the authorizations list of the transaction.
|
// AuthList returns the authorizations list of the transaction.
|
||||||
func (tx *Transaction) AuthList() []Authorization {
|
func (tx *Transaction) AuthList() []SetCodeAuthorization {
|
||||||
setcodetx, ok := tx.inner.(*SetCodeTx)
|
setcodetx, ok := tx.inner.(*SetCodeTx)
|
||||||
if !ok {
|
if !ok {
|
||||||
return nil
|
return nil
|
||||||
|
|
|
||||||
|
|
@ -30,21 +30,21 @@ import (
|
||||||
type txJSON struct {
|
type txJSON struct {
|
||||||
Type hexutil.Uint64 `json:"type"`
|
Type hexutil.Uint64 `json:"type"`
|
||||||
|
|
||||||
ChainID *hexutil.Big `json:"chainId,omitempty"`
|
ChainID *hexutil.Big `json:"chainId,omitempty"`
|
||||||
Nonce *hexutil.Uint64 `json:"nonce"`
|
Nonce *hexutil.Uint64 `json:"nonce"`
|
||||||
To *common.Address `json:"to"`
|
To *common.Address `json:"to"`
|
||||||
Gas *hexutil.Uint64 `json:"gas"`
|
Gas *hexutil.Uint64 `json:"gas"`
|
||||||
GasPrice *hexutil.Big `json:"gasPrice"`
|
GasPrice *hexutil.Big `json:"gasPrice"`
|
||||||
MaxPriorityFeePerGas *hexutil.Big `json:"maxPriorityFeePerGas"`
|
MaxPriorityFeePerGas *hexutil.Big `json:"maxPriorityFeePerGas"`
|
||||||
MaxFeePerGas *hexutil.Big `json:"maxFeePerGas"`
|
MaxFeePerGas *hexutil.Big `json:"maxFeePerGas"`
|
||||||
Value *hexutil.Big `json:"value"`
|
Value *hexutil.Big `json:"value"`
|
||||||
Input *hexutil.Bytes `json:"input"`
|
Input *hexutil.Bytes `json:"input"`
|
||||||
AccessList *AccessList `json:"accessList,omitempty"`
|
AccessList *AccessList `json:"accessList,omitempty"`
|
||||||
AuthorizationList []Authorization `json:"authorizationList,omitempty"`
|
AuthorizationList []SetCodeAuthorization `json:"authorizationList,omitempty"`
|
||||||
V *hexutil.Big `json:"v"`
|
V *hexutil.Big `json:"v"`
|
||||||
R *hexutil.Big `json:"r"`
|
R *hexutil.Big `json:"r"`
|
||||||
S *hexutil.Big `json:"s"`
|
S *hexutil.Big `json:"s"`
|
||||||
YParity *hexutil.Uint64 `json:"yParity,omitempty"`
|
YParity *hexutil.Uint64 `json:"yParity,omitempty"`
|
||||||
|
|
||||||
// Only used for encoding:
|
// Only used for encoding:
|
||||||
Hash common.Hash `json:"hash"`
|
Hash common.Hash `json:"hash"`
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ type SetCodeTx struct {
|
||||||
Value *uint256.Int
|
Value *uint256.Int
|
||||||
Data []byte
|
Data []byte
|
||||||
AccessList AccessList
|
AccessList AccessList
|
||||||
AuthList []Authorization
|
AuthList []SetCodeAuthorization
|
||||||
|
|
||||||
// Signature values
|
// Signature values
|
||||||
V *uint256.Int `json:"v" gencodec:"required"`
|
V *uint256.Int `json:"v" gencodec:"required"`
|
||||||
|
|
@ -66,10 +66,10 @@ type SetCodeTx struct {
|
||||||
S *uint256.Int `json:"s" gencodec:"required"`
|
S *uint256.Int `json:"s" gencodec:"required"`
|
||||||
}
|
}
|
||||||
|
|
||||||
//go:generate go run github.com/fjl/gencodec -type Authorization -field-override authorizationMarshaling -out gen_authorization.go
|
//go:generate go run github.com/fjl/gencodec -type SetCodeAuthorization -field-override authorizationMarshaling -out gen_authorization.go
|
||||||
|
|
||||||
// Authorization is an authorization from an account to deploy code at its address.
|
// SetCodeAuthorization is an authorization from an account to deploy code at its address.
|
||||||
type Authorization struct {
|
type SetCodeAuthorization struct {
|
||||||
ChainID uint64 `json:"chainId" gencodec:"required"`
|
ChainID uint64 `json:"chainId" gencodec:"required"`
|
||||||
Address common.Address `json:"address" gencodec:"required"`
|
Address common.Address `json:"address" gencodec:"required"`
|
||||||
Nonce uint64 `json:"nonce" gencodec:"required"`
|
Nonce uint64 `json:"nonce" gencodec:"required"`
|
||||||
|
|
@ -87,31 +87,25 @@ type authorizationMarshaling struct {
|
||||||
S hexutil.U256
|
S hexutil.U256
|
||||||
}
|
}
|
||||||
|
|
||||||
// SignAuth signs the provided authorization.
|
// SignSetCode creates a signed SetCode authorization.
|
||||||
func SignAuth(auth Authorization, prv *ecdsa.PrivateKey) (Authorization, error) {
|
func SignSetCode(auth SetCodeAuthorization, prv *ecdsa.PrivateKey) (SetCodeAuthorization, error) {
|
||||||
sighash := auth.sigHash()
|
sighash := auth.sigHash()
|
||||||
sig, err := crypto.Sign(sighash[:], prv)
|
sig, err := crypto.Sign(sighash[:], prv)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return Authorization{}, err
|
return SetCodeAuthorization{}, err
|
||||||
}
|
}
|
||||||
return auth.withSignature(sig), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// withSignature updates the signature of an Authorization to be equal the
|
|
||||||
// decoded signature provided in sig.
|
|
||||||
func (a *Authorization) withSignature(sig []byte) Authorization {
|
|
||||||
r, s, _ := decodeSignature(sig)
|
r, s, _ := decodeSignature(sig)
|
||||||
return Authorization{
|
return SetCodeAuthorization{
|
||||||
ChainID: a.ChainID,
|
ChainID: auth.ChainID,
|
||||||
Address: a.Address,
|
Address: auth.Address,
|
||||||
Nonce: a.Nonce,
|
Nonce: auth.Nonce,
|
||||||
V: sig[64],
|
V: sig[64],
|
||||||
R: *uint256.MustFromBig(r),
|
R: *uint256.MustFromBig(r),
|
||||||
S: *uint256.MustFromBig(s),
|
S: *uint256.MustFromBig(s),
|
||||||
}
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *Authorization) sigHash() common.Hash {
|
func (a *SetCodeAuthorization) sigHash() common.Hash {
|
||||||
return prefixedRlpHash(0x05, []any{
|
return prefixedRlpHash(0x05, []any{
|
||||||
a.ChainID,
|
a.ChainID,
|
||||||
a.Address,
|
a.Address,
|
||||||
|
|
@ -120,7 +114,7 @@ func (a *Authorization) sigHash() common.Hash {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Authority recovers the authorizing account of an authorization.
|
// Authority recovers the authorizing account of an authorization.
|
||||||
func (a *Authorization) Authority() (common.Address, error) {
|
func (a *SetCodeAuthorization) Authority() (common.Address, error) {
|
||||||
sighash := a.sigHash()
|
sighash := a.sigHash()
|
||||||
if !crypto.ValidateSignatureValues(a.V, a.R.ToBig(), a.S.ToBig(), true) {
|
if !crypto.ValidateSignatureValues(a.V, a.R.ToBig(), a.S.ToBig(), true) {
|
||||||
return common.Address{}, ErrInvalidSig
|
return common.Address{}, ErrInvalidSig
|
||||||
|
|
@ -152,7 +146,7 @@ func (tx *SetCodeTx) copy() TxData {
|
||||||
Gas: tx.Gas,
|
Gas: tx.Gas,
|
||||||
// These are copied below.
|
// These are copied below.
|
||||||
AccessList: make(AccessList, len(tx.AccessList)),
|
AccessList: make(AccessList, len(tx.AccessList)),
|
||||||
AuthList: make([]Authorization, len(tx.AuthList)),
|
AuthList: make([]SetCodeAuthorization, len(tx.AuthList)),
|
||||||
Value: new(uint256.Int),
|
Value: new(uint256.Int),
|
||||||
ChainID: tx.ChainID,
|
ChainID: tx.ChainID,
|
||||||
GasTipCap: new(uint256.Int),
|
GasTipCap: new(uint256.Int),
|
||||||
|
|
|
||||||
|
|
@ -1654,27 +1654,27 @@ func (api *BlockChainAPI) rpcOutputBlockSigners(b *types.Block, ctx context.Cont
|
||||||
|
|
||||||
// RPCTransaction represents a transaction that will serialize to the RPC representation of a transaction
|
// RPCTransaction represents a transaction that will serialize to the RPC representation of a transaction
|
||||||
type RPCTransaction struct {
|
type RPCTransaction struct {
|
||||||
BlockHash *common.Hash `json:"blockHash"`
|
BlockHash *common.Hash `json:"blockHash"`
|
||||||
BlockNumber *hexutil.Big `json:"blockNumber"`
|
BlockNumber *hexutil.Big `json:"blockNumber"`
|
||||||
From common.Address `json:"from"`
|
From common.Address `json:"from"`
|
||||||
Gas hexutil.Uint64 `json:"gas"`
|
Gas hexutil.Uint64 `json:"gas"`
|
||||||
GasPrice *hexutil.Big `json:"gasPrice"`
|
GasPrice *hexutil.Big `json:"gasPrice"`
|
||||||
GasFeeCap *hexutil.Big `json:"maxFeePerGas,omitempty"`
|
GasFeeCap *hexutil.Big `json:"maxFeePerGas,omitempty"`
|
||||||
GasTipCap *hexutil.Big `json:"maxPriorityFeePerGas,omitempty"`
|
GasTipCap *hexutil.Big `json:"maxPriorityFeePerGas,omitempty"`
|
||||||
Hash common.Hash `json:"hash"`
|
Hash common.Hash `json:"hash"`
|
||||||
Input hexutil.Bytes `json:"input"`
|
Input hexutil.Bytes `json:"input"`
|
||||||
Nonce hexutil.Uint64 `json:"nonce"`
|
Nonce hexutil.Uint64 `json:"nonce"`
|
||||||
To *common.Address `json:"to"`
|
To *common.Address `json:"to"`
|
||||||
TransactionIndex *hexutil.Uint64 `json:"transactionIndex"`
|
TransactionIndex *hexutil.Uint64 `json:"transactionIndex"`
|
||||||
Value *hexutil.Big `json:"value"`
|
Value *hexutil.Big `json:"value"`
|
||||||
Type hexutil.Uint64 `json:"type"`
|
Type hexutil.Uint64 `json:"type"`
|
||||||
Accesses *types.AccessList `json:"accessList,omitempty"`
|
Accesses *types.AccessList `json:"accessList,omitempty"`
|
||||||
ChainID *hexutil.Big `json:"chainId,omitempty"`
|
ChainID *hexutil.Big `json:"chainId,omitempty"`
|
||||||
AuthorizationList []types.Authorization `json:"authorizationList,omitempty"`
|
AuthorizationList []types.SetCodeAuthorization `json:"authorizationList,omitempty"`
|
||||||
V *hexutil.Big `json:"v"`
|
V *hexutil.Big `json:"v"`
|
||||||
R *hexutil.Big `json:"r"`
|
R *hexutil.Big `json:"r"`
|
||||||
S *hexutil.Big `json:"s"`
|
S *hexutil.Big `json:"s"`
|
||||||
YParity *hexutil.Uint64 `json:"yParity,omitempty"`
|
YParity *hexutil.Uint64 `json:"yParity,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// newRPCTransaction returns a transaction that will serialize to the RPC
|
// newRPCTransaction returns a transaction that will serialize to the RPC
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ type TransactionArgs struct {
|
||||||
ChainID *hexutil.Big `json:"chainId,omitempty"`
|
ChainID *hexutil.Big `json:"chainId,omitempty"`
|
||||||
|
|
||||||
// For SetCodeTxType
|
// For SetCodeTxType
|
||||||
AuthorizationList []types.Authorization `json:"authorizationList"`
|
AuthorizationList []types.SetCodeAuthorization `json:"authorizationList"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// from retrieves the transaction sender address.
|
// from retrieves the transaction sender address.
|
||||||
|
|
@ -373,7 +373,7 @@ func (args *TransactionArgs) ToTransaction(defaultType int) *types.Transaction {
|
||||||
if args.AccessList != nil {
|
if args.AccessList != nil {
|
||||||
al = *args.AccessList
|
al = *args.AccessList
|
||||||
}
|
}
|
||||||
authList := []types.Authorization{}
|
authList := []types.SetCodeAuthorization{}
|
||||||
if args.AuthorizationList != nil {
|
if args.AuthorizationList != nil {
|
||||||
authList = args.AuthorizationList
|
authList = args.AuthorizationList
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -307,11 +307,11 @@ func (tx *stTransaction) toMessage(ps stPostState, baseFee *big.Int) (*core.Mess
|
||||||
if gasPrice == nil {
|
if gasPrice == nil {
|
||||||
return nil, errors.New("no gas price provided")
|
return nil, errors.New("no gas price provided")
|
||||||
}
|
}
|
||||||
var authList []types.Authorization
|
var authList []types.SetCodeAuthorization
|
||||||
if tx.AuthorizationList != nil {
|
if tx.AuthorizationList != nil {
|
||||||
authList = make([]types.Authorization, len(tx.AuthorizationList))
|
authList = make([]types.SetCodeAuthorization, len(tx.AuthorizationList))
|
||||||
for i, auth := range tx.AuthorizationList {
|
for i, auth := range tx.AuthorizationList {
|
||||||
authList[i] = types.Authorization{
|
authList[i] = types.SetCodeAuthorization{
|
||||||
ChainID: auth.ChainID,
|
ChainID: auth.ChainID,
|
||||||
Address: auth.Address,
|
Address: auth.Address,
|
||||||
Nonce: auth.Nonce,
|
Nonce: auth.Nonce,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue