Crate example_erc20_gas

Source
Expand description

Example of a custom handler for ERC20 gas calculation.

Gas is going to be deducted from ERC20 token.

Modulesยง

exec
Execution utilities for ERC20 gas payment transactions
handler
Custom handler implementation for ERC20 gas payment

Constantsยง

TOKEN
USDC token address on Ethereum mainnet
TREASURY
Treasury address that receives ERC20 gas payments

Functionsยง

balance_of ๐Ÿ”’
erc_address_storage
Calculates the storage slot for an ERC20 balance mapping. This implements the standard Solidity mapping storage layout where slot = keccak256(abi.encode(address, slot_number))
main ๐Ÿ”’
token_operation
Helpers
transfer ๐Ÿ”’

Type Aliasesยง

AlloyCacheDB ๐Ÿ”’