#[allow(dead_code)]
pub mod erc20_preset_fixed_supply_upgradeable {
# [rustfmt :: skip] use ethcontract as ethcontract ;
#[doc = "Generated by `ethcontract`"]
#[derive(Clone)]
pub struct Contract {
methods: Methods,
}
impl Contract {
#[doc = r" Retrieves the truffle artifact used to generate the type safe"]
#[doc = r" API for this contract."]
pub fn artifact() -> &'static self::ethcontract::Artifact {
use self::ethcontract::private::lazy_static;
use self::ethcontract::Artifact;
lazy_static! {
pub static ref ARTIFACT: Artifact = {
# [allow (unused_mut)] let mut artifact = Artifact :: from_json ("{\n \"_format\": \"hh-sol-artifact-1\",\n \"contractName\": \"ERC20PresetFixedSupplyUpgradeable\",\n \"sourceName\": \"contracts/token/ERC20/presets/ERC20PresetFixedSupplyUpgradeable.sol\",\n \"abi\": [\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burnFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"decimals\",\n \"outputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"subtractedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"decreaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"addedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"increaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"symbol\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"initialSupply\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ],\n \"bytecode\": \"0x608060405234801561001057600080fd5b5061109a806100206000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c806370a082311161008c578063a457c2d711610066578063a457c2d7146101ba578063a9059cbb146101cd578063bd3a13f6146101e0578063dd62ed3e146101f3576100ea565b806370a082311461018c57806379cc67901461019f57806395d89b41146101b2576100ea565b806323b872dd116100c857806323b872dd14610142578063313ce56714610155578063395093511461016457806342966c6814610177576100ea565b806306fdde03146100ef578063095ea7b31461010d57806318160ddd14610130575b600080fd5b6100f761022c565b6040516101049190610f2d565b60405180910390f35b61012061011b366004610e71565b6102be565b6040519015158152602001610104565b6035545b604051908152602001610104565b610120610150366004610e36565b6102d4565b60405160128152602001610104565b610120610172366004610e71565b61038a565b61018a610185366004610f15565b6103c1565b005b61013461019a366004610de3565b6103ce565b61018a6101ad366004610e71565b6103ed565b6100f7610475565b6101206101c8366004610e71565b610484565b6101206101db366004610e71565b61051f565b61018a6101ee366004610e9a565b61052c565b610134610201366004610e04565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b60606036805461023b90610ffd565b80601f016020809104026020016040519081016040528092919081815260200182805461026790610ffd565b80156102b45780601f10610289576101008083540402835291602001916102b4565b820191906000526020600020905b81548152906001019060200180831161029757829003601f168201915b5050505050905090565b60006102cb3384846105a8565b50600192915050565b60006102e18484846106cd565b6001600160a01b03841660009081526034602090815260408083203384529091529020548281101561036b5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b61037f853361037a8685610fe6565b6105a8565b506001949350505050565b3360008181526034602090815260408083206001600160a01b038716845290915281205490916102cb91859061037a908690610fce565b6103cb33826108a5565b50565b6001600160a01b0381166000908152603360205260409020545b919050565b60006103f98333610201565b9050818110156104575760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610362565b610466833361037a8585610fe6565b61047083836108a5565b505050565b60606037805461023b90610ffd565b3360009081526034602090815260408083206001600160a01b0386168452909152812054828110156105065760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610362565b610515338561037a8685610fe6565b5060019392505050565b60006102cb3384846106cd565b600054610100900460ff1680610545575060005460ff16155b6105615760405162461bcd60e51b815260040161036290610f80565b600054610100900460ff16158015610583576000805461ffff19166101011790555b61058f858585856109f4565b80156105a1576000805461ff00191690555b5050505050565b6001600160a01b03831661060a5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610362565b6001600160a01b03821661066b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610362565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b0383166107315760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610362565b6001600160a01b0382166107935760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610362565b6001600160a01b0383166000908152603360205260409020548181101561080b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610362565b6108158282610fe6565b6001600160a01b03808616600090815260336020526040808220939093559085168152908120805484929061084b908490610fce565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161089791815260200190565b60405180910390a350505050565b6001600160a01b0382166109055760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610362565b6001600160a01b038216600090815260336020526040902054818110156109795760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610362565b6109838282610fe6565b6001600160a01b038416600090815260336020526040812091909155603580548492906109b1908490610fe6565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020016106c0565b600054610100900460ff1680610a0d575060005460ff16155b610a295760405162461bcd60e51b815260040161036290610f80565b600054610100900460ff16158015610a4b576000805461ffff19166101011790555b610a53610a71565b610a5d8585610adc565b610a65610a71565b61058f85858585610b71565b600054610100900460ff1680610a8a575060005460ff16155b610aa65760405162461bcd60e51b815260040161036290610f80565b600054610100900460ff16158015610ac8576000805461ffff19166101011790555b80156103cb576000805461ff001916905550565b600054610100900460ff1680610af5575060005460ff16155b610b115760405162461bcd60e51b815260040161036290610f80565b600054610100900460ff16158015610b33576000805461ffff19166101011790555b8251610b46906036906020860190610cac565b508151610b5a906037906020850190610cac565b508015610470576000805461ff0019169055505050565b600054610100900460ff1680610b8a575060005460ff16155b610ba65760405162461bcd60e51b815260040161036290610f80565b600054610100900460ff16158015610bc8576000805461ffff19166101011790555b61058f82846001600160a01b038216610c235760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610362565b8060356000828254610c359190610fce565b90915550506001600160a01b03821660009081526033602052604081208054839290610c62908490610fce565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b828054610cb890610ffd565b90600052602060002090601f016020900481019282610cda5760008555610d20565b82601f10610cf357805160ff1916838001178555610d20565b82800160010185558215610d20579182015b82811115610d20578251825591602001919060010190610d05565b50610d2c929150610d30565b5090565b5b80821115610d2c5760008155600101610d31565b80356001600160a01b03811681146103e857600080fd5b600082601f830112610d6c578081fd5b813567ffffffffffffffff80821115610d8757610d8761104e565b604051601f8301601f19908116603f01168101908282118183101715610daf57610daf61104e565b81604052838152866020858801011115610dc7578485fd5b8360208701602083013792830160200193909352509392505050565b600060208284031215610df4578081fd5b610dfd82610d45565b9392505050565b60008060408385031215610e16578081fd5b610e1f83610d45565b9150610e2d60208401610d45565b90509250929050565b600080600060608486031215610e4a578081fd5b610e5384610d45565b9250610e6160208501610d45565b9150604084013590509250925092565b60008060408385031215610e83578182fd5b610e8c83610d45565b946020939093013593505050565b60008060008060808587031215610eaf578081fd5b843567ffffffffffffffff80821115610ec6578283fd5b610ed288838901610d5c565b95506020870135915080821115610ee7578283fd5b50610ef487828801610d5c565b93505060408501359150610f0a60608601610d45565b905092959194509250565b600060208284031215610f26578081fd5b5035919050565b6000602080835283518082850152825b81811015610f5957858101830151858201604001528201610f3d565b81811115610f6a5783604083870101525b50601f01601f1916929092016040019392505050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60008219821115610fe157610fe1611038565b500190565b600082821015610ff857610ff8611038565b500390565b600181811c9082168061101157607f821691505b6020821081141561103257634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfea2646970667358221220b899116f0c2fe8d86a960b8ba1c9aa60239a10e559394a21872beecb9e2fb97a64736f6c63430008030033\",\n \"deployedBytecode\": \"0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c806370a082311161008c578063a457c2d711610066578063a457c2d7146101ba578063a9059cbb146101cd578063bd3a13f6146101e0578063dd62ed3e146101f3576100ea565b806370a082311461018c57806379cc67901461019f57806395d89b41146101b2576100ea565b806323b872dd116100c857806323b872dd14610142578063313ce56714610155578063395093511461016457806342966c6814610177576100ea565b806306fdde03146100ef578063095ea7b31461010d57806318160ddd14610130575b600080fd5b6100f761022c565b6040516101049190610f2d565b60405180910390f35b61012061011b366004610e71565b6102be565b6040519015158152602001610104565b6035545b604051908152602001610104565b610120610150366004610e36565b6102d4565b60405160128152602001610104565b610120610172366004610e71565b61038a565b61018a610185366004610f15565b6103c1565b005b61013461019a366004610de3565b6103ce565b61018a6101ad366004610e71565b6103ed565b6100f7610475565b6101206101c8366004610e71565b610484565b6101206101db366004610e71565b61051f565b61018a6101ee366004610e9a565b61052c565b610134610201366004610e04565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b60606036805461023b90610ffd565b80601f016020809104026020016040519081016040528092919081815260200182805461026790610ffd565b80156102b45780601f10610289576101008083540402835291602001916102b4565b820191906000526020600020905b81548152906001019060200180831161029757829003601f168201915b5050505050905090565b60006102cb3384846105a8565b50600192915050565b60006102e18484846106cd565b6001600160a01b03841660009081526034602090815260408083203384529091529020548281101561036b5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b61037f853361037a8685610fe6565b6105a8565b506001949350505050565b3360008181526034602090815260408083206001600160a01b038716845290915281205490916102cb91859061037a908690610fce565b6103cb33826108a5565b50565b6001600160a01b0381166000908152603360205260409020545b919050565b60006103f98333610201565b9050818110156104575760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610362565b610466833361037a8585610fe6565b61047083836108a5565b505050565b60606037805461023b90610ffd565b3360009081526034602090815260408083206001600160a01b0386168452909152812054828110156105065760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610362565b610515338561037a8685610fe6565b5060019392505050565b60006102cb3384846106cd565b600054610100900460ff1680610545575060005460ff16155b6105615760405162461bcd60e51b815260040161036290610f80565b600054610100900460ff16158015610583576000805461ffff19166101011790555b61058f858585856109f4565b80156105a1576000805461ff00191690555b5050505050565b6001600160a01b03831661060a5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610362565b6001600160a01b03821661066b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610362565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b0383166107315760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610362565b6001600160a01b0382166107935760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610362565b6001600160a01b0383166000908152603360205260409020548181101561080b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610362565b6108158282610fe6565b6001600160a01b03808616600090815260336020526040808220939093559085168152908120805484929061084b908490610fce565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161089791815260200190565b60405180910390a350505050565b6001600160a01b0382166109055760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610362565b6001600160a01b038216600090815260336020526040902054818110156109795760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610362565b6109838282610fe6565b6001600160a01b038416600090815260336020526040812091909155603580548492906109b1908490610fe6565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020016106c0565b600054610100900460ff1680610a0d575060005460ff16155b610a295760405162461bcd60e51b815260040161036290610f80565b600054610100900460ff16158015610a4b576000805461ffff19166101011790555b610a53610a71565b610a5d8585610adc565b610a65610a71565b61058f85858585610b71565b600054610100900460ff1680610a8a575060005460ff16155b610aa65760405162461bcd60e51b815260040161036290610f80565b600054610100900460ff16158015610ac8576000805461ffff19166101011790555b80156103cb576000805461ff001916905550565b600054610100900460ff1680610af5575060005460ff16155b610b115760405162461bcd60e51b815260040161036290610f80565b600054610100900460ff16158015610b33576000805461ffff19166101011790555b8251610b46906036906020860190610cac565b508151610b5a906037906020850190610cac565b508015610470576000805461ff0019169055505050565b600054610100900460ff1680610b8a575060005460ff16155b610ba65760405162461bcd60e51b815260040161036290610f80565b600054610100900460ff16158015610bc8576000805461ffff19166101011790555b61058f82846001600160a01b038216610c235760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610362565b8060356000828254610c359190610fce565b90915550506001600160a01b03821660009081526033602052604081208054839290610c62908490610fce565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b828054610cb890610ffd565b90600052602060002090601f016020900481019282610cda5760008555610d20565b82601f10610cf357805160ff1916838001178555610d20565b82800160010185558215610d20579182015b82811115610d20578251825591602001919060010190610d05565b50610d2c929150610d30565b5090565b5b80821115610d2c5760008155600101610d31565b80356001600160a01b03811681146103e857600080fd5b600082601f830112610d6c578081fd5b813567ffffffffffffffff80821115610d8757610d8761104e565b604051601f8301601f19908116603f01168101908282118183101715610daf57610daf61104e565b81604052838152866020858801011115610dc7578485fd5b8360208701602083013792830160200193909352509392505050565b600060208284031215610df4578081fd5b610dfd82610d45565b9392505050565b60008060408385031215610e16578081fd5b610e1f83610d45565b9150610e2d60208401610d45565b90509250929050565b600080600060608486031215610e4a578081fd5b610e5384610d45565b9250610e6160208501610d45565b9150604084013590509250925092565b60008060408385031215610e83578182fd5b610e8c83610d45565b946020939093013593505050565b60008060008060808587031215610eaf578081fd5b843567ffffffffffffffff80821115610ec6578283fd5b610ed288838901610d5c565b95506020870135915080821115610ee7578283fd5b50610ef487828801610d5c565b93505060408501359150610f0a60608601610d45565b905092959194509250565b600060208284031215610f26578081fd5b5035919050565b6000602080835283518082850152825b81811015610f5957858101830151858201604001528201610f3d565b81811115610f6a5783604083870101525b50601f01601f1916929092016040019392505050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60008219821115610fe157610fe1611038565b500190565b600082821015610ff857610ff8611038565b500390565b600181811c9082168061101157607f821691505b6020821081141561103257634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfea2646970667358221220b899116f0c2fe8d86a960b8ba1c9aa60239a10e559394a21872beecb9e2fb97a64736f6c63430008030033\",\n \"linkReferences\": {},\n \"deployedLinkReferences\": {}\n}\n") . expect ("valid artifact JSON") ;
artifact
};
}
&ARTIFACT
}
#[doc = r" Creates a new contract instance with the specified `web3`"]
#[doc = r" provider at the given `Address`."]
#[doc = r""]
#[doc = r" Note that this does not verify that a contract with a matching"]
#[doc = r" `Abi` is actually deployed at the given address."]
pub fn at<F, T>(
web3: &self::ethcontract::web3::api::Web3<T>,
address: self::ethcontract::Address,
) -> Self
where
F: std::future::Future<
Output = Result<self::ethcontract::json::Value, self::ethcontract::web3::Error>,
> + Send
+ 'static,
T: self::ethcontract::web3::Transport<Out = F> + Send + Sync + 'static,
{
Contract::with_deployment_info(web3, address, None)
}
#[doc = r" Creates a new contract instance with the specified `web3` provider with"]
#[doc = r" the given `Abi` at the given `Address` and an optional transaction hash."]
#[doc = r" This hash is used to retrieve contract related information such as the"]
#[doc = r" creation block (which is useful for fetching all historic events)."]
#[doc = r""]
#[doc = r" Note that this does not verify that a contract with a matching `Abi` is"]
#[doc = r" actually deployed at the given address nor that the transaction hash,"]
#[doc = r" when provided, is actually for this contract deployment."]
pub fn with_deployment_info<F, T>(
web3: &self::ethcontract::web3::api::Web3<T>,
address: self::ethcontract::Address,
deployment_information: Option<ethcontract::common::DeploymentInformation>,
) -> Self
where
F: std::future::Future<
Output = Result<self::ethcontract::json::Value, self::ethcontract::web3::Error>,
> + Send
+ 'static,
T: self::ethcontract::web3::Transport<Out = F> + Send + Sync + 'static,
{
use self::ethcontract::transport::DynTransport;
use self::ethcontract::web3::api::Web3;
use self::ethcontract::Instance;
let transport = DynTransport::new(web3.transport().clone());
let web3 = Web3::new(transport);
let abi = Self::artifact().abi.clone();
let instance = Instance::with_deployment_info(web3, abi, address, deployment_information);
Contract::from_raw(instance)
}
#[doc = r" Creates a contract from a raw instance."]
fn from_raw(instance: self::ethcontract::dyns::DynInstance) -> Self {
let methods = Methods { instance };
Contract { methods }
}
#[doc = r" Returns the contract address being used by this instance."]
pub fn address(&self) -> self::ethcontract::Address {
self.raw_instance().address()
}
#[doc = r" Returns the deployment information of the contract"]
#[doc = r" if it is known, `None` otherwise."]
pub fn deployment_information(&self) -> Option<ethcontract::common::DeploymentInformation> {
self.raw_instance().deployment_information()
}
#[doc = r" Returns a reference to the default method options used by this"]
#[doc = r" contract."]
pub fn defaults(&self) -> &self::ethcontract::contract::MethodDefaults {
&self.raw_instance().defaults
}
#[doc = r" Returns a mutable reference to the default method options used"]
#[doc = r" by this contract."]
pub fn defaults_mut(&mut self) -> &mut self::ethcontract::contract::MethodDefaults {
&mut self.raw_instance_mut().defaults
}
#[doc = r" Returns a reference to the raw runtime instance used by this"]
#[doc = r" contract."]
pub fn raw_instance(&self) -> &self::ethcontract::dyns::DynInstance {
&self.methods.instance
}
#[doc = r" Returns a mutable reference to the raw runtime instance used by"]
#[doc = r" this contract."]
fn raw_instance_mut(&mut self) -> &mut self::ethcontract::dyns::DynInstance {
&mut self.methods.instance
}
}
impl std::fmt::Debug for Contract {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
f.debug_tuple(stringify!(ERC20PresetFixedSupplyUpgradeable))
.field(&self.address())
.finish()
}
}
impl Contract {
#[doc = "Generated by `ethcontract`"]
#[allow(clippy::too_many_arguments)]
pub fn builder<F, T>(
web3: &self::ethcontract::web3::api::Web3<T>,
) -> self::ethcontract::dyns::DynDeployBuilder<Self>
where
F: std::future::Future<
Output = Result<self::ethcontract::json::Value, self::ethcontract::web3::Error>,
> + Send
+ 'static,
T: self::ethcontract::web3::Transport<Out = F> + Send + Sync + 'static,
{
use self::ethcontract::contract::DeployBuilder;
use self::ethcontract::dyns::DynTransport;
use self::ethcontract::web3::api::Web3;
let transport = DynTransport::new(web3.transport().clone());
let web3 = Web3::new(transport);
let bytecode = Self::artifact().bytecode.clone();
DeployBuilder::new(web3, bytecode, ()).expect("valid deployment args")
}
}
impl self::ethcontract::contract::Deploy<self::ethcontract::dyns::DynTransport> for Contract {
type Context = self::ethcontract::common::Bytecode;
fn bytecode(cx: &Self::Context) -> &self::ethcontract::common::Bytecode {
cx
}
fn abi(_: &Self::Context) -> &self::ethcontract::common::Abi {
&Self::artifact().abi
}
fn from_deployment(
web3: self::ethcontract::dyns::DynWeb3,
address: self::ethcontract::Address,
transaction_hash: self::ethcontract::H256,
_: Self::Context,
) -> Self {
Self::with_deployment_info(&web3, address, Some(transaction_hash.into()))
}
}
impl Contract {
#[doc = r" Retrieves a reference to type containing all the generated"]
#[doc = r" contract methods. This can be used for methods where the name"]
#[doc = r" would collide with a common method (like `at` or `deployed`)."]
pub fn methods(&self) -> &Methods {
&self.methods
}
}
#[doc = r" Type containing all contract methods for generated contract type."]
#[derive(Clone)]
pub struct Methods {
instance: self::ethcontract::dyns::DynInstance,
}
#[allow(clippy::too_many_arguments, clippy::type_complexity)]
impl Methods {
#[doc = "Generated by `ethcontract`"]
pub fn allowance(
&self,
owner: self::ethcontract::Address,
spender: self::ethcontract::Address,
) -> self::ethcontract::dyns::DynViewMethodBuilder<self::ethcontract::U256> {
self
.instance
.view_method([221, 98, 237, 62], (owner, spender))
.expect("generated call")
}
#[doc = "Generated by `ethcontract`"]
pub fn symbol(&self) -> self::ethcontract::dyns::DynViewMethodBuilder<String> {
self
.instance
.view_method([149, 216, 155, 65], ())
.expect("generated call")
}
#[doc = "Generated by `ethcontract`"]
pub fn approve(
&self,
spender: self::ethcontract::Address,
amount: self::ethcontract::U256,
) -> self::ethcontract::dyns::DynMethodBuilder<bool> {
self
.instance
.method([9, 94, 167, 179], (spender, amount))
.expect("generated call")
}
#[doc = "Generated by `ethcontract`"]
pub fn decimals(&self) -> self::ethcontract::dyns::DynViewMethodBuilder<u8> {
self
.instance
.view_method([49, 60, 229, 103], ())
.expect("generated call")
}
#[doc = "Generated by `ethcontract`"]
pub fn decrease_allowance(
&self,
spender: self::ethcontract::Address,
subtracted_value: self::ethcontract::U256,
) -> self::ethcontract::dyns::DynMethodBuilder<bool> {
self
.instance
.method([164, 87, 194, 215], (spender, subtracted_value))
.expect("generated call")
}
#[doc = "Generated by `ethcontract`"]
pub fn increase_allowance(
&self,
spender: self::ethcontract::Address,
added_value: self::ethcontract::U256,
) -> self::ethcontract::dyns::DynMethodBuilder<bool> {
self
.instance
.method([57, 80, 147, 81], (spender, added_value))
.expect("generated call")
}
#[doc = "Generated by `ethcontract`"]
pub fn initialize(
&self,
name: String,
symbol: String,
initial_supply: self::ethcontract::U256,
owner: self::ethcontract::Address,
) -> self::ethcontract::dyns::DynMethodBuilder<()> {
self
.instance
.method([189, 58, 19, 246], (name, symbol, initial_supply, owner))
.expect("generated call")
}
#[doc = "Generated by `ethcontract`"]
pub fn balance_of(
&self,
account: self::ethcontract::Address,
) -> self::ethcontract::dyns::DynViewMethodBuilder<self::ethcontract::U256> {
self
.instance
.view_method([112, 160, 130, 49], (account,))
.expect("generated call")
}
#[doc = "Generated by `ethcontract`"]
pub fn burn(
&self,
amount: self::ethcontract::U256,
) -> self::ethcontract::dyns::DynMethodBuilder<()> {
self
.instance
.method([66, 150, 108, 104], (amount,))
.expect("generated call")
}
#[doc = "Generated by `ethcontract`"]
pub fn burn_from(
&self,
account: self::ethcontract::Address,
amount: self::ethcontract::U256,
) -> self::ethcontract::dyns::DynMethodBuilder<()> {
self
.instance
.method([121, 204, 103, 144], (account, amount))
.expect("generated call")
}
#[doc = "Generated by `ethcontract`"]
pub fn total_supply(
&self,
) -> self::ethcontract::dyns::DynViewMethodBuilder<self::ethcontract::U256> {
self
.instance
.view_method([24, 22, 13, 221], ())
.expect("generated call")
}
#[doc = "Generated by `ethcontract`"]
pub fn transfer(
&self,
recipient: self::ethcontract::Address,
amount: self::ethcontract::U256,
) -> self::ethcontract::dyns::DynMethodBuilder<bool> {
self
.instance
.method([169, 5, 156, 187], (recipient, amount))
.expect("generated call")
}
#[doc = "Generated by `ethcontract`"]
pub fn name(&self) -> self::ethcontract::dyns::DynViewMethodBuilder<String> {
self
.instance
.view_method([6, 253, 222, 3], ())
.expect("generated call")
}
#[doc = "Generated by `ethcontract`"]
pub fn transfer_from(
&self,
sender: self::ethcontract::Address,
recipient: self::ethcontract::Address,
amount: self::ethcontract::U256,
) -> self::ethcontract::dyns::DynMethodBuilder<bool> {
self
.instance
.method([35, 184, 114, 221], (sender, recipient, amount))
.expect("generated call")
}
}
impl std::ops::Deref for Contract {
type Target = Methods;
fn deref(&self) -> &Self::Target {
&self.methods
}
}
#[doc = r" Module containing all generated data models for this contract's"]
#[doc = r" events."]
pub mod event_data {
use super::ethcontract;
#[derive(Clone, Debug, Default, Eq, PartialEq, serde :: Deserialize, serde :: Serialize)]
pub struct Approval {
pub owner: self::ethcontract::Address,
pub spender: self::ethcontract::Address,
pub value: self::ethcontract::U256,
}
impl Approval {
#[doc = r" Retrieves the signature for the event this data corresponds to."]
#[doc = r" This signature is the Keccak-256 hash of the ABI signature of"]
#[doc = r" this event."]
pub fn signature() -> self::ethcontract::H256 {
self::ethcontract::H256([
140, 91, 225, 229, 235, 236, 125, 91, 209, 79, 113, 66, 125, 30, 132, 243, 221, 3, 20,
192, 247, 178, 41, 30, 91, 32, 10, 200, 199, 195, 185, 37,
])
}
#[doc = r" Retrieves the ABI signature for the event this data corresponds"]
#[doc = r" to. For this event the value should always be:"]
#[doc = r""]
#[doc = "`Approval(address,address,uint256)`"]
pub fn abi_signature() -> &'static str {
"Approval(address,address,uint256)"
}
}
impl self::ethcontract::tokens::Tokenize for Approval {
fn from_token(
token: self::ethcontract::common::abi::Token,
) -> Result<Self, self::ethcontract::tokens::Error> {
let (owner, spender, value) = self::ethcontract::tokens::Tokenize::from_token(token)?;
Ok(Approval {
owner,
spender,
value,
})
}
fn into_token(self) -> self::ethcontract::common::abi::Token {
unimplemented!("events are only decoded, not encoded")
}
}
#[derive(Clone, Debug, Default, Eq, PartialEq, serde :: Deserialize, serde :: Serialize)]
pub struct Transfer {
pub from: self::ethcontract::Address,
pub to: self::ethcontract::Address,
pub value: self::ethcontract::U256,
}
impl Transfer {
#[doc = r" Retrieves the signature for the event this data corresponds to."]
#[doc = r" This signature is the Keccak-256 hash of the ABI signature of"]
#[doc = r" this event."]
pub fn signature() -> self::ethcontract::H256 {
self::ethcontract::H256([
221, 242, 82, 173, 27, 226, 200, 155, 105, 194, 176, 104, 252, 55, 141, 170, 149, 43,
167, 241, 99, 196, 161, 22, 40, 245, 90, 77, 245, 35, 179, 239,
])
}
#[doc = r" Retrieves the ABI signature for the event this data corresponds"]
#[doc = r" to. For this event the value should always be:"]
#[doc = r""]
#[doc = "`Transfer(address,address,uint256)`"]
pub fn abi_signature() -> &'static str {
"Transfer(address,address,uint256)"
}
}
impl self::ethcontract::tokens::Tokenize for Transfer {
fn from_token(
token: self::ethcontract::common::abi::Token,
) -> Result<Self, self::ethcontract::tokens::Error> {
let (from, to, value) = self::ethcontract::tokens::Tokenize::from_token(token)?;
Ok(Transfer { from, to, value })
}
fn into_token(self) -> self::ethcontract::common::abi::Token {
unimplemented!("events are only decoded, not encoded")
}
}
}
impl Contract {
#[doc = r" Retrieves a handle to a type containing for creating event"]
#[doc = r" streams for all the contract events."]
pub fn events(&self) -> Events<'_> {
Events {
instance: self.raw_instance(),
}
}
}
pub struct Events<'a> {
instance: &'a self::ethcontract::dyns::DynInstance,
}
impl Events<'_> {
#[doc = r" Generated by `ethcontract`."]
pub fn approval(&self) -> self::event_builders::ApprovalBuilder {
self::event_builders::ApprovalBuilder(
self
.instance
.event(self::ethcontract::H256([
140, 91, 225, 229, 235, 236, 125, 91, 209, 79, 113, 66, 125, 30, 132, 243, 221, 3, 20,
192, 247, 178, 41, 30, 91, 32, 10, 200, 199, 195, 185, 37,
]))
.expect("generated event filter"),
)
}
#[doc = r" Generated by `ethcontract`."]
pub fn transfer(&self) -> self::event_builders::TransferBuilder {
self::event_builders::TransferBuilder(
self
.instance
.event(self::ethcontract::H256([
221, 242, 82, 173, 27, 226, 200, 155, 105, 194, 176, 104, 252, 55, 141, 170, 149, 43,
167, 241, 99, 196, 161, 22, 40, 245, 90, 77, 245, 35, 179, 239,
]))
.expect("generated event filter"),
)
}
}
#[doc = r" Module containing the generated event stream builders with type safe"]
#[doc = r" filter methods for this contract's events."]
pub mod event_builders {
use super::ethcontract;
use super::event_data;
#[doc = "A builder for creating a filtered stream of `Approval` events."]
pub struct ApprovalBuilder(
#[doc = r" The inner event builder."]
pub self::ethcontract::dyns::DynEventBuilder<self::event_data::Approval>,
);
impl ApprovalBuilder {
#[doc = r" Sets the starting block from which to stream logs for."]
#[doc = r""]
#[doc = r" If left unset defaults to the latest block."]
#[allow(clippy::wrong_self_convention)]
pub fn from_block(mut self, block: self::ethcontract::BlockNumber) -> Self {
self.0 = (self.0).from_block(block);
self
}
#[doc = r" Sets the last block from which to stream logs for."]
#[doc = r""]
#[doc = r" If left unset defaults to the streaming until the end of days."]
#[allow(clippy::wrong_self_convention)]
pub fn to_block(mut self, block: self::ethcontract::BlockNumber) -> Self {
self.0 = (self.0).to_block(block);
self
}
#[doc = r" Limit the number of events that can be retrieved by this filter."]
#[doc = r""]
#[doc = r" Note that this parameter is non-standard."]
pub fn limit(mut self, value: usize) -> Self {
self.0 = (self.0).limit(value);
self
}
#[doc = r" The polling interval. This is used as the interval between"]
#[doc = r" consecutive `eth_getFilterChanges` calls to get filter updates."]
pub fn poll_interval(mut self, value: std::time::Duration) -> Self {
self.0 = (self.0).poll_interval(value);
self
}
#[doc = "Adds a filter for the owner event parameter."]
pub fn owner(mut self, topic: self::ethcontract::Topic<self::ethcontract::Address>) -> Self {
self.0 = (self.0).topic0(topic);
self
}
#[doc = "Adds a filter for the spender event parameter."]
pub fn spender(
mut self,
topic: self::ethcontract::Topic<self::ethcontract::Address>,
) -> Self {
self.0 = (self.0).topic1(topic);
self
}
#[doc = r" Returns a future that resolves with a collection of all existing"]
#[doc = r" logs matching the builder parameters."]
pub async fn query(
self,
) -> std::result::Result<
std::vec::Vec<self::ethcontract::Event<self::event_data::Approval>>,
self::ethcontract::errors::EventError,
> {
(self.0).query().await
}
#[doc = r" Creates an event stream from the current event builder."]
pub fn stream(
self,
) -> impl self::ethcontract::futures::stream::Stream<
Item = std::result::Result<
self::ethcontract::StreamEvent<self::event_data::Approval>,
self::ethcontract::errors::EventError,
>,
> {
(self.0).stream()
}
}
#[doc = "A builder for creating a filtered stream of `Transfer` events."]
pub struct TransferBuilder(
#[doc = r" The inner event builder."]
pub self::ethcontract::dyns::DynEventBuilder<self::event_data::Transfer>,
);
impl TransferBuilder {
#[doc = r" Sets the starting block from which to stream logs for."]
#[doc = r""]
#[doc = r" If left unset defaults to the latest block."]
#[allow(clippy::wrong_self_convention)]
pub fn from_block(mut self, block: self::ethcontract::BlockNumber) -> Self {
self.0 = (self.0).from_block(block);
self
}
#[doc = r" Sets the last block from which to stream logs for."]
#[doc = r""]
#[doc = r" If left unset defaults to the streaming until the end of days."]
#[allow(clippy::wrong_self_convention)]
pub fn to_block(mut self, block: self::ethcontract::BlockNumber) -> Self {
self.0 = (self.0).to_block(block);
self
}
#[doc = r" Limit the number of events that can be retrieved by this filter."]
#[doc = r""]
#[doc = r" Note that this parameter is non-standard."]
pub fn limit(mut self, value: usize) -> Self {
self.0 = (self.0).limit(value);
self
}
#[doc = r" The polling interval. This is used as the interval between"]
#[doc = r" consecutive `eth_getFilterChanges` calls to get filter updates."]
pub fn poll_interval(mut self, value: std::time::Duration) -> Self {
self.0 = (self.0).poll_interval(value);
self
}
#[doc = "Adds a filter for the from event parameter."]
pub fn from(mut self, topic: self::ethcontract::Topic<self::ethcontract::Address>) -> Self {
self.0 = (self.0).topic0(topic);
self
}
#[doc = "Adds a filter for the to event parameter."]
pub fn to(mut self, topic: self::ethcontract::Topic<self::ethcontract::Address>) -> Self {
self.0 = (self.0).topic1(topic);
self
}
#[doc = r" Returns a future that resolves with a collection of all existing"]
#[doc = r" logs matching the builder parameters."]
pub async fn query(
self,
) -> std::result::Result<
std::vec::Vec<self::ethcontract::Event<self::event_data::Transfer>>,
self::ethcontract::errors::EventError,
> {
(self.0).query().await
}
#[doc = r" Creates an event stream from the current event builder."]
pub fn stream(
self,
) -> impl self::ethcontract::futures::stream::Stream<
Item = std::result::Result<
self::ethcontract::StreamEvent<self::event_data::Transfer>,
self::ethcontract::errors::EventError,
>,
> {
(self.0).stream()
}
}
}
impl Contract {
#[doc = r" Returns a log stream with all events."]
pub fn all_events(&self) -> self::ethcontract::dyns::DynAllEventsBuilder<Event> {
self::ethcontract::dyns::DynAllEventsBuilder::new(
self.raw_instance().web3(),
self.address(),
self.deployment_information(),
)
}
}
#[doc = r" A contract event."]
#[derive(Clone, Debug, Eq, PartialEq, serde :: Deserialize, serde :: Serialize)]
pub enum Event {
Approval(self::event_data::Approval),
Transfer(self::event_data::Transfer),
}
impl self::ethcontract::contract::ParseLog for Event {
fn parse_log(
log: self::ethcontract::RawLog,
) -> Result<Self, self::ethcontract::errors::ExecutionError> {
let standard_event = log . topics . get (0) . copied () . map (| topic | match topic { self :: ethcontract :: H256 ([140 , 91 , 225 , 229 , 235 , 236 , 125 , 91 , 209 , 79 , 113 , 66 , 125 , 30 , 132 , 243 , 221 , 3 , 20 , 192 , 247 , 178 , 41 , 30 , 91 , 32 , 10 , 200 , 199 , 195 , 185 , 37]) => Ok (Event :: Approval (log . clone () . decode (Contract :: artifact () . abi . event ("Approval") . expect ("generated event decode")) ?)) , self :: ethcontract :: H256 ([221 , 242 , 82 , 173 , 27 , 226 , 200 , 155 , 105 , 194 , 176 , 104 , 252 , 55 , 141 , 170 , 149 , 43 , 167 , 241 , 99 , 196 , 161 , 22 , 40 , 245 , 90 , 77 , 245 , 35 , 179 , 239]) => Ok (Event :: Transfer (log . clone () . decode (Contract :: artifact () . abi . event ("Transfer") . expect ("generated event decode")) ?)) , _ => Err (self :: ethcontract :: errors :: ExecutionError :: from (self :: ethcontract :: common :: abi :: Error :: InvalidData)) , }) ;
if let Some(Ok(data)) = standard_event {
return Ok(data);
}
Err(self::ethcontract::errors::ExecutionError::from(
self::ethcontract::common::abi::Error::InvalidData,
))
}
}
}
pub use self::erc20_preset_fixed_supply_upgradeable::Contract as ERC20PresetFixedSupplyUpgradeable;