Test Function: test_gas_cost()

Test gas at the execution start of a set-code transaction in multiple scenarios.

Parametrized Test Cases

Test ID authorize_to_address signer_type authorization_invalidity_type authorizations_count chain_id_type access_list_case self_sponsored re_authorize authority_type data
single_valid_authorization_single_signer AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER None 1 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EMPTY_ACCOUNT
single_valid_chain_specific_authorization_single_signer AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER None 1 ChainIDType.CHAIN_SPECIFIC AccessListType.EMPTY False False AddressType.EMPTY_ACCOUNT
multiple_valid_authorizations_single_signer AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER None 2 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EMPTY_ACCOUNT
single_invalid_nonce_authorization_single_signer AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER AuthorizationInvalidityType.INVALID_NONCE 1 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EMPTY_ACCOUNT
single_invalid_authorization_invalid_chain_id_single_signer AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER AuthorizationInvalidityType.INVALID_CHAIN_ID 1 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EMPTY_ACCOUNT
multiple_invalid_nonce_authorizations_single_signer AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER AuthorizationInvalidityType.INVALID_NONCE 2 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EMPTY_ACCOUNT
multiple_invalid_nonce_authorizations_multiple_signers AddressType.EMPTY_ACCOUNT SignerType.MULTIPLE_SIGNERS AuthorizationInvalidityType.INVALID_NONCE 2 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EMPTY_ACCOUNT
multiple_invalid_chain_id_authorizations_single_signer AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER AuthorizationInvalidityType.INVALID_CHAIN_ID 2 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EMPTY_ACCOUNT
multiple_valid_authorizations_multiple_signers AddressType.EMPTY_ACCOUNT SignerType.MULTIPLE_SIGNERS None 2 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EMPTY_ACCOUNT
first_valid_then_single_repeated_nonce_authorization AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER AuthorizationInvalidityType.REPEATED_NONCE 2 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EMPTY_ACCOUNT
first_valid_then_single_repeated_nonce_authorizations_multiple_signers AddressType.EMPTY_ACCOUNT SignerType.MULTIPLE_SIGNERS AuthorizationInvalidityType.REPEATED_NONCE 4 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EMPTY_ACCOUNT
single_valid_authorization_to_eoa AddressType.EOA SignerType.SINGLE_SIGNER None 1 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EMPTY_ACCOUNT
single_valid_authorization_to_contract AddressType.CONTRACT SignerType.SINGLE_SIGNER None 1 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EMPTY_ACCOUNT
single_valid_authorization_with_authority_in_access_list AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER None 1 ChainIDType.GENERIC AccessListType.CONTAINS_AUTHORITY False False AddressType.EMPTY_ACCOUNT
single_valid_authorization_with_set_code_address_in_access_list AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER None 1 ChainIDType.GENERIC AccessListType.CONTAINS_SET_CODE_ADDRESS False False AddressType.EMPTY_ACCOUNT
single_valid_authorization_with_authority_and_set_code_address_in_access_list AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER None 1 ChainIDType.GENERIC AccessListType.CONTAINS_AUTHORITY_AND_SET_CODE_ADDRESS False False AddressType.EMPTY_ACCOUNT
single_valid_authorization_eoa_authority AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER None 1 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EOA
single_valid_re_authorization_eoa_authority AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER None 1 ChainIDType.GENERIC AccessListType.EMPTY False True AddressType.EOA_WITH_SET_CODE
multiple_valid_authorizations_eoa_authority AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER None 2 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EOA
single_valid_authorization_eoa_self_sponsored_authority AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER None 1 ChainIDType.GENERIC AccessListType.EMPTY True False AddressType.EOA
multiple_valid_authorizations_eoa_self_sponsored_authority AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER None 2 ChainIDType.GENERIC AccessListType.EMPTY True False AddressType.EOA
single_valid_authorization_invalid_contract_authority AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER None 1 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.CONTRACT
multiple_authorizations_empty_account_then_contract_authority AddressType.EMPTY_ACCOUNT SignerType.MULTIPLE_SIGNERS None 2 ChainIDType.GENERIC AccessListType.EMPTY False False [, ]
multiple_authorizations_eoa_then_contract_authority AddressType.EMPTY_ACCOUNT SignerType.MULTIPLE_SIGNERS None 2 ChainIDType.GENERIC AccessListType.EMPTY False False [, ]
multiple_authorizations_eoa_self_sponsored_then_contract_authority AddressType.EMPTY_ACCOUNT SignerType.MULTIPLE_SIGNERS None 2 ChainIDType.GENERIC AccessListType.EMPTY True False [, ]
single_valid_authorization_with_single_non_zero_byte_data AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER None 1 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EMPTY_ACCOUNT 01
single_valid_authorization_with_single_zero_byte_data AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER None 1 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EMPTY_ACCOUNT 00
many_valid_authorizations_single_signer AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER None 5000 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EMPTY_ACCOUNT
many_valid_authorizations_multiple_signers AddressType.EMPTY_ACCOUNT SignerType.MULTIPLE_SIGNERS None 5000 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EMPTY_ACCOUNT
first_valid_then_many_duplicate_authorizations AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER AuthorizationInvalidityType.REPEATED_NONCE 5000 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EMPTY_ACCOUNT
single_valid_authorization_single_signer AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER None 1 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EMPTY_ACCOUNT
single_valid_chain_specific_authorization_single_signer AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER None 1 ChainIDType.CHAIN_SPECIFIC AccessListType.EMPTY False False AddressType.EMPTY_ACCOUNT
multiple_valid_authorizations_single_signer AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER None 2 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EMPTY_ACCOUNT
single_invalid_nonce_authorization_single_signer AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER AuthorizationInvalidityType.INVALID_NONCE 1 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EMPTY_ACCOUNT
single_invalid_authorization_invalid_chain_id_single_signer AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER AuthorizationInvalidityType.INVALID_CHAIN_ID 1 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EMPTY_ACCOUNT
multiple_invalid_nonce_authorizations_single_signer AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER AuthorizationInvalidityType.INVALID_NONCE 2 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EMPTY_ACCOUNT
multiple_invalid_nonce_authorizations_multiple_signers AddressType.EMPTY_ACCOUNT SignerType.MULTIPLE_SIGNERS AuthorizationInvalidityType.INVALID_NONCE 2 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EMPTY_ACCOUNT
multiple_invalid_chain_id_authorizations_single_signer AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER AuthorizationInvalidityType.INVALID_CHAIN_ID 2 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EMPTY_ACCOUNT
multiple_valid_authorizations_multiple_signers AddressType.EMPTY_ACCOUNT SignerType.MULTIPLE_SIGNERS None 2 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EMPTY_ACCOUNT
first_valid_then_single_repeated_nonce_authorization AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER AuthorizationInvalidityType.REPEATED_NONCE 2 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EMPTY_ACCOUNT
first_valid_then_single_repeated_nonce_authorizations_multiple_signers AddressType.EMPTY_ACCOUNT SignerType.MULTIPLE_SIGNERS AuthorizationInvalidityType.REPEATED_NONCE 4 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EMPTY_ACCOUNT
single_valid_authorization_to_eoa AddressType.EOA SignerType.SINGLE_SIGNER None 1 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EMPTY_ACCOUNT
single_valid_authorization_to_contract AddressType.CONTRACT SignerType.SINGLE_SIGNER None 1 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EMPTY_ACCOUNT
single_valid_authorization_with_authority_in_access_list AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER None 1 ChainIDType.GENERIC AccessListType.CONTAINS_AUTHORITY False False AddressType.EMPTY_ACCOUNT
single_valid_authorization_with_set_code_address_in_access_list AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER None 1 ChainIDType.GENERIC AccessListType.CONTAINS_SET_CODE_ADDRESS False False AddressType.EMPTY_ACCOUNT
single_valid_authorization_with_authority_and_set_code_address_in_access_list AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER None 1 ChainIDType.GENERIC AccessListType.CONTAINS_AUTHORITY_AND_SET_CODE_ADDRESS False False AddressType.EMPTY_ACCOUNT
single_valid_authorization_eoa_authority AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER None 1 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EOA
single_valid_re_authorization_eoa_authority AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER None 1 ChainIDType.GENERIC AccessListType.EMPTY False True AddressType.EOA_WITH_SET_CODE
multiple_valid_authorizations_eoa_authority AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER None 2 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EOA
single_valid_authorization_eoa_self_sponsored_authority AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER None 1 ChainIDType.GENERIC AccessListType.EMPTY True False AddressType.EOA
multiple_valid_authorizations_eoa_self_sponsored_authority AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER None 2 ChainIDType.GENERIC AccessListType.EMPTY True False AddressType.EOA
single_valid_authorization_invalid_contract_authority AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER None 1 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.CONTRACT
multiple_authorizations_empty_account_then_contract_authority AddressType.EMPTY_ACCOUNT SignerType.MULTIPLE_SIGNERS None 2 ChainIDType.GENERIC AccessListType.EMPTY False False [, ]
multiple_authorizations_eoa_then_contract_authority AddressType.EMPTY_ACCOUNT SignerType.MULTIPLE_SIGNERS None 2 ChainIDType.GENERIC AccessListType.EMPTY False False [, ]
multiple_authorizations_eoa_self_sponsored_then_contract_authority AddressType.EMPTY_ACCOUNT SignerType.MULTIPLE_SIGNERS None 2 ChainIDType.GENERIC AccessListType.EMPTY True False [, ]
single_valid_authorization_with_single_non_zero_byte_data AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER None 1 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EMPTY_ACCOUNT 01
single_valid_authorization_with_single_zero_byte_data AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER None 1 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EMPTY_ACCOUNT 00
many_valid_authorizations_single_signer AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER None 5000 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EMPTY_ACCOUNT
many_valid_authorizations_multiple_signers AddressType.EMPTY_ACCOUNT SignerType.MULTIPLE_SIGNERS None 5000 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EMPTY_ACCOUNT
first_valid_then_many_duplicate_authorizations AddressType.EMPTY_ACCOUNT SignerType.SINGLE_SIGNER AuthorizationInvalidityType.REPEATED_NONCE 5000 ChainIDType.GENERIC AccessListType.EMPTY False False AddressType.EMPTY_ACCOUNT