@@ -82,7 +82,7 @@ type Message interface {
8282 IsFake () bool
8383 Data () []byte
8484 AccessList () types.AccessList
85- AuthList () []types.Authorization
85+ SetCodeAuthorizations () []types.SetCodeAuthorization
8686
8787 // In legacy transaction, this is the same as From.
8888 // In sponsored transaction, this is the payer's
@@ -131,7 +131,7 @@ func (result *ExecutionResult) Revert() []byte {
131131}
132132
133133// IntrinsicGas computes the 'intrinsic gas' for a message with the given data.
134- func IntrinsicGas (data []byte , accessList types.AccessList , authList []types.Authorization , isContractCreation , isHomestead , isEIP2028 , isEIP3860 bool ) (uint64 , error ) {
134+ func IntrinsicGas (data []byte , accessList types.AccessList , authList []types.SetCodeAuthorization , isContractCreation , isHomestead , isEIP2028 , isEIP3860 bool ) (uint64 , error ) {
135135 // Set the starting gas for the raw transaction
136136 var gas uint64
137137 if isContractCreation && isHomestead {
@@ -397,11 +397,11 @@ func (st *StateTransition) preCheck() error {
397397 }
398398
399399 // Check that EIP-7702 authorization list signatures are well formed.
400- if msg .AuthList () != nil {
400+ if msg .SetCodeAuthorizations () != nil {
401401 if msg .To () == nil {
402402 return fmt .Errorf ("%w (sender %v)" , ErrSetCodeTxCreate , msg .From ())
403403 }
404- if len (msg .AuthList ()) == 0 {
404+ if len (msg .SetCodeAuthorizations ()) == 0 {
405405 return fmt .Errorf ("%w (sender %v)" , ErrEmptyAuthList , msg .From ())
406406 }
407407 }
@@ -458,7 +458,7 @@ func (st *StateTransition) TransitionDb() (*ExecutionResult, error) {
458458
459459 // Check clauses 4-5, subtract intrinsic gas if everything is correct
460460 if ! st .evm .Config .IsSystemTransaction {
461- gas , err := IntrinsicGas (st .data , st .msg .AccessList (), st .msg .AuthList (), contractCreation , rules .IsHomestead , rules .IsIstanbul , rules .IsShanghai )
461+ gas , err := IntrinsicGas (st .data , st .msg .AccessList (), st .msg .SetCodeAuthorizations (), contractCreation , rules .IsHomestead , rules .IsIstanbul , rules .IsShanghai )
462462 if err != nil {
463463 return nil , err
464464 }
@@ -494,8 +494,8 @@ func (st *StateTransition) TransitionDb() (*ExecutionResult, error) {
494494 st .state .SetNonce (msg .From (), st .state .GetNonce (msg .From ())+ 1 )
495495
496496 // Apply EIP-7702 authorizations.
497- if msg .AuthList () != nil {
498- for _ , auth := range msg .AuthList () {
497+ if msg .SetCodeAuthorizations () != nil {
498+ for _ , auth := range msg .SetCodeAuthorizations () {
499499 // Note errors are ignored, we simply skip invalid authorizations here.
500500 st .applyAuthorization (& auth )
501501 }
@@ -556,7 +556,7 @@ func (st *StateTransition) TransitionDb() (*ExecutionResult, error) {
556556}
557557
558558// validateAuthorization validates an EIP-7702 authorization against the state.
559- func (st * StateTransition ) validateAuthorization (auth * types.Authorization ) (authority common.Address , err error ) {
559+ func (st * StateTransition ) validateAuthorization (auth * types.SetCodeAuthorization ) (authority common.Address , err error ) {
560560 // Verify chain ID is 0 or equal to current chain ID.
561561 if auth .ChainID != 0 && st .evm .ChainConfig ().ChainID .Uint64 () != auth .ChainID {
562562 return authority , ErrAuthorizationWrongChainID
@@ -587,7 +587,7 @@ func (st *StateTransition) validateAuthorization(auth *types.Authorization) (aut
587587}
588588
589589// applyAuthorization applies an EIP-7702 code delegation to the state.
590- func (st * StateTransition ) applyAuthorization (auth * types.Authorization ) error {
590+ func (st * StateTransition ) applyAuthorization (auth * types.SetCodeAuthorization ) error {
591591 authority , err := st .validateAuthorization (auth )
592592 if err != nil {
593593 return err
0 commit comments