/**
Generated by the following Solidity interface...
```solidity
interface MockERC20 {
event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function balanceOf(address account) external view returns (uint256);
function decimals() external view returns (uint8);
function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool);
function increaseAllowance(address spender, uint256 addedValue) external returns (bool);
function mint(address account, uint256 amount) external;
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function totalSupply() external view returns (uint256);
function transfer(address to, uint256 amount) external returns (bool);
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}
```
...which was generated by the following JSON ABI:
```json
[
{
"type": "function",
"name": "allowance",
"inputs": [
{
"name": "owner",
"type": "address",
"internalType": "address"
},
{
"name": "spender",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "approve",
"inputs": [
{
"name": "spender",
"type": "address",
"internalType": "address"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "balanceOf",
"inputs": [
{
"name": "account",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "decimals",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint8",
"internalType": "uint8"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "decreaseAllowance",
"inputs": [
{
"name": "spender",
"type": "address",
"internalType": "address"
},
{
"name": "subtractedValue",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "increaseAllowance",
"inputs": [
{
"name": "spender",
"type": "address",
"internalType": "address"
},
{
"name": "addedValue",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "mint",
"inputs": [
{
"name": "account",
"type": "address",
"internalType": "address"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "name",
"inputs": [],
"outputs": [
{
"name": "",
"type": "string",
"internalType": "string"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "symbol",
"inputs": [],
"outputs": [
{
"name": "",
"type": "string",
"internalType": "string"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "totalSupply",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "transfer",
"inputs": [
{
"name": "to",
"type": "address",
"internalType": "address"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "transferFrom",
"inputs": [
{
"name": "from",
"type": "address",
"internalType": "address"
},
{
"name": "to",
"type": "address",
"internalType": "address"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "nonpayable"
},
{
"type": "event",
"name": "Approval",
"inputs": [
{
"name": "owner",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "spender",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "value",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Transfer",
"inputs": [
{
"name": "from",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "to",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "value",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
}
]
```*/
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style,
clippy::empty_structs_with_brackets
)]
pub mod MockERC20 {
use super::*;
use alloy::sol_types as alloy_sol_types;
/// The creation / init bytecode of the contract.
///
/// ```text
///0x60806040523461031357604080519081016001600160401b03811182821017610226576040908152600a82526926b7b1b5902a37b5b2b760b11b602083015280519081016001600160401b038111828210176102265760405260038152624d434b60e81b602082015281516001600160401b03811161022657600354600181811c91168015610309575b602082101461020857601f81116102a6575b50602092601f821160011461024557928192935f9261023a575b50508160011b915f199060031b1c1916176003555b80516001600160401b03811161022657600454600181811c9116801561021c575b602082101461020857601f81116101a5575b50602091601f8211600114610145579181925f9261013a575b50508160011b915f199060031b1c1916176004555b6040516108a690816103188239f35b015190505f80610116565b601f1982169260045f52805f20915f5b85811061018d57508360019510610175575b505050811b0160045561012b565b01515f1960f88460031b161c191690555f8080610167565b91926020600181928685015181550194019201610155565b60045f527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b601f830160051c810191602084106101fe575b601f0160051c01905b8181106101f357506100fd565b5f81556001016101e6565b90915081906101dd565b634e487b7160e01b5f52602260045260245ffd5b90607f16906100eb565b634e487b7160e01b5f52604160045260245ffd5b015190505f806100b5565b601f1982169360035f52805f20915f5b86811061028e5750836001959610610276575b505050811b016003556100ca565b01515f1960f88460031b161c191690555f8080610268565b91926020600181928685015181550194019201610255565b60035f527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b601f830160051c810191602084106102ff575b601f0160051c01905b8181106102f4575061009b565b5f81556001016102e7565b90915081906102de565b90607f1690610089565b5f80fdfe6080806040526004361015610012575f80fd5b5f3560e01c90816306fdde03146104b057508063095ea7b31461048a57806318160ddd1461046d57806323b872dd14610440578063313ce5671461042557806339509351146103d757806340c10f191461031a57806370a08231146102e357806395d89b41146101c8578063a457c2d714610125578063a9059cbb146100f45763dd62ed3e146100a0575f80fd5b346100f05760403660031901126100f0576100b96105a9565b6100c16105bf565b6001600160a01b039182165f908152600160209081526040808320949093168252928352819020549051908152f35b5f80fd5b346100f05760403660031901126100f05761011a6101106105a9565b60243590336106fa565b602060405160018152f35b346100f05760403660031901126100f05761013e6105a9565b60243590335f52600160205260405f2060018060a01b0382165f5260205260405f2054918083106101755761011a920390336105f6565b60405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608490fd5b346100f0575f3660031901126100f0576040515f6004548060011c906001811680156102d9575b6020831081146102c5578285529081156102a95750600114610254575b50819003601f01601f191681019067ffffffffffffffff8211818310176102405761023c8291826040528261057f565b0390f35b634e487b7160e01b5f52604160045260245ffd5b905060045f527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5f905b8282106102935750602091508201018261020c565b600181602092548385880101520191019061027e565b90506020925060ff191682840152151560051b8201018261020c565b634e487b7160e01b5f52602260045260245ffd5b91607f16916101ef565b346100f05760203660031901126100f0576001600160a01b036103046105a9565b165f525f602052602060405f2054604051908152f35b346100f05760403660031901126100f0576103336105a9565b6001600160a01b03166024358115610392577fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020826103765f946002546105d5565b60025584845283825260408420818154019055604051908152a3005b60405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606490fd5b346100f05760403660031901126100f05761011a6103f36105a9565b335f52600160205260405f2060018060a01b0382165f5260205261041e60405f2060243590546105d5565b90336105f6565b346100f0575f3660031901126100f057602060405160128152f35b346100f05760603660031901126100f05761011a61045c6105a9565b6104646105bf565b604435916106fa565b346100f0575f3660031901126100f0576020600254604051908152f35b346100f05760403660031901126100f05761011a6104a66105a9565b60243590336105f6565b346100f0575f3660031901126100f0575f6003548060011c90600181168015610575575b6020831081146102c5578285529081156102a957506001146105205750819003601f01601f191681019067ffffffffffffffff8211818310176102405761023c8291826040528261057f565b905060035f527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5f905b82821061055f5750602091508201018261020c565b600181602092548385880101520191019061054a565b91607f16916104d4565b602060409281835280519182918282860152018484015e5f828201840152601f01601f1916010190565b600435906001600160a01b03821682036100f057565b602435906001600160a01b03821682036100f057565b919082018092116105e257565b634e487b7160e01b5f52601160045260245ffd5b6001600160a01b03169081156106a9576001600160a01b03169182156106595760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591835f526001825260405f20855f5282528060405f2055604051908152a3565b60405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608490fd5b60405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608490fd5b6001600160a01b031690811561081d576001600160a01b03169182156107cc57815f525f60205260405f205481811061077857817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92602092855f525f84520360405f2055845f525f825260405f20818154019055604051908152a3565b60405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608490fd5b60405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608490fd5b60405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608490fdfea26469706673582212204a65683761186a2e58b61b41a75426176b7e4aa6ffde9be588dc57262a37201264736f6c634300081b0033
/// ```
#[rustfmt::skip]
#[allow(clippy::all)]
pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
b"`\x80`@R4a\x03\x13W`@\x80Q\x90\x81\x01`\x01`\x01`@\x1B\x03\x81\x11\x82\x82\x10\x17a\x02&W`@\x90\x81R`\n\x82Ri&\xB7\xB1\xB5\x90*7\xB5\xB2\xB7`\xB1\x1B` \x83\x01R\x80Q\x90\x81\x01`\x01`\x01`@\x1B\x03\x81\x11\x82\x82\x10\x17a\x02&W`@R`\x03\x81RbMCK`\xE8\x1B` \x82\x01R\x81Q`\x01`\x01`@\x1B\x03\x81\x11a\x02&W`\x03T`\x01\x81\x81\x1C\x91\x16\x80\x15a\x03\tW[` \x82\x10\x14a\x02\x08W`\x1F\x81\x11a\x02\xA6W[P` \x92`\x1F\x82\x11`\x01\x14a\x02EW\x92\x81\x92\x93_\x92a\x02:W[PP\x81`\x01\x1B\x91_\x19\x90`\x03\x1B\x1C\x19\x16\x17`\x03U[\x80Q`\x01`\x01`@\x1B\x03\x81\x11a\x02&W`\x04T`\x01\x81\x81\x1C\x91\x16\x80\x15a\x02\x1CW[` \x82\x10\x14a\x02\x08W`\x1F\x81\x11a\x01\xA5W[P` \x91`\x1F\x82\x11`\x01\x14a\x01EW\x91\x81\x92_\x92a\x01:W[PP\x81`\x01\x1B\x91_\x19\x90`\x03\x1B\x1C\x19\x16\x17`\x04U[`@Qa\x08\xA6\x90\x81a\x03\x18\x829\xF3[\x01Q\x90P_\x80a\x01\x16V[`\x1F\x19\x82\x16\x92`\x04_R\x80_ \x91_[\x85\x81\x10a\x01\x8DWP\x83`\x01\x95\x10a\x01uW[PPP\x81\x1B\x01`\x04Ua\x01+V[\x01Q_\x19`\xF8\x84`\x03\x1B\x16\x1C\x19\x16\x90U_\x80\x80a\x01gV[\x91\x92` `\x01\x81\x92\x86\x85\x01Q\x81U\x01\x94\x01\x92\x01a\x01UV[`\x04_R\x7F\x8A5\xAC\xFB\xC1_\xF8\x1A9\xAE}4O\xD7\t\xF2\x8E\x86\0\xB4\xAA\x8Ce\xC6\xB6K\xFE\x7F\xE3k\xD1\x9B`\x1F\x83\x01`\x05\x1C\x81\x01\x91` \x84\x10a\x01\xFEW[`\x1F\x01`\x05\x1C\x01\x90[\x81\x81\x10a\x01\xF3WPa\0\xFDV[_\x81U`\x01\x01a\x01\xE6V[\x90\x91P\x81\x90a\x01\xDDV[cNH{q`\xE0\x1B_R`\"`\x04R`$_\xFD[\x90`\x7F\x16\x90a\0\xEBV[cNH{q`\xE0\x1B_R`A`\x04R`$_\xFD[\x01Q\x90P_\x80a\0\xB5V[`\x1F\x19\x82\x16\x93`\x03_R\x80_ \x91_[\x86\x81\x10a\x02\x8EWP\x83`\x01\x95\x96\x10a\x02vW[PPP\x81\x1B\x01`\x03Ua\0\xCAV[\x01Q_\x19`\xF8\x84`\x03\x1B\x16\x1C\x19\x16\x90U_\x80\x80a\x02hV[\x91\x92` `\x01\x81\x92\x86\x85\x01Q\x81U\x01\x94\x01\x92\x01a\x02UV[`\x03_R\x7F\xC2WZ\x0E\x9EY<\0\xF9Y\xF8\xC9/\x12\xDB(i\xC39Z;\x05\x02\xD0^%\x16Doq\xF8[`\x1F\x83\x01`\x05\x1C\x81\x01\x91` \x84\x10a\x02\xFFW[`\x1F\x01`\x05\x1C\x01\x90[\x81\x81\x10a\x02\xF4WPa\0\x9BV[_\x81U`\x01\x01a\x02\xE7V[\x90\x91P\x81\x90a\x02\xDEV[\x90`\x7F\x16\x90a\0\x89V[_\x80\xFD\xFE`\x80\x80`@R`\x046\x10\x15a\0\x12W_\x80\xFD[_5`\xE0\x1C\x90\x81c\x06\xFD\xDE\x03\x14a\x04\xB0WP\x80c\t^\xA7\xB3\x14a\x04\x8AW\x80c\x18\x16\r\xDD\x14a\x04mW\x80c#\xB8r\xDD\x14a\x04@W\x80c1<\xE5g\x14a\x04%W\x80c9P\x93Q\x14a\x03\xD7W\x80c@\xC1\x0F\x19\x14a\x03\x1AW\x80cp\xA0\x821\x14a\x02\xE3W\x80c\x95\xD8\x9BA\x14a\x01\xC8W\x80c\xA4W\xC2\xD7\x14a\x01%W\x80c\xA9\x05\x9C\xBB\x14a\0\xF4Wc\xDDb\xED>\x14a\0\xA0W_\x80\xFD[4a\0\xF0W`@6`\x03\x19\x01\x12a\0\xF0Wa\0\xB9a\x05\xA9V[a\0\xC1a\x05\xBFV[`\x01`\x01`\xA0\x1B\x03\x91\x82\x16_\x90\x81R`\x01` \x90\x81R`@\x80\x83 \x94\x90\x93\x16\x82R\x92\x83R\x81\x90 T\x90Q\x90\x81R\xF3[_\x80\xFD[4a\0\xF0W`@6`\x03\x19\x01\x12a\0\xF0Wa\x01\x1Aa\x01\x10a\x05\xA9V[`$5\x903a\x06\xFAV[` `@Q`\x01\x81R\xF3[4a\0\xF0W`@6`\x03\x19\x01\x12a\0\xF0Wa\x01>a\x05\xA9V[`$5\x903_R`\x01` R`@_ `\x01\x80`\xA0\x1B\x03\x82\x16_R` R`@_ T\x91\x80\x83\x10a\x01uWa\x01\x1A\x92\x03\x903a\x05\xF6V[`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`%`$\x82\x01R\x7FERC20: decreased allowance below`D\x82\x01Rd zero`\xD8\x1B`d\x82\x01R`\x84\x90\xFD[4a\0\xF0W_6`\x03\x19\x01\x12a\0\xF0W`@Q_`\x04T\x80`\x01\x1C\x90`\x01\x81\x16\x80\x15a\x02\xD9W[` \x83\x10\x81\x14a\x02\xC5W\x82\x85R\x90\x81\x15a\x02\xA9WP`\x01\x14a\x02TW[P\x81\x90\x03`\x1F\x01`\x1F\x19\x16\x81\x01\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x81\x83\x10\x17a\x02@Wa\x02<\x82\x91\x82`@R\x82a\x05\x7FV[\x03\x90\xF3[cNH{q`\xE0\x1B_R`A`\x04R`$_\xFD[\x90P`\x04_R\x7F\x8A5\xAC\xFB\xC1_\xF8\x1A9\xAE}4O\xD7\t\xF2\x8E\x86\0\xB4\xAA\x8Ce\xC6\xB6K\xFE\x7F\xE3k\xD1\x9B_\x90[\x82\x82\x10a\x02\x93WP` \x91P\x82\x01\x01\x82a\x02\x0CV[`\x01\x81` \x92T\x83\x85\x88\x01\x01R\x01\x91\x01\x90a\x02~V[\x90P` \x92P`\xFF\x19\x16\x82\x84\x01R\x15\x15`\x05\x1B\x82\x01\x01\x82a\x02\x0CV[cNH{q`\xE0\x1B_R`\"`\x04R`$_\xFD[\x91`\x7F\x16\x91a\x01\xEFV[4a\0\xF0W` 6`\x03\x19\x01\x12a\0\xF0W`\x01`\x01`\xA0\x1B\x03a\x03\x04a\x05\xA9V[\x16_R_` R` `@_ T`@Q\x90\x81R\xF3[4a\0\xF0W`@6`\x03\x19\x01\x12a\0\xF0Wa\x033a\x05\xA9V[`\x01`\x01`\xA0\x1B\x03\x16`$5\x81\x15a\x03\x92W\x7F\xDD\xF2R\xAD\x1B\xE2\xC8\x9Bi\xC2\xB0h\xFC7\x8D\xAA\x95+\xA7\xF1c\xC4\xA1\x16(\xF5ZM\xF5#\xB3\xEF` \x82a\x03v_\x94`\x02Ta\x05\xD5V[`\x02U\x84\x84R\x83\x82R`@\x84 \x81\x81T\x01\x90U`@Q\x90\x81R\xA3\0[`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x1F`$\x82\x01R\x7FERC20: mint to the zero address\0`D\x82\x01R`d\x90\xFD[4a\0\xF0W`@6`\x03\x19\x01\x12a\0\xF0Wa\x01\x1Aa\x03\xF3a\x05\xA9V[3_R`\x01` R`@_ `\x01\x80`\xA0\x1B\x03\x82\x16_R` Ra\x04\x1E`@_ `$5\x90Ta\x05\xD5V[\x903a\x05\xF6V[4a\0\xF0W_6`\x03\x19\x01\x12a\0\xF0W` `@Q`\x12\x81R\xF3[4a\0\xF0W``6`\x03\x19\x01\x12a\0\xF0Wa\x01\x1Aa\x04\\a\x05\xA9V[a\x04da\x05\xBFV[`D5\x91a\x06\xFAV[4a\0\xF0W_6`\x03\x19\x01\x12a\0\xF0W` `\x02T`@Q\x90\x81R\xF3[4a\0\xF0W`@6`\x03\x19\x01\x12a\0\xF0Wa\x01\x1Aa\x04\xA6a\x05\xA9V[`$5\x903a\x05\xF6V[4a\0\xF0W_6`\x03\x19\x01\x12a\0\xF0W_`\x03T\x80`\x01\x1C\x90`\x01\x81\x16\x80\x15a\x05uW[` \x83\x10\x81\x14a\x02\xC5W\x82\x85R\x90\x81\x15a\x02\xA9WP`\x01\x14a\x05 WP\x81\x90\x03`\x1F\x01`\x1F\x19\x16\x81\x01\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x81\x83\x10\x17a\x02@Wa\x02<\x82\x91\x82`@R\x82a\x05\x7FV[\x90P`\x03_R\x7F\xC2WZ\x0E\x9EY<\0\xF9Y\xF8\xC9/\x12\xDB(i\xC39Z;\x05\x02\xD0^%\x16Doq\xF8[_\x90[\x82\x82\x10a\x05_WP` \x91P\x82\x01\x01\x82a\x02\x0CV[`\x01\x81` \x92T\x83\x85\x88\x01\x01R\x01\x91\x01\x90a\x05JV[\x91`\x7F\x16\x91a\x04\xD4V[` `@\x92\x81\x83R\x80Q\x91\x82\x91\x82\x82\x86\x01R\x01\x84\x84\x01^_\x82\x82\x01\x84\x01R`\x1F\x01`\x1F\x19\x16\x01\x01\x90V[`\x045\x90`\x01`\x01`\xA0\x1B\x03\x82\x16\x82\x03a\0\xF0WV[`$5\x90`\x01`\x01`\xA0\x1B\x03\x82\x16\x82\x03a\0\xF0WV[\x91\x90\x82\x01\x80\x92\x11a\x05\xE2WV[cNH{q`\xE0\x1B_R`\x11`\x04R`$_\xFD[`\x01`\x01`\xA0\x1B\x03\x16\x90\x81\x15a\x06\xA9W`\x01`\x01`\xA0\x1B\x03\x16\x91\x82\x15a\x06YW` \x7F\x8C[\xE1\xE5\xEB\xEC}[\xD1OqB}\x1E\x84\xF3\xDD\x03\x14\xC0\xF7\xB2)\x1E[ \n\xC8\xC7\xC3\xB9%\x91\x83_R`\x01\x82R`@_ \x85_R\x82R\x80`@_ U`@Q\x90\x81R\xA3V[`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\"`$\x82\x01R\x7FERC20: approve to the zero addre`D\x82\x01Rass`\xF0\x1B`d\x82\x01R`\x84\x90\xFD[`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`$\x80\x82\x01R\x7FERC20: approve from the zero add`D\x82\x01Rcress`\xE0\x1B`d\x82\x01R`\x84\x90\xFD[`\x01`\x01`\xA0\x1B\x03\x16\x90\x81\x15a\x08\x1DW`\x01`\x01`\xA0\x1B\x03\x16\x91\x82\x15a\x07\xCCW\x81_R_` R`@_ T\x81\x81\x10a\x07xW\x81\x7F\xDD\xF2R\xAD\x1B\xE2\xC8\x9Bi\xC2\xB0h\xFC7\x8D\xAA\x95+\xA7\xF1c\xC4\xA1\x16(\xF5ZM\xF5#\xB3\xEF\x92` \x92\x85_R_\x84R\x03`@_ U\x84_R_\x82R`@_ \x81\x81T\x01\x90U`@Q\x90\x81R\xA3V[`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`&`$\x82\x01R\x7FERC20: transfer amount exceeds b`D\x82\x01Realance`\xD0\x1B`d\x82\x01R`\x84\x90\xFD[`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`#`$\x82\x01R\x7FERC20: transfer to the zero addr`D\x82\x01Rbess`\xE8\x1B`d\x82\x01R`\x84\x90\xFD[`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`%`$\x82\x01R\x7FERC20: transfer from the zero ad`D\x82\x01Rddress`\xD8\x1B`d\x82\x01R`\x84\x90\xFD\xFE\xA2dipfsX\"\x12 Jeh7a\x18j.X\xB6\x1BA\xA7T&\x17k~J\xA6\xFF\xDE\x9B\xE5\x88\xDCW&*7 \x12dsolcC\0\x08\x1B\x003",
);
/// The runtime bytecode of the contract, as deployed on the network.
///
/// ```text
///0x6080806040526004361015610012575f80fd5b5f3560e01c90816306fdde03146104b057508063095ea7b31461048a57806318160ddd1461046d57806323b872dd14610440578063313ce5671461042557806339509351146103d757806340c10f191461031a57806370a08231146102e357806395d89b41146101c8578063a457c2d714610125578063a9059cbb146100f45763dd62ed3e146100a0575f80fd5b346100f05760403660031901126100f0576100b96105a9565b6100c16105bf565b6001600160a01b039182165f908152600160209081526040808320949093168252928352819020549051908152f35b5f80fd5b346100f05760403660031901126100f05761011a6101106105a9565b60243590336106fa565b602060405160018152f35b346100f05760403660031901126100f05761013e6105a9565b60243590335f52600160205260405f2060018060a01b0382165f5260205260405f2054918083106101755761011a920390336105f6565b60405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608490fd5b346100f0575f3660031901126100f0576040515f6004548060011c906001811680156102d9575b6020831081146102c5578285529081156102a95750600114610254575b50819003601f01601f191681019067ffffffffffffffff8211818310176102405761023c8291826040528261057f565b0390f35b634e487b7160e01b5f52604160045260245ffd5b905060045f527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5f905b8282106102935750602091508201018261020c565b600181602092548385880101520191019061027e565b90506020925060ff191682840152151560051b8201018261020c565b634e487b7160e01b5f52602260045260245ffd5b91607f16916101ef565b346100f05760203660031901126100f0576001600160a01b036103046105a9565b165f525f602052602060405f2054604051908152f35b346100f05760403660031901126100f0576103336105a9565b6001600160a01b03166024358115610392577fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020826103765f946002546105d5565b60025584845283825260408420818154019055604051908152a3005b60405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606490fd5b346100f05760403660031901126100f05761011a6103f36105a9565b335f52600160205260405f2060018060a01b0382165f5260205261041e60405f2060243590546105d5565b90336105f6565b346100f0575f3660031901126100f057602060405160128152f35b346100f05760603660031901126100f05761011a61045c6105a9565b6104646105bf565b604435916106fa565b346100f0575f3660031901126100f0576020600254604051908152f35b346100f05760403660031901126100f05761011a6104a66105a9565b60243590336105f6565b346100f0575f3660031901126100f0575f6003548060011c90600181168015610575575b6020831081146102c5578285529081156102a957506001146105205750819003601f01601f191681019067ffffffffffffffff8211818310176102405761023c8291826040528261057f565b905060035f527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5f905b82821061055f5750602091508201018261020c565b600181602092548385880101520191019061054a565b91607f16916104d4565b602060409281835280519182918282860152018484015e5f828201840152601f01601f1916010190565b600435906001600160a01b03821682036100f057565b602435906001600160a01b03821682036100f057565b919082018092116105e257565b634e487b7160e01b5f52601160045260245ffd5b6001600160a01b03169081156106a9576001600160a01b03169182156106595760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591835f526001825260405f20855f5282528060405f2055604051908152a3565b60405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608490fd5b60405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608490fd5b6001600160a01b031690811561081d576001600160a01b03169182156107cc57815f525f60205260405f205481811061077857817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92602092855f525f84520360405f2055845f525f825260405f20818154019055604051908152a3565b60405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608490fd5b60405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608490fd5b60405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608490fdfea26469706673582212204a65683761186a2e58b61b41a75426176b7e4aa6ffde9be588dc57262a37201264736f6c634300081b0033
/// ```
#[rustfmt::skip]
#[allow(clippy::all)]
pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
b"`\x80\x80`@R`\x046\x10\x15a\0\x12W_\x80\xFD[_5`\xE0\x1C\x90\x81c\x06\xFD\xDE\x03\x14a\x04\xB0WP\x80c\t^\xA7\xB3\x14a\x04\x8AW\x80c\x18\x16\r\xDD\x14a\x04mW\x80c#\xB8r\xDD\x14a\x04@W\x80c1<\xE5g\x14a\x04%W\x80c9P\x93Q\x14a\x03\xD7W\x80c@\xC1\x0F\x19\x14a\x03\x1AW\x80cp\xA0\x821\x14a\x02\xE3W\x80c\x95\xD8\x9BA\x14a\x01\xC8W\x80c\xA4W\xC2\xD7\x14a\x01%W\x80c\xA9\x05\x9C\xBB\x14a\0\xF4Wc\xDDb\xED>\x14a\0\xA0W_\x80\xFD[4a\0\xF0W`@6`\x03\x19\x01\x12a\0\xF0Wa\0\xB9a\x05\xA9V[a\0\xC1a\x05\xBFV[`\x01`\x01`\xA0\x1B\x03\x91\x82\x16_\x90\x81R`\x01` \x90\x81R`@\x80\x83 \x94\x90\x93\x16\x82R\x92\x83R\x81\x90 T\x90Q\x90\x81R\xF3[_\x80\xFD[4a\0\xF0W`@6`\x03\x19\x01\x12a\0\xF0Wa\x01\x1Aa\x01\x10a\x05\xA9V[`$5\x903a\x06\xFAV[` `@Q`\x01\x81R\xF3[4a\0\xF0W`@6`\x03\x19\x01\x12a\0\xF0Wa\x01>a\x05\xA9V[`$5\x903_R`\x01` R`@_ `\x01\x80`\xA0\x1B\x03\x82\x16_R` R`@_ T\x91\x80\x83\x10a\x01uWa\x01\x1A\x92\x03\x903a\x05\xF6V[`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`%`$\x82\x01R\x7FERC20: decreased allowance below`D\x82\x01Rd zero`\xD8\x1B`d\x82\x01R`\x84\x90\xFD[4a\0\xF0W_6`\x03\x19\x01\x12a\0\xF0W`@Q_`\x04T\x80`\x01\x1C\x90`\x01\x81\x16\x80\x15a\x02\xD9W[` \x83\x10\x81\x14a\x02\xC5W\x82\x85R\x90\x81\x15a\x02\xA9WP`\x01\x14a\x02TW[P\x81\x90\x03`\x1F\x01`\x1F\x19\x16\x81\x01\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x81\x83\x10\x17a\x02@Wa\x02<\x82\x91\x82`@R\x82a\x05\x7FV[\x03\x90\xF3[cNH{q`\xE0\x1B_R`A`\x04R`$_\xFD[\x90P`\x04_R\x7F\x8A5\xAC\xFB\xC1_\xF8\x1A9\xAE}4O\xD7\t\xF2\x8E\x86\0\xB4\xAA\x8Ce\xC6\xB6K\xFE\x7F\xE3k\xD1\x9B_\x90[\x82\x82\x10a\x02\x93WP` \x91P\x82\x01\x01\x82a\x02\x0CV[`\x01\x81` \x92T\x83\x85\x88\x01\x01R\x01\x91\x01\x90a\x02~V[\x90P` \x92P`\xFF\x19\x16\x82\x84\x01R\x15\x15`\x05\x1B\x82\x01\x01\x82a\x02\x0CV[cNH{q`\xE0\x1B_R`\"`\x04R`$_\xFD[\x91`\x7F\x16\x91a\x01\xEFV[4a\0\xF0W` 6`\x03\x19\x01\x12a\0\xF0W`\x01`\x01`\xA0\x1B\x03a\x03\x04a\x05\xA9V[\x16_R_` R` `@_ T`@Q\x90\x81R\xF3[4a\0\xF0W`@6`\x03\x19\x01\x12a\0\xF0Wa\x033a\x05\xA9V[`\x01`\x01`\xA0\x1B\x03\x16`$5\x81\x15a\x03\x92W\x7F\xDD\xF2R\xAD\x1B\xE2\xC8\x9Bi\xC2\xB0h\xFC7\x8D\xAA\x95+\xA7\xF1c\xC4\xA1\x16(\xF5ZM\xF5#\xB3\xEF` \x82a\x03v_\x94`\x02Ta\x05\xD5V[`\x02U\x84\x84R\x83\x82R`@\x84 \x81\x81T\x01\x90U`@Q\x90\x81R\xA3\0[`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x1F`$\x82\x01R\x7FERC20: mint to the zero address\0`D\x82\x01R`d\x90\xFD[4a\0\xF0W`@6`\x03\x19\x01\x12a\0\xF0Wa\x01\x1Aa\x03\xF3a\x05\xA9V[3_R`\x01` R`@_ `\x01\x80`\xA0\x1B\x03\x82\x16_R` Ra\x04\x1E`@_ `$5\x90Ta\x05\xD5V[\x903a\x05\xF6V[4a\0\xF0W_6`\x03\x19\x01\x12a\0\xF0W` `@Q`\x12\x81R\xF3[4a\0\xF0W``6`\x03\x19\x01\x12a\0\xF0Wa\x01\x1Aa\x04\\a\x05\xA9V[a\x04da\x05\xBFV[`D5\x91a\x06\xFAV[4a\0\xF0W_6`\x03\x19\x01\x12a\0\xF0W` `\x02T`@Q\x90\x81R\xF3[4a\0\xF0W`@6`\x03\x19\x01\x12a\0\xF0Wa\x01\x1Aa\x04\xA6a\x05\xA9V[`$5\x903a\x05\xF6V[4a\0\xF0W_6`\x03\x19\x01\x12a\0\xF0W_`\x03T\x80`\x01\x1C\x90`\x01\x81\x16\x80\x15a\x05uW[` \x83\x10\x81\x14a\x02\xC5W\x82\x85R\x90\x81\x15a\x02\xA9WP`\x01\x14a\x05 WP\x81\x90\x03`\x1F\x01`\x1F\x19\x16\x81\x01\x90g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x81\x83\x10\x17a\x02@Wa\x02<\x82\x91\x82`@R\x82a\x05\x7FV[\x90P`\x03_R\x7F\xC2WZ\x0E\x9EY<\0\xF9Y\xF8\xC9/\x12\xDB(i\xC39Z;\x05\x02\xD0^%\x16Doq\xF8[_\x90[\x82\x82\x10a\x05_WP` \x91P\x82\x01\x01\x82a\x02\x0CV[`\x01\x81` \x92T\x83\x85\x88\x01\x01R\x01\x91\x01\x90a\x05JV[\x91`\x7F\x16\x91a\x04\xD4V[` `@\x92\x81\x83R\x80Q\x91\x82\x91\x82\x82\x86\x01R\x01\x84\x84\x01^_\x82\x82\x01\x84\x01R`\x1F\x01`\x1F\x19\x16\x01\x01\x90V[`\x045\x90`\x01`\x01`\xA0\x1B\x03\x82\x16\x82\x03a\0\xF0WV[`$5\x90`\x01`\x01`\xA0\x1B\x03\x82\x16\x82\x03a\0\xF0WV[\x91\x90\x82\x01\x80\x92\x11a\x05\xE2WV[cNH{q`\xE0\x1B_R`\x11`\x04R`$_\xFD[`\x01`\x01`\xA0\x1B\x03\x16\x90\x81\x15a\x06\xA9W`\x01`\x01`\xA0\x1B\x03\x16\x91\x82\x15a\x06YW` \x7F\x8C[\xE1\xE5\xEB\xEC}[\xD1OqB}\x1E\x84\xF3\xDD\x03\x14\xC0\xF7\xB2)\x1E[ \n\xC8\xC7\xC3\xB9%\x91\x83_R`\x01\x82R`@_ \x85_R\x82R\x80`@_ U`@Q\x90\x81R\xA3V[`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\"`$\x82\x01R\x7FERC20: approve to the zero addre`D\x82\x01Rass`\xF0\x1B`d\x82\x01R`\x84\x90\xFD[`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`$\x80\x82\x01R\x7FERC20: approve from the zero add`D\x82\x01Rcress`\xE0\x1B`d\x82\x01R`\x84\x90\xFD[`\x01`\x01`\xA0\x1B\x03\x16\x90\x81\x15a\x08\x1DW`\x01`\x01`\xA0\x1B\x03\x16\x91\x82\x15a\x07\xCCW\x81_R_` R`@_ T\x81\x81\x10a\x07xW\x81\x7F\xDD\xF2R\xAD\x1B\xE2\xC8\x9Bi\xC2\xB0h\xFC7\x8D\xAA\x95+\xA7\xF1c\xC4\xA1\x16(\xF5ZM\xF5#\xB3\xEF\x92` \x92\x85_R_\x84R\x03`@_ U\x84_R_\x82R`@_ \x81\x81T\x01\x90U`@Q\x90\x81R\xA3V[`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`&`$\x82\x01R\x7FERC20: transfer amount exceeds b`D\x82\x01Realance`\xD0\x1B`d\x82\x01R`\x84\x90\xFD[`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`#`$\x82\x01R\x7FERC20: transfer to the zero addr`D\x82\x01Rbess`\xE8\x1B`d\x82\x01R`\x84\x90\xFD[`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`%`$\x82\x01R\x7FERC20: transfer from the zero ad`D\x82\x01Rddress`\xD8\x1B`d\x82\x01R`\x84\x90\xFD\xFE\xA2dipfsX\"\x12 Jeh7a\x18j.X\xB6\x1BA\xA7T&\x17k~J\xA6\xFF\xDE\x9B\xE5\x88\xDCW&*7 \x12dsolcC\0\x08\x1B\x003",
);
#[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)]
/**Event with signature `Approval(address,address,uint256)` and selector `0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925`.
```solidity
event Approval(address indexed owner, address indexed spender, uint256 value);
```*/
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
#[derive(Clone)]
pub struct Approval {
#[allow(missing_docs)]
pub owner: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub spender: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub value: alloy::sol_types::private::primitives::aliases::U256,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
#[automatically_derived]
impl alloy_sol_types::SolEvent for Approval {
type DataTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
type DataToken<'a> = <Self::DataTuple<'a> as alloy_sol_types::SolType>::Token<'a>;
type TopicList = (
alloy_sol_types::sol_data::FixedBytes<32>,
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Address,
);
const SIGNATURE: &'static str = "Approval(address,address,uint256)";
const SIGNATURE_HASH: alloy_sol_types::private::B256 =
alloy_sol_types::private::B256::new([
140u8, 91u8, 225u8, 229u8, 235u8, 236u8, 125u8, 91u8, 209u8, 79u8, 113u8, 66u8,
125u8, 30u8, 132u8, 243u8, 221u8, 3u8, 20u8, 192u8, 247u8, 178u8, 41u8, 30u8,
91u8, 32u8, 10u8, 200u8, 199u8, 195u8, 185u8, 37u8,
]);
const ANONYMOUS: bool = false;
#[allow(unused_variables)]
#[inline]
fn new(
topics: <Self::TopicList as alloy_sol_types::SolType>::RustType,
data: <Self::DataTuple<'_> as alloy_sol_types::SolType>::RustType,
) -> Self {
Self {
owner: topics.1,
spender: topics.2,
value: data.0,
}
}
#[inline]
fn check_signature(
topics: &<Self::TopicList as alloy_sol_types::SolType>::RustType,
) -> alloy_sol_types::Result<()> {
if topics.0 != Self::SIGNATURE_HASH {
return Err(alloy_sol_types::Error::invalid_event_signature_hash(
Self::SIGNATURE,
topics.0,
Self::SIGNATURE_HASH,
));
}
Ok(())
}
#[inline]
fn tokenize_body(&self) -> Self::DataToken<'_> {
(
<alloy::sol_types::sol_data::Uint<256> as alloy_sol_types::SolType>::tokenize(
&self.value,
),
)
}
#[inline]
fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
(
Self::SIGNATURE_HASH.into(),
self.owner.clone(),
self.spender.clone(),
)
}
#[inline]
fn encode_topics_raw(
&self,
out: &mut [alloy_sol_types::abi::token::WordToken],
) -> alloy_sol_types::Result<()> {
if out.len() < <Self::TopicList as alloy_sol_types::TopicList>::COUNT {
return Err(alloy_sol_types::Error::Overrun);
}
out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH);
out[1usize] = <alloy::sol_types::sol_data::Address as alloy_sol_types::EventTopic>::encode_topic(
&self.owner,
);
out[2usize] = <alloy::sol_types::sol_data::Address as alloy_sol_types::EventTopic>::encode_topic(
&self.spender,
);
Ok(())
}
}
#[automatically_derived]
impl alloy_sol_types::private::IntoLogData for Approval {
fn to_log_data(&self) -> alloy_sol_types::private::LogData {
From::from(self)
}
fn into_log_data(self) -> alloy_sol_types::private::LogData {
From::from(&self)
}
}
#[automatically_derived]
impl From<&Approval> for alloy_sol_types::private::LogData {
#[inline]
fn from(this: &Approval) -> alloy_sol_types::private::LogData {
alloy_sol_types::SolEvent::encode_log_data(this)
}
}
};
#[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)]
/**Event with signature `Transfer(address,address,uint256)` and selector `0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`.
```solidity
event Transfer(address indexed from, address indexed to, uint256 value);
```*/
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
#[derive(Clone)]
pub struct Transfer {
#[allow(missing_docs)]
pub from: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub to: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub value: alloy::sol_types::private::primitives::aliases::U256,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
#[automatically_derived]
impl alloy_sol_types::SolEvent for Transfer {
type DataTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
type DataToken<'a> = <Self::DataTuple<'a> as alloy_sol_types::SolType>::Token<'a>;
type TopicList = (
alloy_sol_types::sol_data::FixedBytes<32>,
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Address,
);
const SIGNATURE: &'static str = "Transfer(address,address,uint256)";
const SIGNATURE_HASH: alloy_sol_types::private::B256 =
alloy_sol_types::private::B256::new([
221u8, 242u8, 82u8, 173u8, 27u8, 226u8, 200u8, 155u8, 105u8, 194u8, 176u8,
104u8, 252u8, 55u8, 141u8, 170u8, 149u8, 43u8, 167u8, 241u8, 99u8, 196u8,
161u8, 22u8, 40u8, 245u8, 90u8, 77u8, 245u8, 35u8, 179u8, 239u8,
]);
const ANONYMOUS: bool = false;
#[allow(unused_variables)]
#[inline]
fn new(
topics: <Self::TopicList as alloy_sol_types::SolType>::RustType,
data: <Self::DataTuple<'_> as alloy_sol_types::SolType>::RustType,
) -> Self {
Self {
from: topics.1,
to: topics.2,
value: data.0,
}
}
#[inline]
fn check_signature(
topics: &<Self::TopicList as alloy_sol_types::SolType>::RustType,
) -> alloy_sol_types::Result<()> {
if topics.0 != Self::SIGNATURE_HASH {
return Err(alloy_sol_types::Error::invalid_event_signature_hash(
Self::SIGNATURE,
topics.0,
Self::SIGNATURE_HASH,
));
}
Ok(())
}
#[inline]
fn tokenize_body(&self) -> Self::DataToken<'_> {
(
<alloy::sol_types::sol_data::Uint<256> as alloy_sol_types::SolType>::tokenize(
&self.value,
),
)
}
#[inline]
fn topics(&self) -> <Self::TopicList as alloy_sol_types::SolType>::RustType {
(
Self::SIGNATURE_HASH.into(),
self.from.clone(),
self.to.clone(),
)
}
#[inline]
fn encode_topics_raw(
&self,
out: &mut [alloy_sol_types::abi::token::WordToken],
) -> alloy_sol_types::Result<()> {
if out.len() < <Self::TopicList as alloy_sol_types::TopicList>::COUNT {
return Err(alloy_sol_types::Error::Overrun);
}
out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH);
out[1usize] = <alloy::sol_types::sol_data::Address as alloy_sol_types::EventTopic>::encode_topic(
&self.from,
);
out[2usize] = <alloy::sol_types::sol_data::Address as alloy_sol_types::EventTopic>::encode_topic(
&self.to,
);
Ok(())
}
}
#[automatically_derived]
impl alloy_sol_types::private::IntoLogData for Transfer {
fn to_log_data(&self) -> alloy_sol_types::private::LogData {
From::from(self)
}
fn into_log_data(self) -> alloy_sol_types::private::LogData {
From::from(&self)
}
}
#[automatically_derived]
impl From<&Transfer> for alloy_sol_types::private::LogData {
#[inline]
fn from(this: &Transfer) -> alloy_sol_types::private::LogData {
alloy_sol_types::SolEvent::encode_log_data(this)
}
}
};
#[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)]
/**Function with signature `allowance(address,address)` and selector `0xdd62ed3e`.
```solidity
function allowance(address owner, address spender) external view returns (uint256);
```*/
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct allowanceCall {
#[allow(missing_docs)]
pub owner: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub spender: alloy::sol_types::private::Address,
}
#[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)]
///Container type for the return parameters of the [`allowance(address,address)`](allowanceCall) function.
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct allowanceReturn {
#[allow(missing_docs)]
pub _0: alloy::sol_types::private::primitives::aliases::U256,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Address,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
alloy::sol_types::private::Address,
alloy::sol_types::private::Address,
);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<allowanceCall> for UnderlyingRustTuple<'_> {
fn from(value: allowanceCall) -> Self {
(value.owner, value.spender)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for allowanceCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
owner: tuple.0,
spender: tuple.1,
}
}
}
}
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (alloy::sol_types::private::primitives::aliases::U256,);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<allowanceReturn> for UnderlyingRustTuple<'_> {
fn from(value: allowanceReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for allowanceReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for allowanceCall {
type Parameters<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Address,
);
type Token<'a> = <Self::Parameters<'a> as alloy_sol_types::SolType>::Token<'a>;
type Return = alloy::sol_types::private::primitives::aliases::U256;
type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
type ReturnToken<'a> = <Self::ReturnTuple<'a> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "allowance(address,address)";
const SELECTOR: [u8; 4] = [221u8, 98u8, 237u8, 62u8];
#[inline]
fn new<'a>(
tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
) -> Self {
tuple.into()
}
#[inline]
fn tokenize(&self) -> Self::Token<'_> {
(
<alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
&self.owner,
),
<alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
&self.spender,
),
)
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
(
<alloy::sol_types::sol_data::Uint<256> as alloy_sol_types::SolType>::tokenize(
ret,
),
)
}
#[inline]
fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<'_> as alloy_sol_types::SolType>::abi_decode_sequence(data).map(
|r| {
let r: allowanceReturn = r.into();
r._0
},
)
}
#[inline]
fn abi_decode_returns_validate(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<'_> as alloy_sol_types::SolType>::abi_decode_sequence_validate(
data,
)
.map(|r| {
let r: allowanceReturn = r.into();
r._0
})
}
}
};
#[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)]
/**Function with signature `approve(address,uint256)` and selector `0x095ea7b3`.
```solidity
function approve(address spender, uint256 amount) external returns (bool);
```*/
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct approveCall {
#[allow(missing_docs)]
pub spender: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub amount: alloy::sol_types::private::primitives::aliases::U256,
}
#[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)]
///Container type for the return parameters of the [`approve(address,uint256)`](approveCall) function.
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct approveReturn {
#[allow(missing_docs)]
pub _0: bool,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Uint<256>,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
alloy::sol_types::private::Address,
alloy::sol_types::private::primitives::aliases::U256,
);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<approveCall> for UnderlyingRustTuple<'_> {
fn from(value: approveCall) -> Self {
(value.spender, value.amount)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for approveCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
spender: tuple.0,
amount: tuple.1,
}
}
}
}
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (bool,);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<approveReturn> for UnderlyingRustTuple<'_> {
fn from(value: approveReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for approveReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for approveCall {
type Parameters<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Uint<256>,
);
type Token<'a> = <Self::Parameters<'a> as alloy_sol_types::SolType>::Token<'a>;
type Return = bool;
type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,);
type ReturnToken<'a> = <Self::ReturnTuple<'a> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "approve(address,uint256)";
const SELECTOR: [u8; 4] = [9u8, 94u8, 167u8, 179u8];
#[inline]
fn new<'a>(
tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
) -> Self {
tuple.into()
}
#[inline]
fn tokenize(&self) -> Self::Token<'_> {
(
<alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
&self.spender,
),
<alloy::sol_types::sol_data::Uint<256> as alloy_sol_types::SolType>::tokenize(
&self.amount,
),
)
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
(<alloy::sol_types::sol_data::Bool as alloy_sol_types::SolType>::tokenize(ret),)
}
#[inline]
fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<'_> as alloy_sol_types::SolType>::abi_decode_sequence(data).map(
|r| {
let r: approveReturn = r.into();
r._0
},
)
}
#[inline]
fn abi_decode_returns_validate(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<'_> as alloy_sol_types::SolType>::abi_decode_sequence_validate(
data,
)
.map(|r| {
let r: approveReturn = r.into();
r._0
})
}
}
};
#[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)]
/**Function with signature `balanceOf(address)` and selector `0x70a08231`.
```solidity
function balanceOf(address account) external view returns (uint256);
```*/
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct balanceOfCall {
#[allow(missing_docs)]
pub account: alloy::sol_types::private::Address,
}
#[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)]
///Container type for the return parameters of the [`balanceOf(address)`](balanceOfCall) function.
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct balanceOfReturn {
#[allow(missing_docs)]
pub _0: alloy::sol_types::private::primitives::aliases::U256,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<balanceOfCall> for UnderlyingRustTuple<'_> {
fn from(value: balanceOfCall) -> Self {
(value.account,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for balanceOfCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { account: tuple.0 }
}
}
}
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (alloy::sol_types::private::primitives::aliases::U256,);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<balanceOfReturn> for UnderlyingRustTuple<'_> {
fn from(value: balanceOfReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for balanceOfReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for balanceOfCall {
type Parameters<'a> = (alloy::sol_types::sol_data::Address,);
type Token<'a> = <Self::Parameters<'a> as alloy_sol_types::SolType>::Token<'a>;
type Return = alloy::sol_types::private::primitives::aliases::U256;
type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
type ReturnToken<'a> = <Self::ReturnTuple<'a> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "balanceOf(address)";
const SELECTOR: [u8; 4] = [112u8, 160u8, 130u8, 49u8];
#[inline]
fn new<'a>(
tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
) -> Self {
tuple.into()
}
#[inline]
fn tokenize(&self) -> Self::Token<'_> {
(
<alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
&self.account,
),
)
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
(
<alloy::sol_types::sol_data::Uint<256> as alloy_sol_types::SolType>::tokenize(
ret,
),
)
}
#[inline]
fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<'_> as alloy_sol_types::SolType>::abi_decode_sequence(data).map(
|r| {
let r: balanceOfReturn = r.into();
r._0
},
)
}
#[inline]
fn abi_decode_returns_validate(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<'_> as alloy_sol_types::SolType>::abi_decode_sequence_validate(
data,
)
.map(|r| {
let r: balanceOfReturn = r.into();
r._0
})
}
}
};
#[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)]
/**Function with signature `decimals()` and selector `0x313ce567`.
```solidity
function decimals() external view returns (uint8);
```*/
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct decimalsCall;
#[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)]
///Container type for the return parameters of the [`decimals()`](decimalsCall) function.
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct decimalsReturn {
#[allow(missing_docs)]
pub _0: u8,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = ();
#[doc(hidden)]
type UnderlyingRustTuple<'a> = ();
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<decimalsCall> for UnderlyingRustTuple<'_> {
fn from(value: decimalsCall) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for decimalsCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self
}
}
}
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<8>,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (u8,);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<decimalsReturn> for UnderlyingRustTuple<'_> {
fn from(value: decimalsReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for decimalsReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for decimalsCall {
type Parameters<'a> = ();
type Token<'a> = <Self::Parameters<'a> as alloy_sol_types::SolType>::Token<'a>;
type Return = u8;
type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<8>,);
type ReturnToken<'a> = <Self::ReturnTuple<'a> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "decimals()";
const SELECTOR: [u8; 4] = [49u8, 60u8, 229u8, 103u8];
#[inline]
fn new<'a>(
tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
) -> Self {
tuple.into()
}
#[inline]
fn tokenize(&self) -> Self::Token<'_> {
()
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
(
<alloy::sol_types::sol_data::Uint<8> as alloy_sol_types::SolType>::tokenize(
ret,
),
)
}
#[inline]
fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<'_> as alloy_sol_types::SolType>::abi_decode_sequence(data).map(
|r| {
let r: decimalsReturn = r.into();
r._0
},
)
}
#[inline]
fn abi_decode_returns_validate(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<'_> as alloy_sol_types::SolType>::abi_decode_sequence_validate(
data,
)
.map(|r| {
let r: decimalsReturn = r.into();
r._0
})
}
}
};
#[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)]
/**Function with signature `decreaseAllowance(address,uint256)` and selector `0xa457c2d7`.
```solidity
function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool);
```*/
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct decreaseAllowanceCall {
#[allow(missing_docs)]
pub spender: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub subtractedValue: alloy::sol_types::private::primitives::aliases::U256,
}
#[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)]
///Container type for the return parameters of the [`decreaseAllowance(address,uint256)`](decreaseAllowanceCall) function.
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct decreaseAllowanceReturn {
#[allow(missing_docs)]
pub _0: bool,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Uint<256>,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
alloy::sol_types::private::Address,
alloy::sol_types::private::primitives::aliases::U256,
);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<decreaseAllowanceCall> for UnderlyingRustTuple<'_> {
fn from(value: decreaseAllowanceCall) -> Self {
(value.spender, value.subtractedValue)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for decreaseAllowanceCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
spender: tuple.0,
subtractedValue: tuple.1,
}
}
}
}
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (bool,);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<decreaseAllowanceReturn> for UnderlyingRustTuple<'_> {
fn from(value: decreaseAllowanceReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for decreaseAllowanceReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for decreaseAllowanceCall {
type Parameters<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Uint<256>,
);
type Token<'a> = <Self::Parameters<'a> as alloy_sol_types::SolType>::Token<'a>;
type Return = bool;
type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,);
type ReturnToken<'a> = <Self::ReturnTuple<'a> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "decreaseAllowance(address,uint256)";
const SELECTOR: [u8; 4] = [164u8, 87u8, 194u8, 215u8];
#[inline]
fn new<'a>(
tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
) -> Self {
tuple.into()
}
#[inline]
fn tokenize(&self) -> Self::Token<'_> {
(
<alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
&self.spender,
),
<alloy::sol_types::sol_data::Uint<256> as alloy_sol_types::SolType>::tokenize(
&self.subtractedValue,
),
)
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
(<alloy::sol_types::sol_data::Bool as alloy_sol_types::SolType>::tokenize(ret),)
}
#[inline]
fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<'_> as alloy_sol_types::SolType>::abi_decode_sequence(data).map(
|r| {
let r: decreaseAllowanceReturn = r.into();
r._0
},
)
}
#[inline]
fn abi_decode_returns_validate(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<'_> as alloy_sol_types::SolType>::abi_decode_sequence_validate(
data,
)
.map(|r| {
let r: decreaseAllowanceReturn = r.into();
r._0
})
}
}
};
#[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)]
/**Function with signature `increaseAllowance(address,uint256)` and selector `0x39509351`.
```solidity
function increaseAllowance(address spender, uint256 addedValue) external returns (bool);
```*/
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct increaseAllowanceCall {
#[allow(missing_docs)]
pub spender: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub addedValue: alloy::sol_types::private::primitives::aliases::U256,
}
#[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)]
///Container type for the return parameters of the [`increaseAllowance(address,uint256)`](increaseAllowanceCall) function.
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct increaseAllowanceReturn {
#[allow(missing_docs)]
pub _0: bool,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Uint<256>,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
alloy::sol_types::private::Address,
alloy::sol_types::private::primitives::aliases::U256,
);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<increaseAllowanceCall> for UnderlyingRustTuple<'_> {
fn from(value: increaseAllowanceCall) -> Self {
(value.spender, value.addedValue)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for increaseAllowanceCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
spender: tuple.0,
addedValue: tuple.1,
}
}
}
}
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (bool,);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<increaseAllowanceReturn> for UnderlyingRustTuple<'_> {
fn from(value: increaseAllowanceReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for increaseAllowanceReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for increaseAllowanceCall {
type Parameters<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Uint<256>,
);
type Token<'a> = <Self::Parameters<'a> as alloy_sol_types::SolType>::Token<'a>;
type Return = bool;
type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,);
type ReturnToken<'a> = <Self::ReturnTuple<'a> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "increaseAllowance(address,uint256)";
const SELECTOR: [u8; 4] = [57u8, 80u8, 147u8, 81u8];
#[inline]
fn new<'a>(
tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
) -> Self {
tuple.into()
}
#[inline]
fn tokenize(&self) -> Self::Token<'_> {
(
<alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
&self.spender,
),
<alloy::sol_types::sol_data::Uint<256> as alloy_sol_types::SolType>::tokenize(
&self.addedValue,
),
)
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
(<alloy::sol_types::sol_data::Bool as alloy_sol_types::SolType>::tokenize(ret),)
}
#[inline]
fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<'_> as alloy_sol_types::SolType>::abi_decode_sequence(data).map(
|r| {
let r: increaseAllowanceReturn = r.into();
r._0
},
)
}
#[inline]
fn abi_decode_returns_validate(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<'_> as alloy_sol_types::SolType>::abi_decode_sequence_validate(
data,
)
.map(|r| {
let r: increaseAllowanceReturn = r.into();
r._0
})
}
}
};
#[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)]
/**Function with signature `mint(address,uint256)` and selector `0x40c10f19`.
```solidity
function mint(address account, uint256 amount) external;
```*/
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct mintCall {
#[allow(missing_docs)]
pub account: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub amount: alloy::sol_types::private::primitives::aliases::U256,
}
///Container type for the return parameters of the [`mint(address,uint256)`](mintCall) function.
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct mintReturn {}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Uint<256>,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
alloy::sol_types::private::Address,
alloy::sol_types::private::primitives::aliases::U256,
);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<mintCall> for UnderlyingRustTuple<'_> {
fn from(value: mintCall) -> Self {
(value.account, value.amount)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for mintCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
account: tuple.0,
amount: tuple.1,
}
}
}
}
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = ();
#[doc(hidden)]
type UnderlyingRustTuple<'a> = ();
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<mintReturn> for UnderlyingRustTuple<'_> {
fn from(value: mintReturn) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for mintReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {}
}
}
}
impl mintReturn {
fn _tokenize(&self) -> <mintCall as alloy_sol_types::SolCall>::ReturnToken<'_> {
()
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for mintCall {
type Parameters<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Uint<256>,
);
type Token<'a> = <Self::Parameters<'a> as alloy_sol_types::SolType>::Token<'a>;
type Return = mintReturn;
type ReturnTuple<'a> = ();
type ReturnToken<'a> = <Self::ReturnTuple<'a> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "mint(address,uint256)";
const SELECTOR: [u8; 4] = [64u8, 193u8, 15u8, 25u8];
#[inline]
fn new<'a>(
tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
) -> Self {
tuple.into()
}
#[inline]
fn tokenize(&self) -> Self::Token<'_> {
(
<alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
&self.account,
),
<alloy::sol_types::sol_data::Uint<256> as alloy_sol_types::SolType>::tokenize(
&self.amount,
),
)
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
mintReturn::_tokenize(ret)
}
#[inline]
fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<'_> as alloy_sol_types::SolType>::abi_decode_sequence(data)
.map(Into::into)
}
#[inline]
fn abi_decode_returns_validate(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<'_> as alloy_sol_types::SolType>::abi_decode_sequence_validate(
data,
)
.map(Into::into)
}
}
};
#[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)]
/**Function with signature `name()` and selector `0x06fdde03`.
```solidity
function name() external view returns (string memory);
```*/
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct nameCall;
#[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)]
///Container type for the return parameters of the [`name()`](nameCall) function.
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct nameReturn {
#[allow(missing_docs)]
pub _0: alloy::sol_types::private::String,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = ();
#[doc(hidden)]
type UnderlyingRustTuple<'a> = ();
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<nameCall> for UnderlyingRustTuple<'_> {
fn from(value: nameCall) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for nameCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self
}
}
}
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::String,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<nameReturn> for UnderlyingRustTuple<'_> {
fn from(value: nameReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for nameReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for nameCall {
type Parameters<'a> = ();
type Token<'a> = <Self::Parameters<'a> as alloy_sol_types::SolType>::Token<'a>;
type Return = alloy::sol_types::private::String;
type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,);
type ReturnToken<'a> = <Self::ReturnTuple<'a> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "name()";
const SELECTOR: [u8; 4] = [6u8, 253u8, 222u8, 3u8];
#[inline]
fn new<'a>(
tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
) -> Self {
tuple.into()
}
#[inline]
fn tokenize(&self) -> Self::Token<'_> {
()
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
(<alloy::sol_types::sol_data::String as alloy_sol_types::SolType>::tokenize(ret),)
}
#[inline]
fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<'_> as alloy_sol_types::SolType>::abi_decode_sequence(data).map(
|r| {
let r: nameReturn = r.into();
r._0
},
)
}
#[inline]
fn abi_decode_returns_validate(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<'_> as alloy_sol_types::SolType>::abi_decode_sequence_validate(
data,
)
.map(|r| {
let r: nameReturn = r.into();
r._0
})
}
}
};
#[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)]
/**Function with signature `symbol()` and selector `0x95d89b41`.
```solidity
function symbol() external view returns (string memory);
```*/
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct symbolCall;
#[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)]
///Container type for the return parameters of the [`symbol()`](symbolCall) function.
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct symbolReturn {
#[allow(missing_docs)]
pub _0: alloy::sol_types::private::String,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = ();
#[doc(hidden)]
type UnderlyingRustTuple<'a> = ();
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<symbolCall> for UnderlyingRustTuple<'_> {
fn from(value: symbolCall) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for symbolCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self
}
}
}
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::String,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<symbolReturn> for UnderlyingRustTuple<'_> {
fn from(value: symbolReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for symbolReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for symbolCall {
type Parameters<'a> = ();
type Token<'a> = <Self::Parameters<'a> as alloy_sol_types::SolType>::Token<'a>;
type Return = alloy::sol_types::private::String;
type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,);
type ReturnToken<'a> = <Self::ReturnTuple<'a> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "symbol()";
const SELECTOR: [u8; 4] = [149u8, 216u8, 155u8, 65u8];
#[inline]
fn new<'a>(
tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
) -> Self {
tuple.into()
}
#[inline]
fn tokenize(&self) -> Self::Token<'_> {
()
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
(<alloy::sol_types::sol_data::String as alloy_sol_types::SolType>::tokenize(ret),)
}
#[inline]
fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<'_> as alloy_sol_types::SolType>::abi_decode_sequence(data).map(
|r| {
let r: symbolReturn = r.into();
r._0
},
)
}
#[inline]
fn abi_decode_returns_validate(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<'_> as alloy_sol_types::SolType>::abi_decode_sequence_validate(
data,
)
.map(|r| {
let r: symbolReturn = r.into();
r._0
})
}
}
};
#[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)]
/**Function with signature `totalSupply()` and selector `0x18160ddd`.
```solidity
function totalSupply() external view returns (uint256);
```*/
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct totalSupplyCall;
#[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)]
///Container type for the return parameters of the [`totalSupply()`](totalSupplyCall) function.
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct totalSupplyReturn {
#[allow(missing_docs)]
pub _0: alloy::sol_types::private::primitives::aliases::U256,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = ();
#[doc(hidden)]
type UnderlyingRustTuple<'a> = ();
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<totalSupplyCall> for UnderlyingRustTuple<'_> {
fn from(value: totalSupplyCall) -> Self {
()
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for totalSupplyCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self
}
}
}
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (alloy::sol_types::private::primitives::aliases::U256,);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<totalSupplyReturn> for UnderlyingRustTuple<'_> {
fn from(value: totalSupplyReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for totalSupplyReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for totalSupplyCall {
type Parameters<'a> = ();
type Token<'a> = <Self::Parameters<'a> as alloy_sol_types::SolType>::Token<'a>;
type Return = alloy::sol_types::private::primitives::aliases::U256;
type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,);
type ReturnToken<'a> = <Self::ReturnTuple<'a> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "totalSupply()";
const SELECTOR: [u8; 4] = [24u8, 22u8, 13u8, 221u8];
#[inline]
fn new<'a>(
tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
) -> Self {
tuple.into()
}
#[inline]
fn tokenize(&self) -> Self::Token<'_> {
()
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
(
<alloy::sol_types::sol_data::Uint<256> as alloy_sol_types::SolType>::tokenize(
ret,
),
)
}
#[inline]
fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<'_> as alloy_sol_types::SolType>::abi_decode_sequence(data).map(
|r| {
let r: totalSupplyReturn = r.into();
r._0
},
)
}
#[inline]
fn abi_decode_returns_validate(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<'_> as alloy_sol_types::SolType>::abi_decode_sequence_validate(
data,
)
.map(|r| {
let r: totalSupplyReturn = r.into();
r._0
})
}
}
};
#[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)]
/**Function with signature `transfer(address,uint256)` and selector `0xa9059cbb`.
```solidity
function transfer(address to, uint256 amount) external returns (bool);
```*/
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct transferCall {
#[allow(missing_docs)]
pub to: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub amount: alloy::sol_types::private::primitives::aliases::U256,
}
#[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)]
///Container type for the return parameters of the [`transfer(address,uint256)`](transferCall) function.
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct transferReturn {
#[allow(missing_docs)]
pub _0: bool,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Uint<256>,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
alloy::sol_types::private::Address,
alloy::sol_types::private::primitives::aliases::U256,
);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<transferCall> for UnderlyingRustTuple<'_> {
fn from(value: transferCall) -> Self {
(value.to, value.amount)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for transferCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
to: tuple.0,
amount: tuple.1,
}
}
}
}
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (bool,);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<transferReturn> for UnderlyingRustTuple<'_> {
fn from(value: transferReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for transferReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for transferCall {
type Parameters<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Uint<256>,
);
type Token<'a> = <Self::Parameters<'a> as alloy_sol_types::SolType>::Token<'a>;
type Return = bool;
type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,);
type ReturnToken<'a> = <Self::ReturnTuple<'a> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "transfer(address,uint256)";
const SELECTOR: [u8; 4] = [169u8, 5u8, 156u8, 187u8];
#[inline]
fn new<'a>(
tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
) -> Self {
tuple.into()
}
#[inline]
fn tokenize(&self) -> Self::Token<'_> {
(
<alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
&self.to,
),
<alloy::sol_types::sol_data::Uint<256> as alloy_sol_types::SolType>::tokenize(
&self.amount,
),
)
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
(<alloy::sol_types::sol_data::Bool as alloy_sol_types::SolType>::tokenize(ret),)
}
#[inline]
fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<'_> as alloy_sol_types::SolType>::abi_decode_sequence(data).map(
|r| {
let r: transferReturn = r.into();
r._0
},
)
}
#[inline]
fn abi_decode_returns_validate(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<'_> as alloy_sol_types::SolType>::abi_decode_sequence_validate(
data,
)
.map(|r| {
let r: transferReturn = r.into();
r._0
})
}
}
};
#[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)]
/**Function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`.
```solidity
function transferFrom(address from, address to, uint256 amount) external returns (bool);
```*/
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct transferFromCall {
#[allow(missing_docs)]
pub from: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub to: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub amount: alloy::sol_types::private::primitives::aliases::U256,
}
#[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Eq, Hash)]
///Container type for the return parameters of the [`transferFrom(address,address,uint256)`](transferFromCall) function.
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct transferFromReturn {
#[allow(missing_docs)]
pub _0: bool,
}
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style
)]
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Uint<256>,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
alloy::sol_types::private::Address,
alloy::sol_types::private::Address,
alloy::sol_types::private::primitives::aliases::U256,
);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<transferFromCall> for UnderlyingRustTuple<'_> {
fn from(value: transferFromCall) -> Self {
(value.from, value.to, value.amount)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for transferFromCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
from: tuple.0,
to: tuple.1,
amount: tuple.2,
}
}
}
}
{
#[doc(hidden)]
type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (bool,);
#[cfg(test)]
#[allow(dead_code, unreachable_patterns)]
fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq<UnderlyingRustTuple>) {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<transferFromReturn> for UnderlyingRustTuple<'_> {
fn from(value: transferFromReturn) -> Self {
(value._0,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for transferFromReturn {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { _0: tuple.0 }
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolCall for transferFromCall {
type Parameters<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Uint<256>,
);
type Token<'a> = <Self::Parameters<'a> as alloy_sol_types::SolType>::Token<'a>;
type Return = bool;
type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,);
type ReturnToken<'a> = <Self::ReturnTuple<'a> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "transferFrom(address,address,uint256)";
const SELECTOR: [u8; 4] = [35u8, 184u8, 114u8, 221u8];
#[inline]
fn new<'a>(
tuple: <Self::Parameters<'a> as alloy_sol_types::SolType>::RustType,
) -> Self {
tuple.into()
}
#[inline]
fn tokenize(&self) -> Self::Token<'_> {
(
<alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
&self.from,
),
<alloy::sol_types::sol_data::Address as alloy_sol_types::SolType>::tokenize(
&self.to,
),
<alloy::sol_types::sol_data::Uint<256> as alloy_sol_types::SolType>::tokenize(
&self.amount,
),
)
}
#[inline]
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> {
(<alloy::sol_types::sol_data::Bool as alloy_sol_types::SolType>::tokenize(ret),)
}
#[inline]
fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<'_> as alloy_sol_types::SolType>::abi_decode_sequence(data).map(
|r| {
let r: transferFromReturn = r.into();
r._0
},
)
}
#[inline]
fn abi_decode_returns_validate(data: &[u8]) -> alloy_sol_types::Result<Self::Return> {
<Self::ReturnTuple<'_> as alloy_sol_types::SolType>::abi_decode_sequence_validate(
data,
)
.map(|r| {
let r: transferFromReturn = r.into();
r._0
})
}
}
};
///Container for all the [`MockERC20`](self) function calls.
#[derive(serde::Serialize, serde::Deserialize)]
pub enum MockERC20Calls {
#[allow(missing_docs)]
allowance(allowanceCall),
#[allow(missing_docs)]
approve(approveCall),
#[allow(missing_docs)]
balanceOf(balanceOfCall),
#[allow(missing_docs)]
decimals(decimalsCall),
#[allow(missing_docs)]
decreaseAllowance(decreaseAllowanceCall),
#[allow(missing_docs)]
increaseAllowance(increaseAllowanceCall),
#[allow(missing_docs)]
mint(mintCall),
#[allow(missing_docs)]
name(nameCall),
#[allow(missing_docs)]
symbol(symbolCall),
#[allow(missing_docs)]
totalSupply(totalSupplyCall),
#[allow(missing_docs)]
transfer(transferCall),
#[allow(missing_docs)]
transferFrom(transferFromCall),
}
#[automatically_derived]
impl MockERC20Calls {
/// All the selectors of this enum.
///
/// Note that the selectors might not be in the same order as the variants.
/// No guarantees are made about the order of the selectors.
///
/// Prefer using `SolInterface` methods instead.
pub const SELECTORS: &'static [[u8; 4usize]] = &[
[6u8, 253u8, 222u8, 3u8],
[9u8, 94u8, 167u8, 179u8],
[24u8, 22u8, 13u8, 221u8],
[35u8, 184u8, 114u8, 221u8],
[49u8, 60u8, 229u8, 103u8],
[57u8, 80u8, 147u8, 81u8],
[64u8, 193u8, 15u8, 25u8],
[112u8, 160u8, 130u8, 49u8],
[149u8, 216u8, 155u8, 65u8],
[164u8, 87u8, 194u8, 215u8],
[169u8, 5u8, 156u8, 187u8],
[221u8, 98u8, 237u8, 62u8],
];
}
#[automatically_derived]
impl alloy_sol_types::SolInterface for MockERC20Calls {
const NAME: &'static str = "MockERC20Calls";
const MIN_DATA_LENGTH: usize = 0usize;
const COUNT: usize = 12usize;
#[inline]
fn selector(&self) -> [u8; 4] {
match self {
Self::allowance(_) => <allowanceCall as alloy_sol_types::SolCall>::SELECTOR,
Self::approve(_) => <approveCall as alloy_sol_types::SolCall>::SELECTOR,
Self::balanceOf(_) => <balanceOfCall as alloy_sol_types::SolCall>::SELECTOR,
Self::decimals(_) => <decimalsCall as alloy_sol_types::SolCall>::SELECTOR,
Self::decreaseAllowance(_) => {
<decreaseAllowanceCall as alloy_sol_types::SolCall>::SELECTOR
}
Self::increaseAllowance(_) => {
<increaseAllowanceCall as alloy_sol_types::SolCall>::SELECTOR
}
Self::mint(_) => <mintCall as alloy_sol_types::SolCall>::SELECTOR,
Self::name(_) => <nameCall as alloy_sol_types::SolCall>::SELECTOR,
Self::symbol(_) => <symbolCall as alloy_sol_types::SolCall>::SELECTOR,
Self::totalSupply(_) => <totalSupplyCall as alloy_sol_types::SolCall>::SELECTOR,
Self::transfer(_) => <transferCall as alloy_sol_types::SolCall>::SELECTOR,
Self::transferFrom(_) => <transferFromCall as alloy_sol_types::SolCall>::SELECTOR,
}
}
#[inline]
fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> {
Self::SELECTORS.get(i).copied()
}
#[inline]
fn valid_selector(selector: [u8; 4]) -> bool {
Self::SELECTORS.binary_search(&selector).is_ok()
}
#[inline]
#[allow(non_snake_case)]
fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result<Self> {
static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result<MockERC20Calls>] = &[
{
fn name(data: &[u8]) -> alloy_sol_types::Result<MockERC20Calls> {
<nameCall as alloy_sol_types::SolCall>::abi_decode_raw(data)
.map(MockERC20Calls::name)
}
name
},
{
fn approve(data: &[u8]) -> alloy_sol_types::Result<MockERC20Calls> {
<approveCall as alloy_sol_types::SolCall>::abi_decode_raw(data)
.map(MockERC20Calls::approve)
}
approve
},
{
fn totalSupply(data: &[u8]) -> alloy_sol_types::Result<MockERC20Calls> {
<totalSupplyCall as alloy_sol_types::SolCall>::abi_decode_raw(data)
.map(MockERC20Calls::totalSupply)
}
totalSupply
},
{
fn transferFrom(data: &[u8]) -> alloy_sol_types::Result<MockERC20Calls> {
<transferFromCall as alloy_sol_types::SolCall>::abi_decode_raw(data)
.map(MockERC20Calls::transferFrom)
}
transferFrom
},
{
fn decimals(data: &[u8]) -> alloy_sol_types::Result<MockERC20Calls> {
<decimalsCall as alloy_sol_types::SolCall>::abi_decode_raw(data)
.map(MockERC20Calls::decimals)
}
decimals
},
{
fn increaseAllowance(data: &[u8]) -> alloy_sol_types::Result<MockERC20Calls> {
<increaseAllowanceCall as alloy_sol_types::SolCall>::abi_decode_raw(data)
.map(MockERC20Calls::increaseAllowance)
}
increaseAllowance
},
{
fn mint(data: &[u8]) -> alloy_sol_types::Result<MockERC20Calls> {
<mintCall as alloy_sol_types::SolCall>::abi_decode_raw(data)
.map(MockERC20Calls::mint)
}
mint
},
{
fn balanceOf(data: &[u8]) -> alloy_sol_types::Result<MockERC20Calls> {
<balanceOfCall as alloy_sol_types::SolCall>::abi_decode_raw(data)
.map(MockERC20Calls::balanceOf)
}
balanceOf
},
{
fn symbol(data: &[u8]) -> alloy_sol_types::Result<MockERC20Calls> {
<symbolCall as alloy_sol_types::SolCall>::abi_decode_raw(data)
.map(MockERC20Calls::symbol)
}
symbol
},
{
fn decreaseAllowance(data: &[u8]) -> alloy_sol_types::Result<MockERC20Calls> {
<decreaseAllowanceCall as alloy_sol_types::SolCall>::abi_decode_raw(data)
.map(MockERC20Calls::decreaseAllowance)
}
decreaseAllowance
},
{
fn transfer(data: &[u8]) -> alloy_sol_types::Result<MockERC20Calls> {
<transferCall as alloy_sol_types::SolCall>::abi_decode_raw(data)
.map(MockERC20Calls::transfer)
}
transfer
},
{
fn allowance(data: &[u8]) -> alloy_sol_types::Result<MockERC20Calls> {
<allowanceCall as alloy_sol_types::SolCall>::abi_decode_raw(data)
.map(MockERC20Calls::allowance)
}
allowance
},
];
let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
return Err(alloy_sol_types::Error::unknown_selector(
<Self as alloy_sol_types::SolInterface>::NAME,
selector,
));
};
DECODE_SHIMS[idx](data)
}
#[inline]
#[allow(non_snake_case)]
fn abi_decode_raw_validate(
selector: [u8; 4],
data: &[u8],
) -> alloy_sol_types::Result<Self> {
static DECODE_VALIDATE_SHIMS: &[fn(
&[u8],
)
-> alloy_sol_types::Result<MockERC20Calls>] = &[
{
fn name(data: &[u8]) -> alloy_sol_types::Result<MockERC20Calls> {
<nameCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(data)
.map(MockERC20Calls::name)
}
name
},
{
fn approve(data: &[u8]) -> alloy_sol_types::Result<MockERC20Calls> {
<approveCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(data)
.map(MockERC20Calls::approve)
}
approve
},
{
fn totalSupply(data: &[u8]) -> alloy_sol_types::Result<MockERC20Calls> {
<totalSupplyCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(data)
.map(MockERC20Calls::totalSupply)
}
totalSupply
},
{
fn transferFrom(data: &[u8]) -> alloy_sol_types::Result<MockERC20Calls> {
<transferFromCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(MockERC20Calls::transferFrom)
}
transferFrom
},
{
fn decimals(data: &[u8]) -> alloy_sol_types::Result<MockERC20Calls> {
<decimalsCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(data)
.map(MockERC20Calls::decimals)
}
decimals
},
{
fn increaseAllowance(data: &[u8]) -> alloy_sol_types::Result<MockERC20Calls> {
<increaseAllowanceCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(MockERC20Calls::increaseAllowance)
}
increaseAllowance
},
{
fn mint(data: &[u8]) -> alloy_sol_types::Result<MockERC20Calls> {
<mintCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(data)
.map(MockERC20Calls::mint)
}
mint
},
{
fn balanceOf(data: &[u8]) -> alloy_sol_types::Result<MockERC20Calls> {
<balanceOfCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(data)
.map(MockERC20Calls::balanceOf)
}
balanceOf
},
{
fn symbol(data: &[u8]) -> alloy_sol_types::Result<MockERC20Calls> {
<symbolCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(data)
.map(MockERC20Calls::symbol)
}
symbol
},
{
fn decreaseAllowance(data: &[u8]) -> alloy_sol_types::Result<MockERC20Calls> {
<decreaseAllowanceCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(MockERC20Calls::decreaseAllowance)
}
decreaseAllowance
},
{
fn transfer(data: &[u8]) -> alloy_sol_types::Result<MockERC20Calls> {
<transferCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(data)
.map(MockERC20Calls::transfer)
}
transfer
},
{
fn allowance(data: &[u8]) -> alloy_sol_types::Result<MockERC20Calls> {
<allowanceCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(data)
.map(MockERC20Calls::allowance)
}
allowance
},
];
let Ok(idx) = Self::SELECTORS.binary_search(&selector) else {
return Err(alloy_sol_types::Error::unknown_selector(
<Self as alloy_sol_types::SolInterface>::NAME,
selector,
));
};
DECODE_VALIDATE_SHIMS[idx](data)
}
#[inline]
fn abi_encoded_size(&self) -> usize {
match self {
Self::allowance(inner) => {
<allowanceCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
}
Self::approve(inner) => {
<approveCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
}
Self::balanceOf(inner) => {
<balanceOfCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
}
Self::decimals(inner) => {
<decimalsCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
}
Self::decreaseAllowance(inner) => {
<decreaseAllowanceCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
}
Self::increaseAllowance(inner) => {
<increaseAllowanceCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
}
Self::mint(inner) => {
<mintCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
}
Self::name(inner) => {
<nameCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
}
Self::symbol(inner) => {
<symbolCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
}
Self::totalSupply(inner) => {
<totalSupplyCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
}
Self::transfer(inner) => {
<transferCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
}
Self::transferFrom(inner) => {
<transferFromCall as alloy_sol_types::SolCall>::abi_encoded_size(inner)
}
}
}
#[inline]
fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec<u8>) {
match self {
Self::allowance(inner) => {
<allowanceCall as alloy_sol_types::SolCall>::abi_encode_raw(inner, out)
}
Self::approve(inner) => {
<approveCall as alloy_sol_types::SolCall>::abi_encode_raw(inner, out)
}
Self::balanceOf(inner) => {
<balanceOfCall as alloy_sol_types::SolCall>::abi_encode_raw(inner, out)
}
Self::decimals(inner) => {
<decimalsCall as alloy_sol_types::SolCall>::abi_encode_raw(inner, out)
}
Self::decreaseAllowance(inner) => {
<decreaseAllowanceCall as alloy_sol_types::SolCall>::abi_encode_raw(inner, out)
}
Self::increaseAllowance(inner) => {
<increaseAllowanceCall as alloy_sol_types::SolCall>::abi_encode_raw(inner, out)
}
Self::mint(inner) => {
<mintCall as alloy_sol_types::SolCall>::abi_encode_raw(inner, out)
}
Self::name(inner) => {
<nameCall as alloy_sol_types::SolCall>::abi_encode_raw(inner, out)
}
Self::symbol(inner) => {
<symbolCall as alloy_sol_types::SolCall>::abi_encode_raw(inner, out)
}
Self::totalSupply(inner) => {
<totalSupplyCall as alloy_sol_types::SolCall>::abi_encode_raw(inner, out)
}
Self::transfer(inner) => {
<transferCall as alloy_sol_types::SolCall>::abi_encode_raw(inner, out)
}
Self::transferFrom(inner) => {
<transferFromCall as alloy_sol_types::SolCall>::abi_encode_raw(inner, out)
}
}
}
}
///Container for all the [`MockERC20`](self) events.
#[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq, Eq, Hash)]
pub enum MockERC20Events {
#[allow(missing_docs)]
Approval(Approval),
#[allow(missing_docs)]
Transfer(Transfer),
}
#[automatically_derived]
impl MockERC20Events {
/// All the selectors of this enum.
///
/// Note that the selectors might not be in the same order as the variants.
/// No guarantees are made about the order of the selectors.
///
/// Prefer using `SolInterface` methods instead.
pub const SELECTORS: &'static [[u8; 32usize]] = &[
[
140u8, 91u8, 225u8, 229u8, 235u8, 236u8, 125u8, 91u8, 209u8, 79u8, 113u8, 66u8,
125u8, 30u8, 132u8, 243u8, 221u8, 3u8, 20u8, 192u8, 247u8, 178u8, 41u8, 30u8, 91u8,
32u8, 10u8, 200u8, 199u8, 195u8, 185u8, 37u8,
],
[
221u8, 242u8, 82u8, 173u8, 27u8, 226u8, 200u8, 155u8, 105u8, 194u8, 176u8, 104u8,
252u8, 55u8, 141u8, 170u8, 149u8, 43u8, 167u8, 241u8, 99u8, 196u8, 161u8, 22u8,
40u8, 245u8, 90u8, 77u8, 245u8, 35u8, 179u8, 239u8,
],
];
}
#[automatically_derived]
impl alloy_sol_types::SolEventInterface for MockERC20Events {
const NAME: &'static str = "MockERC20Events";
const COUNT: usize = 2usize;
fn decode_raw_log(
topics: &[alloy_sol_types::Word],
data: &[u8],
) -> alloy_sol_types::Result<Self> {
match topics.first().copied() {
Some(<Approval as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
<Approval as alloy_sol_types::SolEvent>::decode_raw_log(topics, data)
.map(Self::Approval)
}
Some(<Transfer as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
<Transfer as alloy_sol_types::SolEvent>::decode_raw_log(topics, data)
.map(Self::Transfer)
}
_ => alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog {
name: <Self as alloy_sol_types::SolEventInterface>::NAME,
log: alloy_sol_types::private::Box::new(
alloy_sol_types::private::LogData::new_unchecked(
topics.to_vec(),
data.to_vec().into(),
),
),
}),
}
}
}
#[automatically_derived]
impl alloy_sol_types::private::IntoLogData for MockERC20Events {
fn to_log_data(&self) -> alloy_sol_types::private::LogData {
match self {
Self::Approval(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner),
Self::Transfer(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner),
}
}
fn into_log_data(self) -> alloy_sol_types::private::LogData {
match self {
Self::Approval(inner) => {
alloy_sol_types::private::IntoLogData::into_log_data(inner)
}
Self::Transfer(inner) => {
alloy_sol_types::private::IntoLogData::into_log_data(inner)
}
}
}
}
use alloy::contract as alloy_contract;
/**Creates a new wrapper around an on-chain [`MockERC20`](self) contract instance.
See the [wrapper's documentation](`MockERC20Instance`) for more details.*/
#[inline]
pub const fn new<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
>(
address: alloy_sol_types::private::Address,
provider: P,
) -> MockERC20Instance<P, N> {
MockERC20Instance::<P, N>::new(address, provider)
}
/**Deploys this contract using the given `provider` and constructor arguments, if any.
Returns a new instance of the contract, if the deployment was successful.
For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/
#[inline]
pub fn deploy<P: alloy_contract::private::Provider<N>, N: alloy_contract::private::Network>(
provider: P,
) -> impl ::core::future::Future<Output = alloy_contract::Result<MockERC20Instance<P, N>>> {
MockERC20Instance::<P, N>::deploy(provider)
}
/**Creates a `RawCallBuilder` for deploying this contract using the given `provider`
and constructor arguments, if any.
This is a simple wrapper around creating a `RawCallBuilder` with the data set to
the bytecode concatenated with the constructor's ABI-encoded arguments.*/
#[inline]
pub fn deploy_builder<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
>(
provider: P,
) -> alloy_contract::RawCallBuilder<P, N> {
MockERC20Instance::<P, N>::deploy_builder(provider)
}
/**A [`MockERC20`](self) instance.
Contains type-safe methods for interacting with an on-chain instance of the
[`MockERC20`](self) contract located at a given `address`, using a given
provider `P`.
If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!)
documentation on how to provide it), the `deploy` and `deploy_builder` methods can
be used to deploy a new instance of the contract.
See the [module-level documentation](self) for all the available methods.*/
#[derive(Clone)]
pub struct MockERC20Instance<P, N = alloy_contract::private::Ethereum> {
address: alloy_sol_types::private::Address,
provider: P,
_network: ::core::marker::PhantomData<N>,
}
#[automatically_derived]
impl<P, N> ::core::fmt::Debug for MockERC20Instance<P, N> {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("MockERC20Instance")
.field(&self.address)
.finish()
}
}
/// Instantiation and getters/setters.
#[automatically_derived]
impl<P: alloy_contract::private::Provider<N>, N: alloy_contract::private::Network>
MockERC20Instance<P, N>
{
/**Creates a new wrapper around an on-chain [`MockERC20`](self) contract instance.
See the [wrapper's documentation](`MockERC20Instance`) for more details.*/
#[inline]
pub const fn new(address: alloy_sol_types::private::Address, provider: P) -> Self {
Self {
address,
provider,
_network: ::core::marker::PhantomData,
}
}
/**Deploys this contract using the given `provider` and constructor arguments, if any.
Returns a new instance of the contract, if the deployment was successful.
For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/
#[inline]
pub async fn deploy(provider: P) -> alloy_contract::Result<MockERC20Instance<P, N>> {
let call_builder = Self::deploy_builder(provider);
let contract_address = call_builder.deploy().await?;
Ok(Self::new(contract_address, call_builder.provider))
}
/**Creates a `RawCallBuilder` for deploying this contract using the given `provider`
and constructor arguments, if any.
This is a simple wrapper around creating a `RawCallBuilder` with the data set to
the bytecode concatenated with the constructor's ABI-encoded arguments.*/
#[inline]
pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder<P, N> {
alloy_contract::RawCallBuilder::new_raw_deploy(
provider,
::core::clone::Clone::clone(&BYTECODE),
)
}
/// Returns a reference to the address.
#[inline]
pub const fn address(&self) -> &alloy_sol_types::private::Address {
&self.address
}
/// Sets the address.
#[inline]
pub fn set_address(&mut self, address: alloy_sol_types::private::Address) {
self.address = address;
}
/// Sets the address and returns `self`.
pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self {
self.set_address(address);
self
}
/// Returns a reference to the provider.
#[inline]
pub const fn provider(&self) -> &P {
&self.provider
}
}
impl<P: ::core::clone::Clone, N> MockERC20Instance<&P, N> {
/// Clones the provider and returns a new instance with the cloned provider.
#[inline]
pub fn with_cloned_provider(self) -> MockERC20Instance<P, N> {
MockERC20Instance {
address: self.address,
provider: ::core::clone::Clone::clone(&self.provider),
_network: ::core::marker::PhantomData,
}
}
}
/// Function calls.
#[automatically_derived]
impl<P: alloy_contract::private::Provider<N>, N: alloy_contract::private::Network>
MockERC20Instance<P, N>
{
/// Creates a new call builder using this contract instance's provider and address.
///
/// Note that the call can be any function call, not just those defined in this
/// contract. Prefer using the other methods for building type-safe contract calls.
pub fn call_builder<C: alloy_sol_types::SolCall>(
&self,
call: &C,
) -> alloy_contract::SolCallBuilder<&P, C, N> {
alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call)
}
///Creates a new call builder for the [`allowance`] function.
pub fn allowance(
&self,
owner: alloy::sol_types::private::Address,
spender: alloy::sol_types::private::Address,
) -> alloy_contract::SolCallBuilder<&P, allowanceCall, N> {
self.call_builder(&allowanceCall { owner, spender })
}
///Creates a new call builder for the [`approve`] function.
pub fn approve(
&self,
spender: alloy::sol_types::private::Address,
amount: alloy::sol_types::private::primitives::aliases::U256,
) -> alloy_contract::SolCallBuilder<&P, approveCall, N> {
self.call_builder(&approveCall { spender, amount })
}
///Creates a new call builder for the [`balanceOf`] function.
pub fn balanceOf(
&self,
account: alloy::sol_types::private::Address,
) -> alloy_contract::SolCallBuilder<&P, balanceOfCall, N> {
self.call_builder(&balanceOfCall { account })
}
///Creates a new call builder for the [`decimals`] function.
pub fn decimals(&self) -> alloy_contract::SolCallBuilder<&P, decimalsCall, N> {
self.call_builder(&decimalsCall)
}
///Creates a new call builder for the [`decreaseAllowance`] function.
pub fn decreaseAllowance(
&self,
spender: alloy::sol_types::private::Address,
subtractedValue: alloy::sol_types::private::primitives::aliases::U256,
) -> alloy_contract::SolCallBuilder<&P, decreaseAllowanceCall, N> {
self.call_builder(&decreaseAllowanceCall {
spender,
subtractedValue,
})
}
///Creates a new call builder for the [`increaseAllowance`] function.
pub fn increaseAllowance(
&self,
spender: alloy::sol_types::private::Address,
addedValue: alloy::sol_types::private::primitives::aliases::U256,
) -> alloy_contract::SolCallBuilder<&P, increaseAllowanceCall, N> {
self.call_builder(&increaseAllowanceCall {
spender,
addedValue,
})
}
///Creates a new call builder for the [`mint`] function.
pub fn mint(
&self,
account: alloy::sol_types::private::Address,
amount: alloy::sol_types::private::primitives::aliases::U256,
) -> alloy_contract::SolCallBuilder<&P, mintCall, N> {
self.call_builder(&mintCall { account, amount })
}
///Creates a new call builder for the [`name`] function.
pub fn name(&self) -> alloy_contract::SolCallBuilder<&P, nameCall, N> {
self.call_builder(&nameCall)
}
///Creates a new call builder for the [`symbol`] function.
pub fn symbol(&self) -> alloy_contract::SolCallBuilder<&P, symbolCall, N> {
self.call_builder(&symbolCall)
}
///Creates a new call builder for the [`totalSupply`] function.
pub fn totalSupply(&self) -> alloy_contract::SolCallBuilder<&P, totalSupplyCall, N> {
self.call_builder(&totalSupplyCall)
}
///Creates a new call builder for the [`transfer`] function.
pub fn transfer(
&self,
to: alloy::sol_types::private::Address,
amount: alloy::sol_types::private::primitives::aliases::U256,
) -> alloy_contract::SolCallBuilder<&P, transferCall, N> {
self.call_builder(&transferCall { to, amount })
}
///Creates a new call builder for the [`transferFrom`] function.
pub fn transferFrom(
&self,
from: alloy::sol_types::private::Address,
to: alloy::sol_types::private::Address,
amount: alloy::sol_types::private::primitives::aliases::U256,
) -> alloy_contract::SolCallBuilder<&P, transferFromCall, N> {
self.call_builder(&transferFromCall { from, to, amount })
}
}
/// Event filters.
#[automatically_derived]
impl<P: alloy_contract::private::Provider<N>, N: alloy_contract::private::Network>
MockERC20Instance<P, N>
{
/// Creates a new event filter using this contract instance's provider and address.
///
/// Note that the type can be any event, not just those defined in this contract.
/// Prefer using the other methods for building type-safe event filters.
pub fn event_filter<E: alloy_sol_types::SolEvent>(
&self,
) -> alloy_contract::Event<&P, E, N> {
alloy_contract::Event::new_sol(&self.provider, &self.address)
}
///Creates a new event filter for the [`Approval`] event.
pub fn Approval_filter(&self) -> alloy_contract::Event<&P, Approval, N> {
self.event_filter::<Approval>()
}
///Creates a new event filter for the [`Transfer`] event.
pub fn Transfer_filter(&self) -> alloy_contract::Event<&P, Transfer, N> {
self.event_filter::<Transfer>()
}
}
}