Modules
snforge_std
Fully qualified path: snforge_std
Modules
Free functions
Structs
Enums
Traits
cheatcodes
Fully qualified path: snforge_std::cheatcodes
Modules
Free functions
Enums
fs
Fully qualified path: snforge_std::fs
Free functions
Structs
Traits
env
Fully qualified path: snforge_std::env
Free functions
signature
Fully qualified path: snforge_std::signature
Modules
Structs
Enums
Traits
trace
Fully qualified path: snforge_std::trace
Free functions
Structs
Enums
byte_array
Fully qualified path: snforge_std::byte_array
Free functions
_config_types
Fully qualified path: snforge_std::_config_types
Structs
Enums
_cheatcode
Fully qualified path: snforge_std::_cheatcode
Free functions
_internals
Fully qualified path: snforge_std::_internals
Free functions
events
Fully qualified path: snforge_std::cheatcodes::events
Free functions
Structs
Traits
l1_handler
Fully qualified path: snforge_std::cheatcodes::l1_handler
Structs
Traits
contract_class
Fully qualified path: snforge_std::cheatcodes::contract_class
Free functions
Structs
Enums
Traits
fork
Fully qualified path: snforge_std::cheatcodes::fork
Enums
storage
Fully qualified path: snforge_std::cheatcodes::storage
Free functions
execution_info
Fully qualified path: snforge_std::cheatcodes::execution_info
Modules
message_to_l1
Fully qualified path: snforge_std::cheatcodes::message_to_l1
Free functions
Structs
Traits
generate_random_felt
Fully qualified path: snforge_std::cheatcodes::generate_random_felt
Free functions
caller_address
Fully qualified path: snforge_std::cheatcodes::execution_info::caller_address
Free functions
block_number
Fully qualified path: snforge_std::cheatcodes::execution_info::block_number
Free functions
block_timestamp
Fully qualified path: snforge_std::cheatcodes::execution_info::block_timestamp
Free functions
sequencer_address
Fully qualified path: snforge_std::cheatcodes::execution_info::sequencer_address
Free functions
version
Fully qualified path: snforge_std::cheatcodes::execution_info::version
Free functions
max_fee
Fully qualified path: snforge_std::cheatcodes::execution_info::max_fee
Free functions
signature
Fully qualified path: snforge_std::cheatcodes::execution_info::signature
Free functions
transaction_hash
Fully qualified path: snforge_std::cheatcodes::execution_info::transaction_hash
Free functions
chain_id
Fully qualified path: snforge_std::cheatcodes::execution_info::chain_id
Free functions
nonce
Fully qualified path: snforge_std::cheatcodes::execution_info::nonce
Free functions
resource_bounds
Fully qualified path: snforge_std::cheatcodes::execution_info::resource_bounds
Free functions
tip
Fully qualified path: snforge_std::cheatcodes::execution_info::tip
Free functions
paymaster_data
Fully qualified path: snforge_std::cheatcodes::execution_info::paymaster_data
Free functions
nonce_data_availability_mode
Fully qualified path: snforge_std::cheatcodes::execution_info::nonce_data_availability_mode
Free functions
fee_data_availability_mode
Fully qualified path: snforge_std::cheatcodes::execution_info::fee_data_availability_mode
Free functions
account_deployment_data
Fully qualified path: snforge_std::cheatcodes::execution_info::account_deployment_data
Free functions
account_contract_address
Fully qualified path: snforge_std::cheatcodes::execution_info::account_contract_address
Free functions
secp256k1_curve
Fully qualified path: snforge_std::signature::secp256k1_curve
Impls
secp256r1_curve
Fully qualified path: snforge_std::signature::secp256r1_curve
Impls
stark_curve
Fully qualified path: snforge_std::signature::stark_curve
Impls
Free functions
-
cheatcodes::execution_info::caller_address::cheat_caller_address
-
cheatcodes::execution_info::caller_address::start_cheat_caller_address_global
-
cheatcodes::execution_info::caller_address::stop_cheat_caller_address
-
cheatcodes::execution_info::caller_address::stop_cheat_caller_address_global
-
cheatcodes::execution_info::caller_address::start_cheat_caller_address
-
cheatcodes::execution_info::block_number::cheat_block_number
-
cheatcodes::execution_info::block_number::start_cheat_block_number_global
-
cheatcodes::execution_info::block_number::stop_cheat_block_number
-
cheatcodes::execution_info::block_number::stop_cheat_block_number_global
-
cheatcodes::execution_info::block_number::start_cheat_block_number
-
cheatcodes::execution_info::block_timestamp::cheat_block_timestamp
-
cheatcodes::execution_info::block_timestamp::start_cheat_block_timestamp_global
-
cheatcodes::execution_info::block_timestamp::stop_cheat_block_timestamp
-
cheatcodes::execution_info::block_timestamp::stop_cheat_block_timestamp_global
-
cheatcodes::execution_info::block_timestamp::start_cheat_block_timestamp
-
cheatcodes::execution_info::sequencer_address::cheat_sequencer_address
-
cheatcodes::execution_info::sequencer_address::start_cheat_sequencer_address_global
-
cheatcodes::execution_info::sequencer_address::stop_cheat_sequencer_address
-
cheatcodes::execution_info::sequencer_address::stop_cheat_sequencer_address_global
-
cheatcodes::execution_info::sequencer_address::start_cheat_sequencer_address
-
cheatcodes::execution_info::version::cheat_transaction_version
-
cheatcodes::execution_info::version::start_cheat_transaction_version_global
-
cheatcodes::execution_info::version::stop_cheat_transaction_version
-
cheatcodes::execution_info::version::stop_cheat_transaction_version_global
-
cheatcodes::execution_info::version::start_cheat_transaction_version
-
cheatcodes::execution_info::max_fee::start_cheat_max_fee_global
-
cheatcodes::execution_info::max_fee::stop_cheat_max_fee_global
-
cheatcodes::execution_info::signature::start_cheat_signature_global
-
cheatcodes::execution_info::signature::stop_cheat_signature_global
-
cheatcodes::execution_info::signature::start_cheat_signature
-
cheatcodes::execution_info::transaction_hash::cheat_transaction_hash
-
cheatcodes::execution_info::transaction_hash::start_cheat_transaction_hash_global
-
cheatcodes::execution_info::transaction_hash::stop_cheat_transaction_hash
-
cheatcodes::execution_info::transaction_hash::stop_cheat_transaction_hash_global
-
cheatcodes::execution_info::transaction_hash::start_cheat_transaction_hash
-
cheatcodes::execution_info::chain_id::start_cheat_chain_id_global
-
cheatcodes::execution_info::chain_id::stop_cheat_chain_id_global
-
cheatcodes::execution_info::resource_bounds::cheat_resource_bounds
-
cheatcodes::execution_info::resource_bounds::start_cheat_resource_bounds_global
-
cheatcodes::execution_info::resource_bounds::stop_cheat_resource_bounds
-
cheatcodes::execution_info::resource_bounds::stop_cheat_resource_bounds_global
-
cheatcodes::execution_info::resource_bounds::start_cheat_resource_bounds
-
cheatcodes::execution_info::paymaster_data::cheat_paymaster_data
-
cheatcodes::execution_info::paymaster_data::start_cheat_paymaster_data_global
-
cheatcodes::execution_info::paymaster_data::stop_cheat_paymaster_data
-
cheatcodes::execution_info::paymaster_data::stop_cheat_paymaster_data_global
-
cheatcodes::execution_info::paymaster_data::start_cheat_paymaster_data
-
cheatcodes::execution_info::nonce_data_availability_mode::cheat_nonce_data_availability_mode
-
cheatcodes::execution_info::nonce_data_availability_mode::stop_cheat_nonce_data_availability_mode
-
cheatcodes::execution_info::nonce_data_availability_mode::start_cheat_nonce_data_availability_mode
-
cheatcodes::execution_info::fee_data_availability_mode::cheat_fee_data_availability_mode
-
cheatcodes::execution_info::fee_data_availability_mode::stop_cheat_fee_data_availability_mode
-
cheatcodes::execution_info::fee_data_availability_mode::stop_cheat_fee_data_availability_mode_global
-
cheatcodes::execution_info::fee_data_availability_mode::start_cheat_fee_data_availability_mode
-
cheatcodes::execution_info::account_deployment_data::cheat_account_deployment_data
-
cheatcodes::execution_info::account_deployment_data::start_cheat_account_deployment_data_global
-
cheatcodes::execution_info::account_deployment_data::stop_cheat_account_deployment_data
-
cheatcodes::execution_info::account_deployment_data::stop_cheat_account_deployment_data_global
-
cheatcodes::execution_info::account_deployment_data::start_cheat_account_deployment_data
-
cheatcodes::execution_info::account_contract_address::cheat_account_contract_address
-
cheatcodes::execution_info::account_contract_address::start_cheat_account_contract_address_global
-
cheatcodes::execution_info::account_contract_address::stop_cheat_account_contract_address
-
cheatcodes::execution_info::account_contract_address::stop_cheat_account_contract_address_global
-
cheatcodes::execution_info::account_contract_address::start_cheat_account_contract_address
-
cheatcodes::execution_info::caller_address::cheat_caller_address
-
cheatcodes::execution_info::caller_address::start_cheat_caller_address_global
-
cheatcodes::execution_info::caller_address::stop_cheat_caller_address_global
-
cheatcodes::execution_info::caller_address::start_cheat_caller_address
-
cheatcodes::execution_info::caller_address::stop_cheat_caller_address
-
cheatcodes::execution_info::block_number::cheat_block_number
-
cheatcodes::execution_info::block_number::start_cheat_block_number_global
-
cheatcodes::execution_info::block_number::stop_cheat_block_number_global
-
cheatcodes::execution_info::block_number::start_cheat_block_number
-
cheatcodes::execution_info::block_number::stop_cheat_block_number
-
cheatcodes::execution_info::block_timestamp::cheat_block_timestamp
-
cheatcodes::execution_info::block_timestamp::start_cheat_block_timestamp_global
-
cheatcodes::execution_info::block_timestamp::stop_cheat_block_timestamp_global
-
cheatcodes::execution_info::block_timestamp::start_cheat_block_timestamp
-
cheatcodes::execution_info::block_timestamp::stop_cheat_block_timestamp
-
cheatcodes::execution_info::sequencer_address::cheat_sequencer_address
-
cheatcodes::execution_info::sequencer_address::start_cheat_sequencer_address_global
-
cheatcodes::execution_info::sequencer_address::stop_cheat_sequencer_address_global
-
cheatcodes::execution_info::sequencer_address::start_cheat_sequencer_address
-
cheatcodes::execution_info::sequencer_address::stop_cheat_sequencer_address
-
cheatcodes::execution_info::version::cheat_transaction_version
-
cheatcodes::execution_info::version::start_cheat_transaction_version_global
-
cheatcodes::execution_info::version::stop_cheat_transaction_version_global
-
cheatcodes::execution_info::version::start_cheat_transaction_version
-
cheatcodes::execution_info::version::stop_cheat_transaction_version
-
cheatcodes::execution_info::max_fee::start_cheat_max_fee_global
-
cheatcodes::execution_info::max_fee::stop_cheat_max_fee_global
-
cheatcodes::execution_info::signature::start_cheat_signature_global
-
cheatcodes::execution_info::signature::stop_cheat_signature_global
-
cheatcodes::execution_info::signature::start_cheat_signature
-
cheatcodes::execution_info::transaction_hash::cheat_transaction_hash
-
cheatcodes::execution_info::transaction_hash::start_cheat_transaction_hash_global
-
cheatcodes::execution_info::transaction_hash::stop_cheat_transaction_hash_global
-
cheatcodes::execution_info::transaction_hash::start_cheat_transaction_hash
-
cheatcodes::execution_info::transaction_hash::stop_cheat_transaction_hash
-
cheatcodes::execution_info::chain_id::start_cheat_chain_id_global
-
cheatcodes::execution_info::chain_id::stop_cheat_chain_id_global
-
cheatcodes::execution_info::resource_bounds::cheat_resource_bounds
-
cheatcodes::execution_info::resource_bounds::start_cheat_resource_bounds_global
-
cheatcodes::execution_info::resource_bounds::stop_cheat_resource_bounds_global
-
cheatcodes::execution_info::resource_bounds::start_cheat_resource_bounds
-
cheatcodes::execution_info::resource_bounds::stop_cheat_resource_bounds
-
cheatcodes::execution_info::paymaster_data::cheat_paymaster_data
-
cheatcodes::execution_info::paymaster_data::start_cheat_paymaster_data_global
-
cheatcodes::execution_info::paymaster_data::stop_cheat_paymaster_data_global
-
cheatcodes::execution_info::paymaster_data::start_cheat_paymaster_data
-
cheatcodes::execution_info::paymaster_data::stop_cheat_paymaster_data
-
cheatcodes::execution_info::nonce_data_availability_mode::cheat_nonce_data_availability_mode
-
cheatcodes::execution_info::nonce_data_availability_mode::start_cheat_nonce_data_availability_mode
-
cheatcodes::execution_info::nonce_data_availability_mode::stop_cheat_nonce_data_availability_mode
-
cheatcodes::execution_info::fee_data_availability_mode::cheat_fee_data_availability_mode
-
cheatcodes::execution_info::fee_data_availability_mode::stop_cheat_fee_data_availability_mode_global
-
cheatcodes::execution_info::fee_data_availability_mode::start_cheat_fee_data_availability_mode
-
cheatcodes::execution_info::fee_data_availability_mode::stop_cheat_fee_data_availability_mode
-
cheatcodes::execution_info::account_deployment_data::cheat_account_deployment_data
-
cheatcodes::execution_info::account_deployment_data::start_cheat_account_deployment_data_global
-
cheatcodes::execution_info::account_deployment_data::stop_cheat_account_deployment_data_global
-
cheatcodes::execution_info::account_deployment_data::start_cheat_account_deployment_data
-
cheatcodes::execution_info::account_deployment_data::stop_cheat_account_deployment_data
-
cheatcodes::execution_info::account_contract_address::cheat_account_contract_address
-
cheatcodes::execution_info::account_contract_address::start_cheat_account_contract_address_global
-
cheatcodes::execution_info::account_contract_address::stop_cheat_account_contract_address_global
-
cheatcodes::execution_info::account_contract_address::start_cheat_account_contract_address
-
cheatcodes::execution_info::account_contract_address::stop_cheat_account_contract_address
declare
Declares a contract contract
- name of a contract as Cairo string. It is a name of the contract (part after mod keyword) e.g. "HelloStarknet" Returns the DeclareResult
that encapsulated possible outcomes in the enum: - Success
: Contains the successfully declared ContractClass
. - AlreadyDeclared
: Contains ContractClass
and signals that the contract has already been declared.
Fully qualified path: snforge_std::cheatcodes::contract_class::declare
pub fn declare(contract: ByteArray) -> Result<DeclareResult, Array<felt252>>
get_class_hash
Retrieves a class hash of a contract deployed under the given address contract_address
- target contract address Returns the ClassHash
under given address
Fully qualified path: snforge_std::cheatcodes::contract_class::get_class_hash
pub fn get_class_hash(contract_address: ContractAddress) -> ClassHash
spy_events
Creates EventSpy
instance that spies on all events emitted after its creation.
Fully qualified path: snforge_std::cheatcodes::events::spy_events
pub fn spy_events() -> EventSpy
spy_messages_to_l1
Creates MessageToL1Spy
instance that spies on all messages sent to L1
Fully qualified path: snforge_std::cheatcodes::message_to_l1::spy_messages_to_l1
pub fn spy_messages_to_l1() -> MessageToL1Spy
store
Stores felts from serialized_value
in target
contract's storage, starting at storage_address
. - target
- address of the contract, which storage you want to modify - storage_address
- offset of the data in the contract's storage - serialized_value
- a sequence of felts that will be inserted starting at storage_address
Fully qualified path: snforge_std::cheatcodes::storage::store
pub fn store(target: ContractAddress, storage_address: felt252, serialized_value: Span<felt252>)
load
Loads size
felts from target
contract's storage into an Array
, starting at storage_address
. - target
- address of the contract, which storage you want to modify - storage_address
- offset of the data in the contract's storage - size
- how many felts will be loaded into the result Array
Fully qualified path: snforge_std::cheatcodes::storage::load
pub fn load(target: ContractAddress, storage_address: felt252, size: felt252) -> Array<felt252>
map_entry_address
Fully qualified path: snforge_std::cheatcodes::storage::map_entry_address
pub fn map_entry_address(map_selector: felt252, keys: Span<felt252>) -> felt252
test_address
Fully qualified path: snforge_std::cheatcodes::test_address
pub fn test_address() -> ContractAddress
test_selector
Fully qualified path: snforge_std::cheatcodes::test_selector
pub fn test_selector() -> felt252
mock_call
Mocks contract call to a function_selector
of a contract at the given address, for n_times
first calls that are made to the contract. A call to function function_selector
will return data provided in ret_data
argument. An address with no contract can be mocked as well. An entrypoint that is not present on the deployed contract is also possible to mock. Note that the function is not meant for mocking internal calls - it works only for contract entry points. - contract_address
- target contract address - function_selector
- hashed name of the target function (can be obtained with selector!
macro) - ret_data
- data to return by the function function_selector
- n_times
- number of calls to mock the function for
Fully qualified path: snforge_std::cheatcodes::mock_call
pub fn mock_call<T, impl TSerde: core::serde::Serde<T>, impl TDestruct: Destruct<T>>(
contract_address: ContractAddress, function_selector: felt252, ret_data: T, n_times: u32,
)
start_mock_call
Mocks contract call to a function of a contract at the given address, indefinitely. See mock_call
for comprehensive definition of how it can be used. - contract_address
- targeted contracts' address - function_selector
- hashed name of the target function (can be obtained with selector!
macro) - ret_data
- data to be returned by the function
Fully qualified path: snforge_std::cheatcodes::start_mock_call
pub fn start_mock_call<T, impl TSerde: core::serde::Serde<T>, impl TDestruct: Destruct<T>>(
contract_address: ContractAddress, function_selector: felt252, ret_data: T,
)
stop_mock_call
Cancels the mock_call
/ start_mock_call
for the function with given name and contract address. - contract_address
- targeted contracts' address - function_selector
- hashed name of the target function (can be obtained with selector!
macro)
Fully qualified path: snforge_std::cheatcodes::stop_mock_call
pub fn stop_mock_call(contract_address: ContractAddress, function_selector: felt252)
replace_bytecode
Replaces class for given contract address. The new_class
hash has to be declared in order for the replacement class to execute the code, when interacting with the contract. - contract
- address specifying which address will be replaced - new_class
- class hash, that will be used now for given address Returns Result::Ok
if the replacement succeeded, and a ReplaceBytecodeError
with appropriate error type otherwise
Fully qualified path: snforge_std::cheatcodes::replace_bytecode
pub fn replace_bytecode(
contract: ContractAddress, new_class: ClassHash,
) -> Result<(), ReplaceBytecodeError>
cheat_caller_address
Changes the caller address for the given contract address and span. - contract_address
- instance of ContractAddress
specifying which contract to cheat - caller_address
- caller address to be set - span
- instance of CheatSpan
specifying the number of contract calls with the cheat applied
Fully qualified path: snforge_std::cheatcodes::execution_info::caller_address::cheat_caller_address
pub fn cheat_caller_address(
contract_address: ContractAddress, caller_address: ContractAddress, span: CheatSpan,
)
start_cheat_caller_address_global
Changes the caller address. - caller_address
- caller address to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::caller_address::start_cheat_caller_address_global
pub fn start_cheat_caller_address_global(caller_address: ContractAddress)
stop_cheat_caller_address
Cancels the cheat_caller_address
/ start_cheat_caller_address
for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to stop cheating
Fully qualified path: snforge_std::cheatcodes::execution_info::caller_address::stop_cheat_caller_address
pub fn stop_cheat_caller_address(contract_address: ContractAddress)
stop_cheat_caller_address_global
Cancels the start_cheat_caller_address_global
.
Fully qualified path: snforge_std::cheatcodes::execution_info::caller_address::stop_cheat_caller_address_global
pub fn stop_cheat_caller_address_global()
start_cheat_caller_address
Changes the caller address for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to cheat - caller_address
- caller address to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::caller_address::start_cheat_caller_address
pub fn start_cheat_caller_address(
contract_address: ContractAddress, caller_address: ContractAddress,
)
cheat_block_number
Changes the block number for the given contract address and span. - contract_address
- instance of ContractAddress
specifying which contract to cheat - block_number
- block number to be set - span
- instance of CheatSpan
specifying the number of contract calls with the cheat applied
Fully qualified path: snforge_std::cheatcodes::execution_info::block_number::cheat_block_number
pub fn cheat_block_number(contract_address: ContractAddress, block_number: u64, span: CheatSpan)
start_cheat_block_number_global
Changes the block number. - block_number
- block number to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::block_number::start_cheat_block_number_global
pub fn start_cheat_block_number_global(block_number: u64)
stop_cheat_block_number
Cancels the cheat_block_number
/ start_cheat_block_number
for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to stop cheating
Fully qualified path: snforge_std::cheatcodes::execution_info::block_number::stop_cheat_block_number
pub fn stop_cheat_block_number(contract_address: ContractAddress)
stop_cheat_block_number_global
Cancels the start_cheat_block_number_global
.
Fully qualified path: snforge_std::cheatcodes::execution_info::block_number::stop_cheat_block_number_global
pub fn stop_cheat_block_number_global()
start_cheat_block_number
Changes the block number for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to cheat - block_number
- block number to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::block_number::start_cheat_block_number
pub fn start_cheat_block_number(contract_address: ContractAddress, block_number: u64)
cheat_block_timestamp
Changes the block timestamp for the given contract address and span. - contract_address
- instance of ContractAddress
specifying which contract to cheat - block_timestamp
- block timestamp to be set - span
- instance of CheatSpan
specifying the number of contract calls with the cheat applied
Fully qualified path: snforge_std::cheatcodes::execution_info::block_timestamp::cheat_block_timestamp
pub fn cheat_block_timestamp(
contract_address: ContractAddress, block_timestamp: u64, span: CheatSpan,
)
start_cheat_block_timestamp_global
Changes the block timestamp. - block_timestamp
- block timestamp to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::block_timestamp::start_cheat_block_timestamp_global
pub fn start_cheat_block_timestamp_global(block_timestamp: u64)
stop_cheat_block_timestamp
Cancels the cheat_block_timestamp
/ start_cheat_block_timestamp
for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to stop cheating
Fully qualified path: snforge_std::cheatcodes::execution_info::block_timestamp::stop_cheat_block_timestamp
pub fn stop_cheat_block_timestamp(contract_address: ContractAddress)
stop_cheat_block_timestamp_global
Cancels the start_cheat_block_timestamp_global
.
Fully qualified path: snforge_std::cheatcodes::execution_info::block_timestamp::stop_cheat_block_timestamp_global
pub fn stop_cheat_block_timestamp_global()
start_cheat_block_timestamp
Changes the block timestamp for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to cheat - block_timestamp
- block timestamp to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::block_timestamp::start_cheat_block_timestamp
pub fn start_cheat_block_timestamp(contract_address: ContractAddress, block_timestamp: u64)
cheat_sequencer_address
Changes the sequencer address for the given contract address and span. - contract_address
- instance of ContractAddress
specifying which contract to cheat - sequencer_address
- sequencer address to be set - span
- instance of CheatSpan
specifying the number of contract calls with the cheat applied
Fully qualified path: snforge_std::cheatcodes::execution_info::sequencer_address::cheat_sequencer_address
pub fn cheat_sequencer_address(
contract_address: ContractAddress, sequencer_address: ContractAddress, span: CheatSpan,
)
start_cheat_sequencer_address_global
Changes the sequencer address. - sequencer_address
- sequencer address to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::sequencer_address::start_cheat_sequencer_address_global
pub fn start_cheat_sequencer_address_global(sequencer_address: ContractAddress)
stop_cheat_sequencer_address
Cancels the cheat_sequencer_address
/ start_cheat_sequencer_address
for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to stop cheating
Fully qualified path: snforge_std::cheatcodes::execution_info::sequencer_address::stop_cheat_sequencer_address
pub fn stop_cheat_sequencer_address(contract_address: ContractAddress)
stop_cheat_sequencer_address_global
Cancels the start_cheat_sequencer_address_global
.
Fully qualified path: snforge_std::cheatcodes::execution_info::sequencer_address::stop_cheat_sequencer_address_global
pub fn stop_cheat_sequencer_address_global()
start_cheat_sequencer_address
Changes the sequencer address for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to cheat - sequencer_address
- sequencer address to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::sequencer_address::start_cheat_sequencer_address
pub fn start_cheat_sequencer_address(
contract_address: ContractAddress, sequencer_address: ContractAddress,
)
cheat_transaction_version
Changes the transaction version for the given contract address and span. - contract_address
- instance of ContractAddress
specifying which contract to cheat - version
- transaction version to be set - span
- instance of CheatSpan
specifying the number of contract calls with the cheat applied
Fully qualified path: snforge_std::cheatcodes::execution_info::version::cheat_transaction_version
pub fn cheat_transaction_version(
contract_address: ContractAddress, version: felt252, span: CheatSpan,
)
start_cheat_transaction_version_global
Changes the transaction version. - version
- transaction version to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::version::start_cheat_transaction_version_global
pub fn start_cheat_transaction_version_global(version: felt252)
stop_cheat_transaction_version
Cancels the cheat_transaction_version
/ start_cheat_transaction_version
for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to stop cheating
Fully qualified path: snforge_std::cheatcodes::execution_info::version::stop_cheat_transaction_version
pub fn stop_cheat_transaction_version(contract_address: ContractAddress)
stop_cheat_transaction_version_global
Cancels the start_cheat_transaction_version_global
.
Fully qualified path: snforge_std::cheatcodes::execution_info::version::stop_cheat_transaction_version_global
pub fn stop_cheat_transaction_version_global()
start_cheat_transaction_version
Changes the transaction version for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to cheat - version
- transaction version to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::version::start_cheat_transaction_version
pub fn start_cheat_transaction_version(contract_address: ContractAddress, version: felt252)
cheat_max_fee
Changes the transaction max fee for the given contract address and span. - contract_address
- instance of ContractAddress
specifying which contract to cheat - max_fee
- transaction max fee to be set - span
- instance of CheatSpan
specifying the number of contract calls with the cheat applied
Fully qualified path: snforge_std::cheatcodes::execution_info::max_fee::cheat_max_fee
pub fn cheat_max_fee(contract_address: ContractAddress, max_fee: u128, span: CheatSpan)
start_cheat_max_fee_global
Changes the transaction max fee. - max_fee
- transaction max fee to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::max_fee::start_cheat_max_fee_global
pub fn start_cheat_max_fee_global(max_fee: u128)
stop_cheat_max_fee
Cancels the cheat_max_fee
/ start_cheat_max_fee
for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to stop cheating
Fully qualified path: snforge_std::cheatcodes::execution_info::max_fee::stop_cheat_max_fee
pub fn stop_cheat_max_fee(contract_address: ContractAddress)
stop_cheat_max_fee_global
Cancels the start_cheat_max_fee_global
.
Fully qualified path: snforge_std::cheatcodes::execution_info::max_fee::stop_cheat_max_fee_global
pub fn stop_cheat_max_fee_global()
start_cheat_max_fee
Changes the transaction max fee for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to cheat - max_fee
- transaction max fee to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::max_fee::start_cheat_max_fee
pub fn start_cheat_max_fee(contract_address: ContractAddress, max_fee: u128)
cheat_signature
Changes the transaction signature for the given contract address and span. - contract_address
- instance of ContractAddress
specifying which contract to cheat - signature
- transaction signature to be set - span
- instance of CheatSpan
specifying the number of contract calls with the cheat applied
Fully qualified path: snforge_std::cheatcodes::execution_info::signature::cheat_signature
pub fn cheat_signature(contract_address: ContractAddress, signature: Span<felt252>, span: CheatSpan)
start_cheat_signature_global
Changes the transaction signature. - signature
- transaction signature to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::signature::start_cheat_signature_global
pub fn start_cheat_signature_global(signature: Span<felt252>)
stop_cheat_signature
Cancels the cheat_signature
/ start_cheat_signature
for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to stop cheating
Fully qualified path: snforge_std::cheatcodes::execution_info::signature::stop_cheat_signature
pub fn stop_cheat_signature(contract_address: ContractAddress)
stop_cheat_signature_global
Cancels the start_cheat_signature_global
.
Fully qualified path: snforge_std::cheatcodes::execution_info::signature::stop_cheat_signature_global
pub fn stop_cheat_signature_global()
start_cheat_signature
Changes the transaction signature for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to cheat - signature
- transaction signature to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::signature::start_cheat_signature
pub fn start_cheat_signature(contract_address: ContractAddress, signature: Span<felt252>)
cheat_transaction_hash
Changes the transaction hash for the given contract address and span. - contract_address
- instance of ContractAddress
specifying which contract to cheat - transaction_hash
- transaction hash to be set - span
- instance of CheatSpan
specifying the number of contract calls with the cheat applied
Fully qualified path: snforge_std::cheatcodes::execution_info::transaction_hash::cheat_transaction_hash
pub fn cheat_transaction_hash(
contract_address: ContractAddress, transaction_hash: felt252, span: CheatSpan,
)
start_cheat_transaction_hash_global
Changes the transaction hash. - transaction_hash
- transaction hash to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::transaction_hash::start_cheat_transaction_hash_global
pub fn start_cheat_transaction_hash_global(transaction_hash: felt252)
stop_cheat_transaction_hash
Cancels the cheat_transaction_hash
/ start_cheat_transaction_hash
for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to stop cheating
Fully qualified path: snforge_std::cheatcodes::execution_info::transaction_hash::stop_cheat_transaction_hash
pub fn stop_cheat_transaction_hash(contract_address: ContractAddress)
stop_cheat_transaction_hash_global
Cancels the start_cheat_transaction_hash_global
.
Fully qualified path: snforge_std::cheatcodes::execution_info::transaction_hash::stop_cheat_transaction_hash_global
pub fn stop_cheat_transaction_hash_global()
start_cheat_transaction_hash
Changes the transaction hash for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to cheat - transaction_hash
- transaction hash to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::transaction_hash::start_cheat_transaction_hash
pub fn start_cheat_transaction_hash(contract_address: ContractAddress, transaction_hash: felt252)
cheat_chain_id
Changes the transaction chain_id for the given contract address and span. - contract_address
- instance of ContractAddress
specifying which contract to cheat - chain_id
- transaction chain_id to be set - span
- instance of CheatSpan
specifying the number of contract calls with the cheat applied
Fully qualified path: snforge_std::cheatcodes::execution_info::chain_id::cheat_chain_id
pub fn cheat_chain_id(contract_address: ContractAddress, chain_id: felt252, span: CheatSpan)
start_cheat_chain_id_global
Changes the transaction chain_id. - chain_id
- transaction chain_id to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::chain_id::start_cheat_chain_id_global
pub fn start_cheat_chain_id_global(chain_id: felt252)
stop_cheat_chain_id
Cancels the cheat_chain_id
/ start_cheat_chain_id
for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to stop cheating
Fully qualified path: snforge_std::cheatcodes::execution_info::chain_id::stop_cheat_chain_id
pub fn stop_cheat_chain_id(contract_address: ContractAddress)
stop_cheat_chain_id_global
Cancels the start_cheat_chain_id_global
.
Fully qualified path: snforge_std::cheatcodes::execution_info::chain_id::stop_cheat_chain_id_global
pub fn stop_cheat_chain_id_global()
start_cheat_chain_id
Changes the transaction chain_id for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to cheat - chain_id
- transaction chain_id to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::chain_id::start_cheat_chain_id
pub fn start_cheat_chain_id(contract_address: ContractAddress, chain_id: felt252)
cheat_nonce
Changes the transaction nonce for the given contract address and span. - contract_address
- instance of ContractAddress
specifying which contract to cheat - nonce
- transaction nonce to be set - span
- instance of CheatSpan
specifying the number of contract calls with the cheat applied
Fully qualified path: snforge_std::cheatcodes::execution_info::nonce::cheat_nonce
pub fn cheat_nonce(contract_address: ContractAddress, nonce: felt252, span: CheatSpan)
start_cheat_nonce_global
Changes the transaction nonce. - nonce
- transaction nonce to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::nonce::start_cheat_nonce_global
pub fn start_cheat_nonce_global(nonce: felt252)
stop_cheat_nonce
Cancels the cheat_nonce
/ start_cheat_nonce
for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to stop cheating
Fully qualified path: snforge_std::cheatcodes::execution_info::nonce::stop_cheat_nonce
pub fn stop_cheat_nonce(contract_address: ContractAddress)
stop_cheat_nonce_global
Cancels the start_cheat_nonce_global
.
Fully qualified path: snforge_std::cheatcodes::execution_info::nonce::stop_cheat_nonce_global
pub fn stop_cheat_nonce_global()
start_cheat_nonce
Changes the transaction nonce for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to cheat - nonce
- transaction nonce to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::nonce::start_cheat_nonce
pub fn start_cheat_nonce(contract_address: ContractAddress, nonce: felt252)
cheat_resource_bounds
Changes the transaction resource bounds for the given contract address and span. - contract_address
- instance of ContractAddress
specifying which contract to cheat - resource_bounds
- transaction resource bounds to be set - span
- instance of CheatSpan
specifying the number of contract calls with the cheat applied
Fully qualified path: snforge_std::cheatcodes::execution_info::resource_bounds::cheat_resource_bounds
pub fn cheat_resource_bounds(
contract_address: ContractAddress, resource_bounds: Span<ResourcesBounds>, span: CheatSpan,
)
start_cheat_resource_bounds_global
Changes the transaction resource bounds. - resource_bounds
- transaction resource bounds to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::resource_bounds::start_cheat_resource_bounds_global
pub fn start_cheat_resource_bounds_global(resource_bounds: Span<ResourcesBounds>)
stop_cheat_resource_bounds
Cancels the cheat_resource_bounds
/ start_cheat_resource_bounds
for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to stop cheating
Fully qualified path: snforge_std::cheatcodes::execution_info::resource_bounds::stop_cheat_resource_bounds
pub fn stop_cheat_resource_bounds(contract_address: ContractAddress)
stop_cheat_resource_bounds_global
Cancels the start_cheat_resource_bounds_global
.
Fully qualified path: snforge_std::cheatcodes::execution_info::resource_bounds::stop_cheat_resource_bounds_global
pub fn stop_cheat_resource_bounds_global()
start_cheat_resource_bounds
Changes the transaction resource bounds for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to cheat - resource_bounds
- transaction resource bounds to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::resource_bounds::start_cheat_resource_bounds
pub fn start_cheat_resource_bounds(
contract_address: ContractAddress, resource_bounds: Span<ResourcesBounds>,
)
cheat_tip
Changes the transaction tip for the given contract address and span. - contract_address
- instance of ContractAddress
specifying which contract to cheat - tip
- transaction tip to be set - span
- instance of CheatSpan
specifying the number of contract calls with the cheat applied
Fully qualified path: snforge_std::cheatcodes::execution_info::tip::cheat_tip
pub fn cheat_tip(contract_address: ContractAddress, tip: u128, span: CheatSpan)
start_cheat_tip_global
Changes the transaction tip. - tip
- transaction tip to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::tip::start_cheat_tip_global
pub fn start_cheat_tip_global(tip: u128)
stop_cheat_tip
Cancels the cheat_tip
/ start_cheat_tip
for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to stop cheating
Fully qualified path: snforge_std::cheatcodes::execution_info::tip::stop_cheat_tip
pub fn stop_cheat_tip(contract_address: ContractAddress)
stop_cheat_tip_global
Cancels the start_cheat_tip_global
.
Fully qualified path: snforge_std::cheatcodes::execution_info::tip::stop_cheat_tip_global
pub fn stop_cheat_tip_global()
start_cheat_tip
Changes the transaction tip for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to cheat - tip
- transaction tip to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::tip::start_cheat_tip
pub fn start_cheat_tip(contract_address: ContractAddress, tip: u128)
cheat_paymaster_data
Changes the transaction paymaster data for the given contract address and span. - contract_address
- instance of ContractAddress
specifying which contract to cheat - paymaster_data
- transaction paymaster data to be set - span
- instance of CheatSpan
specifying the number of contract calls with the cheat applied
Fully qualified path: snforge_std::cheatcodes::execution_info::paymaster_data::cheat_paymaster_data
pub fn cheat_paymaster_data(
contract_address: ContractAddress, paymaster_data: Span<felt252>, span: CheatSpan,
)
start_cheat_paymaster_data_global
Changes the transaction paymaster data. - paymaster_data
- transaction paymaster data to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::paymaster_data::start_cheat_paymaster_data_global
pub fn start_cheat_paymaster_data_global(paymaster_data: Span<felt252>)
stop_cheat_paymaster_data
Cancels the cheat_paymaster_data
/ start_cheat_paymaster_data
for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to stop cheating
Fully qualified path: snforge_std::cheatcodes::execution_info::paymaster_data::stop_cheat_paymaster_data
pub fn stop_cheat_paymaster_data(contract_address: ContractAddress)
stop_cheat_paymaster_data_global
Cancels the start_cheat_paymaster_data_global
.
Fully qualified path: snforge_std::cheatcodes::execution_info::paymaster_data::stop_cheat_paymaster_data_global
pub fn stop_cheat_paymaster_data_global()
start_cheat_paymaster_data
Changes the transaction paymaster data for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to cheat - paymaster_data
- transaction paymaster data to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::paymaster_data::start_cheat_paymaster_data
pub fn start_cheat_paymaster_data(contract_address: ContractAddress, paymaster_data: Span<felt252>)
cheat_nonce_data_availability_mode
Changes the transaction nonce data availability mode for the given contract address and span. - contract_address
- instance of ContractAddress
specifying which contracts to cheat - nonce_data_availability_mode
- transaction nonce data availability mode to be set - span
- instance of CheatSpan
specifying the number of contract calls with the cheat applied
Fully qualified path: snforge_std::cheatcodes::execution_info::nonce_data_availability_mode::cheat_nonce_data_availability_mode
pub fn cheat_nonce_data_availability_mode(
contract_address: ContractAddress, nonce_data_availability_mode: u32, span: CheatSpan,
)
start_cheat_nonce_data_availability_mode_global
Changes the transaction nonce data availability mode. - nonce_data_availability_mode
- transaction nonce data availability mode to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::nonce_data_availability_mode::start_cheat_nonce_data_availability_mode_global
pub fn start_cheat_nonce_data_availability_mode_global(nonce_data_availability_mode: u32)
stop_cheat_nonce_data_availability_mode
Cancels the cheat_nonce_data_availability_mode
/ start_cheat_nonce_data_availability_mode
for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to stop cheating
Fully qualified path: snforge_std::cheatcodes::execution_info::nonce_data_availability_mode::stop_cheat_nonce_data_availability_mode
pub fn stop_cheat_nonce_data_availability_mode(contract_address: ContractAddress)
stop_cheat_nonce_data_availability_mode_global
Cancels the start_cheat_nonce_data_availability_mode_global
.
Fully qualified path: snforge_std::cheatcodes::execution_info::nonce_data_availability_mode::stop_cheat_nonce_data_availability_mode_global
pub fn stop_cheat_nonce_data_availability_mode_global()
start_cheat_nonce_data_availability_mode
Changes the transaction nonce data availability mode for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to cheat - nonce_data_availability_mode
- transaction nonce data availability mode to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::nonce_data_availability_mode::start_cheat_nonce_data_availability_mode
pub fn start_cheat_nonce_data_availability_mode(
contract_address: ContractAddress, nonce_data_availability_mode: u32,
)
cheat_fee_data_availability_mode
Changes the transaction fee data availability mode for the given contract address and span. - contract_address
- instance of ContractAddress
specifying which contracts to cheat - fee_data_availability_mode
- transaction fee data availability mode to be set - span
- instance of CheatSpan
specifying the number of contract calls with the cheat applied
Fully qualified path: snforge_std::cheatcodes::execution_info::fee_data_availability_mode::cheat_fee_data_availability_mode
pub fn cheat_fee_data_availability_mode(
contract_address: ContractAddress, fee_data_availability_mode: u32, span: CheatSpan,
)
start_cheat_fee_data_availability_mode_global
Changes the transaction fee data availability mode. - fee_data_availability_mode
- transaction fee data availability mode to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::fee_data_availability_mode::start_cheat_fee_data_availability_mode_global
pub fn start_cheat_fee_data_availability_mode_global(fee_data_availability_mode: u32)
stop_cheat_fee_data_availability_mode
Cancels the cheat_fee_data_availability_mode
/ start_cheat_fee_data_availability_mode
for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to stop cheating
Fully qualified path: snforge_std::cheatcodes::execution_info::fee_data_availability_mode::stop_cheat_fee_data_availability_mode
pub fn stop_cheat_fee_data_availability_mode(contract_address: ContractAddress)
stop_cheat_fee_data_availability_mode_global
Cancels the start_cheat_fee_data_availability_mode_global
.
Fully qualified path: snforge_std::cheatcodes::execution_info::fee_data_availability_mode::stop_cheat_fee_data_availability_mode_global
pub fn stop_cheat_fee_data_availability_mode_global()
start_cheat_fee_data_availability_mode
Changes the transaction fee data availability mode for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to cheat - fee_data_availability_mode
- transaction fee data availability mode to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::fee_data_availability_mode::start_cheat_fee_data_availability_mode
pub fn start_cheat_fee_data_availability_mode(
contract_address: ContractAddress, fee_data_availability_mode: u32,
)
cheat_account_deployment_data
Changes the transaction account deployment data for the given contract address and span. - contract_address
- instance of ContractAddress
specifying which contracts to cheat - account_deployment_data
- transaction account deployment data to be set - span
- instance of CheatSpan
specifying the number of contract calls with the cheat applied
Fully qualified path: snforge_std::cheatcodes::execution_info::account_deployment_data::cheat_account_deployment_data
pub fn cheat_account_deployment_data(
contract_address: ContractAddress, account_deployment_data: Span<felt252>, span: CheatSpan,
)
start_cheat_account_deployment_data_global
Changes the transaction account deployment data. - account_deployment_data
- transaction account deployment data to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::account_deployment_data::start_cheat_account_deployment_data_global
pub fn start_cheat_account_deployment_data_global(account_deployment_data: Span<felt252>)
stop_cheat_account_deployment_data
Cancels the cheat_account_deployment_data
/ start_cheat_account_deployment_data
for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to stop cheating
Fully qualified path: snforge_std::cheatcodes::execution_info::account_deployment_data::stop_cheat_account_deployment_data
pub fn stop_cheat_account_deployment_data(contract_address: ContractAddress)
stop_cheat_account_deployment_data_global
Cancels the cheat_account_deployment_data_global
.
Fully qualified path: snforge_std::cheatcodes::execution_info::account_deployment_data::stop_cheat_account_deployment_data_global
pub fn stop_cheat_account_deployment_data_global()
start_cheat_account_deployment_data
Changes the transaction account deployment data for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to cheat - account_deployment_data
- transaction account deployment data to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::account_deployment_data::start_cheat_account_deployment_data
pub fn start_cheat_account_deployment_data(
contract_address: ContractAddress, account_deployment_data: Span<felt252>,
)
cheat_account_contract_address
Changes the address of an account which the transaction originates from, for the given contract address and span. - contract_address
- instance of ContractAddress
specifying which contracts to cheat - account_contract_address
- transaction account deployment data to be set - span
- instance of CheatSpan
specifying the number of contract calls with the cheat applied
Fully qualified path: snforge_std::cheatcodes::execution_info::account_contract_address::cheat_account_contract_address
pub fn cheat_account_contract_address(
contract_address: ContractAddress, account_contract_address: ContractAddress, span: CheatSpan,
)
start_cheat_account_contract_address_global
Changes the address of an account which the transaction originates from. - account_contract_address
- transaction account deployment data to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::account_contract_address::start_cheat_account_contract_address_global
pub fn start_cheat_account_contract_address_global(account_contract_address: ContractAddress)
stop_cheat_account_contract_address
Cancels the cheat_account_contract_address
/ start_cheat_account_contract_address
for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to stop cheating
Fully qualified path: snforge_std::cheatcodes::execution_info::account_contract_address::stop_cheat_account_contract_address
pub fn stop_cheat_account_contract_address(contract_address: ContractAddress)
stop_cheat_account_contract_address_global
Cancels the start_cheat_account_contract_address_global
.
Fully qualified path: snforge_std::cheatcodes::execution_info::account_contract_address::stop_cheat_account_contract_address_global
pub fn stop_cheat_account_contract_address_global()
start_cheat_account_contract_address
Changes the address of an account which the transaction originates from, for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to cheat - account_contract_address
- transaction account deployment data to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::account_contract_address::start_cheat_account_contract_address
pub fn start_cheat_account_contract_address(
contract_address: ContractAddress, account_contract_address: ContractAddress,
)
generate_random_felt
Generates a random felt value Returns a random felt within the range of 0 and 2^252 - 1
Fully qualified path: snforge_std::cheatcodes::generate_random_felt::generate_random_felt
pub fn generate_random_felt() -> felt252
test_selector
Fully qualified path: snforge_std::cheatcodes::test_selector
pub fn test_selector() -> felt252
test_address
Fully qualified path: snforge_std::cheatcodes::test_address
pub fn test_address() -> ContractAddress
mock_call
Mocks contract call to a function_selector
of a contract at the given address, for n_times
first calls that are made to the contract. A call to function function_selector
will return data provided in ret_data
argument. An address with no contract can be mocked as well. An entrypoint that is not present on the deployed contract is also possible to mock. Note that the function is not meant for mocking internal calls - it works only for contract entry points. - contract_address
- target contract address - function_selector
- hashed name of the target function (can be obtained with selector!
macro) - ret_data
- data to return by the function function_selector
- n_times
- number of calls to mock the function for
Fully qualified path: snforge_std::cheatcodes::mock_call
pub fn mock_call<T, impl TSerde: core::serde::Serde<T>, impl TDestruct: Destruct<T>>(
contract_address: ContractAddress, function_selector: felt252, ret_data: T, n_times: u32,
)
start_mock_call
Mocks contract call to a function of a contract at the given address, indefinitely. See mock_call
for comprehensive definition of how it can be used. - contract_address
- targeted contracts' address - function_selector
- hashed name of the target function (can be obtained with selector!
macro) - ret_data
- data to be returned by the function
Fully qualified path: snforge_std::cheatcodes::start_mock_call
pub fn start_mock_call<T, impl TSerde: core::serde::Serde<T>, impl TDestruct: Destruct<T>>(
contract_address: ContractAddress, function_selector: felt252, ret_data: T,
)
stop_mock_call
Cancels the mock_call
/ start_mock_call
for the function with given name and contract address. - contract_address
- targeted contracts' address - function_selector
- hashed name of the target function (can be obtained with selector!
macro)
Fully qualified path: snforge_std::cheatcodes::stop_mock_call
pub fn stop_mock_call(contract_address: ContractAddress, function_selector: felt252)
replace_bytecode
Replaces class for given contract address. The new_class
hash has to be declared in order for the replacement class to execute the code, when interacting with the contract. - contract
- address specifying which address will be replaced - new_class
- class hash, that will be used now for given address Returns Result::Ok
if the replacement succeeded, and a ReplaceBytecodeError
with appropriate error type otherwise
Fully qualified path: snforge_std::cheatcodes::replace_bytecode
pub fn replace_bytecode(
contract: ContractAddress, new_class: ClassHash,
) -> Result<(), ReplaceBytecodeError>
spy_events
Creates EventSpy
instance that spies on all events emitted after its creation.
Fully qualified path: snforge_std::cheatcodes::events::spy_events
pub fn spy_events() -> EventSpy
declare
Declares a contract contract
- name of a contract as Cairo string. It is a name of the contract (part after mod keyword) e.g. "HelloStarknet" Returns the DeclareResult
that encapsulated possible outcomes in the enum: - Success
: Contains the successfully declared ContractClass
. - AlreadyDeclared
: Contains ContractClass
and signals that the contract has already been declared.
Fully qualified path: snforge_std::cheatcodes::contract_class::declare
pub fn declare(contract: ByteArray) -> Result<DeclareResult, Array<felt252>>
get_class_hash
Retrieves a class hash of a contract deployed under the given address contract_address
- target contract address Returns the ClassHash
under given address
Fully qualified path: snforge_std::cheatcodes::contract_class::get_class_hash
pub fn get_class_hash(contract_address: ContractAddress) -> ClassHash
store
Stores felts from serialized_value
in target
contract's storage, starting at storage_address
. - target
- address of the contract, which storage you want to modify - storage_address
- offset of the data in the contract's storage - serialized_value
- a sequence of felts that will be inserted starting at storage_address
Fully qualified path: snforge_std::cheatcodes::storage::store
pub fn store(target: ContractAddress, storage_address: felt252, serialized_value: Span<felt252>)
load
Loads size
felts from target
contract's storage into an Array
, starting at storage_address
. - target
- address of the contract, which storage you want to modify - storage_address
- offset of the data in the contract's storage - size
- how many felts will be loaded into the result Array
Fully qualified path: snforge_std::cheatcodes::storage::load
pub fn load(target: ContractAddress, storage_address: felt252, size: felt252) -> Array<felt252>
map_entry_address
Fully qualified path: snforge_std::cheatcodes::storage::map_entry_address
pub fn map_entry_address(map_selector: felt252, keys: Span<felt252>) -> felt252
cheat_caller_address
Changes the caller address for the given contract address and span. - contract_address
- instance of ContractAddress
specifying which contract to cheat - caller_address
- caller address to be set - span
- instance of CheatSpan
specifying the number of contract calls with the cheat applied
Fully qualified path: snforge_std::cheatcodes::execution_info::caller_address::cheat_caller_address
pub fn cheat_caller_address(
contract_address: ContractAddress, caller_address: ContractAddress, span: CheatSpan,
)
start_cheat_caller_address_global
Changes the caller address. - caller_address
- caller address to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::caller_address::start_cheat_caller_address_global
pub fn start_cheat_caller_address_global(caller_address: ContractAddress)
stop_cheat_caller_address_global
Cancels the start_cheat_caller_address_global
.
Fully qualified path: snforge_std::cheatcodes::execution_info::caller_address::stop_cheat_caller_address_global
pub fn stop_cheat_caller_address_global()
start_cheat_caller_address
Changes the caller address for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to cheat - caller_address
- caller address to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::caller_address::start_cheat_caller_address
pub fn start_cheat_caller_address(
contract_address: ContractAddress, caller_address: ContractAddress,
)
stop_cheat_caller_address
Cancels the cheat_caller_address
/ start_cheat_caller_address
for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to stop cheating
Fully qualified path: snforge_std::cheatcodes::execution_info::caller_address::stop_cheat_caller_address
pub fn stop_cheat_caller_address(contract_address: ContractAddress)
cheat_block_number
Changes the block number for the given contract address and span. - contract_address
- instance of ContractAddress
specifying which contract to cheat - block_number
- block number to be set - span
- instance of CheatSpan
specifying the number of contract calls with the cheat applied
Fully qualified path: snforge_std::cheatcodes::execution_info::block_number::cheat_block_number
pub fn cheat_block_number(contract_address: ContractAddress, block_number: u64, span: CheatSpan)
start_cheat_block_number_global
Changes the block number. - block_number
- block number to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::block_number::start_cheat_block_number_global
pub fn start_cheat_block_number_global(block_number: u64)
stop_cheat_block_number_global
Cancels the start_cheat_block_number_global
.
Fully qualified path: snforge_std::cheatcodes::execution_info::block_number::stop_cheat_block_number_global
pub fn stop_cheat_block_number_global()
start_cheat_block_number
Changes the block number for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to cheat - block_number
- block number to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::block_number::start_cheat_block_number
pub fn start_cheat_block_number(contract_address: ContractAddress, block_number: u64)
stop_cheat_block_number
Cancels the cheat_block_number
/ start_cheat_block_number
for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to stop cheating
Fully qualified path: snforge_std::cheatcodes::execution_info::block_number::stop_cheat_block_number
pub fn stop_cheat_block_number(contract_address: ContractAddress)
cheat_block_timestamp
Changes the block timestamp for the given contract address and span. - contract_address
- instance of ContractAddress
specifying which contract to cheat - block_timestamp
- block timestamp to be set - span
- instance of CheatSpan
specifying the number of contract calls with the cheat applied
Fully qualified path: snforge_std::cheatcodes::execution_info::block_timestamp::cheat_block_timestamp
pub fn cheat_block_timestamp(
contract_address: ContractAddress, block_timestamp: u64, span: CheatSpan,
)
start_cheat_block_timestamp_global
Changes the block timestamp. - block_timestamp
- block timestamp to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::block_timestamp::start_cheat_block_timestamp_global
pub fn start_cheat_block_timestamp_global(block_timestamp: u64)
stop_cheat_block_timestamp_global
Cancels the start_cheat_block_timestamp_global
.
Fully qualified path: snforge_std::cheatcodes::execution_info::block_timestamp::stop_cheat_block_timestamp_global
pub fn stop_cheat_block_timestamp_global()
start_cheat_block_timestamp
Changes the block timestamp for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to cheat - block_timestamp
- block timestamp to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::block_timestamp::start_cheat_block_timestamp
pub fn start_cheat_block_timestamp(contract_address: ContractAddress, block_timestamp: u64)
stop_cheat_block_timestamp
Cancels the cheat_block_timestamp
/ start_cheat_block_timestamp
for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to stop cheating
Fully qualified path: snforge_std::cheatcodes::execution_info::block_timestamp::stop_cheat_block_timestamp
pub fn stop_cheat_block_timestamp(contract_address: ContractAddress)
cheat_sequencer_address
Changes the sequencer address for the given contract address and span. - contract_address
- instance of ContractAddress
specifying which contract to cheat - sequencer_address
- sequencer address to be set - span
- instance of CheatSpan
specifying the number of contract calls with the cheat applied
Fully qualified path: snforge_std::cheatcodes::execution_info::sequencer_address::cheat_sequencer_address
pub fn cheat_sequencer_address(
contract_address: ContractAddress, sequencer_address: ContractAddress, span: CheatSpan,
)
start_cheat_sequencer_address_global
Changes the sequencer address. - sequencer_address
- sequencer address to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::sequencer_address::start_cheat_sequencer_address_global
pub fn start_cheat_sequencer_address_global(sequencer_address: ContractAddress)
stop_cheat_sequencer_address_global
Cancels the start_cheat_sequencer_address_global
.
Fully qualified path: snforge_std::cheatcodes::execution_info::sequencer_address::stop_cheat_sequencer_address_global
pub fn stop_cheat_sequencer_address_global()
start_cheat_sequencer_address
Changes the sequencer address for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to cheat - sequencer_address
- sequencer address to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::sequencer_address::start_cheat_sequencer_address
pub fn start_cheat_sequencer_address(
contract_address: ContractAddress, sequencer_address: ContractAddress,
)
stop_cheat_sequencer_address
Cancels the cheat_sequencer_address
/ start_cheat_sequencer_address
for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to stop cheating
Fully qualified path: snforge_std::cheatcodes::execution_info::sequencer_address::stop_cheat_sequencer_address
pub fn stop_cheat_sequencer_address(contract_address: ContractAddress)
cheat_transaction_version
Changes the transaction version for the given contract address and span. - contract_address
- instance of ContractAddress
specifying which contract to cheat - version
- transaction version to be set - span
- instance of CheatSpan
specifying the number of contract calls with the cheat applied
Fully qualified path: snforge_std::cheatcodes::execution_info::version::cheat_transaction_version
pub fn cheat_transaction_version(
contract_address: ContractAddress, version: felt252, span: CheatSpan,
)
start_cheat_transaction_version_global
Changes the transaction version. - version
- transaction version to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::version::start_cheat_transaction_version_global
pub fn start_cheat_transaction_version_global(version: felt252)
stop_cheat_transaction_version_global
Cancels the start_cheat_transaction_version_global
.
Fully qualified path: snforge_std::cheatcodes::execution_info::version::stop_cheat_transaction_version_global
pub fn stop_cheat_transaction_version_global()
start_cheat_transaction_version
Changes the transaction version for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to cheat - version
- transaction version to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::version::start_cheat_transaction_version
pub fn start_cheat_transaction_version(contract_address: ContractAddress, version: felt252)
stop_cheat_transaction_version
Cancels the cheat_transaction_version
/ start_cheat_transaction_version
for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to stop cheating
Fully qualified path: snforge_std::cheatcodes::execution_info::version::stop_cheat_transaction_version
pub fn stop_cheat_transaction_version(contract_address: ContractAddress)
cheat_max_fee
Changes the transaction max fee for the given contract address and span. - contract_address
- instance of ContractAddress
specifying which contract to cheat - max_fee
- transaction max fee to be set - span
- instance of CheatSpan
specifying the number of contract calls with the cheat applied
Fully qualified path: snforge_std::cheatcodes::execution_info::max_fee::cheat_max_fee
pub fn cheat_max_fee(contract_address: ContractAddress, max_fee: u128, span: CheatSpan)
start_cheat_max_fee_global
Changes the transaction max fee. - max_fee
- transaction max fee to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::max_fee::start_cheat_max_fee_global
pub fn start_cheat_max_fee_global(max_fee: u128)
stop_cheat_max_fee_global
Cancels the start_cheat_max_fee_global
.
Fully qualified path: snforge_std::cheatcodes::execution_info::max_fee::stop_cheat_max_fee_global
pub fn stop_cheat_max_fee_global()
start_cheat_max_fee
Changes the transaction max fee for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to cheat - max_fee
- transaction max fee to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::max_fee::start_cheat_max_fee
pub fn start_cheat_max_fee(contract_address: ContractAddress, max_fee: u128)
stop_cheat_max_fee
Cancels the cheat_max_fee
/ start_cheat_max_fee
for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to stop cheating
Fully qualified path: snforge_std::cheatcodes::execution_info::max_fee::stop_cheat_max_fee
pub fn stop_cheat_max_fee(contract_address: ContractAddress)
cheat_signature
Changes the transaction signature for the given contract address and span. - contract_address
- instance of ContractAddress
specifying which contract to cheat - signature
- transaction signature to be set - span
- instance of CheatSpan
specifying the number of contract calls with the cheat applied
Fully qualified path: snforge_std::cheatcodes::execution_info::signature::cheat_signature
pub fn cheat_signature(contract_address: ContractAddress, signature: Span<felt252>, span: CheatSpan)
start_cheat_signature_global
Changes the transaction signature. - signature
- transaction signature to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::signature::start_cheat_signature_global
pub fn start_cheat_signature_global(signature: Span<felt252>)
stop_cheat_signature_global
Cancels the start_cheat_signature_global
.
Fully qualified path: snforge_std::cheatcodes::execution_info::signature::stop_cheat_signature_global
pub fn stop_cheat_signature_global()
start_cheat_signature
Changes the transaction signature for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to cheat - signature
- transaction signature to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::signature::start_cheat_signature
pub fn start_cheat_signature(contract_address: ContractAddress, signature: Span<felt252>)
stop_cheat_signature
Cancels the cheat_signature
/ start_cheat_signature
for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to stop cheating
Fully qualified path: snforge_std::cheatcodes::execution_info::signature::stop_cheat_signature
pub fn stop_cheat_signature(contract_address: ContractAddress)
cheat_transaction_hash
Changes the transaction hash for the given contract address and span. - contract_address
- instance of ContractAddress
specifying which contract to cheat - transaction_hash
- transaction hash to be set - span
- instance of CheatSpan
specifying the number of contract calls with the cheat applied
Fully qualified path: snforge_std::cheatcodes::execution_info::transaction_hash::cheat_transaction_hash
pub fn cheat_transaction_hash(
contract_address: ContractAddress, transaction_hash: felt252, span: CheatSpan,
)
start_cheat_transaction_hash_global
Changes the transaction hash. - transaction_hash
- transaction hash to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::transaction_hash::start_cheat_transaction_hash_global
pub fn start_cheat_transaction_hash_global(transaction_hash: felt252)
stop_cheat_transaction_hash_global
Cancels the start_cheat_transaction_hash_global
.
Fully qualified path: snforge_std::cheatcodes::execution_info::transaction_hash::stop_cheat_transaction_hash_global
pub fn stop_cheat_transaction_hash_global()
start_cheat_transaction_hash
Changes the transaction hash for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to cheat - transaction_hash
- transaction hash to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::transaction_hash::start_cheat_transaction_hash
pub fn start_cheat_transaction_hash(contract_address: ContractAddress, transaction_hash: felt252)
stop_cheat_transaction_hash
Cancels the cheat_transaction_hash
/ start_cheat_transaction_hash
for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to stop cheating
Fully qualified path: snforge_std::cheatcodes::execution_info::transaction_hash::stop_cheat_transaction_hash
pub fn stop_cheat_transaction_hash(contract_address: ContractAddress)
cheat_chain_id
Changes the transaction chain_id for the given contract address and span. - contract_address
- instance of ContractAddress
specifying which contract to cheat - chain_id
- transaction chain_id to be set - span
- instance of CheatSpan
specifying the number of contract calls with the cheat applied
Fully qualified path: snforge_std::cheatcodes::execution_info::chain_id::cheat_chain_id
pub fn cheat_chain_id(contract_address: ContractAddress, chain_id: felt252, span: CheatSpan)
start_cheat_chain_id_global
Changes the transaction chain_id. - chain_id
- transaction chain_id to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::chain_id::start_cheat_chain_id_global
pub fn start_cheat_chain_id_global(chain_id: felt252)
stop_cheat_chain_id_global
Cancels the start_cheat_chain_id_global
.
Fully qualified path: snforge_std::cheatcodes::execution_info::chain_id::stop_cheat_chain_id_global
pub fn stop_cheat_chain_id_global()
start_cheat_chain_id
Changes the transaction chain_id for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to cheat - chain_id
- transaction chain_id to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::chain_id::start_cheat_chain_id
pub fn start_cheat_chain_id(contract_address: ContractAddress, chain_id: felt252)
stop_cheat_chain_id
Cancels the cheat_chain_id
/ start_cheat_chain_id
for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to stop cheating
Fully qualified path: snforge_std::cheatcodes::execution_info::chain_id::stop_cheat_chain_id
pub fn stop_cheat_chain_id(contract_address: ContractAddress)
cheat_nonce
Changes the transaction nonce for the given contract address and span. - contract_address
- instance of ContractAddress
specifying which contract to cheat - nonce
- transaction nonce to be set - span
- instance of CheatSpan
specifying the number of contract calls with the cheat applied
Fully qualified path: snforge_std::cheatcodes::execution_info::nonce::cheat_nonce
pub fn cheat_nonce(contract_address: ContractAddress, nonce: felt252, span: CheatSpan)
start_cheat_nonce_global
Changes the transaction nonce. - nonce
- transaction nonce to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::nonce::start_cheat_nonce_global
pub fn start_cheat_nonce_global(nonce: felt252)
stop_cheat_nonce_global
Cancels the start_cheat_nonce_global
.
Fully qualified path: snforge_std::cheatcodes::execution_info::nonce::stop_cheat_nonce_global
pub fn stop_cheat_nonce_global()
start_cheat_nonce
Changes the transaction nonce for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to cheat - nonce
- transaction nonce to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::nonce::start_cheat_nonce
pub fn start_cheat_nonce(contract_address: ContractAddress, nonce: felt252)
stop_cheat_nonce
Cancels the cheat_nonce
/ start_cheat_nonce
for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to stop cheating
Fully qualified path: snforge_std::cheatcodes::execution_info::nonce::stop_cheat_nonce
pub fn stop_cheat_nonce(contract_address: ContractAddress)
cheat_resource_bounds
Changes the transaction resource bounds for the given contract address and span. - contract_address
- instance of ContractAddress
specifying which contract to cheat - resource_bounds
- transaction resource bounds to be set - span
- instance of CheatSpan
specifying the number of contract calls with the cheat applied
Fully qualified path: snforge_std::cheatcodes::execution_info::resource_bounds::cheat_resource_bounds
pub fn cheat_resource_bounds(
contract_address: ContractAddress, resource_bounds: Span<ResourcesBounds>, span: CheatSpan,
)
start_cheat_resource_bounds_global
Changes the transaction resource bounds. - resource_bounds
- transaction resource bounds to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::resource_bounds::start_cheat_resource_bounds_global
pub fn start_cheat_resource_bounds_global(resource_bounds: Span<ResourcesBounds>)
stop_cheat_resource_bounds_global
Cancels the start_cheat_resource_bounds_global
.
Fully qualified path: snforge_std::cheatcodes::execution_info::resource_bounds::stop_cheat_resource_bounds_global
pub fn stop_cheat_resource_bounds_global()
start_cheat_resource_bounds
Changes the transaction resource bounds for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to cheat - resource_bounds
- transaction resource bounds to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::resource_bounds::start_cheat_resource_bounds
pub fn start_cheat_resource_bounds(
contract_address: ContractAddress, resource_bounds: Span<ResourcesBounds>,
)
stop_cheat_resource_bounds
Cancels the cheat_resource_bounds
/ start_cheat_resource_bounds
for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to stop cheating
Fully qualified path: snforge_std::cheatcodes::execution_info::resource_bounds::stop_cheat_resource_bounds
pub fn stop_cheat_resource_bounds(contract_address: ContractAddress)
cheat_tip
Changes the transaction tip for the given contract address and span. - contract_address
- instance of ContractAddress
specifying which contract to cheat - tip
- transaction tip to be set - span
- instance of CheatSpan
specifying the number of contract calls with the cheat applied
Fully qualified path: snforge_std::cheatcodes::execution_info::tip::cheat_tip
pub fn cheat_tip(contract_address: ContractAddress, tip: u128, span: CheatSpan)
start_cheat_tip_global
Changes the transaction tip. - tip
- transaction tip to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::tip::start_cheat_tip_global
pub fn start_cheat_tip_global(tip: u128)
stop_cheat_tip_global
Cancels the start_cheat_tip_global
.
Fully qualified path: snforge_std::cheatcodes::execution_info::tip::stop_cheat_tip_global
pub fn stop_cheat_tip_global()
start_cheat_tip
Changes the transaction tip for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to cheat - tip
- transaction tip to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::tip::start_cheat_tip
pub fn start_cheat_tip(contract_address: ContractAddress, tip: u128)
stop_cheat_tip
Cancels the cheat_tip
/ start_cheat_tip
for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to stop cheating
Fully qualified path: snforge_std::cheatcodes::execution_info::tip::stop_cheat_tip
pub fn stop_cheat_tip(contract_address: ContractAddress)
cheat_paymaster_data
Changes the transaction paymaster data for the given contract address and span. - contract_address
- instance of ContractAddress
specifying which contract to cheat - paymaster_data
- transaction paymaster data to be set - span
- instance of CheatSpan
specifying the number of contract calls with the cheat applied
Fully qualified path: snforge_std::cheatcodes::execution_info::paymaster_data::cheat_paymaster_data
pub fn cheat_paymaster_data(
contract_address: ContractAddress, paymaster_data: Span<felt252>, span: CheatSpan,
)
start_cheat_paymaster_data_global
Changes the transaction paymaster data. - paymaster_data
- transaction paymaster data to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::paymaster_data::start_cheat_paymaster_data_global
pub fn start_cheat_paymaster_data_global(paymaster_data: Span<felt252>)
stop_cheat_paymaster_data_global
Cancels the start_cheat_paymaster_data_global
.
Fully qualified path: snforge_std::cheatcodes::execution_info::paymaster_data::stop_cheat_paymaster_data_global
pub fn stop_cheat_paymaster_data_global()
start_cheat_paymaster_data
Changes the transaction paymaster data for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to cheat - paymaster_data
- transaction paymaster data to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::paymaster_data::start_cheat_paymaster_data
pub fn start_cheat_paymaster_data(contract_address: ContractAddress, paymaster_data: Span<felt252>)
stop_cheat_paymaster_data
Cancels the cheat_paymaster_data
/ start_cheat_paymaster_data
for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to stop cheating
Fully qualified path: snforge_std::cheatcodes::execution_info::paymaster_data::stop_cheat_paymaster_data
pub fn stop_cheat_paymaster_data(contract_address: ContractAddress)
cheat_nonce_data_availability_mode
Changes the transaction nonce data availability mode for the given contract address and span. - contract_address
- instance of ContractAddress
specifying which contracts to cheat - nonce_data_availability_mode
- transaction nonce data availability mode to be set - span
- instance of CheatSpan
specifying the number of contract calls with the cheat applied
Fully qualified path: snforge_std::cheatcodes::execution_info::nonce_data_availability_mode::cheat_nonce_data_availability_mode
pub fn cheat_nonce_data_availability_mode(
contract_address: ContractAddress, nonce_data_availability_mode: u32, span: CheatSpan,
)
start_cheat_nonce_data_availability_mode_global
Changes the transaction nonce data availability mode. - nonce_data_availability_mode
- transaction nonce data availability mode to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::nonce_data_availability_mode::start_cheat_nonce_data_availability_mode_global
pub fn start_cheat_nonce_data_availability_mode_global(nonce_data_availability_mode: u32)
stop_cheat_nonce_data_availability_mode_global
Cancels the start_cheat_nonce_data_availability_mode_global
.
Fully qualified path: snforge_std::cheatcodes::execution_info::nonce_data_availability_mode::stop_cheat_nonce_data_availability_mode_global
pub fn stop_cheat_nonce_data_availability_mode_global()
start_cheat_nonce_data_availability_mode
Changes the transaction nonce data availability mode for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to cheat - nonce_data_availability_mode
- transaction nonce data availability mode to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::nonce_data_availability_mode::start_cheat_nonce_data_availability_mode
pub fn start_cheat_nonce_data_availability_mode(
contract_address: ContractAddress, nonce_data_availability_mode: u32,
)
stop_cheat_nonce_data_availability_mode
Cancels the cheat_nonce_data_availability_mode
/ start_cheat_nonce_data_availability_mode
for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to stop cheating
Fully qualified path: snforge_std::cheatcodes::execution_info::nonce_data_availability_mode::stop_cheat_nonce_data_availability_mode
pub fn stop_cheat_nonce_data_availability_mode(contract_address: ContractAddress)
cheat_fee_data_availability_mode
Changes the transaction fee data availability mode for the given contract address and span. - contract_address
- instance of ContractAddress
specifying which contracts to cheat - fee_data_availability_mode
- transaction fee data availability mode to be set - span
- instance of CheatSpan
specifying the number of contract calls with the cheat applied
Fully qualified path: snforge_std::cheatcodes::execution_info::fee_data_availability_mode::cheat_fee_data_availability_mode
pub fn cheat_fee_data_availability_mode(
contract_address: ContractAddress, fee_data_availability_mode: u32, span: CheatSpan,
)
start_cheat_fee_data_availability_mode_global
Changes the transaction fee data availability mode. - fee_data_availability_mode
- transaction fee data availability mode to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::fee_data_availability_mode::start_cheat_fee_data_availability_mode_global
pub fn start_cheat_fee_data_availability_mode_global(fee_data_availability_mode: u32)
stop_cheat_fee_data_availability_mode_global
Cancels the start_cheat_fee_data_availability_mode_global
.
Fully qualified path: snforge_std::cheatcodes::execution_info::fee_data_availability_mode::stop_cheat_fee_data_availability_mode_global
pub fn stop_cheat_fee_data_availability_mode_global()
start_cheat_fee_data_availability_mode
Changes the transaction fee data availability mode for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to cheat - fee_data_availability_mode
- transaction fee data availability mode to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::fee_data_availability_mode::start_cheat_fee_data_availability_mode
pub fn start_cheat_fee_data_availability_mode(
contract_address: ContractAddress, fee_data_availability_mode: u32,
)
stop_cheat_fee_data_availability_mode
Cancels the cheat_fee_data_availability_mode
/ start_cheat_fee_data_availability_mode
for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to stop cheating
Fully qualified path: snforge_std::cheatcodes::execution_info::fee_data_availability_mode::stop_cheat_fee_data_availability_mode
pub fn stop_cheat_fee_data_availability_mode(contract_address: ContractAddress)
cheat_account_deployment_data
Changes the transaction account deployment data for the given contract address and span. - contract_address
- instance of ContractAddress
specifying which contracts to cheat - account_deployment_data
- transaction account deployment data to be set - span
- instance of CheatSpan
specifying the number of contract calls with the cheat applied
Fully qualified path: snforge_std::cheatcodes::execution_info::account_deployment_data::cheat_account_deployment_data
pub fn cheat_account_deployment_data(
contract_address: ContractAddress, account_deployment_data: Span<felt252>, span: CheatSpan,
)
start_cheat_account_deployment_data_global
Changes the transaction account deployment data. - account_deployment_data
- transaction account deployment data to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::account_deployment_data::start_cheat_account_deployment_data_global
pub fn start_cheat_account_deployment_data_global(account_deployment_data: Span<felt252>)
stop_cheat_account_deployment_data_global
Cancels the cheat_account_deployment_data_global
.
Fully qualified path: snforge_std::cheatcodes::execution_info::account_deployment_data::stop_cheat_account_deployment_data_global
pub fn stop_cheat_account_deployment_data_global()
start_cheat_account_deployment_data
Changes the transaction account deployment data for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to cheat - account_deployment_data
- transaction account deployment data to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::account_deployment_data::start_cheat_account_deployment_data
pub fn start_cheat_account_deployment_data(
contract_address: ContractAddress, account_deployment_data: Span<felt252>,
)
stop_cheat_account_deployment_data
Cancels the cheat_account_deployment_data
/ start_cheat_account_deployment_data
for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to stop cheating
Fully qualified path: snforge_std::cheatcodes::execution_info::account_deployment_data::stop_cheat_account_deployment_data
pub fn stop_cheat_account_deployment_data(contract_address: ContractAddress)
cheat_account_contract_address
Changes the address of an account which the transaction originates from, for the given contract address and span. - contract_address
- instance of ContractAddress
specifying which contracts to cheat - account_contract_address
- transaction account deployment data to be set - span
- instance of CheatSpan
specifying the number of contract calls with the cheat applied
Fully qualified path: snforge_std::cheatcodes::execution_info::account_contract_address::cheat_account_contract_address
pub fn cheat_account_contract_address(
contract_address: ContractAddress, account_contract_address: ContractAddress, span: CheatSpan,
)
start_cheat_account_contract_address_global
Changes the address of an account which the transaction originates from. - account_contract_address
- transaction account deployment data to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::account_contract_address::start_cheat_account_contract_address_global
pub fn start_cheat_account_contract_address_global(account_contract_address: ContractAddress)
stop_cheat_account_contract_address_global
Cancels the start_cheat_account_contract_address_global
.
Fully qualified path: snforge_std::cheatcodes::execution_info::account_contract_address::stop_cheat_account_contract_address_global
pub fn stop_cheat_account_contract_address_global()
start_cheat_account_contract_address
Changes the address of an account which the transaction originates from, for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to cheat - account_contract_address
- transaction account deployment data to be set
Fully qualified path: snforge_std::cheatcodes::execution_info::account_contract_address::start_cheat_account_contract_address
pub fn start_cheat_account_contract_address(
contract_address: ContractAddress, account_contract_address: ContractAddress,
)
stop_cheat_account_contract_address
Cancels the cheat_account_contract_address
/ start_cheat_account_contract_address
for the given contract_address. - contract_address
- instance of ContractAddress
specifying which contract to stop cheating
Fully qualified path: snforge_std::cheatcodes::execution_info::account_contract_address::stop_cheat_account_contract_address
pub fn stop_cheat_account_contract_address(contract_address: ContractAddress)
spy_messages_to_l1
Creates MessageToL1Spy
instance that spies on all messages sent to L1
Fully qualified path: snforge_std::cheatcodes::message_to_l1::spy_messages_to_l1
pub fn spy_messages_to_l1() -> MessageToL1Spy
generate_random_felt
Generates a random felt value Returns a random felt within the range of 0 and 2^252 - 1
Fully qualified path: snforge_std::cheatcodes::generate_random_felt::generate_random_felt
pub fn generate_random_felt() -> felt252
read_txt
file
- a File
struct to read text data from Returns an array of felts read from the file, panics if read was not possible
Fully qualified path: snforge_std::fs::file_operations::read_txt
pub fn read_txt(file: @File) -> Array<felt252>
read_json
file
- a File
struct to read json data from Returns an array of felts read from the file, panics if read was not possible, or json was incorrect
Fully qualified path: snforge_std::fs::file_operations::read_json
pub fn read_json(file: @File) -> Array<felt252>
var
Reads an environment variable, without parsing it name
- name of an environment variable Returns the read array of felts
Fully qualified path: snforge_std::env::env_vars::var
pub fn var(name: ByteArray) -> Array<felt252>
get_call_trace
Returns current call trace of the test, up to the last call made to a contract
Fully qualified path: snforge_std::trace::get_call_trace
pub fn get_call_trace() -> CallTrace
byte_array_as_felt_array
Fully qualified path: snforge_std::byte_array::byte_array_as_felt_array
pub fn byte_array_as_felt_array(self: @ByteArray) -> Array<felt252>
try_deserialize_bytearray_error
This function is meant to transform a serialized output from a contract call into a ByteArray
. x
- Span of felt252
s returned from a contract call (panic data) Returns the parsed ByteArray
, or an Err
if the parsing failed.
Fully qualified path: snforge_std::byte_array::try_deserialize_bytearray_error
pub fn try_deserialize_bytearray_error(x: Span<felt252>) -> Result<ByteArray, ByteArray>
handle_cheatcode
Fully qualified path: snforge_std::_cheatcode::handle_cheatcode
pub(crate) fn handle_cheatcode(input: Span<felt252>) -> Span<felt252>
_is_config_run
Fully qualified path: snforge_std::_cheatcode::_is_config_run
pub fn _is_config_run() -> bool
_is_config_run
Fully qualified path: snforge_std::_cheatcode::_is_config_run
pub fn _is_config_run() -> bool
Structs
ContractClass
Fully qualified path: snforge_std::cheatcodes::contract_class::ContractClass
#[derive(Drop, Serde, Copy)]
pub struct ContractClass {
pub class_hash: ClassHash,
}
L1Handler
Fully qualified path: snforge_std::cheatcodes::l1_handler::L1Handler
#[derive(Drop, Clone)]
pub struct L1Handler {
target: ContractAddress,
selector: felt252,
}
Event
Raw event format (as seen via the RPC-API), can be used for asserting the emitted events.
Fully qualified path: snforge_std::cheatcodes::events::Event
#[derive(Drop, Clone, Serde, Debug)]
pub struct Event {
pub keys: Array<felt252>,
pub data: Array<felt252>,
}
EventSpy
An event spy structure allowing to get events emitted only after its creation.
Fully qualified path: snforge_std::cheatcodes::events::EventSpy
#[derive(Drop, Serde)]
pub struct EventSpy {
event_offset: usize,
}
MessageToL1
Raw message to L1 format (as seen via the RPC-API), can be used for asserting the sent messages.
Fully qualified path: snforge_std::cheatcodes::message_to_l1::MessageToL1
#[derive(Drop, Clone, Serde)]
pub struct MessageToL1 {
pub to_address: EthAddress,
pub payload: Array<felt252>,
}
MessageToL1Spy
A message spy structure allowing to get messages emitted only after its creation.
Fully qualified path: snforge_std::cheatcodes::message_to_l1::MessageToL1Spy
#[derive(Drop, Serde)]
pub struct MessageToL1Spy {
message_offset: usize,
}
Event
Raw event format (as seen via the RPC-API), can be used for asserting the emitted events.
Fully qualified path: snforge_std::cheatcodes::events::Event
#[derive(Drop, Clone, Serde, Debug)]
pub struct Event {
pub keys: Array<felt252>,
pub data: Array<felt252>,
}
EventSpy
An event spy structure allowing to get events emitted only after its creation.
Fully qualified path: snforge_std::cheatcodes::events::EventSpy
#[derive(Drop, Serde)]
pub struct EventSpy {
event_offset: usize,
}
Events
A wrapper structure on an array of events to handle filtering smoothly.
Fully qualified path: snforge_std::cheatcodes::events::Events
#[derive(Drop, Serde, Clone, Debug)]
pub struct Events {
pub events: Array<(ContractAddress, Event)>,
}
L1Handler
Fully qualified path: snforge_std::cheatcodes::l1_handler::L1Handler
#[derive(Drop, Clone)]
pub struct L1Handler {
target: ContractAddress,
selector: felt252,
}
ContractClass
Fully qualified path: snforge_std::cheatcodes::contract_class::ContractClass
#[derive(Drop, Serde, Copy)]
pub struct ContractClass {
pub class_hash: ClassHash,
}
MessageToL1
Raw message to L1 format (as seen via the RPC-API), can be used for asserting the sent messages.
Fully qualified path: snforge_std::cheatcodes::message_to_l1::MessageToL1
#[derive(Drop, Clone, Serde)]
pub struct MessageToL1 {
pub to_address: EthAddress,
pub payload: Array<felt252>,
}
MessageToL1Spy
A message spy structure allowing to get messages emitted only after its creation.
Fully qualified path: snforge_std::cheatcodes::message_to_l1::MessageToL1Spy
#[derive(Drop, Serde)]
pub struct MessageToL1Spy {
message_offset: usize,
}
MessagesToL1
A wrapper structure on an array of messages to handle filtering smoothly.
Fully qualified path: snforge_std::cheatcodes::message_to_l1::MessagesToL1
#[derive(Drop, Serde)]
pub struct MessagesToL1 {
pub messages: Array<(ContractAddress, MessageToL1)>,
}
File
Fully qualified path: snforge_std::fs::file_operations::File
#[derive(Drop, Clone)]
pub struct File {
path: ByteArray,
}
KeyPair
Fully qualified path: snforge_std::signature::KeyPair
#[derive(Copy, Drop)]
pub struct KeyPair<SK, PK> {
pub secret_key: SK,
pub public_key: PK,
}
CallTrace
Tree-like structure which contains all of the starknet calls and sub-calls along with the results
Fully qualified path: snforge_std::trace::CallTrace
#[derive(Drop, Serde, PartialEq, Clone, Debug)]
pub struct CallTrace {
pub entry_point: CallEntryPoint,
pub nested_calls: Array<CallTrace>,
pub result: CallResult,
}
CallEntryPoint
A single function entry point summary
Fully qualified path: snforge_std::trace::CallEntryPoint
#[derive(Drop, Serde, PartialEq, Clone, Debug)]
pub struct CallEntryPoint {
pub entry_point_type: EntryPointType,
pub entry_point_selector: felt252,
pub calldata: Array<felt252>,
pub contract_address: ContractAddress,
pub caller_address: ContractAddress,
pub call_type: CallType,
}
AvailableGasConfig
Fully qualified path: snforge_std::_config_types::AvailableGasConfig
#[derive(Drop, Serde)]
pub struct AvailableGasConfig {
pub gas: felt252,
}
InlineForkConfig
Fully qualified path: snforge_std::_config_types::InlineForkConfig
#[derive(Drop, Serde)]
pub struct InlineForkConfig {
pub url: ByteArray,
pub block: BlockId,
}
OverriddenForkConfig
Fully qualified path: snforge_std::_config_types::OverriddenForkConfig
#[derive(Drop, Serde)]
pub struct OverriddenForkConfig {
pub name: ByteArray,
pub block: BlockId,
}
FuzzerConfig
Fully qualified path: snforge_std::_config_types::FuzzerConfig
#[derive(Drop, Serde)]
pub struct FuzzerConfig {
pub runs: Option<felt252>,
pub seed: Option<felt252>,
}
ShouldPanicConfig
Fully qualified path: snforge_std::_config_types::ShouldPanicConfig
#[derive(Drop, Serde)]
pub struct ShouldPanicConfig {
pub expected: Expected,
}
IgnoreConfig
Fully qualified path: snforge_std::_config_types::IgnoreConfig
#[derive(Drop, Serde)]
pub struct IgnoreConfig {
pub is_ignored: bool,
}
Enums
DeclareResult
Fully qualified path: snforge_std::cheatcodes::contract_class::DeclareResult
#[derive(Drop, Serde, Clone)]
pub enum DeclareResult {
Success: ContractClass,
AlreadyDeclared: ContractClass,
}
Variants
Success
Fully qualified path: snforge_std::cheatcodes::contract_class::DeclareResult::Success
Success : ContractClass
AlreadyDeclared
Fully qualified path: snforge_std::cheatcodes::contract_class::DeclareResult::AlreadyDeclared
AlreadyDeclared : ContractClass
BlockTag
Fully qualified path: snforge_std::cheatcodes::fork::BlockTag
#[derive(Drop, Copy, Serde)]
pub enum BlockTag {
Latest,
Pending,
}
Variants
Latest
Fully qualified path: snforge_std::cheatcodes::fork::BlockTag::Latest
Latest
Pending
Fully qualified path: snforge_std::cheatcodes::fork::BlockTag::Pending
Pending
BlockId
Fully qualified path: snforge_std::cheatcodes::fork::BlockId
#[derive(Drop, Copy, Serde)]
pub enum BlockId {
Tag: BlockTag,
Hash: felt252,
Number: u64,
}
Variants
Tag
Fully qualified path: snforge_std::cheatcodes::fork::BlockId::Tag
Tag : BlockTag
Hash
Fully qualified path: snforge_std::cheatcodes::fork::BlockId::Hash
Hash : felt252
Number
Fully qualified path: snforge_std::cheatcodes::fork::BlockId::Number
Number : u64
CheatSpan
Enum used to specify how long the target should be cheated for.
Fully qualified path: snforge_std::cheatcodes::CheatSpan
#[derive(Copy, Drop, Serde, PartialEq, Clone, Debug)]
pub enum CheatSpan {
Indefinite: (),
TargetCalls: usize,
}
Variants
Indefinite
Applies the cheatcode indefinitely, until the cheat is canceled manually (e.g. using stop_cheat_block_timestamp
).
Fully qualified path: snforge_std::cheatcodes::CheatSpan::Indefinite
Indefinite : ( )
TargetCalls
Applies the cheatcode for a specified number of calls to the target, after which the cheat is canceled (or until the cheat is canceled manually).
Fully qualified path: snforge_std::cheatcodes::CheatSpan::TargetCalls
TargetCalls : usize
ReplaceBytecodeError
Fully qualified path: snforge_std::cheatcodes::ReplaceBytecodeError
#[derive(Drop, Serde, PartialEq, Debug)]
pub enum ReplaceBytecodeError {
ContractNotDeployed,
UndeclaredClassHash,
}
Variants
ContractNotDeployed
Means that the contract does not exist, and thus bytecode cannot be replaced
Fully qualified path: snforge_std::cheatcodes::ReplaceBytecodeError::ContractNotDeployed
ContractNotDeployed
UndeclaredClassHash
Means that the given class for replacement is not declared
Fully qualified path: snforge_std::cheatcodes::ReplaceBytecodeError::UndeclaredClassHash
UndeclaredClassHash
CheatSpan
Enum used to specify how long the target should be cheated for.
Fully qualified path: snforge_std::cheatcodes::CheatSpan
#[derive(Copy, Drop, Serde, PartialEq, Clone, Debug)]
pub enum CheatSpan {
Indefinite: (),
TargetCalls: usize,
}
Variants
Indefinite
Applies the cheatcode indefinitely, until the cheat is canceled manually (e.g. using stop_cheat_block_timestamp
).
Fully qualified path: snforge_std::cheatcodes::CheatSpan::Indefinite
Indefinite : ( )
TargetCalls
Applies the cheatcode for a specified number of calls to the target, after which the cheat is canceled (or until the cheat is canceled manually).
Fully qualified path: snforge_std::cheatcodes::CheatSpan::TargetCalls
TargetCalls : usize
ReplaceBytecodeError
Fully qualified path: snforge_std::cheatcodes::ReplaceBytecodeError
#[derive(Drop, Serde, PartialEq, Debug)]
pub enum ReplaceBytecodeError {
ContractNotDeployed,
UndeclaredClassHash,
}
Variants
ContractNotDeployed
Means that the contract does not exist, and thus bytecode cannot be replaced
Fully qualified path: snforge_std::cheatcodes::ReplaceBytecodeError::ContractNotDeployed
ContractNotDeployed
UndeclaredClassHash
Means that the given class for replacement is not declared
Fully qualified path: snforge_std::cheatcodes::ReplaceBytecodeError::UndeclaredClassHash
UndeclaredClassHash
DeclareResult
Fully qualified path: snforge_std::cheatcodes::contract_class::DeclareResult
#[derive(Drop, Serde, Clone)]
pub enum DeclareResult {
Success: ContractClass,
AlreadyDeclared: ContractClass,
}
Variants
Success
Fully qualified path: snforge_std::cheatcodes::contract_class::DeclareResult::Success
Success : ContractClass
AlreadyDeclared
Fully qualified path: snforge_std::cheatcodes::contract_class::DeclareResult::AlreadyDeclared
AlreadyDeclared : ContractClass
BlockTag
Fully qualified path: snforge_std::cheatcodes::fork::BlockTag
#[derive(Drop, Copy, Serde)]
pub enum BlockTag {
Latest,
Pending,
}
Variants
Latest
Fully qualified path: snforge_std::cheatcodes::fork::BlockTag::Latest
Latest
Pending
Fully qualified path: snforge_std::cheatcodes::fork::BlockTag::Pending
Pending
BlockId
Fully qualified path: snforge_std::cheatcodes::fork::BlockId
#[derive(Drop, Copy, Serde)]
pub enum BlockId {
Tag: BlockTag,
Hash: felt252,
Number: u64,
}
Variants
Tag
Fully qualified path: snforge_std::cheatcodes::fork::BlockId::Tag
Tag : BlockTag
Hash
Fully qualified path: snforge_std::cheatcodes::fork::BlockId::Hash
Hash : felt252
Number
Fully qualified path: snforge_std::cheatcodes::fork::BlockId::Number
Number : u64
SignError
Fully qualified path: snforge_std::signature::SignError
#[derive(Copy, Drop, Serde, PartialEq)]
pub enum SignError {
InvalidSecretKey,
HashOutOfRange,
}
Variants
InvalidSecretKey
Fully qualified path: snforge_std::signature::SignError::InvalidSecretKey
InvalidSecretKey
HashOutOfRange
Fully qualified path: snforge_std::signature::SignError::HashOutOfRange
HashOutOfRange
EntryPointType
Type of the function being invoked
Fully qualified path: snforge_std::trace::EntryPointType
#[derive(Drop, Serde, PartialEq, Clone, Debug)]
pub enum EntryPointType {
Constructor,
External,
L1Handler,
}
Variants
Constructor
Constructor of a contract
Fully qualified path: snforge_std::trace::EntryPointType::Constructor
Constructor
External
Contract interface entry point
Fully qualified path: snforge_std::trace::EntryPointType::External
External
L1Handler
An entrypoint for handling messages from L1
Fully qualified path: snforge_std::trace::EntryPointType::L1Handler
L1Handler
CallType
Denotes type of the call
Fully qualified path: snforge_std::trace::CallType
#[derive(Drop, Serde, PartialEq, Clone, Debug)]
pub enum CallType {
Call,
Delegate,
}
Variants
Call
Regular call
Fully qualified path: snforge_std::trace::CallType::Call
Call
Delegate
Library call
Fully qualified path: snforge_std::trace::CallType::Delegate
Delegate
CallResult
Result of a contract or a library call
Fully qualified path: snforge_std::trace::CallResult
#[derive(Drop, Serde, PartialEq, Clone, Debug)]
pub enum CallResult {
Success: Array<felt252>,
Failure: CallFailure,
}
Variants
Success
A successful call with it's result
Fully qualified path: snforge_std::trace::CallResult::Success
Success : Array < felt252 >
Failure
A failed call along with it's panic data
Fully qualified path: snforge_std::trace::CallResult::Failure
Failure : CallFailure
CallFailure
Represents a pre-processed failure of a call
Fully qualified path: snforge_std::trace::CallFailure
#[derive(Drop, Serde, PartialEq, Clone, Debug)]
pub enum CallFailure {
Panic: Array<felt252>,
Error: ByteArray,
}
Variants
Panic
Contains raw panic data
Fully qualified path: snforge_std::trace::CallFailure::Panic
Panic : Array < felt252 >
Error
Contains panic data in parsed form, if parsing is applicable
Fully qualified path: snforge_std::trace::CallFailure::Error
Error : ByteArray
BlockId
Fully qualified path: snforge_std::_config_types::BlockId
#[derive(Drop, Serde)]
pub enum BlockId {
BlockTag: (),
BlockHash: felt252,
BlockNumber: felt252,
}
Variants
BlockTag
Fully qualified path: snforge_std::_config_types::BlockId::BlockTag
BlockTag : ( )
BlockHash
Fully qualified path: snforge_std::_config_types::BlockId::BlockHash
BlockHash : felt252
BlockNumber
Fully qualified path: snforge_std::_config_types::BlockId::BlockNumber
BlockNumber : felt252
ForkConfig
Fully qualified path: snforge_std::_config_types::ForkConfig
#[derive(Drop, Serde)]
pub enum ForkConfig {
Inline: InlineForkConfig,
Named: ByteArray,
Overridden: OverriddenForkConfig,
}
Variants
Inline
Fully qualified path: snforge_std::_config_types::ForkConfig::Inline
Inline : InlineForkConfig
Named
Fully qualified path: snforge_std::_config_types::ForkConfig::Named
Named : ByteArray
Overridden
Fully qualified path: snforge_std::_config_types::ForkConfig::Overridden
Overridden : OverriddenForkConfig
Expected
Fully qualified path: snforge_std::_config_types::Expected
#[derive(Drop, Serde)]
pub enum Expected {
ShortString: felt252,
ByteArray: ByteArray,
Array: Array<felt252>,
Any,
}
Variants
ShortString
Fully qualified path: snforge_std::_config_types::Expected::ShortString
ShortString : felt252
ByteArray
Fully qualified path: snforge_std::_config_types::Expected::ByteArray
ByteArray : ByteArray
Array
Fully qualified path: snforge_std::_config_types::Expected::Array
Array : Array < felt252 >
Any
Fully qualified path: snforge_std::_config_types::Expected::Any
Any
Traits
ContractClassTrait
Fully qualified path: snforge_std::cheatcodes::contract_class::ContractClassTrait
pub trait ContractClassTrait
Trait functions
precalculate_address
Calculates an address of a contract in advance that would be returned when calling deploy
The precalculated address is only correct for the very next deployment The constructor_calldata
has a direct impact on the resulting contract address self
- an instance of the struct ContractClass
which is obtained by calling declare
and unpacking DeclareResult
constructor_calldata
- serialized calldata for the deploy constructor Returns the precalculated ContractAddress
Fully qualified path: snforge_std::cheatcodes::contract_class::ContractClassTrait::precalculate_address
fn precalculate_address(
self: @ContractClass, constructor_calldata: @Array::<felt252>,
) -> ContractAddress
deploy
Deploys a contract self
- an instance of the struct ContractClass
which is obtained by calling declare
and unpacking DeclareResult
constructor_calldata
- calldata for the constructor, serialized with Serde
Returns the address the contract was deployed at and serialized constructor return data, or panic data if it failed
Fully qualified path: snforge_std::cheatcodes::contract_class::ContractClassTrait::deploy
fn deploy(
self: @ContractClass, constructor_calldata: @Array::<felt252>,
) -> SyscallResult<(ContractAddress, Span<felt252>)>
deploy_at
Deploys a contract at a given address self
- an instance of the struct ContractClass
which is obtained by calling declare
and unpacking DeclareResult
constructor_calldata
- serialized calldata for the constructor contract_address
- address the contract should be deployed at Returns the address the contract was deployed at and serialized constructor return data, or panic data if it failed
Fully qualified path: snforge_std::cheatcodes::contract_class::ContractClassTrait::deploy_at
fn deploy_at(
self: @ContractClass,
constructor_calldata: @Array::<felt252>,
contract_address: ContractAddress,
) -> SyscallResult<(ContractAddress, Span<felt252>)>
new
Utility method for creating a new ContractClass
instance class_hash
- a numeric value that can be converted into the class hash of ContractClass
Returns the created ContractClass
Fully qualified path: snforge_std::cheatcodes::contract_class::ContractClassTrait::new
fn new<T, +Into<T, ClassHash>>(class_hash: T) -> ContractClass
DeclareResultTrait
Fully qualified path: snforge_std::cheatcodes::contract_class::DeclareResultTrait
pub trait DeclareResultTrait
Trait functions
contract_class
Gets inner ContractClass
self
- an instance of the struct DeclareResult
which is obtained by calling declare
Fully qualified path: snforge_std::cheatcodes::contract_class::DeclareResultTrait::contract_class
fn contract_class(self: @DeclareResult) -> @ContractClass
L1HandlerTrait
Fully qualified path: snforge_std::cheatcodes::l1_handler::L1HandlerTrait
pub trait L1HandlerTrait
Trait functions
new
Fully qualified path: snforge_std::cheatcodes::l1_handler::L1HandlerTrait::new
fn new(target: ContractAddress, selector: felt252) -> L1Handler
execute
Fully qualified path: snforge_std::cheatcodes::l1_handler::L1HandlerTrait::execute
fn execute(self: L1Handler, from_address: felt252, payload: Span::<felt252>) -> SyscallResult<()>
EventSpyTrait
Fully qualified path: snforge_std::cheatcodes::events::EventSpyTrait
pub trait EventSpyTrait
Trait functions
get_events
Gets all events given EventSpy
spies for.
Fully qualified path: snforge_std::cheatcodes::events::EventSpyTrait::get_events
fn get_events(ref self: EventSpy) -> Events
EventSpyAssertionsTrait
Allows to assert the expected events emission (or lack thereof), in the scope of EventSpy
structure.
Fully qualified path: snforge_std::cheatcodes::events::EventSpyAssertionsTrait
pub trait EventSpyAssertionsTrait<T, impl TEvent: starknet::Event<T>, impl TDrop: Drop<T>>
Trait functions
assert_emitted
Fully qualified path: snforge_std::cheatcodes::events::EventSpyAssertionsTrait::assert_emitted
fn assert_emitted(ref self: EventSpy, events: @Array<(ContractAddress, T)>)
assert_not_emitted
Fully qualified path: snforge_std::cheatcodes::events::EventSpyAssertionsTrait::assert_not_emitted
fn assert_not_emitted(ref self: EventSpy, events: @Array<(ContractAddress, T)>)
EventsFilterTrait
Fully qualified path: snforge_std::cheatcodes::events::EventsFilterTrait
pub trait EventsFilterTrait
Trait functions
emitted_by
Filter events emitted by a given ContractAddress
.
Fully qualified path: snforge_std::cheatcodes::events::EventsFilterTrait::emitted_by
fn emitted_by(self: @Events, contract_address: ContractAddress) -> Events
MessageToL1SpyTrait
Fully qualified path: snforge_std::cheatcodes::message_to_l1::MessageToL1SpyTrait
pub trait MessageToL1SpyTrait
Trait functions
get_messages
Gets all messages given MessageToL1Spy
spies for.
Fully qualified path: snforge_std::cheatcodes::message_to_l1::MessageToL1SpyTrait::get_messages
fn get_messages(ref self: MessageToL1Spy) -> MessagesToL1
MessageToL1FilterTrait
Fully qualified path: snforge_std::cheatcodes::message_to_l1::MessageToL1FilterTrait
pub trait MessageToL1FilterTrait
Trait functions
sent_by
Filter messages emitted by a sender of a given ContractAddress
Fully qualified path: snforge_std::cheatcodes::message_to_l1::MessageToL1FilterTrait::sent_by
fn sent_by(self: @MessagesToL1, contract_address: ContractAddress) -> MessagesToL1
sent_to
Filter messages emitted by a receiver of a given ethereum address
Fully qualified path: snforge_std::cheatcodes::message_to_l1::MessageToL1FilterTrait::sent_to
fn sent_to(self: @MessagesToL1, to_address: EthAddress) -> MessagesToL1
MessageToL1SpyAssertionsTrait
Allows to assert the expected sent messages (or lack thereof), in the scope of MessageToL1Spy
structure.
Fully qualified path: snforge_std::cheatcodes::message_to_l1::MessageToL1SpyAssertionsTrait
pub trait MessageToL1SpyAssertionsTrait
Trait functions
assert_sent
Fully qualified path: snforge_std::cheatcodes::message_to_l1::MessageToL1SpyAssertionsTrait::assert_sent
fn assert_sent(ref self: MessageToL1Spy, messages: @Array<(ContractAddress, MessageToL1)>)
assert_not_sent
Fully qualified path: snforge_std::cheatcodes::message_to_l1::MessageToL1SpyAssertionsTrait::assert_not_sent
fn assert_not_sent(ref self: MessageToL1Spy, messages: @Array<(ContractAddress, MessageToL1)>)
EventSpyTrait
Fully qualified path: snforge_std::cheatcodes::events::EventSpyTrait
pub trait EventSpyTrait
Trait functions
get_events
Gets all events given EventSpy
spies for.
Fully qualified path: snforge_std::cheatcodes::events::EventSpyTrait::get_events
fn get_events(ref self: EventSpy) -> Events
EventsFilterTrait
Fully qualified path: snforge_std::cheatcodes::events::EventsFilterTrait
pub trait EventsFilterTrait
Trait functions
emitted_by
Filter events emitted by a given ContractAddress
.
Fully qualified path: snforge_std::cheatcodes::events::EventsFilterTrait::emitted_by
fn emitted_by(self: @Events, contract_address: ContractAddress) -> Events
EventSpyAssertionsTrait
Allows to assert the expected events emission (or lack thereof), in the scope of EventSpy
structure.
Fully qualified path: snforge_std::cheatcodes::events::EventSpyAssertionsTrait
pub trait EventSpyAssertionsTrait<T, impl TEvent: starknet::Event<T>, impl TDrop: Drop<T>>
Trait functions
assert_emitted
Fully qualified path: snforge_std::cheatcodes::events::EventSpyAssertionsTrait::assert_emitted
fn assert_emitted(ref self: EventSpy, events: @Array<(ContractAddress, T)>)
assert_not_emitted
Fully qualified path: snforge_std::cheatcodes::events::EventSpyAssertionsTrait::assert_not_emitted
fn assert_not_emitted(ref self: EventSpy, events: @Array<(ContractAddress, T)>)
L1HandlerTrait
Fully qualified path: snforge_std::cheatcodes::l1_handler::L1HandlerTrait
pub trait L1HandlerTrait
Trait functions
new
Fully qualified path: snforge_std::cheatcodes::l1_handler::L1HandlerTrait::new
fn new(target: ContractAddress, selector: felt252) -> L1Handler
execute
Fully qualified path: snforge_std::cheatcodes::l1_handler::L1HandlerTrait::execute
fn execute(self: L1Handler, from_address: felt252, payload: Span::<felt252>) -> SyscallResult<()>
ContractClassTrait
Fully qualified path: snforge_std::cheatcodes::contract_class::ContractClassTrait
pub trait ContractClassTrait
Trait functions
precalculate_address
Calculates an address of a contract in advance that would be returned when calling deploy
The precalculated address is only correct for the very next deployment The constructor_calldata
has a direct impact on the resulting contract address self
- an instance of the struct ContractClass
which is obtained by calling declare
and unpacking DeclareResult
constructor_calldata
- serialized calldata for the deploy constructor Returns the precalculated ContractAddress
Fully qualified path: snforge_std::cheatcodes::contract_class::ContractClassTrait::precalculate_address
fn precalculate_address(
self: @ContractClass, constructor_calldata: @Array::<felt252>,
) -> ContractAddress
deploy
Deploys a contract self
- an instance of the struct ContractClass
which is obtained by calling declare
and unpacking DeclareResult
constructor_calldata
- calldata for the constructor, serialized with Serde
Returns the address the contract was deployed at and serialized constructor return data, or panic data if it failed
Fully qualified path: snforge_std::cheatcodes::contract_class::ContractClassTrait::deploy
fn deploy(
self: @ContractClass, constructor_calldata: @Array::<felt252>,
) -> SyscallResult<(ContractAddress, Span<felt252>)>
deploy_at
Deploys a contract at a given address self
- an instance of the struct ContractClass
which is obtained by calling declare
and unpacking DeclareResult
constructor_calldata
- serialized calldata for the constructor contract_address
- address the contract should be deployed at Returns the address the contract was deployed at and serialized constructor return data, or panic data if it failed
Fully qualified path: snforge_std::cheatcodes::contract_class::ContractClassTrait::deploy_at
fn deploy_at(
self: @ContractClass,
constructor_calldata: @Array::<felt252>,
contract_address: ContractAddress,
) -> SyscallResult<(ContractAddress, Span<felt252>)>
new
Utility method for creating a new ContractClass
instance class_hash
- a numeric value that can be converted into the class hash of ContractClass
Returns the created ContractClass
Fully qualified path: snforge_std::cheatcodes::contract_class::ContractClassTrait::new
fn new<T, +Into<T, ClassHash>>(class_hash: T) -> ContractClass
DeclareResultTrait
Fully qualified path: snforge_std::cheatcodes::contract_class::DeclareResultTrait
pub trait DeclareResultTrait
Trait functions
contract_class
Gets inner ContractClass
self
- an instance of the struct DeclareResult
which is obtained by calling declare
Fully qualified path: snforge_std::cheatcodes::contract_class::DeclareResultTrait::contract_class
fn contract_class(self: @DeclareResult) -> @ContractClass
MessageToL1SpyTrait
Fully qualified path: snforge_std::cheatcodes::message_to_l1::MessageToL1SpyTrait
pub trait MessageToL1SpyTrait
Trait functions
get_messages
Gets all messages given MessageToL1Spy
spies for.
Fully qualified path: snforge_std::cheatcodes::message_to_l1::MessageToL1SpyTrait::get_messages
fn get_messages(ref self: MessageToL1Spy) -> MessagesToL1
MessageToL1FilterTrait
Fully qualified path: snforge_std::cheatcodes::message_to_l1::MessageToL1FilterTrait
pub trait MessageToL1FilterTrait
Trait functions
sent_by
Filter messages emitted by a sender of a given ContractAddress
Fully qualified path: snforge_std::cheatcodes::message_to_l1::MessageToL1FilterTrait::sent_by
fn sent_by(self: @MessagesToL1, contract_address: ContractAddress) -> MessagesToL1
sent_to
Filter messages emitted by a receiver of a given ethereum address
Fully qualified path: snforge_std::cheatcodes::message_to_l1::MessageToL1FilterTrait::sent_to
fn sent_to(self: @MessagesToL1, to_address: EthAddress) -> MessagesToL1
MessageToL1SpyAssertionsTrait
Allows to assert the expected sent messages (or lack thereof), in the scope of MessageToL1Spy
structure.
Fully qualified path: snforge_std::cheatcodes::message_to_l1::MessageToL1SpyAssertionsTrait
pub trait MessageToL1SpyAssertionsTrait
Trait functions
assert_sent
Fully qualified path: snforge_std::cheatcodes::message_to_l1::MessageToL1SpyAssertionsTrait::assert_sent
fn assert_sent(ref self: MessageToL1Spy, messages: @Array<(ContractAddress, MessageToL1)>)
assert_not_sent
Fully qualified path: snforge_std::cheatcodes::message_to_l1::MessageToL1SpyAssertionsTrait::assert_not_sent
fn assert_not_sent(ref self: MessageToL1Spy, messages: @Array<(ContractAddress, MessageToL1)>)
FileTrait
Fully qualified path: snforge_std::fs::file_operations::FileTrait
pub trait FileTrait
Trait functions
new
Creates a file struct used for reading json / text path
- a path to file in ByteArray form, relative to the package root
Fully qualified path: snforge_std::fs::file_operations::FileTrait::new
fn new(path: ByteArray) -> File
FileParser
Fully qualified path: snforge_std::fs::file_operations::FileParser
pub trait FileParser<T, impl TSerde: Serde<T>>
Trait functions
parse_txt
Reads from the text file and tries to deserialize the result into given type with Serde
file
- File instance Returns an instance of T
if deserialization was possible
Fully qualified path: snforge_std::fs::file_operations::FileParser::parse_txt
fn parse_txt(file: @File) -> Option<T>
parse_json
Reads from the json file and tries to deserialize the result into given type with Serde
file
- File instance Returns an instance of T
if deserialization was possible
Fully qualified path: snforge_std::fs::file_operations::FileParser::parse_json
fn parse_json(file: @File) -> Option<T>
KeyPairTrait
Fully qualified path: snforge_std::signature::KeyPairTrait
pub trait KeyPairTrait<SK, PK>
Trait functions
generate
Generates the private and public keys using the built-in random generator
Fully qualified path: snforge_std::signature::KeyPairTrait::generate
fn generate() -> KeyPair<SK, PK>
from_secret_key
Derives the KeyPair (secret_key
+ public_key
) using secret_key
Fully qualified path: snforge_std::signature::KeyPairTrait::from_secret_key
fn from_secret_key(secret_key: SK) -> KeyPair<SK, PK>
SignerTrait
Fully qualified path: snforge_std::signature::SignerTrait
pub trait SignerTrait<T, H, U>
Trait functions
sign
Signs given message hash self
- KeyPair used for signing message_hash
- input to sign bounded by the curve type (u256 for 256bit curves, felt252 for StarkCurve) Returns the signature components (usually r,s tuple) or error
Fully qualified path: snforge_std::signature::SignerTrait::sign
fn sign(self: T, message_hash: H) -> Result<U, SignError>
VerifierTrait
Fully qualified path: snforge_std::signature::VerifierTrait
pub trait VerifierTrait<T, H, U>
Trait functions
verify
self
- KeyPair used for verifying message_hash
- input to verify bounded by the curve type (u256 for 256bit curves, felt252 for StarkCurve) signature
- the signature components (usually r,s tuple) Returns a boolean representing the validity of the signature
Fully qualified path: snforge_std::signature::VerifierTrait::verify
fn verify(self: T, message_hash: H, signature: U) -> bool
Impls
Secp256k1CurveKeyPairImpl
Fully qualified path: snforge_std::signature::secp256k1_curve::Secp256k1CurveKeyPairImpl
pub impl Secp256k1CurveKeyPairImpl of KeyPairTrait<u256, Secp256k1Point>
Impl functions
generate
Fully qualified path: snforge_std::signature::secp256k1_curve::Secp256k1CurveKeyPairImpl::generate
fn generate() -> KeyPair<u256, Secp256k1Point>
from_secret_key
Fully qualified path: snforge_std::signature::secp256k1_curve::Secp256k1CurveKeyPairImpl::from_secret_key
fn from_secret_key(secret_key: u256) -> KeyPair<u256, Secp256k1Point>
Secp256k1CurveSignerImpl
Fully qualified path: snforge_std::signature::secp256k1_curve::Secp256k1CurveSignerImpl
pub impl Secp256k1CurveSignerImpl of SignerTrait<KeyPair<u256, Secp256k1Point>, u256, (u256, u256)>
Impl functions
sign
Fully qualified path: snforge_std::signature::secp256k1_curve::Secp256k1CurveSignerImpl::sign
fn sign(self: KeyPair<u256, Secp256k1Point>, message_hash: u256) -> Result<(u256, u256), SignError>
Secp256k1CurveVerifierImpl
Fully qualified path: snforge_std::signature::secp256k1_curve::Secp256k1CurveVerifierImpl
pub impl Secp256k1CurveVerifierImpl of VerifierTrait<
KeyPair<u256, Secp256k1Point>, u256, (u256, u256),
>
Impl functions
verify
Fully qualified path: snforge_std::signature::secp256k1_curve::Secp256k1CurveVerifierImpl::verify
fn verify(self: KeyPair<u256, Secp256k1Point>, message_hash: u256, signature: (u256, u256)) -> bool
Secp256r1CurveKeyPairImpl
Fully qualified path: snforge_std::signature::secp256r1_curve::Secp256r1CurveKeyPairImpl
pub impl Secp256r1CurveKeyPairImpl of KeyPairTrait<u256, Secp256r1Point>
Impl functions
generate
Fully qualified path: snforge_std::signature::secp256r1_curve::Secp256r1CurveKeyPairImpl::generate
fn generate() -> KeyPair<u256, Secp256r1Point>
from_secret_key
Fully qualified path: snforge_std::signature::secp256r1_curve::Secp256r1CurveKeyPairImpl::from_secret_key
fn from_secret_key(secret_key: u256) -> KeyPair<u256, Secp256r1Point>
Secp256r1CurveSignerImpl
Fully qualified path: snforge_std::signature::secp256r1_curve::Secp256r1CurveSignerImpl
pub impl Secp256r1CurveSignerImpl of SignerTrait<KeyPair<u256, Secp256r1Point>, u256, (u256, u256)>
Impl functions
sign
Fully qualified path: snforge_std::signature::secp256r1_curve::Secp256r1CurveSignerImpl::sign
fn sign(self: KeyPair<u256, Secp256r1Point>, message_hash: u256) -> Result<(u256, u256), SignError>
Secp256r1CurveVerifierImpl
Fully qualified path: snforge_std::signature::secp256r1_curve::Secp256r1CurveVerifierImpl
pub impl Secp256r1CurveVerifierImpl of VerifierTrait<
KeyPair<u256, Secp256r1Point>, u256, (u256, u256),
>
Impl functions
verify
Fully qualified path: snforge_std::signature::secp256r1_curve::Secp256r1CurveVerifierImpl::verify
fn verify(self: KeyPair<u256, Secp256r1Point>, message_hash: u256, signature: (u256, u256)) -> bool
StarkCurveKeyPairImpl
Fully qualified path: snforge_std::signature::stark_curve::StarkCurveKeyPairImpl
pub impl StarkCurveKeyPairImpl of KeyPairTrait<felt252, felt252>
Impl functions
generate
Fully qualified path: snforge_std::signature::stark_curve::StarkCurveKeyPairImpl::generate
fn generate() -> KeyPair<felt252, felt252>
from_secret_key
Fully qualified path: snforge_std::signature::stark_curve::StarkCurveKeyPairImpl::from_secret_key
fn from_secret_key(secret_key: felt252) -> KeyPair<felt252, felt252>
StarkCurveSignerImpl
Fully qualified path: snforge_std::signature::stark_curve::StarkCurveSignerImpl
pub impl StarkCurveSignerImpl of SignerTrait<KeyPair<felt252, felt252>, felt252, (felt252, felt252)>
Impl functions
sign
Fully qualified path: snforge_std::signature::stark_curve::StarkCurveSignerImpl::sign
fn sign(
self: KeyPair<felt252, felt252>, message_hash: felt252,
) -> Result<(felt252, felt252), SignError>
StarkCurveVerifierImpl
Fully qualified path: snforge_std::signature::stark_curve::StarkCurveVerifierImpl
pub impl StarkCurveVerifierImpl of VerifierTrait<
KeyPair<felt252, felt252>, felt252, (felt252, felt252),
>
Impl functions
verify
Fully qualified path: snforge_std::signature::stark_curve::StarkCurveVerifierImpl::verify
fn verify(
self: KeyPair<felt252, felt252>, message_hash: felt252, signature: (felt252, felt252),
) -> bool