pub use mock_erc20::*;
/// This module was auto-generated with ethers-rs Abigen.
/// More information at: <https://github.com/gakonst/ethers-rs>
#[allow(
clippy::enum_variant_names,
clippy::too_many_arguments,
clippy::upper_case_acronyms,
clippy::type_complexity,
dead_code,
non_camel_case_types
)]
#[allow(clippy::module_inception)]
#[allow(clippy::useless_conversion)]
#[allow(clippy::large_enum_variant)]
pub mod mock_erc20 {
#[allow(deprecated)]
fn __abi() -> ::ethers::core::abi::Abi {
::ethers::core::abi::ethabi::Contract {
constructor: ::core::option::Option::Some(::ethers::core::abi::ethabi::Constructor {
inputs: ::std::vec![
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("name_"),
kind: ::ethers::core::abi::ethabi::ParamType::String,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("string"),
),
},
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("symbol_"),
kind: ::ethers::core::abi::ethabi::ParamType::String,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("string"),
),
},
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("decimals_"),
kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize),
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("uint8"),
),
},
],
}),
functions: ::core::convert::From::from([
(
::std::borrow::ToOwned::to_owned("allowance"),
::std::vec![::ethers::core::abi::ethabi::Function {
name: ::std::borrow::ToOwned::to_owned("allowance"),
inputs: ::std::vec![
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("owner"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("address"),
),
},
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("spender"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("address"),
),
},
],
outputs: ::std::vec![::ethers::core::abi::ethabi::Param {
name: ::std::string::String::new(),
kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,),
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("uint256"),
),
},],
constant: ::core::option::Option::None,
state_mutability: ::ethers::core::abi::ethabi::StateMutability::View,
},],
),
(
::std::borrow::ToOwned::to_owned("approve"),
::std::vec![::ethers::core::abi::ethabi::Function {
name: ::std::borrow::ToOwned::to_owned("approve"),
inputs: ::std::vec![
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("spender"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("address"),
),
},
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("amount"),
kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,),
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("uint256"),
),
},
],
outputs: ::std::vec![::ethers::core::abi::ethabi::Param {
name: ::std::string::String::new(),
kind: ::ethers::core::abi::ethabi::ParamType::Bool,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("bool"),
),
},],
constant: ::core::option::Option::None,
state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable,
},],
),
(
::std::borrow::ToOwned::to_owned("balanceOf"),
::std::vec![::ethers::core::abi::ethabi::Function {
name: ::std::borrow::ToOwned::to_owned("balanceOf"),
inputs: ::std::vec![::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("account"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("address"),
),
},],
outputs: ::std::vec![::ethers::core::abi::ethabi::Param {
name: ::std::string::String::new(),
kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,),
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("uint256"),
),
},],
constant: ::core::option::Option::None,
state_mutability: ::ethers::core::abi::ethabi::StateMutability::View,
},],
),
(
::std::borrow::ToOwned::to_owned("decimals"),
::std::vec![::ethers::core::abi::ethabi::Function {
name: ::std::borrow::ToOwned::to_owned("decimals"),
inputs: ::std::vec![],
outputs: ::std::vec![::ethers::core::abi::ethabi::Param {
name: ::std::string::String::new(),
kind: ::ethers::core::abi::ethabi::ParamType::Uint(8usize),
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("uint8"),
),
},],
constant: ::core::option::Option::None,
state_mutability: ::ethers::core::abi::ethabi::StateMutability::View,
},],
),
(
::std::borrow::ToOwned::to_owned("decreaseAllowance"),
::std::vec![::ethers::core::abi::ethabi::Function {
name: ::std::borrow::ToOwned::to_owned("decreaseAllowance"),
inputs: ::std::vec![
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("spender"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("address"),
),
},
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("subtractedValue"),
kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,),
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("uint256"),
),
},
],
outputs: ::std::vec![::ethers::core::abi::ethabi::Param {
name: ::std::string::String::new(),
kind: ::ethers::core::abi::ethabi::ParamType::Bool,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("bool"),
),
},],
constant: ::core::option::Option::None,
state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable,
},],
),
(
::std::borrow::ToOwned::to_owned("increaseAllowance"),
::std::vec![::ethers::core::abi::ethabi::Function {
name: ::std::borrow::ToOwned::to_owned("increaseAllowance"),
inputs: ::std::vec![
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("spender"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("address"),
),
},
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("addedValue"),
kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,),
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("uint256"),
),
},
],
outputs: ::std::vec![::ethers::core::abi::ethabi::Param {
name: ::std::string::String::new(),
kind: ::ethers::core::abi::ethabi::ParamType::Bool,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("bool"),
),
},],
constant: ::core::option::Option::None,
state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable,
},],
),
(
::std::borrow::ToOwned::to_owned("mint"),
::std::vec![::ethers::core::abi::ethabi::Function {
name: ::std::borrow::ToOwned::to_owned("mint"),
inputs: ::std::vec![
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("account"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("address"),
),
},
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("amount"),
kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,),
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("uint256"),
),
},
],
outputs: ::std::vec![],
constant: ::core::option::Option::None,
state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable,
},],
),
(
::std::borrow::ToOwned::to_owned("name"),
::std::vec![::ethers::core::abi::ethabi::Function {
name: ::std::borrow::ToOwned::to_owned("name"),
inputs: ::std::vec![],
outputs: ::std::vec![::ethers::core::abi::ethabi::Param {
name: ::std::string::String::new(),
kind: ::ethers::core::abi::ethabi::ParamType::String,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("string"),
),
},],
constant: ::core::option::Option::None,
state_mutability: ::ethers::core::abi::ethabi::StateMutability::View,
},],
),
(
::std::borrow::ToOwned::to_owned("symbol"),
::std::vec![::ethers::core::abi::ethabi::Function {
name: ::std::borrow::ToOwned::to_owned("symbol"),
inputs: ::std::vec![],
outputs: ::std::vec![::ethers::core::abi::ethabi::Param {
name: ::std::string::String::new(),
kind: ::ethers::core::abi::ethabi::ParamType::String,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("string"),
),
},],
constant: ::core::option::Option::None,
state_mutability: ::ethers::core::abi::ethabi::StateMutability::View,
},],
),
(
::std::borrow::ToOwned::to_owned("totalSupply"),
::std::vec![::ethers::core::abi::ethabi::Function {
name: ::std::borrow::ToOwned::to_owned("totalSupply"),
inputs: ::std::vec![],
outputs: ::std::vec![::ethers::core::abi::ethabi::Param {
name: ::std::string::String::new(),
kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,),
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("uint256"),
),
},],
constant: ::core::option::Option::None,
state_mutability: ::ethers::core::abi::ethabi::StateMutability::View,
},],
),
(
::std::borrow::ToOwned::to_owned("transfer"),
::std::vec![::ethers::core::abi::ethabi::Function {
name: ::std::borrow::ToOwned::to_owned("transfer"),
inputs: ::std::vec![
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("to"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("address"),
),
},
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("amount"),
kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,),
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("uint256"),
),
},
],
outputs: ::std::vec![::ethers::core::abi::ethabi::Param {
name: ::std::string::String::new(),
kind: ::ethers::core::abi::ethabi::ParamType::Bool,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("bool"),
),
},],
constant: ::core::option::Option::None,
state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable,
},],
),
(
::std::borrow::ToOwned::to_owned("transferFrom"),
::std::vec![::ethers::core::abi::ethabi::Function {
name: ::std::borrow::ToOwned::to_owned("transferFrom"),
inputs: ::std::vec![
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("from"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("address"),
),
},
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("to"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("address"),
),
},
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("amount"),
kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,),
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("uint256"),
),
},
],
outputs: ::std::vec![::ethers::core::abi::ethabi::Param {
name: ::std::string::String::new(),
kind: ::ethers::core::abi::ethabi::ParamType::Bool,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("bool"),
),
},],
constant: ::core::option::Option::None,
state_mutability: ::ethers::core::abi::ethabi::StateMutability::NonPayable,
},],
),
]),
events: ::core::convert::From::from([
(
::std::borrow::ToOwned::to_owned("Approval"),
::std::vec![::ethers::core::abi::ethabi::Event {
name: ::std::borrow::ToOwned::to_owned("Approval"),
inputs: ::std::vec![
::ethers::core::abi::ethabi::EventParam {
name: ::std::borrow::ToOwned::to_owned("owner"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
indexed: true,
},
::ethers::core::abi::ethabi::EventParam {
name: ::std::borrow::ToOwned::to_owned("spender"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
indexed: true,
},
::ethers::core::abi::ethabi::EventParam {
name: ::std::borrow::ToOwned::to_owned("value"),
kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,),
indexed: false,
},
],
anonymous: false,
},],
),
(
::std::borrow::ToOwned::to_owned("Transfer"),
::std::vec![::ethers::core::abi::ethabi::Event {
name: ::std::borrow::ToOwned::to_owned("Transfer"),
inputs: ::std::vec![
::ethers::core::abi::ethabi::EventParam {
name: ::std::borrow::ToOwned::to_owned("from"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
indexed: true,
},
::ethers::core::abi::ethabi::EventParam {
name: ::std::borrow::ToOwned::to_owned("to"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
indexed: true,
},
::ethers::core::abi::ethabi::EventParam {
name: ::std::borrow::ToOwned::to_owned("value"),
kind: ::ethers::core::abi::ethabi::ParamType::Uint(256usize,),
indexed: false,
},
],
anonymous: false,
},],
),
]),
errors: ::std::collections::BTreeMap::new(),
receive: false,
fallback: false,
}
}
///The parsed JSON ABI of the contract.
pub static MOCKERC20_ABI: ::ethers::contract::Lazy<::ethers::core::abi::Abi> =
::ethers::contract::Lazy::new(__abi);
#[rustfmt::skip]
const __BYTECODE: &[u8] = b"`\x80`@R4\x80\x15b\0\0\x11W`\0\x80\xFD[P`@Qb\0\x0E$8\x03\x80b\0\x0E$\x839\x81\x01`@\x81\x90Rb\0\x004\x91b\0\x02\xD7V[\x82Q\x83\x90\x83\x90b\0\0M\x90`\x03\x90` \x85\x01\x90b\0\x01dV[P\x80Qb\0\0c\x90`\x04\x90` \x84\x01\x90b\0\x01dV[PPPb\0\0\x813h\x05k\xC7^-c\x10\0\0b\0\0\x9E` \x1B` \x1CV[`\x05\x80T`\xFF\x19\x16`\xFF\x92\x90\x92\x16\x91\x90\x91\x17\x90UPb\0\x03\xBF\x90PV[`\x01`\x01`\xA0\x1B\x03\x82\x16b\0\0\xF9W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x1F`$\x82\x01R\x7FERC20: mint to the zero address\0`D\x82\x01R`d\x01`@Q\x80\x91\x03\x90\xFD[\x80`\x02`\0\x82\x82Tb\0\x01\r\x91\x90b\0\x03\\V[\x90\x91UPP`\x01`\x01`\xA0\x1B\x03\x82\x16`\0\x81\x81R` \x81\x81R`@\x80\x83 \x80T\x86\x01\x90UQ\x84\x81R\x7F\xDD\xF2R\xAD\x1B\xE2\xC8\x9Bi\xC2\xB0h\xFC7\x8D\xAA\x95+\xA7\xF1c\xC4\xA1\x16(\xF5ZM\xF5#\xB3\xEF\x91\x01`@Q\x80\x91\x03\x90\xA3PPV[\x82\x80Tb\0\x01r\x90b\0\x03\x83V[\x90`\0R` `\0 \x90`\x1F\x01` \x90\x04\x81\x01\x92\x82b\0\x01\x96W`\0\x85Ub\0\x01\xE1V[\x82`\x1F\x10b\0\x01\xB1W\x80Q`\xFF\x19\x16\x83\x80\x01\x17\x85Ub\0\x01\xE1V[\x82\x80\x01`\x01\x01\x85U\x82\x15b\0\x01\xE1W\x91\x82\x01[\x82\x81\x11\x15b\0\x01\xE1W\x82Q\x82U\x91` \x01\x91\x90`\x01\x01\x90b\0\x01\xC4V[Pb\0\x01\xEF\x92\x91Pb\0\x01\xF3V[P\x90V[[\x80\x82\x11\x15b\0\x01\xEFW`\0\x81U`\x01\x01b\0\x01\xF4V[cNH{q`\xE0\x1B`\0R`A`\x04R`$`\0\xFD[`\0\x82`\x1F\x83\x01\x12b\0\x022W`\0\x80\xFD[\x81Q`\x01`\x01`@\x1B\x03\x80\x82\x11\x15b\0\x02OWb\0\x02Ob\0\x02\nV[`@Q`\x1F\x83\x01`\x1F\x19\x90\x81\x16`?\x01\x16\x81\x01\x90\x82\x82\x11\x81\x83\x10\x17\x15b\0\x02zWb\0\x02zb\0\x02\nV[\x81`@R\x83\x81R` \x92P\x86\x83\x85\x88\x01\x01\x11\x15b\0\x02\x97W`\0\x80\xFD[`\0\x91P[\x83\x82\x10\x15b\0\x02\xBBW\x85\x82\x01\x83\x01Q\x81\x83\x01\x84\x01R\x90\x82\x01\x90b\0\x02\x9CV[\x83\x82\x11\x15b\0\x02\xCDW`\0\x83\x85\x83\x01\x01R[\x96\x95PPPPPPV[`\0\x80`\0``\x84\x86\x03\x12\x15b\0\x02\xEDW`\0\x80\xFD[\x83Q`\x01`\x01`@\x1B\x03\x80\x82\x11\x15b\0\x03\x05W`\0\x80\xFD[b\0\x03\x13\x87\x83\x88\x01b\0\x02 V[\x94P` \x86\x01Q\x91P\x80\x82\x11\x15b\0\x03*W`\0\x80\xFD[Pb\0\x039\x86\x82\x87\x01b\0\x02 V[\x92PP`@\x84\x01Q`\xFF\x81\x16\x81\x14b\0\x03QW`\0\x80\xFD[\x80\x91PP\x92P\x92P\x92V[`\0\x82\x19\x82\x11\x15b\0\x03~WcNH{q`\xE0\x1B`\0R`\x11`\x04R`$`\0\xFD[P\x01\x90V[`\x01\x81\x81\x1C\x90\x82\x16\x80b\0\x03\x98W`\x7F\x82\x16\x91P[` \x82\x10\x81\x03b\0\x03\xB9WcNH{q`\xE0\x1B`\0R`\"`\x04R`$`\0\xFD[P\x91\x90PV[a\nU\x80b\0\x03\xCF`\09`\0\xF3\xFE`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[P`\x046\x10a\0\xD4W`\x005`\xE0\x1C\x80c@\xC1\x0F\x19\x11a\0\x81W\x80c\xA4W\xC2\xD7\x11a\0[W\x80c\xA4W\xC2\xD7\x14a\x01\xADW\x80c\xA9\x05\x9C\xBB\x14a\x01\xC0W\x80c\xDDb\xED>\x14a\x01\xD3W`\0\x80\xFD[\x80c@\xC1\x0F\x19\x14a\x01gW\x80cp\xA0\x821\x14a\x01|W\x80c\x95\xD8\x9BA\x14a\x01\xA5W`\0\x80\xFD[\x80c#\xB8r\xDD\x11a\0\xB2W\x80c#\xB8r\xDD\x14a\x01,W\x80c1<\xE5g\x14a\x01?W\x80c9P\x93Q\x14a\x01TW`\0\x80\xFD[\x80c\x06\xFD\xDE\x03\x14a\0\xD9W\x80c\t^\xA7\xB3\x14a\0\xF7W\x80c\x18\x16\r\xDD\x14a\x01\x1AW[`\0\x80\xFD[a\0\xE1a\x02\x0CV[`@Qa\0\xEE\x91\x90a\x08\x93V[`@Q\x80\x91\x03\x90\xF3[a\x01\na\x01\x056`\x04a\t\x04V[a\x02\x9EV[`@Q\x90\x15\x15\x81R` \x01a\0\xEEV[`\x02T[`@Q\x90\x81R` \x01a\0\xEEV[a\x01\na\x01:6`\x04a\t.V[a\x02\xB6V[`\x05T`@Q`\xFF\x90\x91\x16\x81R` \x01a\0\xEEV[a\x01\na\x01b6`\x04a\t\x04V[a\x02\xDAV[a\x01za\x01u6`\x04a\t\x04V[a\x03\x19V[\0[a\x01\x1Ea\x01\x8A6`\x04a\tjV[`\x01`\x01`\xA0\x1B\x03\x16`\0\x90\x81R` \x81\x90R`@\x90 T\x90V[a\0\xE1a\x03\x84V[a\x01\na\x01\xBB6`\x04a\t\x04V[a\x03\x93V[a\x01\na\x01\xCE6`\x04a\t\x04V[a\x04=V[a\x01\x1Ea\x01\xE16`\x04a\t\x8CV[`\x01`\x01`\xA0\x1B\x03\x91\x82\x16`\0\x90\x81R`\x01` \x90\x81R`@\x80\x83 \x93\x90\x94\x16\x82R\x91\x90\x91R T\x90V[```\x03\x80Ta\x02\x1B\x90a\t\xBFV[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x02G\x90a\t\xBFV[\x80\x15a\x02\x94W\x80`\x1F\x10a\x02iWa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x02\x94V[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x02wW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPPPP\x90P\x90V[`\x003a\x02\xAC\x81\x85\x85a\x04KV[P`\x01\x93\x92PPPV[`\x003a\x02\xC4\x85\x82\x85a\x05oV[a\x02\xCF\x85\x85\x85a\x06\x01V[P`\x01\x94\x93PPPPV[3`\0\x81\x81R`\x01` \x90\x81R`@\x80\x83 `\x01`\x01`\xA0\x1B\x03\x87\x16\x84R\x90\x91R\x81 T\x90\x91\x90a\x02\xAC\x90\x82\x90\x86\x90a\x03\x14\x90\x87\x90a\t\xF9V[a\x04KV[h\x05k\xC7^-c\x10\0\0\x81\x10a\x03vW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x1B`$\x82\x01R\x7FMockERC20: amount too large\0\0\0\0\0`D\x82\x01R`d\x01[`@Q\x80\x91\x03\x90\xFD[a\x03\x80\x82\x82a\x07\xD4V[PPV[```\x04\x80Ta\x02\x1B\x90a\t\xBFV[3`\0\x81\x81R`\x01` \x90\x81R`@\x80\x83 `\x01`\x01`\xA0\x1B\x03\x87\x16\x84R\x90\x91R\x81 T\x90\x91\x90\x83\x81\x10\x15a\x040W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`%`$\x82\x01R\x7FERC20: decreased allowance below`D\x82\x01R\x7F zero\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`d\x82\x01R`\x84\x01a\x03mV[a\x02\xCF\x82\x86\x86\x84\x03a\x04KV[`\x003a\x02\xAC\x81\x85\x85a\x06\x01V[`\x01`\x01`\xA0\x1B\x03\x83\x16a\x04\xADW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`$\x80\x82\x01R\x7FERC20: approve from the zero add`D\x82\x01Rcress`\xE0\x1B`d\x82\x01R`\x84\x01a\x03mV[`\x01`\x01`\xA0\x1B\x03\x82\x16a\x05\x0EW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\"`$\x82\x01R\x7FERC20: approve to the zero addre`D\x82\x01Rass`\xF0\x1B`d\x82\x01R`\x84\x01a\x03mV[`\x01`\x01`\xA0\x1B\x03\x83\x81\x16`\0\x81\x81R`\x01` \x90\x81R`@\x80\x83 \x94\x87\x16\x80\x84R\x94\x82R\x91\x82\x90 \x85\x90U\x90Q\x84\x81R\x7F\x8C[\xE1\xE5\xEB\xEC}[\xD1OqB}\x1E\x84\xF3\xDD\x03\x14\xC0\xF7\xB2)\x1E[ \n\xC8\xC7\xC3\xB9%\x91\x01`@Q\x80\x91\x03\x90\xA3PPPV[`\x01`\x01`\xA0\x1B\x03\x83\x81\x16`\0\x90\x81R`\x01` \x90\x81R`@\x80\x83 \x93\x86\x16\x83R\x92\x90R T`\0\x19\x81\x14a\x05\xFBW\x81\x81\x10\x15a\x05\xEEW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x1D`$\x82\x01R\x7FERC20: insufficient allowance\0\0\0`D\x82\x01R`d\x01a\x03mV[a\x05\xFB\x84\x84\x84\x84\x03a\x04KV[PPPPV[`\x01`\x01`\xA0\x1B\x03\x83\x16a\x06}W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`%`$\x82\x01R\x7FERC20: transfer from the zero ad`D\x82\x01R\x7Fdress\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`d\x82\x01R`\x84\x01a\x03mV[`\x01`\x01`\xA0\x1B\x03\x82\x16a\x06\xDFW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`#`$\x82\x01R\x7FERC20: transfer to the zero addr`D\x82\x01Rbess`\xE8\x1B`d\x82\x01R`\x84\x01a\x03mV[`\x01`\x01`\xA0\x1B\x03\x83\x16`\0\x90\x81R` \x81\x90R`@\x90 T\x81\x81\x10\x15a\x07nW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`&`$\x82\x01R\x7FERC20: transfer amount exceeds b`D\x82\x01R\x7Falance\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`d\x82\x01R`\x84\x01a\x03mV[`\x01`\x01`\xA0\x1B\x03\x84\x81\x16`\0\x81\x81R` \x81\x81R`@\x80\x83 \x87\x87\x03\x90U\x93\x87\x16\x80\x83R\x91\x84\x90 \x80T\x87\x01\x90U\x92Q\x85\x81R\x90\x92\x7F\xDD\xF2R\xAD\x1B\xE2\xC8\x9Bi\xC2\xB0h\xFC7\x8D\xAA\x95+\xA7\xF1c\xC4\xA1\x16(\xF5ZM\xF5#\xB3\xEF\x91\x01`@Q\x80\x91\x03\x90\xA3a\x05\xFBV[`\x01`\x01`\xA0\x1B\x03\x82\x16a\x08*W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x1F`$\x82\x01R\x7FERC20: mint to the zero address\0`D\x82\x01R`d\x01a\x03mV[\x80`\x02`\0\x82\x82Ta\x08<\x91\x90a\t\xF9V[\x90\x91UPP`\x01`\x01`\xA0\x1B\x03\x82\x16`\0\x81\x81R` \x81\x81R`@\x80\x83 \x80T\x86\x01\x90UQ\x84\x81R\x7F\xDD\xF2R\xAD\x1B\xE2\xC8\x9Bi\xC2\xB0h\xFC7\x8D\xAA\x95+\xA7\xF1c\xC4\xA1\x16(\xF5ZM\xF5#\xB3\xEF\x91\x01`@Q\x80\x91\x03\x90\xA3PPV[`\0` \x80\x83R\x83Q\x80\x82\x85\x01R`\0[\x81\x81\x10\x15a\x08\xC0W\x85\x81\x01\x83\x01Q\x85\x82\x01`@\x01R\x82\x01a\x08\xA4V[\x81\x81\x11\x15a\x08\xD2W`\0`@\x83\x87\x01\x01R[P`\x1F\x01`\x1F\x19\x16\x92\x90\x92\x01`@\x01\x93\x92PPPV[\x805`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\x08\xFFW`\0\x80\xFD[\x91\x90PV[`\0\x80`@\x83\x85\x03\x12\x15a\t\x17W`\0\x80\xFD[a\t \x83a\x08\xE8V[\x94` \x93\x90\x93\x015\x93PPPV[`\0\x80`\0``\x84\x86\x03\x12\x15a\tCW`\0\x80\xFD[a\tL\x84a\x08\xE8V[\x92Pa\tZ` \x85\x01a\x08\xE8V[\x91P`@\x84\x015\x90P\x92P\x92P\x92V[`\0` \x82\x84\x03\x12\x15a\t|W`\0\x80\xFD[a\t\x85\x82a\x08\xE8V[\x93\x92PPPV[`\0\x80`@\x83\x85\x03\x12\x15a\t\x9FW`\0\x80\xFD[a\t\xA8\x83a\x08\xE8V[\x91Pa\t\xB6` \x84\x01a\x08\xE8V[\x90P\x92P\x92\x90PV[`\x01\x81\x81\x1C\x90\x82\x16\x80a\t\xD3W`\x7F\x82\x16\x91P[` \x82\x10\x81\x03a\t\xF3WcNH{q`\xE0\x1B`\0R`\"`\x04R`$`\0\xFD[P\x91\x90PV[`\0\x82\x19\x82\x11\x15a\n\x1AWcNH{q`\xE0\x1B`\0R`\x11`\x04R`$`\0\xFD[P\x01\x90V\xFE\xA2dipfsX\"\x12 P\xBB\xF7;\x1A\xCB\x1FG{\xB7\x11G\x85\xFB\xB9s\x04\xD3p\xD5nG\xEE\xC6\x04z\xA6\x92\xC5E\xDABdsolcC\0\x08\r\x003";
/// The bytecode of the contract.
pub static MOCKERC20_BYTECODE: ::ethers::core::types::Bytes =
::ethers::core::types::Bytes::from_static(__BYTECODE);
#[rustfmt::skip]
const __DEPLOYED_BYTECODE: &[u8] = b"`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[P`\x046\x10a\0\xD4W`\x005`\xE0\x1C\x80c@\xC1\x0F\x19\x11a\0\x81W\x80c\xA4W\xC2\xD7\x11a\0[W\x80c\xA4W\xC2\xD7\x14a\x01\xADW\x80c\xA9\x05\x9C\xBB\x14a\x01\xC0W\x80c\xDDb\xED>\x14a\x01\xD3W`\0\x80\xFD[\x80c@\xC1\x0F\x19\x14a\x01gW\x80cp\xA0\x821\x14a\x01|W\x80c\x95\xD8\x9BA\x14a\x01\xA5W`\0\x80\xFD[\x80c#\xB8r\xDD\x11a\0\xB2W\x80c#\xB8r\xDD\x14a\x01,W\x80c1<\xE5g\x14a\x01?W\x80c9P\x93Q\x14a\x01TW`\0\x80\xFD[\x80c\x06\xFD\xDE\x03\x14a\0\xD9W\x80c\t^\xA7\xB3\x14a\0\xF7W\x80c\x18\x16\r\xDD\x14a\x01\x1AW[`\0\x80\xFD[a\0\xE1a\x02\x0CV[`@Qa\0\xEE\x91\x90a\x08\x93V[`@Q\x80\x91\x03\x90\xF3[a\x01\na\x01\x056`\x04a\t\x04V[a\x02\x9EV[`@Q\x90\x15\x15\x81R` \x01a\0\xEEV[`\x02T[`@Q\x90\x81R` \x01a\0\xEEV[a\x01\na\x01:6`\x04a\t.V[a\x02\xB6V[`\x05T`@Q`\xFF\x90\x91\x16\x81R` \x01a\0\xEEV[a\x01\na\x01b6`\x04a\t\x04V[a\x02\xDAV[a\x01za\x01u6`\x04a\t\x04V[a\x03\x19V[\0[a\x01\x1Ea\x01\x8A6`\x04a\tjV[`\x01`\x01`\xA0\x1B\x03\x16`\0\x90\x81R` \x81\x90R`@\x90 T\x90V[a\0\xE1a\x03\x84V[a\x01\na\x01\xBB6`\x04a\t\x04V[a\x03\x93V[a\x01\na\x01\xCE6`\x04a\t\x04V[a\x04=V[a\x01\x1Ea\x01\xE16`\x04a\t\x8CV[`\x01`\x01`\xA0\x1B\x03\x91\x82\x16`\0\x90\x81R`\x01` \x90\x81R`@\x80\x83 \x93\x90\x94\x16\x82R\x91\x90\x91R T\x90V[```\x03\x80Ta\x02\x1B\x90a\t\xBFV[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x02G\x90a\t\xBFV[\x80\x15a\x02\x94W\x80`\x1F\x10a\x02iWa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x02\x94V[\x82\x01\x91\x90`\0R` `\0 \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x02wW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPPPP\x90P\x90V[`\x003a\x02\xAC\x81\x85\x85a\x04KV[P`\x01\x93\x92PPPV[`\x003a\x02\xC4\x85\x82\x85a\x05oV[a\x02\xCF\x85\x85\x85a\x06\x01V[P`\x01\x94\x93PPPPV[3`\0\x81\x81R`\x01` \x90\x81R`@\x80\x83 `\x01`\x01`\xA0\x1B\x03\x87\x16\x84R\x90\x91R\x81 T\x90\x91\x90a\x02\xAC\x90\x82\x90\x86\x90a\x03\x14\x90\x87\x90a\t\xF9V[a\x04KV[h\x05k\xC7^-c\x10\0\0\x81\x10a\x03vW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x1B`$\x82\x01R\x7FMockERC20: amount too large\0\0\0\0\0`D\x82\x01R`d\x01[`@Q\x80\x91\x03\x90\xFD[a\x03\x80\x82\x82a\x07\xD4V[PPV[```\x04\x80Ta\x02\x1B\x90a\t\xBFV[3`\0\x81\x81R`\x01` \x90\x81R`@\x80\x83 `\x01`\x01`\xA0\x1B\x03\x87\x16\x84R\x90\x91R\x81 T\x90\x91\x90\x83\x81\x10\x15a\x040W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`%`$\x82\x01R\x7FERC20: decreased allowance below`D\x82\x01R\x7F zero\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`d\x82\x01R`\x84\x01a\x03mV[a\x02\xCF\x82\x86\x86\x84\x03a\x04KV[`\x003a\x02\xAC\x81\x85\x85a\x06\x01V[`\x01`\x01`\xA0\x1B\x03\x83\x16a\x04\xADW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`$\x80\x82\x01R\x7FERC20: approve from the zero add`D\x82\x01Rcress`\xE0\x1B`d\x82\x01R`\x84\x01a\x03mV[`\x01`\x01`\xA0\x1B\x03\x82\x16a\x05\x0EW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\"`$\x82\x01R\x7FERC20: approve to the zero addre`D\x82\x01Rass`\xF0\x1B`d\x82\x01R`\x84\x01a\x03mV[`\x01`\x01`\xA0\x1B\x03\x83\x81\x16`\0\x81\x81R`\x01` \x90\x81R`@\x80\x83 \x94\x87\x16\x80\x84R\x94\x82R\x91\x82\x90 \x85\x90U\x90Q\x84\x81R\x7F\x8C[\xE1\xE5\xEB\xEC}[\xD1OqB}\x1E\x84\xF3\xDD\x03\x14\xC0\xF7\xB2)\x1E[ \n\xC8\xC7\xC3\xB9%\x91\x01`@Q\x80\x91\x03\x90\xA3PPPV[`\x01`\x01`\xA0\x1B\x03\x83\x81\x16`\0\x90\x81R`\x01` \x90\x81R`@\x80\x83 \x93\x86\x16\x83R\x92\x90R T`\0\x19\x81\x14a\x05\xFBW\x81\x81\x10\x15a\x05\xEEW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x1D`$\x82\x01R\x7FERC20: insufficient allowance\0\0\0`D\x82\x01R`d\x01a\x03mV[a\x05\xFB\x84\x84\x84\x84\x03a\x04KV[PPPPV[`\x01`\x01`\xA0\x1B\x03\x83\x16a\x06}W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`%`$\x82\x01R\x7FERC20: transfer from the zero ad`D\x82\x01R\x7Fdress\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`d\x82\x01R`\x84\x01a\x03mV[`\x01`\x01`\xA0\x1B\x03\x82\x16a\x06\xDFW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`#`$\x82\x01R\x7FERC20: transfer to the zero addr`D\x82\x01Rbess`\xE8\x1B`d\x82\x01R`\x84\x01a\x03mV[`\x01`\x01`\xA0\x1B\x03\x83\x16`\0\x90\x81R` \x81\x90R`@\x90 T\x81\x81\x10\x15a\x07nW`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`&`$\x82\x01R\x7FERC20: transfer amount exceeds b`D\x82\x01R\x7Falance\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`d\x82\x01R`\x84\x01a\x03mV[`\x01`\x01`\xA0\x1B\x03\x84\x81\x16`\0\x81\x81R` \x81\x81R`@\x80\x83 \x87\x87\x03\x90U\x93\x87\x16\x80\x83R\x91\x84\x90 \x80T\x87\x01\x90U\x92Q\x85\x81R\x90\x92\x7F\xDD\xF2R\xAD\x1B\xE2\xC8\x9Bi\xC2\xB0h\xFC7\x8D\xAA\x95+\xA7\xF1c\xC4\xA1\x16(\xF5ZM\xF5#\xB3\xEF\x91\x01`@Q\x80\x91\x03\x90\xA3a\x05\xFBV[`\x01`\x01`\xA0\x1B\x03\x82\x16a\x08*W`@QbF\x1B\xCD`\xE5\x1B\x81R` `\x04\x82\x01R`\x1F`$\x82\x01R\x7FERC20: mint to the zero address\0`D\x82\x01R`d\x01a\x03mV[\x80`\x02`\0\x82\x82Ta\x08<\x91\x90a\t\xF9V[\x90\x91UPP`\x01`\x01`\xA0\x1B\x03\x82\x16`\0\x81\x81R` \x81\x81R`@\x80\x83 \x80T\x86\x01\x90UQ\x84\x81R\x7F\xDD\xF2R\xAD\x1B\xE2\xC8\x9Bi\xC2\xB0h\xFC7\x8D\xAA\x95+\xA7\xF1c\xC4\xA1\x16(\xF5ZM\xF5#\xB3\xEF\x91\x01`@Q\x80\x91\x03\x90\xA3PPV[`\0` \x80\x83R\x83Q\x80\x82\x85\x01R`\0[\x81\x81\x10\x15a\x08\xC0W\x85\x81\x01\x83\x01Q\x85\x82\x01`@\x01R\x82\x01a\x08\xA4V[\x81\x81\x11\x15a\x08\xD2W`\0`@\x83\x87\x01\x01R[P`\x1F\x01`\x1F\x19\x16\x92\x90\x92\x01`@\x01\x93\x92PPPV[\x805`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\x08\xFFW`\0\x80\xFD[\x91\x90PV[`\0\x80`@\x83\x85\x03\x12\x15a\t\x17W`\0\x80\xFD[a\t \x83a\x08\xE8V[\x94` \x93\x90\x93\x015\x93PPPV[`\0\x80`\0``\x84\x86\x03\x12\x15a\tCW`\0\x80\xFD[a\tL\x84a\x08\xE8V[\x92Pa\tZ` \x85\x01a\x08\xE8V[\x91P`@\x84\x015\x90P\x92P\x92P\x92V[`\0` \x82\x84\x03\x12\x15a\t|W`\0\x80\xFD[a\t\x85\x82a\x08\xE8V[\x93\x92PPPV[`\0\x80`@\x83\x85\x03\x12\x15a\t\x9FW`\0\x80\xFD[a\t\xA8\x83a\x08\xE8V[\x91Pa\t\xB6` \x84\x01a\x08\xE8V[\x90P\x92P\x92\x90PV[`\x01\x81\x81\x1C\x90\x82\x16\x80a\t\xD3W`\x7F\x82\x16\x91P[` \x82\x10\x81\x03a\t\xF3WcNH{q`\xE0\x1B`\0R`\"`\x04R`$`\0\xFD[P\x91\x90PV[`\0\x82\x19\x82\x11\x15a\n\x1AWcNH{q`\xE0\x1B`\0R`\x11`\x04R`$`\0\xFD[P\x01\x90V\xFE\xA2dipfsX\"\x12 P\xBB\xF7;\x1A\xCB\x1FG{\xB7\x11G\x85\xFB\xB9s\x04\xD3p\xD5nG\xEE\xC6\x04z\xA6\x92\xC5E\xDABdsolcC\0\x08\r\x003";
/// The deployed bytecode of the contract.
pub static MOCKERC20_DEPLOYED_BYTECODE: ::ethers::core::types::Bytes =
::ethers::core::types::Bytes::from_static(__DEPLOYED_BYTECODE);
pub struct MockERC20<M>(::ethers::contract::Contract<M>);
impl<M> ::core::clone::Clone for MockERC20<M> {
fn clone(&self) -> Self {
Self(::core::clone::Clone::clone(&self.0))
}
}
impl<M> ::core::ops::Deref for MockERC20<M> {
type Target = ::ethers::contract::Contract<M>;
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl<M> ::core::ops::DerefMut for MockERC20<M> {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl<M> ::core::fmt::Debug for MockERC20<M> {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple(::core::stringify!(MockERC20))
.field(&self.address())
.finish()
}
}
impl<M: ::ethers::providers::Middleware> MockERC20<M> {
/// Creates a new contract instance with the specified `ethers` client at
/// `address`. The contract derefs to a `ethers::Contract` object.
pub fn new<T: Into<::ethers::core::types::Address>>(
address: T,
client: ::std::sync::Arc<M>,
) -> Self {
Self(::ethers::contract::Contract::new(
address.into(),
MOCKERC20_ABI.clone(),
client,
))
}
/// Constructs the general purpose `Deployer` instance based on the provided constructor arguments and sends it.
/// Returns a new instance of a deployer that returns an instance of this contract after sending the transaction
///
/// Notes:
/// - If there are no constructor arguments, you should pass `()` as the argument.
/// - The default poll duration is 7 seconds.
/// - The default number of confirmations is 1 block.
///
///
/// # Example
///
/// Generate contract bindings with `abigen!` and deploy a new contract instance.
///
/// *Note*: this requires a `bytecode` and `abi` object in the `greeter.json` artifact.
///
/// ```ignore
/// # async fn deploy<M: ethers::providers::Middleware>(client: ::std::sync::Arc<M>) {
/// abigen!(Greeter, "../greeter.json");
///
/// let greeter_contract = Greeter::deploy(client, "Hello world!".to_string()).unwrap().send().await.unwrap();
/// let msg = greeter_contract.greet().call().await.unwrap();
/// # }
/// ```
pub fn deploy<T: ::ethers::core::abi::Tokenize>(
client: ::std::sync::Arc<M>,
constructor_args: T,
) -> ::core::result::Result<
::ethers::contract::builders::ContractDeployer<M, Self>,
::ethers::contract::ContractError<M>,
> {
let factory = ::ethers::contract::ContractFactory::new(
MOCKERC20_ABI.clone(),
MOCKERC20_BYTECODE.clone().into(),
client,
);
let deployer = factory.deploy(constructor_args)?;
let deployer = ::ethers::contract::ContractDeployer::new(deployer);
Ok(deployer)
}
///Calls the contract's `allowance` (0xdd62ed3e) function
pub fn allowance(
&self,
owner: ::ethers::core::types::Address,
spender: ::ethers::core::types::Address,
) -> ::ethers::contract::builders::ContractCall<M, ::ethers::core::types::U256> {
self.0
.method_hash([221, 98, 237, 62], (owner, spender))
.expect("method not found (this should never happen)")
}
///Calls the contract's `approve` (0x095ea7b3) function
pub fn approve(
&self,
spender: ::ethers::core::types::Address,
amount: ::ethers::core::types::U256,
) -> ::ethers::contract::builders::ContractCall<M, bool> {
self.0
.method_hash([9, 94, 167, 179], (spender, amount))
.expect("method not found (this should never happen)")
}
///Calls the contract's `balanceOf` (0x70a08231) function
pub fn balance_of(
&self,
account: ::ethers::core::types::Address,
) -> ::ethers::contract::builders::ContractCall<M, ::ethers::core::types::U256> {
self.0
.method_hash([112, 160, 130, 49], account)
.expect("method not found (this should never happen)")
}
///Calls the contract's `decimals` (0x313ce567) function
pub fn decimals(&self) -> ::ethers::contract::builders::ContractCall<M, u8> {
self.0
.method_hash([49, 60, 229, 103], ())
.expect("method not found (this should never happen)")
}
///Calls the contract's `decreaseAllowance` (0xa457c2d7) function
pub fn decrease_allowance(
&self,
spender: ::ethers::core::types::Address,
subtracted_value: ::ethers::core::types::U256,
) -> ::ethers::contract::builders::ContractCall<M, bool> {
self.0
.method_hash([164, 87, 194, 215], (spender, subtracted_value))
.expect("method not found (this should never happen)")
}
///Calls the contract's `increaseAllowance` (0x39509351) function
pub fn increase_allowance(
&self,
spender: ::ethers::core::types::Address,
added_value: ::ethers::core::types::U256,
) -> ::ethers::contract::builders::ContractCall<M, bool> {
self.0
.method_hash([57, 80, 147, 81], (spender, added_value))
.expect("method not found (this should never happen)")
}
///Calls the contract's `mint` (0x40c10f19) function
pub fn mint(
&self,
account: ::ethers::core::types::Address,
amount: ::ethers::core::types::U256,
) -> ::ethers::contract::builders::ContractCall<M, ()> {
self.0
.method_hash([64, 193, 15, 25], (account, amount))
.expect("method not found (this should never happen)")
}
///Calls the contract's `name` (0x06fdde03) function
pub fn name(&self) -> ::ethers::contract::builders::ContractCall<M, ::std::string::String> {
self.0
.method_hash([6, 253, 222, 3], ())
.expect("method not found (this should never happen)")
}
///Calls the contract's `symbol` (0x95d89b41) function
pub fn symbol(
&self,
) -> ::ethers::contract::builders::ContractCall<M, ::std::string::String> {
self.0
.method_hash([149, 216, 155, 65], ())
.expect("method not found (this should never happen)")
}
///Calls the contract's `totalSupply` (0x18160ddd) function
pub fn total_supply(
&self,
) -> ::ethers::contract::builders::ContractCall<M, ::ethers::core::types::U256> {
self.0
.method_hash([24, 22, 13, 221], ())
.expect("method not found (this should never happen)")
}
///Calls the contract's `transfer` (0xa9059cbb) function
pub fn transfer(
&self,
to: ::ethers::core::types::Address,
amount: ::ethers::core::types::U256,
) -> ::ethers::contract::builders::ContractCall<M, bool> {
self.0
.method_hash([169, 5, 156, 187], (to, amount))
.expect("method not found (this should never happen)")
}
///Calls the contract's `transferFrom` (0x23b872dd) function
pub fn transfer_from(
&self,
from: ::ethers::core::types::Address,
to: ::ethers::core::types::Address,
amount: ::ethers::core::types::U256,
) -> ::ethers::contract::builders::ContractCall<M, bool> {
self.0
.method_hash([35, 184, 114, 221], (from, to, amount))
.expect("method not found (this should never happen)")
}
///Gets the contract's `Approval` event
pub fn approval_filter(
&self,
) -> ::ethers::contract::builders::Event<::std::sync::Arc<M>, M, ApprovalFilter> {
self.0.event()
}
///Gets the contract's `Transfer` event
pub fn transfer_filter(
&self,
) -> ::ethers::contract::builders::Event<::std::sync::Arc<M>, M, TransferFilter> {
self.0.event()
}
/// Returns an `Event` builder for all the events of this contract.
pub fn events(
&self,
) -> ::ethers::contract::builders::Event<::std::sync::Arc<M>, M, MockERC20Events> {
self.0
.event_with_filter(::core::default::Default::default())
}
}
impl<M: ::ethers::providers::Middleware> From<::ethers::contract::Contract<M>> for MockERC20<M> {
fn from(contract: ::ethers::contract::Contract<M>) -> Self {
Self::new(contract.address(), contract.client())
}
}
#[derive(
Clone,
::ethers::contract::EthEvent,
::ethers::contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash,
)]
#[ethevent(name = "Approval", abi = "Approval(address,address,uint256)")]
pub struct ApprovalFilter {
#[ethevent(indexed)]
pub owner: ::ethers::core::types::Address,
#[ethevent(indexed)]
pub spender: ::ethers::core::types::Address,
pub value: ::ethers::core::types::U256,
}
#[derive(
Clone,
::ethers::contract::EthEvent,
::ethers::contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash,
)]
#[ethevent(name = "Transfer", abi = "Transfer(address,address,uint256)")]
pub struct TransferFilter {
#[ethevent(indexed)]
pub from: ::ethers::core::types::Address,
#[ethevent(indexed)]
pub to: ::ethers::core::types::Address,
pub value: ::ethers::core::types::U256,
}
///Container type for all of the contract's events
#[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)]
pub enum MockERC20Events {
ApprovalFilter(ApprovalFilter),
TransferFilter(TransferFilter),
}
impl ::ethers::contract::EthLogDecode for MockERC20Events {
fn decode_log(
log: &::ethers::core::abi::RawLog,
) -> ::core::result::Result<Self, ::ethers::core::abi::Error> {
if let Ok(decoded) = ApprovalFilter::decode_log(log) {
return Ok(MockERC20Events::ApprovalFilter(decoded));
}
if let Ok(decoded) = TransferFilter::decode_log(log) {
return Ok(MockERC20Events::TransferFilter(decoded));
}
Err(::ethers::core::abi::Error::InvalidData)
}
}
impl ::core::fmt::Display for MockERC20Events {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self {
Self::ApprovalFilter(element) => ::core::fmt::Display::fmt(element, f),
Self::TransferFilter(element) => ::core::fmt::Display::fmt(element, f),
}
}
}
impl ::core::convert::From<ApprovalFilter> for MockERC20Events {
fn from(value: ApprovalFilter) -> Self {
Self::ApprovalFilter(value)
}
}
impl ::core::convert::From<TransferFilter> for MockERC20Events {
fn from(value: TransferFilter) -> Self {
Self::TransferFilter(value)
}
}
///Container type for all input parameters for the `allowance` function with signature `allowance(address,address)` and selector `0xdd62ed3e`
#[derive(
Clone,
::ethers::contract::EthCall,
::ethers::contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash,
)]
#[ethcall(name = "allowance", abi = "allowance(address,address)")]
pub struct AllowanceCall {
pub owner: ::ethers::core::types::Address,
pub spender: ::ethers::core::types::Address,
}
///Container type for all input parameters for the `approve` function with signature `approve(address,uint256)` and selector `0x095ea7b3`
#[derive(
Clone,
::ethers::contract::EthCall,
::ethers::contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash,
)]
#[ethcall(name = "approve", abi = "approve(address,uint256)")]
pub struct ApproveCall {
pub spender: ::ethers::core::types::Address,
pub amount: ::ethers::core::types::U256,
}
///Container type for all input parameters for the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231`
#[derive(
Clone,
::ethers::contract::EthCall,
::ethers::contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash,
)]
#[ethcall(name = "balanceOf", abi = "balanceOf(address)")]
pub struct BalanceOfCall {
pub account: ::ethers::core::types::Address,
}
///Container type for all input parameters for the `decimals` function with signature `decimals()` and selector `0x313ce567`
#[derive(
Clone,
::ethers::contract::EthCall,
::ethers::contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash,
)]
#[ethcall(name = "decimals", abi = "decimals()")]
pub struct DecimalsCall;
///Container type for all input parameters for the `decreaseAllowance` function with signature `decreaseAllowance(address,uint256)` and selector `0xa457c2d7`
#[derive(
Clone,
::ethers::contract::EthCall,
::ethers::contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash,
)]
#[ethcall(name = "decreaseAllowance", abi = "decreaseAllowance(address,uint256)")]
pub struct DecreaseAllowanceCall {
pub spender: ::ethers::core::types::Address,
pub subtracted_value: ::ethers::core::types::U256,
}
///Container type for all input parameters for the `increaseAllowance` function with signature `increaseAllowance(address,uint256)` and selector `0x39509351`
#[derive(
Clone,
::ethers::contract::EthCall,
::ethers::contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash,
)]
#[ethcall(name = "increaseAllowance", abi = "increaseAllowance(address,uint256)")]
pub struct IncreaseAllowanceCall {
pub spender: ::ethers::core::types::Address,
pub added_value: ::ethers::core::types::U256,
}
///Container type for all input parameters for the `mint` function with signature `mint(address,uint256)` and selector `0x40c10f19`
#[derive(
Clone,
::ethers::contract::EthCall,
::ethers::contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash,
)]
#[ethcall(name = "mint", abi = "mint(address,uint256)")]
pub struct MintCall {
pub account: ::ethers::core::types::Address,
pub amount: ::ethers::core::types::U256,
}
///Container type for all input parameters for the `name` function with signature `name()` and selector `0x06fdde03`
#[derive(
Clone,
::ethers::contract::EthCall,
::ethers::contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash,
)]
#[ethcall(name = "name", abi = "name()")]
pub struct NameCall;
///Container type for all input parameters for the `symbol` function with signature `symbol()` and selector `0x95d89b41`
#[derive(
Clone,
::ethers::contract::EthCall,
::ethers::contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash,
)]
#[ethcall(name = "symbol", abi = "symbol()")]
pub struct SymbolCall;
///Container type for all input parameters for the `totalSupply` function with signature `totalSupply()` and selector `0x18160ddd`
#[derive(
Clone,
::ethers::contract::EthCall,
::ethers::contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash,
)]
#[ethcall(name = "totalSupply", abi = "totalSupply()")]
pub struct TotalSupplyCall;
///Container type for all input parameters for the `transfer` function with signature `transfer(address,uint256)` and selector `0xa9059cbb`
#[derive(
Clone,
::ethers::contract::EthCall,
::ethers::contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash,
)]
#[ethcall(name = "transfer", abi = "transfer(address,uint256)")]
pub struct TransferCall {
pub to: ::ethers::core::types::Address,
pub amount: ::ethers::core::types::U256,
}
///Container type for all input parameters for the `transferFrom` function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`
#[derive(
Clone,
::ethers::contract::EthCall,
::ethers::contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash,
)]
#[ethcall(name = "transferFrom", abi = "transferFrom(address,address,uint256)")]
pub struct TransferFromCall {
pub from: ::ethers::core::types::Address,
pub to: ::ethers::core::types::Address,
pub amount: ::ethers::core::types::U256,
}
///Container type for all of the contract's call
#[derive(Clone, ::ethers::contract::EthAbiType, Debug, PartialEq, Eq, Hash)]
pub enum MockERC20Calls {
Allowance(AllowanceCall),
Approve(ApproveCall),
BalanceOf(BalanceOfCall),
Decimals(DecimalsCall),
DecreaseAllowance(DecreaseAllowanceCall),
IncreaseAllowance(IncreaseAllowanceCall),
Mint(MintCall),
Name(NameCall),
Symbol(SymbolCall),
TotalSupply(TotalSupplyCall),
Transfer(TransferCall),
TransferFrom(TransferFromCall),
}
impl ::ethers::core::abi::AbiDecode for MockERC20Calls {
fn decode(
data: impl AsRef<[u8]>,
) -> ::core::result::Result<Self, ::ethers::core::abi::AbiError> {
let data = data.as_ref();
if let Ok(decoded) = <AllowanceCall as ::ethers::core::abi::AbiDecode>::decode(data) {
return Ok(Self::Allowance(decoded));
}
if let Ok(decoded) = <ApproveCall as ::ethers::core::abi::AbiDecode>::decode(data) {
return Ok(Self::Approve(decoded));
}
if let Ok(decoded) = <BalanceOfCall as ::ethers::core::abi::AbiDecode>::decode(data) {
return Ok(Self::BalanceOf(decoded));
}
if let Ok(decoded) = <DecimalsCall as ::ethers::core::abi::AbiDecode>::decode(data) {
return Ok(Self::Decimals(decoded));
}
if let Ok(decoded) =
<DecreaseAllowanceCall as ::ethers::core::abi::AbiDecode>::decode(data)
{
return Ok(Self::DecreaseAllowance(decoded));
}
if let Ok(decoded) =
<IncreaseAllowanceCall as ::ethers::core::abi::AbiDecode>::decode(data)
{
return Ok(Self::IncreaseAllowance(decoded));
}
if let Ok(decoded) = <MintCall as ::ethers::core::abi::AbiDecode>::decode(data) {
return Ok(Self::Mint(decoded));
}
if let Ok(decoded) = <NameCall as ::ethers::core::abi::AbiDecode>::decode(data) {
return Ok(Self::Name(decoded));
}
if let Ok(decoded) = <SymbolCall as ::ethers::core::abi::AbiDecode>::decode(data) {
return Ok(Self::Symbol(decoded));
}
if let Ok(decoded) = <TotalSupplyCall as ::ethers::core::abi::AbiDecode>::decode(data) {
return Ok(Self::TotalSupply(decoded));
}
if let Ok(decoded) = <TransferCall as ::ethers::core::abi::AbiDecode>::decode(data) {
return Ok(Self::Transfer(decoded));
}
if let Ok(decoded) = <TransferFromCall as ::ethers::core::abi::AbiDecode>::decode(data)
{
return Ok(Self::TransferFrom(decoded));
}
Err(::ethers::core::abi::Error::InvalidData.into())
}
}
impl ::ethers::core::abi::AbiEncode for MockERC20Calls {
fn encode(self) -> Vec<u8> {
match self {
Self::Allowance(element) => ::ethers::core::abi::AbiEncode::encode(element),
Self::Approve(element) => ::ethers::core::abi::AbiEncode::encode(element),
Self::BalanceOf(element) => ::ethers::core::abi::AbiEncode::encode(element),
Self::Decimals(element) => ::ethers::core::abi::AbiEncode::encode(element),
Self::DecreaseAllowance(element) => ::ethers::core::abi::AbiEncode::encode(element),
Self::IncreaseAllowance(element) => ::ethers::core::abi::AbiEncode::encode(element),
Self::Mint(element) => ::ethers::core::abi::AbiEncode::encode(element),
Self::Name(element) => ::ethers::core::abi::AbiEncode::encode(element),
Self::Symbol(element) => ::ethers::core::abi::AbiEncode::encode(element),
Self::TotalSupply(element) => ::ethers::core::abi::AbiEncode::encode(element),
Self::Transfer(element) => ::ethers::core::abi::AbiEncode::encode(element),
Self::TransferFrom(element) => ::ethers::core::abi::AbiEncode::encode(element),
}
}
}
impl ::core::fmt::Display for MockERC20Calls {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self {
Self::Allowance(element) => ::core::fmt::Display::fmt(element, f),
Self::Approve(element) => ::core::fmt::Display::fmt(element, f),
Self::BalanceOf(element) => ::core::fmt::Display::fmt(element, f),
Self::Decimals(element) => ::core::fmt::Display::fmt(element, f),
Self::DecreaseAllowance(element) => ::core::fmt::Display::fmt(element, f),
Self::IncreaseAllowance(element) => ::core::fmt::Display::fmt(element, f),
Self::Mint(element) => ::core::fmt::Display::fmt(element, f),
Self::Name(element) => ::core::fmt::Display::fmt(element, f),
Self::Symbol(element) => ::core::fmt::Display::fmt(element, f),
Self::TotalSupply(element) => ::core::fmt::Display::fmt(element, f),
Self::Transfer(element) => ::core::fmt::Display::fmt(element, f),
Self::TransferFrom(element) => ::core::fmt::Display::fmt(element, f),
}
}
}
impl ::core::convert::From<AllowanceCall> for MockERC20Calls {
fn from(value: AllowanceCall) -> Self {
Self::Allowance(value)
}
}
impl ::core::convert::From<ApproveCall> for MockERC20Calls {
fn from(value: ApproveCall) -> Self {
Self::Approve(value)
}
}
impl ::core::convert::From<BalanceOfCall> for MockERC20Calls {
fn from(value: BalanceOfCall) -> Self {
Self::BalanceOf(value)
}
}
impl ::core::convert::From<DecimalsCall> for MockERC20Calls {
fn from(value: DecimalsCall) -> Self {
Self::Decimals(value)
}
}
impl ::core::convert::From<DecreaseAllowanceCall> for MockERC20Calls {
fn from(value: DecreaseAllowanceCall) -> Self {
Self::DecreaseAllowance(value)
}
}
impl ::core::convert::From<IncreaseAllowanceCall> for MockERC20Calls {
fn from(value: IncreaseAllowanceCall) -> Self {
Self::IncreaseAllowance(value)
}
}
impl ::core::convert::From<MintCall> for MockERC20Calls {
fn from(value: MintCall) -> Self {
Self::Mint(value)
}
}
impl ::core::convert::From<NameCall> for MockERC20Calls {
fn from(value: NameCall) -> Self {
Self::Name(value)
}
}
impl ::core::convert::From<SymbolCall> for MockERC20Calls {
fn from(value: SymbolCall) -> Self {
Self::Symbol(value)
}
}
impl ::core::convert::From<TotalSupplyCall> for MockERC20Calls {
fn from(value: TotalSupplyCall) -> Self {
Self::TotalSupply(value)
}
}
impl ::core::convert::From<TransferCall> for MockERC20Calls {
fn from(value: TransferCall) -> Self {
Self::Transfer(value)
}
}
impl ::core::convert::From<TransferFromCall> for MockERC20Calls {
fn from(value: TransferFromCall) -> Self {
Self::TransferFrom(value)
}
}
///Container type for all return fields from the `allowance` function with signature `allowance(address,address)` and selector `0xdd62ed3e`
#[derive(
Clone,
::ethers::contract::EthAbiType,
::ethers::contract::EthAbiCodec,
Default,
Debug,
PartialEq,
Eq,
Hash,
)]
pub struct AllowanceReturn(pub ::ethers::core::types::U256);
///Container type for all return fields from the `approve` function with signature `approve(address,uint256)` and selector `0x095ea7b3`
#[derive(
Clone,
::ethers::contract::EthAbiType,
::ethers::contract::EthAbiCodec,
Default,
Debug,
PartialEq,
Eq,
Hash,
)]
pub struct ApproveReturn(pub bool);
///Container type for all return fields from the `balanceOf` function with signature `balanceOf(address)` and selector `0x70a08231`
#[derive(
Clone,
::ethers::contract::EthAbiType,
::ethers::contract::EthAbiCodec,
Default,
Debug,
PartialEq,
Eq,
Hash,
)]
pub struct BalanceOfReturn(pub ::ethers::core::types::U256);
///Container type for all return fields from the `decimals` function with signature `decimals()` and selector `0x313ce567`
#[derive(
Clone,
::ethers::contract::EthAbiType,
::ethers::contract::EthAbiCodec,
Default,
Debug,
PartialEq,
Eq,
Hash,
)]
pub struct DecimalsReturn(pub u8);
///Container type for all return fields from the `decreaseAllowance` function with signature `decreaseAllowance(address,uint256)` and selector `0xa457c2d7`
#[derive(
Clone,
::ethers::contract::EthAbiType,
::ethers::contract::EthAbiCodec,
Default,
Debug,
PartialEq,
Eq,
Hash,
)]
pub struct DecreaseAllowanceReturn(pub bool);
///Container type for all return fields from the `increaseAllowance` function with signature `increaseAllowance(address,uint256)` and selector `0x39509351`
#[derive(
Clone,
::ethers::contract::EthAbiType,
::ethers::contract::EthAbiCodec,
Default,
Debug,
PartialEq,
Eq,
Hash,
)]
pub struct IncreaseAllowanceReturn(pub bool);
///Container type for all return fields from the `name` function with signature `name()` and selector `0x06fdde03`
#[derive(
Clone,
::ethers::contract::EthAbiType,
::ethers::contract::EthAbiCodec,
Default,
Debug,
PartialEq,
Eq,
Hash,
)]
pub struct NameReturn(pub ::std::string::String);
///Container type for all return fields from the `symbol` function with signature `symbol()` and selector `0x95d89b41`
#[derive(
Clone,
::ethers::contract::EthAbiType,
::ethers::contract::EthAbiCodec,
Default,
Debug,
PartialEq,
Eq,
Hash,
)]
pub struct SymbolReturn(pub ::std::string::String);
///Container type for all return fields from the `totalSupply` function with signature `totalSupply()` and selector `0x18160ddd`
#[derive(
Clone,
::ethers::contract::EthAbiType,
::ethers::contract::EthAbiCodec,
Default,
Debug,
PartialEq,
Eq,
Hash,
)]
pub struct TotalSupplyReturn(pub ::ethers::core::types::U256);
///Container type for all return fields from the `transfer` function with signature `transfer(address,uint256)` and selector `0xa9059cbb`
#[derive(
Clone,
::ethers::contract::EthAbiType,
::ethers::contract::EthAbiCodec,
Default,
Debug,
PartialEq,
Eq,
Hash,
)]
pub struct TransferReturn(pub bool);
///Container type for all return fields from the `transferFrom` function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`
#[derive(
Clone,
::ethers::contract::EthAbiType,
::ethers::contract::EthAbiCodec,
Default,
Debug,
PartialEq,
Eq,
Hash,
)]
pub struct TransferFromReturn(pub bool);
}