/**
Generated by the following Solidity interface...
```solidity
interface SimpleERC20 {
error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);
error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);
error ERC20InvalidApprover(address approver);
error ERC20InvalidReceiver(address receiver);
error ERC20InvalidSender(address sender);
error ERC20InvalidSpender(address spender);
event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);
constructor(address minter, uint256 initialSupply);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 value) external returns (bool);
function balanceOf(address account) external view returns (uint256);
function decimals() external view returns (uint8);
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 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
}
```
...which was generated by the following JSON ABI:
```json
[
{
"type": "constructor",
"inputs": [
{
"name": "minter",
"type": "address",
"internalType": "address"
},
{
"name": "initialSupply",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "nonpayable"
},
{
"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": "value",
"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": "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": "value",
"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": "value",
"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
},
{
"type": "error",
"name": "ERC20InsufficientAllowance",
"inputs": [
{
"name": "spender",
"type": "address",
"internalType": "address"
},
{
"name": "allowance",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "needed",
"type": "uint256",
"internalType": "uint256"
}
]
},
{
"type": "error",
"name": "ERC20InsufficientBalance",
"inputs": [
{
"name": "sender",
"type": "address",
"internalType": "address"
},
{
"name": "balance",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "needed",
"type": "uint256",
"internalType": "uint256"
}
]
},
{
"type": "error",
"name": "ERC20InvalidApprover",
"inputs": [
{
"name": "approver",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "ERC20InvalidReceiver",
"inputs": [
{
"name": "receiver",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "ERC20InvalidSender",
"inputs": [
{
"name": "sender",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "ERC20InvalidSpender",
"inputs": [
{
"name": "spender",
"type": "address",
"internalType": "address"
}
]
}
]
```*/
#[allow(
non_camel_case_types,
non_snake_case,
clippy::pub_underscore_fields,
clippy::style,
clippy::empty_structs_with_brackets
)]
pub mod SimpleERC20 {
use super::*;
use alloy::sol_types as alloy_sol_types;
/// The creation / init bytecode of the contract.
///
/// ```text
///0x6080604052346103b1576109e26040813803918261001c816103b5565b9384928339810103126103b15780516001600160a01b03811691908290036103b1576020015161004c60406103b5565b91600b83526a053696d706c6545524332360ac1b602084015261006f60406103b5565b6005815264053494d32360dc1b602082015283519092906001600160401b0381116102c257600354600181811c911680156103a7575b60208210146102a457601f8111610344575b50602094601f82116001146102e1579481929394955f926102d6575b50508160011b915f199060031b1c1916176003555b82516001600160401b0381116102c257600454600181811c911680156102b8575b60208210146102a457601f8111610241575b506020601f82116001146101de57819293945f926101d3575b50508160011b915f199060031b1c1916176004555b81156101c057600254908082018092116101ac5760207fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef915f9360025584845283825260408420818154019055604051908152a360405161060790816103db8239f35b634e487b7160e01b5f52601160045260245ffd5b63ec442f0560e01b5f525f60045260245ffd5b015190505f80610134565b601f1982169060045f52805f20915f5b81811061022957509583600195969710610211575b505050811b01600455610149565b01515f1960f88460031b161c191690555f8080610203565b9192602060018192868b0151815501940192016101ee565b60045f527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b601f830160051c8101916020841061029a575b601f0160051c01905b81811061028f575061011b565b5f8155600101610282565b9091508190610279565b634e487b7160e01b5f52602260045260245ffd5b90607f1690610109565b634e487b7160e01b5f52604160045260245ffd5b015190505f806100d3565b601f1982169560035f52805f20915f5b88811061032c57508360019596979810610314575b505050811b016003556100e8565b01515f1960f88460031b161c191690555f8080610306565b919260206001819286850151815501940192016102f1565b60035f527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b601f830160051c8101916020841061039d575b601f0160051c01905b81811061039257506100b7565b5f8155600101610385565b909150819061037c565b90607f16906100a5565b5f80fd5b6040519190601f01601f191682016001600160401b038111838210176102c25760405256fe6080806040526004361015610012575f80fd5b5f3560e01c90816306fdde03146103ef57508063095ea7b31461036d57806318160ddd1461035057806323b872dd14610271578063313ce5671461025657806370a082311461021f57806395d89b4114610104578063a9059cbb146100d35763dd62ed3e1461007f575f80fd5b346100cf5760403660031901126100cf576100986104e8565b6100a06104fe565b6001600160a01b039182165f908152600160209081526040808320949093168252928352819020549051908152f35b5f80fd5b346100cf5760403660031901126100cf576100f96100ef6104e8565b6024359033610514565b602060405160018152f35b346100cf575f3660031901126100cf576040515f6004548060011c90600181168015610215575b602083108114610201578285529081156101e55750600114610190575b50819003601f01601f191681019067ffffffffffffffff82118183101761017c57610178829182604052826104be565b0390f35b634e487b7160e01b5f52604160045260245ffd5b905060045f527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5f905b8282106101cf57506020915082010182610148565b60018160209254838588010152019101906101ba565b90506020925060ff191682840152151560051b82010182610148565b634e487b7160e01b5f52602260045260245ffd5b91607f169161012b565b346100cf5760203660031901126100cf576001600160a01b036102406104e8565b165f525f602052602060405f2054604051908152f35b346100cf575f3660031901126100cf57602060405160128152f35b346100cf5760603660031901126100cf5761028a6104e8565b6102926104fe565b6001600160a01b0382165f818152600160209081526040808320338452909152902054909260443592915f1981106102d0575b506100f99350610514565b83811061033557841561032257331561030f576100f9945f52600160205260405f2060018060a01b0333165f526020528360405f2091039055846102c5565b634a1406b160e11b5f525f60045260245ffd5b63e602df0560e01b5f525f60045260245ffd5b8390637dc7a0d960e11b5f523360045260245260445260645ffd5b346100cf575f3660031901126100cf576020600254604051908152f35b346100cf5760403660031901126100cf576103866104e8565b602435903315610322576001600160a01b031690811561030f57335f52600160205260405f20825f526020528060405f20556040519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560203392a3602060405160018152f35b346100cf575f3660031901126100cf575f6003548060011c906001811680156104b4575b602083108114610201578285529081156101e5575060011461045f5750819003601f01601f191681019067ffffffffffffffff82118183101761017c57610178829182604052826104be565b905060035f527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5f905b82821061049e57506020915082010182610148565b6001816020925483858801015201910190610489565b91607f1691610413565b602060409281835280519182918282860152018484015e5f828201840152601f01601f1916010190565b600435906001600160a01b03821682036100cf57565b602435906001600160a01b03821682036100cf57565b6001600160a01b03169081156105be576001600160a01b03169182156105ab57815f525f60205260405f205481811061059257817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92602092855f525f84520360405f2055845f525f825260405f20818154019055604051908152a3565b8263391434e360e21b5f5260045260245260445260645ffd5b63ec442f0560e01b5f525f60045260245ffd5b634b637e8f60e11b5f525f60045260245ffdfea2646970667358221220cac874b0e5b3f14a7f7e4b7e5415a81424893ae66b4ef42c436a3ec4b502262a64736f6c634300081e0033
/// ```
#[rustfmt::skip]
#[allow(clippy::all)]
pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static(
b"`\x80`@R4a\x03\xB1Wa\t\xE2`@\x818\x03\x91\x82a\0\x1C\x81a\x03\xB5V[\x93\x84\x92\x839\x81\x01\x03\x12a\x03\xB1W\x80Q`\x01`\x01`\xA0\x1B\x03\x81\x16\x91\x90\x82\x90\x03a\x03\xB1W` \x01Qa\0L`@a\x03\xB5V[\x91`\x0B\x83Rj\x056\x96\xD7\x06\xC6TU$3#`\xAC\x1B` \x84\x01Ra\0o`@a\x03\xB5V[`\x05\x81Rd\x054\x94\xD3#`\xDC\x1B` \x82\x01R\x83Q\x90\x92\x90`\x01`\x01`@\x1B\x03\x81\x11a\x02\xC2W`\x03T`\x01\x81\x81\x1C\x91\x16\x80\x15a\x03\xA7W[` \x82\x10\x14a\x02\xA4W`\x1F\x81\x11a\x03DW[P` \x94`\x1F\x82\x11`\x01\x14a\x02\xE1W\x94\x81\x92\x93\x94\x95_\x92a\x02\xD6W[PP\x81`\x01\x1B\x91_\x19\x90`\x03\x1B\x1C\x19\x16\x17`\x03U[\x82Q`\x01`\x01`@\x1B\x03\x81\x11a\x02\xC2W`\x04T`\x01\x81\x81\x1C\x91\x16\x80\x15a\x02\xB8W[` \x82\x10\x14a\x02\xA4W`\x1F\x81\x11a\x02AW[P` `\x1F\x82\x11`\x01\x14a\x01\xDEW\x81\x92\x93\x94_\x92a\x01\xD3W[PP\x81`\x01\x1B\x91_\x19\x90`\x03\x1B\x1C\x19\x16\x17`\x04U[\x81\x15a\x01\xC0W`\x02T\x90\x80\x82\x01\x80\x92\x11a\x01\xACW` \x7F\xDD\xF2R\xAD\x1B\xE2\xC8\x9Bi\xC2\xB0h\xFC7\x8D\xAA\x95+\xA7\xF1c\xC4\xA1\x16(\xF5ZM\xF5#\xB3\xEF\x91_\x93`\x02U\x84\x84R\x83\x82R`@\x84 \x81\x81T\x01\x90U`@Q\x90\x81R\xA3`@Qa\x06\x07\x90\x81a\x03\xDB\x829\xF3[cNH{q`\xE0\x1B_R`\x11`\x04R`$_\xFD[c\xECD/\x05`\xE0\x1B_R_`\x04R`$_\xFD[\x01Q\x90P_\x80a\x014V[`\x1F\x19\x82\x16\x90`\x04_R\x80_ \x91_[\x81\x81\x10a\x02)WP\x95\x83`\x01\x95\x96\x97\x10a\x02\x11W[PPP\x81\x1B\x01`\x04Ua\x01IV[\x01Q_\x19`\xF8\x84`\x03\x1B\x16\x1C\x19\x16\x90U_\x80\x80a\x02\x03V[\x91\x92` `\x01\x81\x92\x86\x8B\x01Q\x81U\x01\x94\x01\x92\x01a\x01\xEEV[`\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\x02\x9AW[`\x1F\x01`\x05\x1C\x01\x90[\x81\x81\x10a\x02\x8FWPa\x01\x1BV[_\x81U`\x01\x01a\x02\x82V[\x90\x91P\x81\x90a\x02yV[cNH{q`\xE0\x1B_R`\"`\x04R`$_\xFD[\x90`\x7F\x16\x90a\x01\tV[cNH{q`\xE0\x1B_R`A`\x04R`$_\xFD[\x01Q\x90P_\x80a\0\xD3V[`\x1F\x19\x82\x16\x95`\x03_R\x80_ \x91_[\x88\x81\x10a\x03,WP\x83`\x01\x95\x96\x97\x98\x10a\x03\x14W[PPP\x81\x1B\x01`\x03Ua\0\xE8V[\x01Q_\x19`\xF8\x84`\x03\x1B\x16\x1C\x19\x16\x90U_\x80\x80a\x03\x06V[\x91\x92` `\x01\x81\x92\x86\x85\x01Q\x81U\x01\x94\x01\x92\x01a\x02\xF1V[`\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\x03\x9DW[`\x1F\x01`\x05\x1C\x01\x90[\x81\x81\x10a\x03\x92WPa\0\xB7V[_\x81U`\x01\x01a\x03\x85V[\x90\x91P\x81\x90a\x03|V[\x90`\x7F\x16\x90a\0\xA5V[_\x80\xFD[`@Q\x91\x90`\x1F\x01`\x1F\x19\x16\x82\x01`\x01`\x01`@\x1B\x03\x81\x11\x83\x82\x10\x17a\x02\xC2W`@RV\xFE`\x80\x80`@R`\x046\x10\x15a\0\x12W_\x80\xFD[_5`\xE0\x1C\x90\x81c\x06\xFD\xDE\x03\x14a\x03\xEFWP\x80c\t^\xA7\xB3\x14a\x03mW\x80c\x18\x16\r\xDD\x14a\x03PW\x80c#\xB8r\xDD\x14a\x02qW\x80c1<\xE5g\x14a\x02VW\x80cp\xA0\x821\x14a\x02\x1FW\x80c\x95\xD8\x9BA\x14a\x01\x04W\x80c\xA9\x05\x9C\xBB\x14a\0\xD3Wc\xDDb\xED>\x14a\0\x7FW_\x80\xFD[4a\0\xCFW`@6`\x03\x19\x01\x12a\0\xCFWa\0\x98a\x04\xE8V[a\0\xA0a\x04\xFEV[`\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\xCFW`@6`\x03\x19\x01\x12a\0\xCFWa\0\xF9a\0\xEFa\x04\xE8V[`$5\x903a\x05\x14V[` `@Q`\x01\x81R\xF3[4a\0\xCFW_6`\x03\x19\x01\x12a\0\xCFW`@Q_`\x04T\x80`\x01\x1C\x90`\x01\x81\x16\x80\x15a\x02\x15W[` \x83\x10\x81\x14a\x02\x01W\x82\x85R\x90\x81\x15a\x01\xE5WP`\x01\x14a\x01\x90W[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\x01|Wa\x01x\x82\x91\x82`@R\x82a\x04\xBEV[\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\x01\xCFWP` \x91P\x82\x01\x01\x82a\x01HV[`\x01\x81` \x92T\x83\x85\x88\x01\x01R\x01\x91\x01\x90a\x01\xBAV[\x90P` \x92P`\xFF\x19\x16\x82\x84\x01R\x15\x15`\x05\x1B\x82\x01\x01\x82a\x01HV[cNH{q`\xE0\x1B_R`\"`\x04R`$_\xFD[\x91`\x7F\x16\x91a\x01+V[4a\0\xCFW` 6`\x03\x19\x01\x12a\0\xCFW`\x01`\x01`\xA0\x1B\x03a\x02@a\x04\xE8V[\x16_R_` R` `@_ T`@Q\x90\x81R\xF3[4a\0\xCFW_6`\x03\x19\x01\x12a\0\xCFW` `@Q`\x12\x81R\xF3[4a\0\xCFW``6`\x03\x19\x01\x12a\0\xCFWa\x02\x8Aa\x04\xE8V[a\x02\x92a\x04\xFEV[`\x01`\x01`\xA0\x1B\x03\x82\x16_\x81\x81R`\x01` \x90\x81R`@\x80\x83 3\x84R\x90\x91R\x90 T\x90\x92`D5\x92\x91_\x19\x81\x10a\x02\xD0W[Pa\0\xF9\x93Pa\x05\x14V[\x83\x81\x10a\x035W\x84\x15a\x03\"W3\x15a\x03\x0FWa\0\xF9\x94_R`\x01` R`@_ `\x01\x80`\xA0\x1B\x033\x16_R` R\x83`@_ \x91\x03\x90U\x84a\x02\xC5V[cJ\x14\x06\xB1`\xE1\x1B_R_`\x04R`$_\xFD[c\xE6\x02\xDF\x05`\xE0\x1B_R_`\x04R`$_\xFD[\x83\x90c}\xC7\xA0\xD9`\xE1\x1B_R3`\x04R`$R`DR`d_\xFD[4a\0\xCFW_6`\x03\x19\x01\x12a\0\xCFW` `\x02T`@Q\x90\x81R\xF3[4a\0\xCFW`@6`\x03\x19\x01\x12a\0\xCFWa\x03\x86a\x04\xE8V[`$5\x903\x15a\x03\"W`\x01`\x01`\xA0\x1B\x03\x16\x90\x81\x15a\x03\x0FW3_R`\x01` R`@_ \x82_R` R\x80`@_ U`@Q\x90\x81R\x7F\x8C[\xE1\xE5\xEB\xEC}[\xD1OqB}\x1E\x84\xF3\xDD\x03\x14\xC0\xF7\xB2)\x1E[ \n\xC8\xC7\xC3\xB9%` 3\x92\xA3` `@Q`\x01\x81R\xF3[4a\0\xCFW_6`\x03\x19\x01\x12a\0\xCFW_`\x03T\x80`\x01\x1C\x90`\x01\x81\x16\x80\x15a\x04\xB4W[` \x83\x10\x81\x14a\x02\x01W\x82\x85R\x90\x81\x15a\x01\xE5WP`\x01\x14a\x04_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\x01|Wa\x01x\x82\x91\x82`@R\x82a\x04\xBEV[\x90P`\x03_R\x7F\xC2WZ\x0E\x9EY<\0\xF9Y\xF8\xC9/\x12\xDB(i\xC39Z;\x05\x02\xD0^%\x16Doq\xF8[_\x90[\x82\x82\x10a\x04\x9EWP` \x91P\x82\x01\x01\x82a\x01HV[`\x01\x81` \x92T\x83\x85\x88\x01\x01R\x01\x91\x01\x90a\x04\x89V[\x91`\x7F\x16\x91a\x04\x13V[` `@\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\xCFWV[`$5\x90`\x01`\x01`\xA0\x1B\x03\x82\x16\x82\x03a\0\xCFWV[`\x01`\x01`\xA0\x1B\x03\x16\x90\x81\x15a\x05\xBEW`\x01`\x01`\xA0\x1B\x03\x16\x91\x82\x15a\x05\xABW\x81_R_` R`@_ T\x81\x81\x10a\x05\x92W\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[\x82c9\x144\xE3`\xE2\x1B_R`\x04R`$R`DR`d_\xFD[c\xECD/\x05`\xE0\x1B_R_`\x04R`$_\xFD[cKc~\x8F`\xE1\x1B_R_`\x04R`$_\xFD\xFE\xA2dipfsX\"\x12 \xCA\xC8t\xB0\xE5\xB3\xF1J\x7F~K~T\x15\xA8\x14$\x89:\xE6kN\xF4,Cj>\xC4\xB5\x02&*dsolcC\0\x08\x1E\x003",
);
/// The runtime bytecode of the contract, as deployed on the network.
///
/// ```text
///0x6080806040526004361015610012575f80fd5b5f3560e01c90816306fdde03146103ef57508063095ea7b31461036d57806318160ddd1461035057806323b872dd14610271578063313ce5671461025657806370a082311461021f57806395d89b4114610104578063a9059cbb146100d35763dd62ed3e1461007f575f80fd5b346100cf5760403660031901126100cf576100986104e8565b6100a06104fe565b6001600160a01b039182165f908152600160209081526040808320949093168252928352819020549051908152f35b5f80fd5b346100cf5760403660031901126100cf576100f96100ef6104e8565b6024359033610514565b602060405160018152f35b346100cf575f3660031901126100cf576040515f6004548060011c90600181168015610215575b602083108114610201578285529081156101e55750600114610190575b50819003601f01601f191681019067ffffffffffffffff82118183101761017c57610178829182604052826104be565b0390f35b634e487b7160e01b5f52604160045260245ffd5b905060045f527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5f905b8282106101cf57506020915082010182610148565b60018160209254838588010152019101906101ba565b90506020925060ff191682840152151560051b82010182610148565b634e487b7160e01b5f52602260045260245ffd5b91607f169161012b565b346100cf5760203660031901126100cf576001600160a01b036102406104e8565b165f525f602052602060405f2054604051908152f35b346100cf575f3660031901126100cf57602060405160128152f35b346100cf5760603660031901126100cf5761028a6104e8565b6102926104fe565b6001600160a01b0382165f818152600160209081526040808320338452909152902054909260443592915f1981106102d0575b506100f99350610514565b83811061033557841561032257331561030f576100f9945f52600160205260405f2060018060a01b0333165f526020528360405f2091039055846102c5565b634a1406b160e11b5f525f60045260245ffd5b63e602df0560e01b5f525f60045260245ffd5b8390637dc7a0d960e11b5f523360045260245260445260645ffd5b346100cf575f3660031901126100cf576020600254604051908152f35b346100cf5760403660031901126100cf576103866104e8565b602435903315610322576001600160a01b031690811561030f57335f52600160205260405f20825f526020528060405f20556040519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560203392a3602060405160018152f35b346100cf575f3660031901126100cf575f6003548060011c906001811680156104b4575b602083108114610201578285529081156101e5575060011461045f5750819003601f01601f191681019067ffffffffffffffff82118183101761017c57610178829182604052826104be565b905060035f527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5f905b82821061049e57506020915082010182610148565b6001816020925483858801015201910190610489565b91607f1691610413565b602060409281835280519182918282860152018484015e5f828201840152601f01601f1916010190565b600435906001600160a01b03821682036100cf57565b602435906001600160a01b03821682036100cf57565b6001600160a01b03169081156105be576001600160a01b03169182156105ab57815f525f60205260405f205481811061059257817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92602092855f525f84520360405f2055845f525f825260405f20818154019055604051908152a3565b8263391434e360e21b5f5260045260245260445260645ffd5b63ec442f0560e01b5f525f60045260245ffd5b634b637e8f60e11b5f525f60045260245ffdfea2646970667358221220cac874b0e5b3f14a7f7e4b7e5415a81424893ae66b4ef42c436a3ec4b502262a64736f6c634300081e0033
/// ```
#[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\x03\xEFWP\x80c\t^\xA7\xB3\x14a\x03mW\x80c\x18\x16\r\xDD\x14a\x03PW\x80c#\xB8r\xDD\x14a\x02qW\x80c1<\xE5g\x14a\x02VW\x80cp\xA0\x821\x14a\x02\x1FW\x80c\x95\xD8\x9BA\x14a\x01\x04W\x80c\xA9\x05\x9C\xBB\x14a\0\xD3Wc\xDDb\xED>\x14a\0\x7FW_\x80\xFD[4a\0\xCFW`@6`\x03\x19\x01\x12a\0\xCFWa\0\x98a\x04\xE8V[a\0\xA0a\x04\xFEV[`\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\xCFW`@6`\x03\x19\x01\x12a\0\xCFWa\0\xF9a\0\xEFa\x04\xE8V[`$5\x903a\x05\x14V[` `@Q`\x01\x81R\xF3[4a\0\xCFW_6`\x03\x19\x01\x12a\0\xCFW`@Q_`\x04T\x80`\x01\x1C\x90`\x01\x81\x16\x80\x15a\x02\x15W[` \x83\x10\x81\x14a\x02\x01W\x82\x85R\x90\x81\x15a\x01\xE5WP`\x01\x14a\x01\x90W[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\x01|Wa\x01x\x82\x91\x82`@R\x82a\x04\xBEV[\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\x01\xCFWP` \x91P\x82\x01\x01\x82a\x01HV[`\x01\x81` \x92T\x83\x85\x88\x01\x01R\x01\x91\x01\x90a\x01\xBAV[\x90P` \x92P`\xFF\x19\x16\x82\x84\x01R\x15\x15`\x05\x1B\x82\x01\x01\x82a\x01HV[cNH{q`\xE0\x1B_R`\"`\x04R`$_\xFD[\x91`\x7F\x16\x91a\x01+V[4a\0\xCFW` 6`\x03\x19\x01\x12a\0\xCFW`\x01`\x01`\xA0\x1B\x03a\x02@a\x04\xE8V[\x16_R_` R` `@_ T`@Q\x90\x81R\xF3[4a\0\xCFW_6`\x03\x19\x01\x12a\0\xCFW` `@Q`\x12\x81R\xF3[4a\0\xCFW``6`\x03\x19\x01\x12a\0\xCFWa\x02\x8Aa\x04\xE8V[a\x02\x92a\x04\xFEV[`\x01`\x01`\xA0\x1B\x03\x82\x16_\x81\x81R`\x01` \x90\x81R`@\x80\x83 3\x84R\x90\x91R\x90 T\x90\x92`D5\x92\x91_\x19\x81\x10a\x02\xD0W[Pa\0\xF9\x93Pa\x05\x14V[\x83\x81\x10a\x035W\x84\x15a\x03\"W3\x15a\x03\x0FWa\0\xF9\x94_R`\x01` R`@_ `\x01\x80`\xA0\x1B\x033\x16_R` R\x83`@_ \x91\x03\x90U\x84a\x02\xC5V[cJ\x14\x06\xB1`\xE1\x1B_R_`\x04R`$_\xFD[c\xE6\x02\xDF\x05`\xE0\x1B_R_`\x04R`$_\xFD[\x83\x90c}\xC7\xA0\xD9`\xE1\x1B_R3`\x04R`$R`DR`d_\xFD[4a\0\xCFW_6`\x03\x19\x01\x12a\0\xCFW` `\x02T`@Q\x90\x81R\xF3[4a\0\xCFW`@6`\x03\x19\x01\x12a\0\xCFWa\x03\x86a\x04\xE8V[`$5\x903\x15a\x03\"W`\x01`\x01`\xA0\x1B\x03\x16\x90\x81\x15a\x03\x0FW3_R`\x01` R`@_ \x82_R` R\x80`@_ U`@Q\x90\x81R\x7F\x8C[\xE1\xE5\xEB\xEC}[\xD1OqB}\x1E\x84\xF3\xDD\x03\x14\xC0\xF7\xB2)\x1E[ \n\xC8\xC7\xC3\xB9%` 3\x92\xA3` `@Q`\x01\x81R\xF3[4a\0\xCFW_6`\x03\x19\x01\x12a\0\xCFW_`\x03T\x80`\x01\x1C\x90`\x01\x81\x16\x80\x15a\x04\xB4W[` \x83\x10\x81\x14a\x02\x01W\x82\x85R\x90\x81\x15a\x01\xE5WP`\x01\x14a\x04_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\x01|Wa\x01x\x82\x91\x82`@R\x82a\x04\xBEV[\x90P`\x03_R\x7F\xC2WZ\x0E\x9EY<\0\xF9Y\xF8\xC9/\x12\xDB(i\xC39Z;\x05\x02\xD0^%\x16Doq\xF8[_\x90[\x82\x82\x10a\x04\x9EWP` \x91P\x82\x01\x01\x82a\x01HV[`\x01\x81` \x92T\x83\x85\x88\x01\x01R\x01\x91\x01\x90a\x04\x89V[\x91`\x7F\x16\x91a\x04\x13V[` `@\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\xCFWV[`$5\x90`\x01`\x01`\xA0\x1B\x03\x82\x16\x82\x03a\0\xCFWV[`\x01`\x01`\xA0\x1B\x03\x16\x90\x81\x15a\x05\xBEW`\x01`\x01`\xA0\x1B\x03\x16\x91\x82\x15a\x05\xABW\x81_R_` R`@_ T\x81\x81\x10a\x05\x92W\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[\x82c9\x144\xE3`\xE2\x1B_R`\x04R`$R`DR`d_\xFD[c\xECD/\x05`\xE0\x1B_R_`\x04R`$_\xFD[cKc~\x8F`\xE1\x1B_R_`\x04R`$_\xFD\xFE\xA2dipfsX\"\x12 \xCA\xC8t\xB0\xE5\xB3\xF1J\x7F~K~T\x15\xA8\x14$\x89:\xE6kN\xF4,Cj>\xC4\xB5\x02&*dsolcC\0\x08\x1E\x003",
);
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
/**Custom error with signature `ERC20InsufficientAllowance(address,uint256,uint256)` and selector `0xfb8f41b2`.
```solidity
error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);
```*/
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct ERC20InsufficientAllowance {
#[allow(missing_docs)]
pub spender: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub allowance: alloy::sol_types::private::primitives::aliases::U256,
#[allow(missing_docs)]
pub needed: 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)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Uint<256>,
alloy::sol_types::sol_data::Uint<256>,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
alloy::sol_types::private::Address,
alloy::sol_types::private::primitives::aliases::U256,
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<ERC20InsufficientAllowance>
for UnderlyingRustTuple<'_> {
fn from(value: ERC20InsufficientAllowance) -> Self {
(value.spender, value.allowance, value.needed)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for ERC20InsufficientAllowance {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
spender: tuple.0,
allowance: tuple.1,
needed: tuple.2,
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolError for ERC20InsufficientAllowance {
type Parameters<'a> = UnderlyingSolTuple<'a>;
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "ERC20InsufficientAllowance(address,uint256,uint256)";
const SELECTOR: [u8; 4] = [251u8, 143u8, 65u8, 178u8];
#[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.allowance),
<alloy::sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(&self.needed),
)
}
#[inline]
fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result<Self> {
<Self::Parameters<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(Self::new)
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
/**Custom error with signature `ERC20InsufficientBalance(address,uint256,uint256)` and selector `0xe450d38c`.
```solidity
error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);
```*/
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct ERC20InsufficientBalance {
#[allow(missing_docs)]
pub sender: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub balance: alloy::sol_types::private::primitives::aliases::U256,
#[allow(missing_docs)]
pub needed: 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)]
#[allow(dead_code)]
type UnderlyingSolTuple<'a> = (
alloy::sol_types::sol_data::Address,
alloy::sol_types::sol_data::Uint<256>,
alloy::sol_types::sol_data::Uint<256>,
);
#[doc(hidden)]
type UnderlyingRustTuple<'a> = (
alloy::sol_types::private::Address,
alloy::sol_types::private::primitives::aliases::U256,
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<ERC20InsufficientBalance>
for UnderlyingRustTuple<'_> {
fn from(value: ERC20InsufficientBalance) -> Self {
(value.sender, value.balance, value.needed)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>>
for ERC20InsufficientBalance {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
sender: tuple.0,
balance: tuple.1,
needed: tuple.2,
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolError for ERC20InsufficientBalance {
type Parameters<'a> = UnderlyingSolTuple<'a>;
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "ERC20InsufficientBalance(address,uint256,uint256)";
const SELECTOR: [u8; 4] = [228u8, 80u8, 211u8, 140u8];
#[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.sender,
),
<alloy::sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(&self.balance),
<alloy::sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(&self.needed),
)
}
#[inline]
fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result<Self> {
<Self::Parameters<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(Self::new)
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
/**Custom error with signature `ERC20InvalidApprover(address)` and selector `0xe602df05`.
```solidity
error ERC20InvalidApprover(address approver);
```*/
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct ERC20InvalidApprover {
#[allow(missing_docs)]
pub approver: alloy::sol_types::private::Address,
}
#[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)]
#[allow(dead_code)]
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<ERC20InvalidApprover> for UnderlyingRustTuple<'_> {
fn from(value: ERC20InvalidApprover) -> Self {
(value.approver,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for ERC20InvalidApprover {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { approver: tuple.0 }
}
}
#[automatically_derived]
impl alloy_sol_types::SolError for ERC20InvalidApprover {
type Parameters<'a> = UnderlyingSolTuple<'a>;
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "ERC20InvalidApprover(address)";
const SELECTOR: [u8; 4] = [230u8, 2u8, 223u8, 5u8];
#[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.approver,
),
)
}
#[inline]
fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result<Self> {
<Self::Parameters<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(Self::new)
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
/**Custom error with signature `ERC20InvalidReceiver(address)` and selector `0xec442f05`.
```solidity
error ERC20InvalidReceiver(address receiver);
```*/
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct ERC20InvalidReceiver {
#[allow(missing_docs)]
pub receiver: alloy::sol_types::private::Address,
}
#[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)]
#[allow(dead_code)]
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<ERC20InvalidReceiver> for UnderlyingRustTuple<'_> {
fn from(value: ERC20InvalidReceiver) -> Self {
(value.receiver,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for ERC20InvalidReceiver {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { receiver: tuple.0 }
}
}
#[automatically_derived]
impl alloy_sol_types::SolError for ERC20InvalidReceiver {
type Parameters<'a> = UnderlyingSolTuple<'a>;
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "ERC20InvalidReceiver(address)";
const SELECTOR: [u8; 4] = [236u8, 68u8, 47u8, 5u8];
#[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.receiver,
),
)
}
#[inline]
fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result<Self> {
<Self::Parameters<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(Self::new)
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
/**Custom error with signature `ERC20InvalidSender(address)` and selector `0x96c6fd1e`.
```solidity
error ERC20InvalidSender(address sender);
```*/
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct ERC20InvalidSender {
#[allow(missing_docs)]
pub sender: alloy::sol_types::private::Address,
}
#[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)]
#[allow(dead_code)]
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<ERC20InvalidSender> for UnderlyingRustTuple<'_> {
fn from(value: ERC20InvalidSender) -> Self {
(value.sender,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for ERC20InvalidSender {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { sender: tuple.0 }
}
}
#[automatically_derived]
impl alloy_sol_types::SolError for ERC20InvalidSender {
type Parameters<'a> = UnderlyingSolTuple<'a>;
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "ERC20InvalidSender(address)";
const SELECTOR: [u8; 4] = [150u8, 198u8, 253u8, 30u8];
#[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.sender,
),
)
}
#[inline]
fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result<Self> {
<Self::Parameters<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(Self::new)
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
/**Custom error with signature `ERC20InvalidSpender(address)` and selector `0x94280d62`.
```solidity
error ERC20InvalidSpender(address spender);
```*/
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct ERC20InvalidSpender {
#[allow(missing_docs)]
pub spender: alloy::sol_types::private::Address,
}
#[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)]
#[allow(dead_code)]
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<ERC20InvalidSpender> for UnderlyingRustTuple<'_> {
fn from(value: ERC20InvalidSpender) -> Self {
(value.spender,)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for ERC20InvalidSpender {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self { spender: tuple.0 }
}
}
#[automatically_derived]
impl alloy_sol_types::SolError for ERC20InvalidSpender {
type Parameters<'a> = UnderlyingSolTuple<'a>;
type Token<'a> = <Self::Parameters<
'a,
> as alloy_sol_types::SolType>::Token<'a>;
const SIGNATURE: &'static str = "ERC20InvalidSpender(address)";
const SELECTOR: [u8; 4] = [148u8, 40u8, 13u8, 98u8];
#[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,
),
)
}
#[inline]
fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result<Self> {
<Self::Parameters<
'_,
> as alloy_sol_types::SolType>::abi_decode_sequence_validate(data)
.map(Self::new)
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(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)]
#[derive(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)
}
}
};
/**Constructor`.
```solidity
constructor(address minter, uint256 initialSupply);
```*/
#[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)]
#[derive(Clone)]
pub struct constructorCall {
#[allow(missing_docs)]
pub minter: alloy::sol_types::private::Address,
#[allow(missing_docs)]
pub initialSupply: alloy::sol_types::private::primitives::aliases::U256,
}
const _: () = {
use alloy::sol_types as alloy_sol_types;
{
#[doc(hidden)]
#[allow(dead_code)]
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<constructorCall> for UnderlyingRustTuple<'_> {
fn from(value: constructorCall) -> Self {
(value.minter, value.initialSupply)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for constructorCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
minter: tuple.0,
initialSupply: tuple.1,
}
}
}
}
#[automatically_derived]
impl alloy_sol_types::SolConstructor for constructorCall {
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>;
#[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.minter,
),
<alloy::sol_types::sol_data::Uint<
256,
> as alloy_sol_types::SolType>::tokenize(&self.initialSupply),
)
}
}
};
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(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)]
#[derive(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)]
#[allow(dead_code)]
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)]
#[allow(dead_code)]
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)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
/**Function with signature `approve(address,uint256)` and selector `0x095ea7b3`.
```solidity
function approve(address spender, uint256 value) 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 value: alloy::sol_types::private::primitives::aliases::U256,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(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)]
#[allow(dead_code)]
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.value)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for approveCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
spender: tuple.0,
value: tuple.1,
}
}
}
}
{
#[doc(hidden)]
#[allow(dead_code)]
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.value),
)
}
#[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)]
#[derive(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)]
#[derive(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)]
#[allow(dead_code)]
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)]
#[allow(dead_code)]
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)]
#[derive(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)]
#[derive(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)]
#[allow(dead_code)]
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)]
#[allow(dead_code)]
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)]
#[derive(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)]
#[derive(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)]
#[allow(dead_code)]
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)]
#[allow(dead_code)]
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)]
#[derive(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)]
#[derive(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)]
#[allow(dead_code)]
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)]
#[allow(dead_code)]
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)]
#[derive(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)]
#[derive(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)]
#[allow(dead_code)]
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)]
#[allow(dead_code)]
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)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
/**Function with signature `transfer(address,uint256)` and selector `0xa9059cbb`.
```solidity
function transfer(address to, uint256 value) 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 value: alloy::sol_types::private::primitives::aliases::U256,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(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)]
#[allow(dead_code)]
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.value)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for transferCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
to: tuple.0,
value: tuple.1,
}
}
}
}
{
#[doc(hidden)]
#[allow(dead_code)]
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.value),
)
}
#[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)]
#[derive(Default, Debug, PartialEq, Eq, Hash)]
/**Function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`.
```solidity
function transferFrom(address from, address to, uint256 value) 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 value: alloy::sol_types::private::primitives::aliases::U256,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(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)]
#[allow(dead_code)]
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.value)
}
}
#[automatically_derived]
#[doc(hidden)]
impl ::core::convert::From<UnderlyingRustTuple<'_>> for transferFromCall {
fn from(tuple: UnderlyingRustTuple<'_>) -> Self {
Self {
from: tuple.0,
to: tuple.1,
value: tuple.2,
}
}
}
}
{
#[doc(hidden)]
#[allow(dead_code)]
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.value),
)
}
#[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 [`SimpleERC20`](self) function calls.
#[derive(Clone)]
#[derive(serde::Serialize, serde::Deserialize)]
#[derive()]
pub enum SimpleERC20Calls {
#[allow(missing_docs)]
allowance(allowanceCall),
#[allow(missing_docs)]
approve(approveCall),
#[allow(missing_docs)]
balanceOf(balanceOfCall),
#[allow(missing_docs)]
decimals(decimalsCall),
#[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),
}
impl SimpleERC20Calls {
/// 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],
[112u8, 160u8, 130u8, 49u8],
[149u8, 216u8, 155u8, 65u8],
[169u8, 5u8, 156u8, 187u8],
[221u8, 98u8, 237u8, 62u8],
];
/// The names of the variants in the same order as `SELECTORS`.
pub const VARIANT_NAMES: &'static [&'static str] = &[
::core::stringify!(name),
::core::stringify!(approve),
::core::stringify!(totalSupply),
::core::stringify!(transferFrom),
::core::stringify!(decimals),
::core::stringify!(balanceOf),
::core::stringify!(symbol),
::core::stringify!(transfer),
::core::stringify!(allowance),
];
/// The signatures in the same order as `SELECTORS`.
pub const SIGNATURES: &'static [&'static str] = &[
<nameCall as alloy_sol_types::SolCall>::SIGNATURE,
<approveCall as alloy_sol_types::SolCall>::SIGNATURE,
<totalSupplyCall as alloy_sol_types::SolCall>::SIGNATURE,
<transferFromCall as alloy_sol_types::SolCall>::SIGNATURE,
<decimalsCall as alloy_sol_types::SolCall>::SIGNATURE,
<balanceOfCall as alloy_sol_types::SolCall>::SIGNATURE,
<symbolCall as alloy_sol_types::SolCall>::SIGNATURE,
<transferCall as alloy_sol_types::SolCall>::SIGNATURE,
<allowanceCall as alloy_sol_types::SolCall>::SIGNATURE,
];
/// Returns the signature for the given selector, if known.
#[inline]
pub fn signature_by_selector(
selector: [u8; 4usize],
) -> ::core::option::Option<&'static str> {
match Self::SELECTORS.binary_search(&selector) {
::core::result::Result::Ok(idx) => {
::core::option::Option::Some(Self::SIGNATURES[idx])
}
::core::result::Result::Err(_) => ::core::option::Option::None,
}
}
/// Returns the enum variant name for the given selector, if known.
#[inline]
pub fn name_by_selector(
selector: [u8; 4usize],
) -> ::core::option::Option<&'static str> {
let sig = Self::signature_by_selector(selector)?;
sig.split_once('(').map(|(name, _)| name)
}
}
#[automatically_derived]
impl alloy_sol_types::SolInterface for SimpleERC20Calls {
const NAME: &'static str = "SimpleERC20Calls";
const MIN_DATA_LENGTH: usize = 0usize;
const COUNT: usize = 9usize;
#[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::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<SimpleERC20Calls>] = &[
{
fn name(data: &[u8]) -> alloy_sol_types::Result<SimpleERC20Calls> {
<nameCall as alloy_sol_types::SolCall>::abi_decode_raw(data)
.map(SimpleERC20Calls::name)
}
name
},
{
fn approve(
data: &[u8],
) -> alloy_sol_types::Result<SimpleERC20Calls> {
<approveCall as alloy_sol_types::SolCall>::abi_decode_raw(data)
.map(SimpleERC20Calls::approve)
}
approve
},
{
fn totalSupply(
data: &[u8],
) -> alloy_sol_types::Result<SimpleERC20Calls> {
<totalSupplyCall as alloy_sol_types::SolCall>::abi_decode_raw(
data,
)
.map(SimpleERC20Calls::totalSupply)
}
totalSupply
},
{
fn transferFrom(
data: &[u8],
) -> alloy_sol_types::Result<SimpleERC20Calls> {
<transferFromCall as alloy_sol_types::SolCall>::abi_decode_raw(
data,
)
.map(SimpleERC20Calls::transferFrom)
}
transferFrom
},
{
fn decimals(
data: &[u8],
) -> alloy_sol_types::Result<SimpleERC20Calls> {
<decimalsCall as alloy_sol_types::SolCall>::abi_decode_raw(data)
.map(SimpleERC20Calls::decimals)
}
decimals
},
{
fn balanceOf(
data: &[u8],
) -> alloy_sol_types::Result<SimpleERC20Calls> {
<balanceOfCall as alloy_sol_types::SolCall>::abi_decode_raw(data)
.map(SimpleERC20Calls::balanceOf)
}
balanceOf
},
{
fn symbol(data: &[u8]) -> alloy_sol_types::Result<SimpleERC20Calls> {
<symbolCall as alloy_sol_types::SolCall>::abi_decode_raw(data)
.map(SimpleERC20Calls::symbol)
}
symbol
},
{
fn transfer(
data: &[u8],
) -> alloy_sol_types::Result<SimpleERC20Calls> {
<transferCall as alloy_sol_types::SolCall>::abi_decode_raw(data)
.map(SimpleERC20Calls::transfer)
}
transfer
},
{
fn allowance(
data: &[u8],
) -> alloy_sol_types::Result<SimpleERC20Calls> {
<allowanceCall as alloy_sol_types::SolCall>::abi_decode_raw(data)
.map(SimpleERC20Calls::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<SimpleERC20Calls>] = &[
{
fn name(data: &[u8]) -> alloy_sol_types::Result<SimpleERC20Calls> {
<nameCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(SimpleERC20Calls::name)
}
name
},
{
fn approve(
data: &[u8],
) -> alloy_sol_types::Result<SimpleERC20Calls> {
<approveCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(SimpleERC20Calls::approve)
}
approve
},
{
fn totalSupply(
data: &[u8],
) -> alloy_sol_types::Result<SimpleERC20Calls> {
<totalSupplyCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(SimpleERC20Calls::totalSupply)
}
totalSupply
},
{
fn transferFrom(
data: &[u8],
) -> alloy_sol_types::Result<SimpleERC20Calls> {
<transferFromCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(SimpleERC20Calls::transferFrom)
}
transferFrom
},
{
fn decimals(
data: &[u8],
) -> alloy_sol_types::Result<SimpleERC20Calls> {
<decimalsCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(SimpleERC20Calls::decimals)
}
decimals
},
{
fn balanceOf(
data: &[u8],
) -> alloy_sol_types::Result<SimpleERC20Calls> {
<balanceOfCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(SimpleERC20Calls::balanceOf)
}
balanceOf
},
{
fn symbol(data: &[u8]) -> alloy_sol_types::Result<SimpleERC20Calls> {
<symbolCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(SimpleERC20Calls::symbol)
}
symbol
},
{
fn transfer(
data: &[u8],
) -> alloy_sol_types::Result<SimpleERC20Calls> {
<transferCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(SimpleERC20Calls::transfer)
}
transfer
},
{
fn allowance(
data: &[u8],
) -> alloy_sol_types::Result<SimpleERC20Calls> {
<allowanceCall as alloy_sol_types::SolCall>::abi_decode_raw_validate(
data,
)
.map(SimpleERC20Calls::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::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::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 [`SimpleERC20`](self) custom errors.
#[derive(Clone)]
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Debug, PartialEq, Eq, Hash)]
pub enum SimpleERC20Errors {
#[allow(missing_docs)]
ERC20InsufficientAllowance(ERC20InsufficientAllowance),
#[allow(missing_docs)]
ERC20InsufficientBalance(ERC20InsufficientBalance),
#[allow(missing_docs)]
ERC20InvalidApprover(ERC20InvalidApprover),
#[allow(missing_docs)]
ERC20InvalidReceiver(ERC20InvalidReceiver),
#[allow(missing_docs)]
ERC20InvalidSender(ERC20InvalidSender),
#[allow(missing_docs)]
ERC20InvalidSpender(ERC20InvalidSpender),
}
impl SimpleERC20Errors {
/// 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]] = &[
[148u8, 40u8, 13u8, 98u8],
[150u8, 198u8, 253u8, 30u8],
[228u8, 80u8, 211u8, 140u8],
[230u8, 2u8, 223u8, 5u8],
[236u8, 68u8, 47u8, 5u8],
[251u8, 143u8, 65u8, 178u8],
];
/// The names of the variants in the same order as `SELECTORS`.
pub const VARIANT_NAMES: &'static [&'static str] = &[
::core::stringify!(ERC20InvalidSpender),
::core::stringify!(ERC20InvalidSender),
::core::stringify!(ERC20InsufficientBalance),
::core::stringify!(ERC20InvalidApprover),
::core::stringify!(ERC20InvalidReceiver),
::core::stringify!(ERC20InsufficientAllowance),
];
/// The signatures in the same order as `SELECTORS`.
pub const SIGNATURES: &'static [&'static str] = &[
<ERC20InvalidSpender as alloy_sol_types::SolError>::SIGNATURE,
<ERC20InvalidSender as alloy_sol_types::SolError>::SIGNATURE,
<ERC20InsufficientBalance as alloy_sol_types::SolError>::SIGNATURE,
<ERC20InvalidApprover as alloy_sol_types::SolError>::SIGNATURE,
<ERC20InvalidReceiver as alloy_sol_types::SolError>::SIGNATURE,
<ERC20InsufficientAllowance as alloy_sol_types::SolError>::SIGNATURE,
];
/// Returns the signature for the given selector, if known.
#[inline]
pub fn signature_by_selector(
selector: [u8; 4usize],
) -> ::core::option::Option<&'static str> {
match Self::SELECTORS.binary_search(&selector) {
::core::result::Result::Ok(idx) => {
::core::option::Option::Some(Self::SIGNATURES[idx])
}
::core::result::Result::Err(_) => ::core::option::Option::None,
}
}
/// Returns the enum variant name for the given selector, if known.
#[inline]
pub fn name_by_selector(
selector: [u8; 4usize],
) -> ::core::option::Option<&'static str> {
let sig = Self::signature_by_selector(selector)?;
sig.split_once('(').map(|(name, _)| name)
}
}
#[automatically_derived]
impl alloy_sol_types::SolInterface for SimpleERC20Errors {
const NAME: &'static str = "SimpleERC20Errors";
const MIN_DATA_LENGTH: usize = 32usize;
const COUNT: usize = 6usize;
#[inline]
fn selector(&self) -> [u8; 4] {
match self {
Self::ERC20InsufficientAllowance(_) => {
<ERC20InsufficientAllowance as alloy_sol_types::SolError>::SELECTOR
}
Self::ERC20InsufficientBalance(_) => {
<ERC20InsufficientBalance as alloy_sol_types::SolError>::SELECTOR
}
Self::ERC20InvalidApprover(_) => {
<ERC20InvalidApprover as alloy_sol_types::SolError>::SELECTOR
}
Self::ERC20InvalidReceiver(_) => {
<ERC20InvalidReceiver as alloy_sol_types::SolError>::SELECTOR
}
Self::ERC20InvalidSender(_) => {
<ERC20InvalidSender as alloy_sol_types::SolError>::SELECTOR
}
Self::ERC20InvalidSpender(_) => {
<ERC20InvalidSpender as alloy_sol_types::SolError>::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<SimpleERC20Errors>] = &[
{
fn ERC20InvalidSpender(
data: &[u8],
) -> alloy_sol_types::Result<SimpleERC20Errors> {
<ERC20InvalidSpender as alloy_sol_types::SolError>::abi_decode_raw(
data,
)
.map(SimpleERC20Errors::ERC20InvalidSpender)
}
ERC20InvalidSpender
},
{
fn ERC20InvalidSender(
data: &[u8],
) -> alloy_sol_types::Result<SimpleERC20Errors> {
<ERC20InvalidSender as alloy_sol_types::SolError>::abi_decode_raw(
data,
)
.map(SimpleERC20Errors::ERC20InvalidSender)
}
ERC20InvalidSender
},
{
fn ERC20InsufficientBalance(
data: &[u8],
) -> alloy_sol_types::Result<SimpleERC20Errors> {
<ERC20InsufficientBalance as alloy_sol_types::SolError>::abi_decode_raw(
data,
)
.map(SimpleERC20Errors::ERC20InsufficientBalance)
}
ERC20InsufficientBalance
},
{
fn ERC20InvalidApprover(
data: &[u8],
) -> alloy_sol_types::Result<SimpleERC20Errors> {
<ERC20InvalidApprover as alloy_sol_types::SolError>::abi_decode_raw(
data,
)
.map(SimpleERC20Errors::ERC20InvalidApprover)
}
ERC20InvalidApprover
},
{
fn ERC20InvalidReceiver(
data: &[u8],
) -> alloy_sol_types::Result<SimpleERC20Errors> {
<ERC20InvalidReceiver as alloy_sol_types::SolError>::abi_decode_raw(
data,
)
.map(SimpleERC20Errors::ERC20InvalidReceiver)
}
ERC20InvalidReceiver
},
{
fn ERC20InsufficientAllowance(
data: &[u8],
) -> alloy_sol_types::Result<SimpleERC20Errors> {
<ERC20InsufficientAllowance as alloy_sol_types::SolError>::abi_decode_raw(
data,
)
.map(SimpleERC20Errors::ERC20InsufficientAllowance)
}
ERC20InsufficientAllowance
},
];
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<SimpleERC20Errors>] = &[
{
fn ERC20InvalidSpender(
data: &[u8],
) -> alloy_sol_types::Result<SimpleERC20Errors> {
<ERC20InvalidSpender as alloy_sol_types::SolError>::abi_decode_raw_validate(
data,
)
.map(SimpleERC20Errors::ERC20InvalidSpender)
}
ERC20InvalidSpender
},
{
fn ERC20InvalidSender(
data: &[u8],
) -> alloy_sol_types::Result<SimpleERC20Errors> {
<ERC20InvalidSender as alloy_sol_types::SolError>::abi_decode_raw_validate(
data,
)
.map(SimpleERC20Errors::ERC20InvalidSender)
}
ERC20InvalidSender
},
{
fn ERC20InsufficientBalance(
data: &[u8],
) -> alloy_sol_types::Result<SimpleERC20Errors> {
<ERC20InsufficientBalance as alloy_sol_types::SolError>::abi_decode_raw_validate(
data,
)
.map(SimpleERC20Errors::ERC20InsufficientBalance)
}
ERC20InsufficientBalance
},
{
fn ERC20InvalidApprover(
data: &[u8],
) -> alloy_sol_types::Result<SimpleERC20Errors> {
<ERC20InvalidApprover as alloy_sol_types::SolError>::abi_decode_raw_validate(
data,
)
.map(SimpleERC20Errors::ERC20InvalidApprover)
}
ERC20InvalidApprover
},
{
fn ERC20InvalidReceiver(
data: &[u8],
) -> alloy_sol_types::Result<SimpleERC20Errors> {
<ERC20InvalidReceiver as alloy_sol_types::SolError>::abi_decode_raw_validate(
data,
)
.map(SimpleERC20Errors::ERC20InvalidReceiver)
}
ERC20InvalidReceiver
},
{
fn ERC20InsufficientAllowance(
data: &[u8],
) -> alloy_sol_types::Result<SimpleERC20Errors> {
<ERC20InsufficientAllowance as alloy_sol_types::SolError>::abi_decode_raw_validate(
data,
)
.map(SimpleERC20Errors::ERC20InsufficientAllowance)
}
ERC20InsufficientAllowance
},
];
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::ERC20InsufficientAllowance(inner) => {
<ERC20InsufficientAllowance as alloy_sol_types::SolError>::abi_encoded_size(
inner,
)
}
Self::ERC20InsufficientBalance(inner) => {
<ERC20InsufficientBalance as alloy_sol_types::SolError>::abi_encoded_size(
inner,
)
}
Self::ERC20InvalidApprover(inner) => {
<ERC20InvalidApprover as alloy_sol_types::SolError>::abi_encoded_size(
inner,
)
}
Self::ERC20InvalidReceiver(inner) => {
<ERC20InvalidReceiver as alloy_sol_types::SolError>::abi_encoded_size(
inner,
)
}
Self::ERC20InvalidSender(inner) => {
<ERC20InvalidSender as alloy_sol_types::SolError>::abi_encoded_size(
inner,
)
}
Self::ERC20InvalidSpender(inner) => {
<ERC20InvalidSpender as alloy_sol_types::SolError>::abi_encoded_size(
inner,
)
}
}
}
#[inline]
fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec<u8>) {
match self {
Self::ERC20InsufficientAllowance(inner) => {
<ERC20InsufficientAllowance as alloy_sol_types::SolError>::abi_encode_raw(
inner,
out,
)
}
Self::ERC20InsufficientBalance(inner) => {
<ERC20InsufficientBalance as alloy_sol_types::SolError>::abi_encode_raw(
inner,
out,
)
}
Self::ERC20InvalidApprover(inner) => {
<ERC20InvalidApprover as alloy_sol_types::SolError>::abi_encode_raw(
inner,
out,
)
}
Self::ERC20InvalidReceiver(inner) => {
<ERC20InvalidReceiver as alloy_sol_types::SolError>::abi_encode_raw(
inner,
out,
)
}
Self::ERC20InvalidSender(inner) => {
<ERC20InvalidSender as alloy_sol_types::SolError>::abi_encode_raw(
inner,
out,
)
}
Self::ERC20InvalidSpender(inner) => {
<ERC20InvalidSpender as alloy_sol_types::SolError>::abi_encode_raw(
inner,
out,
)
}
}
}
}
///Container for all the [`SimpleERC20`](self) events.
#[derive(Clone)]
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Debug, PartialEq, Eq, Hash)]
pub enum SimpleERC20Events {
#[allow(missing_docs)]
Approval(Approval),
#[allow(missing_docs)]
Transfer(Transfer),
}
impl SimpleERC20Events {
/// 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,
],
];
/// The names of the variants in the same order as `SELECTORS`.
pub const VARIANT_NAMES: &'static [&'static str] = &[
::core::stringify!(Approval),
::core::stringify!(Transfer),
];
/// The signatures in the same order as `SELECTORS`.
pub const SIGNATURES: &'static [&'static str] = &[
<Approval as alloy_sol_types::SolEvent>::SIGNATURE,
<Transfer as alloy_sol_types::SolEvent>::SIGNATURE,
];
/// Returns the signature for the given selector, if known.
#[inline]
pub fn signature_by_selector(
selector: [u8; 32usize],
) -> ::core::option::Option<&'static str> {
match Self::SELECTORS.binary_search(&selector) {
::core::result::Result::Ok(idx) => {
::core::option::Option::Some(Self::SIGNATURES[idx])
}
::core::result::Result::Err(_) => ::core::option::Option::None,
}
}
/// Returns the enum variant name for the given selector, if known.
#[inline]
pub fn name_by_selector(
selector: [u8; 32usize],
) -> ::core::option::Option<&'static str> {
let sig = Self::signature_by_selector(selector)?;
sig.split_once('(').map(|(name, _)| name)
}
}
#[automatically_derived]
impl alloy_sol_types::SolEventInterface for SimpleERC20Events {
const NAME: &'static str = "SimpleERC20Events";
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 SimpleERC20Events {
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 [`SimpleERC20`](self) contract instance.
See the [wrapper's documentation](`SimpleERC20Instance`) 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,
) -> SimpleERC20Instance<P, N> {
SimpleERC20Instance::<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,
minter: alloy::sol_types::private::Address,
initialSupply: alloy::sol_types::private::primitives::aliases::U256,
) -> impl ::core::future::Future<
Output = alloy_contract::Result<SimpleERC20Instance<P, N>>,
> {
SimpleERC20Instance::<P, N>::deploy(__provider, minter, initialSupply)
}
/**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,
minter: alloy::sol_types::private::Address,
initialSupply: alloy::sol_types::private::primitives::aliases::U256,
) -> alloy_contract::RawCallBuilder<P, N> {
SimpleERC20Instance::<P, N>::deploy_builder(__provider, minter, initialSupply)
}
/**A [`SimpleERC20`](self) instance.
Contains type-safe methods for interacting with an on-chain instance of the
[`SimpleERC20`](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 SimpleERC20Instance<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 SimpleERC20Instance<P, N> {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("SimpleERC20Instance").field(&self.address).finish()
}
}
/// Instantiation and getters/setters.
impl<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
> SimpleERC20Instance<P, N> {
/**Creates a new wrapper around an on-chain [`SimpleERC20`](self) contract instance.
See the [wrapper's documentation](`SimpleERC20Instance`) for more details.*/
#[inline]
pub const fn new(
address: alloy_sol_types::private::Address,
__provider: P,
) -> Self {
Self {
address,
provider: __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,
minter: alloy::sol_types::private::Address,
initialSupply: alloy::sol_types::private::primitives::aliases::U256,
) -> alloy_contract::Result<SimpleERC20Instance<P, N>> {
let call_builder = Self::deploy_builder(__provider, minter, initialSupply);
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,
minter: alloy::sol_types::private::Address,
initialSupply: alloy::sol_types::private::primitives::aliases::U256,
) -> alloy_contract::RawCallBuilder<P, N> {
alloy_contract::RawCallBuilder::new_raw_deploy(
__provider,
[
&BYTECODE[..],
&alloy_sol_types::SolConstructor::abi_encode(
&constructorCall {
minter,
initialSupply,
},
)[..],
]
.concat()
.into(),
)
}
/// 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> SimpleERC20Instance<&P, N> {
/// Clones the provider and returns a new instance with the cloned provider.
#[inline]
pub fn with_cloned_provider(self) -> SimpleERC20Instance<P, N> {
SimpleERC20Instance {
address: self.address,
provider: ::core::clone::Clone::clone(&self.provider),
_network: ::core::marker::PhantomData,
}
}
}
/// Function calls.
impl<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
> SimpleERC20Instance<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,
value: alloy::sol_types::private::primitives::aliases::U256,
) -> alloy_contract::SolCallBuilder<&P, approveCall, N> {
self.call_builder(&approveCall { spender, value })
}
///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 [`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,
value: alloy::sol_types::private::primitives::aliases::U256,
) -> alloy_contract::SolCallBuilder<&P, transferCall, N> {
self.call_builder(&transferCall { to, value })
}
///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,
value: alloy::sol_types::private::primitives::aliases::U256,
) -> alloy_contract::SolCallBuilder<&P, transferFromCall, N> {
self.call_builder(
&transferFromCall {
from,
to,
value,
},
)
}
}
/// Event filters.
impl<
P: alloy_contract::private::Provider<N>,
N: alloy_contract::private::Network,
> SimpleERC20Instance<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>()
}
}
}