pub use erc721_votes::*;
/// 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,
)]
pub mod erc721_votes {
#[rustfmt::skip]
const __ABI: &str = "[{\"inputs\":[],\"type\":\"error\",\"name\":\"InvalidShortString\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"str\",\"type\":\"string\",\"components\":[]}],\"type\":\"error\",\"name\":\"StringTooLong\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\",\"components\":[],\"indexed\":true}],\"type\":\"event\",\"name\":\"Approval\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\",\"components\":[],\"indexed\":false}],\"type\":\"event\",\"name\":\"ApprovalForAll\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"address\",\"name\":\"fromDelegate\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"address\",\"name\":\"toDelegate\",\"type\":\"address\",\"components\":[],\"indexed\":true}],\"type\":\"event\",\"name\":\"DelegateChanged\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"uint256\",\"name\":\"previousBalance\",\"type\":\"uint256\",\"components\":[],\"indexed\":false},{\"internalType\":\"uint256\",\"name\":\"newBalance\",\"type\":\"uint256\",\"components\":[],\"indexed\":false}],\"type\":\"event\",\"name\":\"DelegateVotesChanged\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[],\"type\":\"event\",\"name\":\"EIP712DomainChanged\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\",\"components\":[],\"indexed\":true}],\"type\":\"event\",\"name\":\"Transfer\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"CLOCK_MODE\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"approve\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"clock\",\"outputs\":[{\"internalType\":\"uint48\",\"name\":\"\",\"type\":\"uint48\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"delegate\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\",\"components\":[]},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\",\"components\":[]},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"delegateBySig\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"delegates\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"eip712Domain\",\"outputs\":[{\"internalType\":\"bytes1\",\"name\":\"fields\",\"type\":\"bytes1\",\"components\":[]},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\",\"components\":[]},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"address\",\"name\":\"verifyingContract\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\",\"components\":[]},{\"internalType\":\"uint256[]\",\"name\":\"extensions\",\"type\":\"uint256[]\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timepoint\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"getPastTotalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"timepoint\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"getPastVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"getVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"safeTransferFrom\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"safeTransferFrom\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"setApprovalForAll\",\"outputs\":[]},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"tokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"transferFrom\",\"outputs\":[]}]";
///The parsed JSON ABI of the contract.
pub static ERC721VOTES_ABI: ::ethers_contract::Lazy<::ethers_core::abi::Abi> = ::ethers_contract::Lazy::new(||
::ethers_core::utils::__serde_json::from_str(__ABI).expect("ABI is always valid"));
pub struct ERC721Votes<M>(::ethers_contract::Contract<M>);
impl<M> ::core::clone::Clone for ERC721Votes<M> {
fn clone(&self) -> Self {
Self(::core::clone::Clone::clone(&self.0))
}
}
impl<M> ::core::ops::Deref for ERC721Votes<M> {
type Target = ::ethers_contract::Contract<M>;
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl<M> ::core::ops::DerefMut for ERC721Votes<M> {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl<M> ::core::fmt::Debug for ERC721Votes<M> {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple(stringify!(ERC721Votes)).field(&self.address()).finish()
}
}
impl<M: ::ethers_providers::Middleware> ERC721Votes<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(),
ERC721VOTES_ABI.clone(),
client,
),
)
}
///Calls the contract's `CLOCK_MODE` (0x4bf5d7e9) function
pub fn clock_mode(
&self,
) -> ::ethers_contract::builders::ContractCall<M, ::std::string::String> {
self.0
.method_hash([75, 245, 215, 233], ())
.expect("method not found (this should never happen)")
}
///Calls the contract's `DOMAIN_SEPARATOR` (0x3644e515) function
pub fn domain_separator(
&self,
) -> ::ethers_contract::builders::ContractCall<M, [u8; 32]> {
self.0
.method_hash([54, 68, 229, 21], ())
.expect("method not found (this should never happen)")
}
///Calls the contract's `approve` (0x095ea7b3) function
pub fn approve(
&self,
to: ::ethers_core::types::Address,
token_id: ::ethers_core::types::U256,
) -> ::ethers_contract::builders::ContractCall<M, ()> {
self.0
.method_hash([9, 94, 167, 179], (to, token_id))
.expect("method not found (this should never happen)")
}
///Calls the contract's `balanceOf` (0x70a08231) function
pub fn balance_of(
&self,
owner: ::ethers_core::types::Address,
) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
self.0
.method_hash([112, 160, 130, 49], owner)
.expect("method not found (this should never happen)")
}
///Calls the contract's `clock` (0x91ddadf4) function
pub fn clock(&self) -> ::ethers_contract::builders::ContractCall<M, u64> {
self.0
.method_hash([145, 221, 173, 244], ())
.expect("method not found (this should never happen)")
}
///Calls the contract's `delegate` (0x5c19a95c) function
pub fn delegate(
&self,
delegatee: ::ethers_core::types::Address,
) -> ::ethers_contract::builders::ContractCall<M, ()> {
self.0
.method_hash([92, 25, 169, 92], delegatee)
.expect("method not found (this should never happen)")
}
///Calls the contract's `delegateBySig` (0xc3cda520) function
pub fn delegate_by_sig(
&self,
delegatee: ::ethers_core::types::Address,
nonce: ::ethers_core::types::U256,
expiry: ::ethers_core::types::U256,
v: u8,
r: [u8; 32],
s: [u8; 32],
) -> ::ethers_contract::builders::ContractCall<M, ()> {
self.0
.method_hash([195, 205, 165, 32], (delegatee, nonce, expiry, v, r, s))
.expect("method not found (this should never happen)")
}
///Calls the contract's `delegates` (0x587cde1e) function
pub fn delegates(
&self,
account: ::ethers_core::types::Address,
) -> ::ethers_contract::builders::ContractCall<
M,
::ethers_core::types::Address,
> {
self.0
.method_hash([88, 124, 222, 30], account)
.expect("method not found (this should never happen)")
}
///Calls the contract's `eip712Domain` (0x84b0196e) function
pub fn eip_712_domain(
&self,
) -> ::ethers_contract::builders::ContractCall<
M,
(
[u8; 1],
::std::string::String,
::std::string::String,
::ethers_core::types::U256,
::ethers_core::types::Address,
[u8; 32],
::std::vec::Vec<::ethers_core::types::U256>,
),
> {
self.0
.method_hash([132, 176, 25, 110], ())
.expect("method not found (this should never happen)")
}
///Calls the contract's `getApproved` (0x081812fc) function
pub fn get_approved(
&self,
token_id: ::ethers_core::types::U256,
) -> ::ethers_contract::builders::ContractCall<
M,
::ethers_core::types::Address,
> {
self.0
.method_hash([8, 24, 18, 252], token_id)
.expect("method not found (this should never happen)")
}
///Calls the contract's `getPastTotalSupply` (0x8e539e8c) function
pub fn get_past_total_supply(
&self,
timepoint: ::ethers_core::types::U256,
) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
self.0
.method_hash([142, 83, 158, 140], timepoint)
.expect("method not found (this should never happen)")
}
///Calls the contract's `getPastVotes` (0x3a46b1a8) function
pub fn get_past_votes(
&self,
account: ::ethers_core::types::Address,
timepoint: ::ethers_core::types::U256,
) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
self.0
.method_hash([58, 70, 177, 168], (account, timepoint))
.expect("method not found (this should never happen)")
}
///Calls the contract's `getVotes` (0x9ab24eb0) function
pub fn get_votes(
&self,
account: ::ethers_core::types::Address,
) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
self.0
.method_hash([154, 178, 78, 176], account)
.expect("method not found (this should never happen)")
}
///Calls the contract's `isApprovedForAll` (0xe985e9c5) function
pub fn is_approved_for_all(
&self,
owner: ::ethers_core::types::Address,
operator: ::ethers_core::types::Address,
) -> ::ethers_contract::builders::ContractCall<M, bool> {
self.0
.method_hash([233, 133, 233, 197], (owner, operator))
.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 `nonces` (0x7ecebe00) function
pub fn nonces(
&self,
owner: ::ethers_core::types::Address,
) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
self.0
.method_hash([126, 206, 190, 0], owner)
.expect("method not found (this should never happen)")
}
///Calls the contract's `ownerOf` (0x6352211e) function
pub fn owner_of(
&self,
token_id: ::ethers_core::types::U256,
) -> ::ethers_contract::builders::ContractCall<
M,
::ethers_core::types::Address,
> {
self.0
.method_hash([99, 82, 33, 30], token_id)
.expect("method not found (this should never happen)")
}
///Calls the contract's `safeTransferFrom` (0x42842e0e) function
pub fn safe_transfer_from(
&self,
from: ::ethers_core::types::Address,
to: ::ethers_core::types::Address,
token_id: ::ethers_core::types::U256,
) -> ::ethers_contract::builders::ContractCall<M, ()> {
self.0
.method_hash([66, 132, 46, 14], (from, to, token_id))
.expect("method not found (this should never happen)")
}
///Calls the contract's `safeTransferFrom` (0xb88d4fde) function
pub fn safe_transfer_from_with_from_and_to_and_data(
&self,
from: ::ethers_core::types::Address,
to: ::ethers_core::types::Address,
token_id: ::ethers_core::types::U256,
data: ::ethers_core::types::Bytes,
) -> ::ethers_contract::builders::ContractCall<M, ()> {
self.0
.method_hash([184, 141, 79, 222], (from, to, token_id, data))
.expect("method not found (this should never happen)")
}
///Calls the contract's `setApprovalForAll` (0xa22cb465) function
pub fn set_approval_for_all(
&self,
operator: ::ethers_core::types::Address,
approved: bool,
) -> ::ethers_contract::builders::ContractCall<M, ()> {
self.0
.method_hash([162, 44, 180, 101], (operator, approved))
.expect("method not found (this should never happen)")
}
///Calls the contract's `supportsInterface` (0x01ffc9a7) function
pub fn supports_interface(
&self,
interface_id: [u8; 4],
) -> ::ethers_contract::builders::ContractCall<M, bool> {
self.0
.method_hash([1, 255, 201, 167], interface_id)
.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 `tokenURI` (0xc87b56dd) function
pub fn token_uri(
&self,
token_id: ::ethers_core::types::U256,
) -> ::ethers_contract::builders::ContractCall<M, ::std::string::String> {
self.0
.method_hash([200, 123, 86, 221], token_id)
.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,
token_id: ::ethers_core::types::U256,
) -> ::ethers_contract::builders::ContractCall<M, ()> {
self.0
.method_hash([35, 184, 114, 221], (from, to, token_id))
.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 `ApprovalForAll` event
pub fn approval_for_all_filter(
&self,
) -> ::ethers_contract::builders::Event<
::std::sync::Arc<M>,
M,
ApprovalForAllFilter,
> {
self.0.event()
}
///Gets the contract's `DelegateChanged` event
pub fn delegate_changed_filter(
&self,
) -> ::ethers_contract::builders::Event<
::std::sync::Arc<M>,
M,
DelegateChangedFilter,
> {
self.0.event()
}
///Gets the contract's `DelegateVotesChanged` event
pub fn delegate_votes_changed_filter(
&self,
) -> ::ethers_contract::builders::Event<
::std::sync::Arc<M>,
M,
DelegateVotesChangedFilter,
> {
self.0.event()
}
///Gets the contract's `EIP712DomainChanged` event
pub fn eip712_domain_changed_filter(
&self,
) -> ::ethers_contract::builders::Event<
::std::sync::Arc<M>,
M,
Eip712DomainChangedFilter,
> {
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,
ERC721VotesEvents,
> {
self.0.event_with_filter(::core::default::Default::default())
}
}
impl<M: ::ethers_providers::Middleware> From<::ethers_contract::Contract<M>>
for ERC721Votes<M> {
fn from(contract: ::ethers_contract::Contract<M>) -> Self {
Self::new(contract.address(), contract.client())
}
}
///Custom Error type `InvalidShortString` with signature `InvalidShortString()` and selector `0xb3512b0c`
#[derive(
Clone,
::ethers_contract::EthError,
::ethers_contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[etherror(name = "InvalidShortString", abi = "InvalidShortString()")]
pub struct InvalidShortString;
///Custom Error type `StringTooLong` with signature `StringTooLong(string)` and selector `0x305a27a9`
#[derive(
Clone,
::ethers_contract::EthError,
::ethers_contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[etherror(name = "StringTooLong", abi = "StringTooLong(string)")]
pub struct StringTooLong {
pub str: ::std::string::String,
}
///Container type for all of the contract's custom errors
#[derive(Clone, ::ethers_contract::EthAbiType, Debug, PartialEq, Eq, Hash)]
pub enum ERC721VotesErrors {
InvalidShortString(InvalidShortString),
StringTooLong(StringTooLong),
/// The standard solidity revert string, with selector
/// Error(string) -- 0x08c379a0
RevertString(::std::string::String),
}
impl ::ethers_core::abi::AbiDecode for ERC721VotesErrors {
fn decode(
data: impl AsRef<[u8]>,
) -> ::core::result::Result<Self, ::ethers_core::abi::AbiError> {
let data = data.as_ref();
if let Ok(decoded)
= <::std::string::String as ::ethers_core::abi::AbiDecode>::decode(
data,
) {
return Ok(Self::RevertString(decoded));
}
if let Ok(decoded)
= <InvalidShortString as ::ethers_core::abi::AbiDecode>::decode(data) {
return Ok(Self::InvalidShortString(decoded));
}
if let Ok(decoded)
= <StringTooLong as ::ethers_core::abi::AbiDecode>::decode(data) {
return Ok(Self::StringTooLong(decoded));
}
Err(::ethers_core::abi::Error::InvalidData.into())
}
}
impl ::ethers_core::abi::AbiEncode for ERC721VotesErrors {
fn encode(self) -> ::std::vec::Vec<u8> {
match self {
Self::InvalidShortString(element) => {
::ethers_core::abi::AbiEncode::encode(element)
}
Self::StringTooLong(element) => {
::ethers_core::abi::AbiEncode::encode(element)
}
Self::RevertString(s) => ::ethers_core::abi::AbiEncode::encode(s),
}
}
}
impl ::ethers_contract::ContractRevert for ERC721VotesErrors {
fn valid_selector(selector: [u8; 4]) -> bool {
match selector {
[0x08, 0xc3, 0x79, 0xa0] => true,
_ if selector
== <InvalidShortString as ::ethers_contract::EthError>::selector() => {
true
}
_ if selector
== <StringTooLong as ::ethers_contract::EthError>::selector() => true,
_ => false,
}
}
}
impl ::core::fmt::Display for ERC721VotesErrors {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self {
Self::InvalidShortString(element) => {
::core::fmt::Display::fmt(element, f)
}
Self::StringTooLong(element) => ::core::fmt::Display::fmt(element, f),
Self::RevertString(s) => ::core::fmt::Display::fmt(s, f),
}
}
}
impl ::core::convert::From<::std::string::String> for ERC721VotesErrors {
fn from(value: String) -> Self {
Self::RevertString(value)
}
}
impl ::core::convert::From<InvalidShortString> for ERC721VotesErrors {
fn from(value: InvalidShortString) -> Self {
Self::InvalidShortString(value)
}
}
impl ::core::convert::From<StringTooLong> for ERC721VotesErrors {
fn from(value: StringTooLong) -> Self {
Self::StringTooLong(value)
}
}
#[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 approved: ::ethers_core::types::Address,
#[ethevent(indexed)]
pub token_id: ::ethers_core::types::U256,
}
#[derive(
Clone,
::ethers_contract::EthEvent,
::ethers_contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethevent(name = "ApprovalForAll", abi = "ApprovalForAll(address,address,bool)")]
pub struct ApprovalForAllFilter {
#[ethevent(indexed)]
pub owner: ::ethers_core::types::Address,
#[ethevent(indexed)]
pub operator: ::ethers_core::types::Address,
pub approved: bool,
}
#[derive(
Clone,
::ethers_contract::EthEvent,
::ethers_contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethevent(
name = "DelegateChanged",
abi = "DelegateChanged(address,address,address)"
)]
pub struct DelegateChangedFilter {
#[ethevent(indexed)]
pub delegator: ::ethers_core::types::Address,
#[ethevent(indexed)]
pub from_delegate: ::ethers_core::types::Address,
#[ethevent(indexed)]
pub to_delegate: ::ethers_core::types::Address,
}
#[derive(
Clone,
::ethers_contract::EthEvent,
::ethers_contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethevent(
name = "DelegateVotesChanged",
abi = "DelegateVotesChanged(address,uint256,uint256)"
)]
pub struct DelegateVotesChangedFilter {
#[ethevent(indexed)]
pub delegate: ::ethers_core::types::Address,
pub previous_balance: ::ethers_core::types::U256,
pub new_balance: ::ethers_core::types::U256,
}
#[derive(
Clone,
::ethers_contract::EthEvent,
::ethers_contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethevent(name = "EIP712DomainChanged", abi = "EIP712DomainChanged()")]
pub struct Eip712DomainChangedFilter;
#[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,
#[ethevent(indexed)]
pub token_id: ::ethers_core::types::U256,
}
///Container type for all of the contract's events
#[derive(Clone, ::ethers_contract::EthAbiType, Debug, PartialEq, Eq, Hash)]
pub enum ERC721VotesEvents {
ApprovalFilter(ApprovalFilter),
ApprovalForAllFilter(ApprovalForAllFilter),
DelegateChangedFilter(DelegateChangedFilter),
DelegateVotesChangedFilter(DelegateVotesChangedFilter),
Eip712DomainChangedFilter(Eip712DomainChangedFilter),
TransferFilter(TransferFilter),
}
impl ::ethers_contract::EthLogDecode for ERC721VotesEvents {
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(ERC721VotesEvents::ApprovalFilter(decoded));
}
if let Ok(decoded) = ApprovalForAllFilter::decode_log(log) {
return Ok(ERC721VotesEvents::ApprovalForAllFilter(decoded));
}
if let Ok(decoded) = DelegateChangedFilter::decode_log(log) {
return Ok(ERC721VotesEvents::DelegateChangedFilter(decoded));
}
if let Ok(decoded) = DelegateVotesChangedFilter::decode_log(log) {
return Ok(ERC721VotesEvents::DelegateVotesChangedFilter(decoded));
}
if let Ok(decoded) = Eip712DomainChangedFilter::decode_log(log) {
return Ok(ERC721VotesEvents::Eip712DomainChangedFilter(decoded));
}
if let Ok(decoded) = TransferFilter::decode_log(log) {
return Ok(ERC721VotesEvents::TransferFilter(decoded));
}
Err(::ethers_core::abi::Error::InvalidData)
}
}
impl ::core::fmt::Display for ERC721VotesEvents {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self {
Self::ApprovalFilter(element) => ::core::fmt::Display::fmt(element, f),
Self::ApprovalForAllFilter(element) => {
::core::fmt::Display::fmt(element, f)
}
Self::DelegateChangedFilter(element) => {
::core::fmt::Display::fmt(element, f)
}
Self::DelegateVotesChangedFilter(element) => {
::core::fmt::Display::fmt(element, f)
}
Self::Eip712DomainChangedFilter(element) => {
::core::fmt::Display::fmt(element, f)
}
Self::TransferFilter(element) => ::core::fmt::Display::fmt(element, f),
}
}
}
impl ::core::convert::From<ApprovalFilter> for ERC721VotesEvents {
fn from(value: ApprovalFilter) -> Self {
Self::ApprovalFilter(value)
}
}
impl ::core::convert::From<ApprovalForAllFilter> for ERC721VotesEvents {
fn from(value: ApprovalForAllFilter) -> Self {
Self::ApprovalForAllFilter(value)
}
}
impl ::core::convert::From<DelegateChangedFilter> for ERC721VotesEvents {
fn from(value: DelegateChangedFilter) -> Self {
Self::DelegateChangedFilter(value)
}
}
impl ::core::convert::From<DelegateVotesChangedFilter> for ERC721VotesEvents {
fn from(value: DelegateVotesChangedFilter) -> Self {
Self::DelegateVotesChangedFilter(value)
}
}
impl ::core::convert::From<Eip712DomainChangedFilter> for ERC721VotesEvents {
fn from(value: Eip712DomainChangedFilter) -> Self {
Self::Eip712DomainChangedFilter(value)
}
}
impl ::core::convert::From<TransferFilter> for ERC721VotesEvents {
fn from(value: TransferFilter) -> Self {
Self::TransferFilter(value)
}
}
///Container type for all input parameters for the `CLOCK_MODE` function with signature `CLOCK_MODE()` and selector `0x4bf5d7e9`
#[derive(
Clone,
::ethers_contract::EthCall,
::ethers_contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethcall(name = "CLOCK_MODE", abi = "CLOCK_MODE()")]
pub struct ClockModeCall;
///Container type for all input parameters for the `DOMAIN_SEPARATOR` function with signature `DOMAIN_SEPARATOR()` and selector `0x3644e515`
#[derive(
Clone,
::ethers_contract::EthCall,
::ethers_contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethcall(name = "DOMAIN_SEPARATOR", abi = "DOMAIN_SEPARATOR()")]
pub struct DomainSeparatorCall;
///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 to: ::ethers_core::types::Address,
pub token_id: ::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 owner: ::ethers_core::types::Address,
}
///Container type for all input parameters for the `clock` function with signature `clock()` and selector `0x91ddadf4`
#[derive(
Clone,
::ethers_contract::EthCall,
::ethers_contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethcall(name = "clock", abi = "clock()")]
pub struct ClockCall;
///Container type for all input parameters for the `delegate` function with signature `delegate(address)` and selector `0x5c19a95c`
#[derive(
Clone,
::ethers_contract::EthCall,
::ethers_contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethcall(name = "delegate", abi = "delegate(address)")]
pub struct DelegateCall {
pub delegatee: ::ethers_core::types::Address,
}
///Container type for all input parameters for the `delegateBySig` function with signature `delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)` and selector `0xc3cda520`
#[derive(
Clone,
::ethers_contract::EthCall,
::ethers_contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethcall(
name = "delegateBySig",
abi = "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)"
)]
pub struct DelegateBySigCall {
pub delegatee: ::ethers_core::types::Address,
pub nonce: ::ethers_core::types::U256,
pub expiry: ::ethers_core::types::U256,
pub v: u8,
pub r: [u8; 32],
pub s: [u8; 32],
}
///Container type for all input parameters for the `delegates` function with signature `delegates(address)` and selector `0x587cde1e`
#[derive(
Clone,
::ethers_contract::EthCall,
::ethers_contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethcall(name = "delegates", abi = "delegates(address)")]
pub struct DelegatesCall {
pub account: ::ethers_core::types::Address,
}
///Container type for all input parameters for the `eip712Domain` function with signature `eip712Domain()` and selector `0x84b0196e`
#[derive(
Clone,
::ethers_contract::EthCall,
::ethers_contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethcall(name = "eip712Domain", abi = "eip712Domain()")]
pub struct Eip712DomainCall;
///Container type for all input parameters for the `getApproved` function with signature `getApproved(uint256)` and selector `0x081812fc`
#[derive(
Clone,
::ethers_contract::EthCall,
::ethers_contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethcall(name = "getApproved", abi = "getApproved(uint256)")]
pub struct GetApprovedCall {
pub token_id: ::ethers_core::types::U256,
}
///Container type for all input parameters for the `getPastTotalSupply` function with signature `getPastTotalSupply(uint256)` and selector `0x8e539e8c`
#[derive(
Clone,
::ethers_contract::EthCall,
::ethers_contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethcall(name = "getPastTotalSupply", abi = "getPastTotalSupply(uint256)")]
pub struct GetPastTotalSupplyCall {
pub timepoint: ::ethers_core::types::U256,
}
///Container type for all input parameters for the `getPastVotes` function with signature `getPastVotes(address,uint256)` and selector `0x3a46b1a8`
#[derive(
Clone,
::ethers_contract::EthCall,
::ethers_contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethcall(name = "getPastVotes", abi = "getPastVotes(address,uint256)")]
pub struct GetPastVotesCall {
pub account: ::ethers_core::types::Address,
pub timepoint: ::ethers_core::types::U256,
}
///Container type for all input parameters for the `getVotes` function with signature `getVotes(address)` and selector `0x9ab24eb0`
#[derive(
Clone,
::ethers_contract::EthCall,
::ethers_contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethcall(name = "getVotes", abi = "getVotes(address)")]
pub struct GetVotesCall {
pub account: ::ethers_core::types::Address,
}
///Container type for all input parameters for the `isApprovedForAll` function with signature `isApprovedForAll(address,address)` and selector `0xe985e9c5`
#[derive(
Clone,
::ethers_contract::EthCall,
::ethers_contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethcall(name = "isApprovedForAll", abi = "isApprovedForAll(address,address)")]
pub struct IsApprovedForAllCall {
pub owner: ::ethers_core::types::Address,
pub operator: ::ethers_core::types::Address,
}
///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 `nonces` function with signature `nonces(address)` and selector `0x7ecebe00`
#[derive(
Clone,
::ethers_contract::EthCall,
::ethers_contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethcall(name = "nonces", abi = "nonces(address)")]
pub struct NoncesCall {
pub owner: ::ethers_core::types::Address,
}
///Container type for all input parameters for the `ownerOf` function with signature `ownerOf(uint256)` and selector `0x6352211e`
#[derive(
Clone,
::ethers_contract::EthCall,
::ethers_contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethcall(name = "ownerOf", abi = "ownerOf(uint256)")]
pub struct OwnerOfCall {
pub token_id: ::ethers_core::types::U256,
}
///Container type for all input parameters for the `safeTransferFrom` function with signature `safeTransferFrom(address,address,uint256)` and selector `0x42842e0e`
#[derive(
Clone,
::ethers_contract::EthCall,
::ethers_contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethcall(
name = "safeTransferFrom",
abi = "safeTransferFrom(address,address,uint256)"
)]
pub struct SafeTransferFromCall {
pub from: ::ethers_core::types::Address,
pub to: ::ethers_core::types::Address,
pub token_id: ::ethers_core::types::U256,
}
///Container type for all input parameters for the `safeTransferFrom` function with signature `safeTransferFrom(address,address,uint256,bytes)` and selector `0xb88d4fde`
#[derive(
Clone,
::ethers_contract::EthCall,
::ethers_contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethcall(
name = "safeTransferFrom",
abi = "safeTransferFrom(address,address,uint256,bytes)"
)]
pub struct SafeTransferFromWithFromAndToAndDataCall {
pub from: ::ethers_core::types::Address,
pub to: ::ethers_core::types::Address,
pub token_id: ::ethers_core::types::U256,
pub data: ::ethers_core::types::Bytes,
}
///Container type for all input parameters for the `setApprovalForAll` function with signature `setApprovalForAll(address,bool)` and selector `0xa22cb465`
#[derive(
Clone,
::ethers_contract::EthCall,
::ethers_contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethcall(name = "setApprovalForAll", abi = "setApprovalForAll(address,bool)")]
pub struct SetApprovalForAllCall {
pub operator: ::ethers_core::types::Address,
pub approved: bool,
}
///Container type for all input parameters for the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7`
#[derive(
Clone,
::ethers_contract::EthCall,
::ethers_contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethcall(name = "supportsInterface", abi = "supportsInterface(bytes4)")]
pub struct SupportsInterfaceCall {
pub interface_id: [u8; 4],
}
///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 `tokenURI` function with signature `tokenURI(uint256)` and selector `0xc87b56dd`
#[derive(
Clone,
::ethers_contract::EthCall,
::ethers_contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethcall(name = "tokenURI", abi = "tokenURI(uint256)")]
pub struct TokenURICall {
pub token_id: ::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 token_id: ::ethers_core::types::U256,
}
///Container type for all of the contract's call
#[derive(Clone, ::ethers_contract::EthAbiType, Debug, PartialEq, Eq, Hash)]
pub enum ERC721VotesCalls {
ClockMode(ClockModeCall),
DomainSeparator(DomainSeparatorCall),
Approve(ApproveCall),
BalanceOf(BalanceOfCall),
Clock(ClockCall),
Delegate(DelegateCall),
DelegateBySig(DelegateBySigCall),
Delegates(DelegatesCall),
Eip712Domain(Eip712DomainCall),
GetApproved(GetApprovedCall),
GetPastTotalSupply(GetPastTotalSupplyCall),
GetPastVotes(GetPastVotesCall),
GetVotes(GetVotesCall),
IsApprovedForAll(IsApprovedForAllCall),
Name(NameCall),
Nonces(NoncesCall),
OwnerOf(OwnerOfCall),
SafeTransferFrom(SafeTransferFromCall),
SafeTransferFromWithFromAndToAndData(SafeTransferFromWithFromAndToAndDataCall),
SetApprovalForAll(SetApprovalForAllCall),
SupportsInterface(SupportsInterfaceCall),
Symbol(SymbolCall),
TokenURI(TokenURICall),
TransferFrom(TransferFromCall),
}
impl ::ethers_core::abi::AbiDecode for ERC721VotesCalls {
fn decode(
data: impl AsRef<[u8]>,
) -> ::core::result::Result<Self, ::ethers_core::abi::AbiError> {
let data = data.as_ref();
if let Ok(decoded)
= <ClockModeCall as ::ethers_core::abi::AbiDecode>::decode(data) {
return Ok(Self::ClockMode(decoded));
}
if let Ok(decoded)
= <DomainSeparatorCall as ::ethers_core::abi::AbiDecode>::decode(data) {
return Ok(Self::DomainSeparator(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)
= <ClockCall as ::ethers_core::abi::AbiDecode>::decode(data) {
return Ok(Self::Clock(decoded));
}
if let Ok(decoded)
= <DelegateCall as ::ethers_core::abi::AbiDecode>::decode(data) {
return Ok(Self::Delegate(decoded));
}
if let Ok(decoded)
= <DelegateBySigCall as ::ethers_core::abi::AbiDecode>::decode(data) {
return Ok(Self::DelegateBySig(decoded));
}
if let Ok(decoded)
= <DelegatesCall as ::ethers_core::abi::AbiDecode>::decode(data) {
return Ok(Self::Delegates(decoded));
}
if let Ok(decoded)
= <Eip712DomainCall as ::ethers_core::abi::AbiDecode>::decode(data) {
return Ok(Self::Eip712Domain(decoded));
}
if let Ok(decoded)
= <GetApprovedCall as ::ethers_core::abi::AbiDecode>::decode(data) {
return Ok(Self::GetApproved(decoded));
}
if let Ok(decoded)
= <GetPastTotalSupplyCall as ::ethers_core::abi::AbiDecode>::decode(
data,
) {
return Ok(Self::GetPastTotalSupply(decoded));
}
if let Ok(decoded)
= <GetPastVotesCall as ::ethers_core::abi::AbiDecode>::decode(data) {
return Ok(Self::GetPastVotes(decoded));
}
if let Ok(decoded)
= <GetVotesCall as ::ethers_core::abi::AbiDecode>::decode(data) {
return Ok(Self::GetVotes(decoded));
}
if let Ok(decoded)
= <IsApprovedForAllCall as ::ethers_core::abi::AbiDecode>::decode(data) {
return Ok(Self::IsApprovedForAll(decoded));
}
if let Ok(decoded)
= <NameCall as ::ethers_core::abi::AbiDecode>::decode(data) {
return Ok(Self::Name(decoded));
}
if let Ok(decoded)
= <NoncesCall as ::ethers_core::abi::AbiDecode>::decode(data) {
return Ok(Self::Nonces(decoded));
}
if let Ok(decoded)
= <OwnerOfCall as ::ethers_core::abi::AbiDecode>::decode(data) {
return Ok(Self::OwnerOf(decoded));
}
if let Ok(decoded)
= <SafeTransferFromCall as ::ethers_core::abi::AbiDecode>::decode(data) {
return Ok(Self::SafeTransferFrom(decoded));
}
if let Ok(decoded)
= <SafeTransferFromWithFromAndToAndDataCall as ::ethers_core::abi::AbiDecode>::decode(
data,
) {
return Ok(Self::SafeTransferFromWithFromAndToAndData(decoded));
}
if let Ok(decoded)
= <SetApprovalForAllCall as ::ethers_core::abi::AbiDecode>::decode(
data,
) {
return Ok(Self::SetApprovalForAll(decoded));
}
if let Ok(decoded)
= <SupportsInterfaceCall as ::ethers_core::abi::AbiDecode>::decode(
data,
) {
return Ok(Self::SupportsInterface(decoded));
}
if let Ok(decoded)
= <SymbolCall as ::ethers_core::abi::AbiDecode>::decode(data) {
return Ok(Self::Symbol(decoded));
}
if let Ok(decoded)
= <TokenURICall as ::ethers_core::abi::AbiDecode>::decode(data) {
return Ok(Self::TokenURI(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 ERC721VotesCalls {
fn encode(self) -> Vec<u8> {
match self {
Self::ClockMode(element) => {
::ethers_core::abi::AbiEncode::encode(element)
}
Self::DomainSeparator(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::Clock(element) => ::ethers_core::abi::AbiEncode::encode(element),
Self::Delegate(element) => ::ethers_core::abi::AbiEncode::encode(element),
Self::DelegateBySig(element) => {
::ethers_core::abi::AbiEncode::encode(element)
}
Self::Delegates(element) => {
::ethers_core::abi::AbiEncode::encode(element)
}
Self::Eip712Domain(element) => {
::ethers_core::abi::AbiEncode::encode(element)
}
Self::GetApproved(element) => {
::ethers_core::abi::AbiEncode::encode(element)
}
Self::GetPastTotalSupply(element) => {
::ethers_core::abi::AbiEncode::encode(element)
}
Self::GetPastVotes(element) => {
::ethers_core::abi::AbiEncode::encode(element)
}
Self::GetVotes(element) => ::ethers_core::abi::AbiEncode::encode(element),
Self::IsApprovedForAll(element) => {
::ethers_core::abi::AbiEncode::encode(element)
}
Self::Name(element) => ::ethers_core::abi::AbiEncode::encode(element),
Self::Nonces(element) => ::ethers_core::abi::AbiEncode::encode(element),
Self::OwnerOf(element) => ::ethers_core::abi::AbiEncode::encode(element),
Self::SafeTransferFrom(element) => {
::ethers_core::abi::AbiEncode::encode(element)
}
Self::SafeTransferFromWithFromAndToAndData(element) => {
::ethers_core::abi::AbiEncode::encode(element)
}
Self::SetApprovalForAll(element) => {
::ethers_core::abi::AbiEncode::encode(element)
}
Self::SupportsInterface(element) => {
::ethers_core::abi::AbiEncode::encode(element)
}
Self::Symbol(element) => ::ethers_core::abi::AbiEncode::encode(element),
Self::TokenURI(element) => ::ethers_core::abi::AbiEncode::encode(element),
Self::TransferFrom(element) => {
::ethers_core::abi::AbiEncode::encode(element)
}
}
}
}
impl ::core::fmt::Display for ERC721VotesCalls {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
match self {
Self::ClockMode(element) => ::core::fmt::Display::fmt(element, f),
Self::DomainSeparator(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::Clock(element) => ::core::fmt::Display::fmt(element, f),
Self::Delegate(element) => ::core::fmt::Display::fmt(element, f),
Self::DelegateBySig(element) => ::core::fmt::Display::fmt(element, f),
Self::Delegates(element) => ::core::fmt::Display::fmt(element, f),
Self::Eip712Domain(element) => ::core::fmt::Display::fmt(element, f),
Self::GetApproved(element) => ::core::fmt::Display::fmt(element, f),
Self::GetPastTotalSupply(element) => {
::core::fmt::Display::fmt(element, f)
}
Self::GetPastVotes(element) => ::core::fmt::Display::fmt(element, f),
Self::GetVotes(element) => ::core::fmt::Display::fmt(element, f),
Self::IsApprovedForAll(element) => ::core::fmt::Display::fmt(element, f),
Self::Name(element) => ::core::fmt::Display::fmt(element, f),
Self::Nonces(element) => ::core::fmt::Display::fmt(element, f),
Self::OwnerOf(element) => ::core::fmt::Display::fmt(element, f),
Self::SafeTransferFrom(element) => ::core::fmt::Display::fmt(element, f),
Self::SafeTransferFromWithFromAndToAndData(element) => {
::core::fmt::Display::fmt(element, f)
}
Self::SetApprovalForAll(element) => ::core::fmt::Display::fmt(element, f),
Self::SupportsInterface(element) => ::core::fmt::Display::fmt(element, f),
Self::Symbol(element) => ::core::fmt::Display::fmt(element, f),
Self::TokenURI(element) => ::core::fmt::Display::fmt(element, f),
Self::TransferFrom(element) => ::core::fmt::Display::fmt(element, f),
}
}
}
impl ::core::convert::From<ClockModeCall> for ERC721VotesCalls {
fn from(value: ClockModeCall) -> Self {
Self::ClockMode(value)
}
}
impl ::core::convert::From<DomainSeparatorCall> for ERC721VotesCalls {
fn from(value: DomainSeparatorCall) -> Self {
Self::DomainSeparator(value)
}
}
impl ::core::convert::From<ApproveCall> for ERC721VotesCalls {
fn from(value: ApproveCall) -> Self {
Self::Approve(value)
}
}
impl ::core::convert::From<BalanceOfCall> for ERC721VotesCalls {
fn from(value: BalanceOfCall) -> Self {
Self::BalanceOf(value)
}
}
impl ::core::convert::From<ClockCall> for ERC721VotesCalls {
fn from(value: ClockCall) -> Self {
Self::Clock(value)
}
}
impl ::core::convert::From<DelegateCall> for ERC721VotesCalls {
fn from(value: DelegateCall) -> Self {
Self::Delegate(value)
}
}
impl ::core::convert::From<DelegateBySigCall> for ERC721VotesCalls {
fn from(value: DelegateBySigCall) -> Self {
Self::DelegateBySig(value)
}
}
impl ::core::convert::From<DelegatesCall> for ERC721VotesCalls {
fn from(value: DelegatesCall) -> Self {
Self::Delegates(value)
}
}
impl ::core::convert::From<Eip712DomainCall> for ERC721VotesCalls {
fn from(value: Eip712DomainCall) -> Self {
Self::Eip712Domain(value)
}
}
impl ::core::convert::From<GetApprovedCall> for ERC721VotesCalls {
fn from(value: GetApprovedCall) -> Self {
Self::GetApproved(value)
}
}
impl ::core::convert::From<GetPastTotalSupplyCall> for ERC721VotesCalls {
fn from(value: GetPastTotalSupplyCall) -> Self {
Self::GetPastTotalSupply(value)
}
}
impl ::core::convert::From<GetPastVotesCall> for ERC721VotesCalls {
fn from(value: GetPastVotesCall) -> Self {
Self::GetPastVotes(value)
}
}
impl ::core::convert::From<GetVotesCall> for ERC721VotesCalls {
fn from(value: GetVotesCall) -> Self {
Self::GetVotes(value)
}
}
impl ::core::convert::From<IsApprovedForAllCall> for ERC721VotesCalls {
fn from(value: IsApprovedForAllCall) -> Self {
Self::IsApprovedForAll(value)
}
}
impl ::core::convert::From<NameCall> for ERC721VotesCalls {
fn from(value: NameCall) -> Self {
Self::Name(value)
}
}
impl ::core::convert::From<NoncesCall> for ERC721VotesCalls {
fn from(value: NoncesCall) -> Self {
Self::Nonces(value)
}
}
impl ::core::convert::From<OwnerOfCall> for ERC721VotesCalls {
fn from(value: OwnerOfCall) -> Self {
Self::OwnerOf(value)
}
}
impl ::core::convert::From<SafeTransferFromCall> for ERC721VotesCalls {
fn from(value: SafeTransferFromCall) -> Self {
Self::SafeTransferFrom(value)
}
}
impl ::core::convert::From<SafeTransferFromWithFromAndToAndDataCall>
for ERC721VotesCalls {
fn from(value: SafeTransferFromWithFromAndToAndDataCall) -> Self {
Self::SafeTransferFromWithFromAndToAndData(value)
}
}
impl ::core::convert::From<SetApprovalForAllCall> for ERC721VotesCalls {
fn from(value: SetApprovalForAllCall) -> Self {
Self::SetApprovalForAll(value)
}
}
impl ::core::convert::From<SupportsInterfaceCall> for ERC721VotesCalls {
fn from(value: SupportsInterfaceCall) -> Self {
Self::SupportsInterface(value)
}
}
impl ::core::convert::From<SymbolCall> for ERC721VotesCalls {
fn from(value: SymbolCall) -> Self {
Self::Symbol(value)
}
}
impl ::core::convert::From<TokenURICall> for ERC721VotesCalls {
fn from(value: TokenURICall) -> Self {
Self::TokenURI(value)
}
}
impl ::core::convert::From<TransferFromCall> for ERC721VotesCalls {
fn from(value: TransferFromCall) -> Self {
Self::TransferFrom(value)
}
}
///Container type for all return fields from the `CLOCK_MODE` function with signature `CLOCK_MODE()` and selector `0x4bf5d7e9`
#[derive(
Clone,
::ethers_contract::EthAbiType,
::ethers_contract::EthAbiCodec,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
pub struct ClockModeReturn(pub ::std::string::String);
///Container type for all return fields from the `DOMAIN_SEPARATOR` function with signature `DOMAIN_SEPARATOR()` and selector `0x3644e515`
#[derive(
Clone,
::ethers_contract::EthAbiType,
::ethers_contract::EthAbiCodec,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
pub struct DomainSeparatorReturn(pub [u8; 32]);
///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 `clock` function with signature `clock()` and selector `0x91ddadf4`
#[derive(
Clone,
::ethers_contract::EthAbiType,
::ethers_contract::EthAbiCodec,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
pub struct ClockReturn(pub u64);
///Container type for all return fields from the `delegates` function with signature `delegates(address)` and selector `0x587cde1e`
#[derive(
Clone,
::ethers_contract::EthAbiType,
::ethers_contract::EthAbiCodec,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
pub struct DelegatesReturn(pub ::ethers_core::types::Address);
///Container type for all return fields from the `eip712Domain` function with signature `eip712Domain()` and selector `0x84b0196e`
#[derive(
Clone,
::ethers_contract::EthAbiType,
::ethers_contract::EthAbiCodec,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
pub struct Eip712DomainReturn {
pub fields: [u8; 1],
pub name: ::std::string::String,
pub version: ::std::string::String,
pub chain_id: ::ethers_core::types::U256,
pub verifying_contract: ::ethers_core::types::Address,
pub salt: [u8; 32],
pub extensions: ::std::vec::Vec<::ethers_core::types::U256>,
}
///Container type for all return fields from the `getApproved` function with signature `getApproved(uint256)` and selector `0x081812fc`
#[derive(
Clone,
::ethers_contract::EthAbiType,
::ethers_contract::EthAbiCodec,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
pub struct GetApprovedReturn(pub ::ethers_core::types::Address);
///Container type for all return fields from the `getPastTotalSupply` function with signature `getPastTotalSupply(uint256)` and selector `0x8e539e8c`
#[derive(
Clone,
::ethers_contract::EthAbiType,
::ethers_contract::EthAbiCodec,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
pub struct GetPastTotalSupplyReturn(pub ::ethers_core::types::U256);
///Container type for all return fields from the `getPastVotes` function with signature `getPastVotes(address,uint256)` and selector `0x3a46b1a8`
#[derive(
Clone,
::ethers_contract::EthAbiType,
::ethers_contract::EthAbiCodec,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
pub struct GetPastVotesReturn(pub ::ethers_core::types::U256);
///Container type for all return fields from the `getVotes` function with signature `getVotes(address)` and selector `0x9ab24eb0`
#[derive(
Clone,
::ethers_contract::EthAbiType,
::ethers_contract::EthAbiCodec,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
pub struct GetVotesReturn(pub ::ethers_core::types::U256);
///Container type for all return fields from the `isApprovedForAll` function with signature `isApprovedForAll(address,address)` and selector `0xe985e9c5`
#[derive(
Clone,
::ethers_contract::EthAbiType,
::ethers_contract::EthAbiCodec,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
pub struct IsApprovedForAllReturn(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 `nonces` function with signature `nonces(address)` and selector `0x7ecebe00`
#[derive(
Clone,
::ethers_contract::EthAbiType,
::ethers_contract::EthAbiCodec,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
pub struct NoncesReturn(pub ::ethers_core::types::U256);
///Container type for all return fields from the `ownerOf` function with signature `ownerOf(uint256)` and selector `0x6352211e`
#[derive(
Clone,
::ethers_contract::EthAbiType,
::ethers_contract::EthAbiCodec,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
pub struct OwnerOfReturn(pub ::ethers_core::types::Address);
///Container type for all return fields from the `supportsInterface` function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7`
#[derive(
Clone,
::ethers_contract::EthAbiType,
::ethers_contract::EthAbiCodec,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
pub struct SupportsInterfaceReturn(pub bool);
///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 `tokenURI` function with signature `tokenURI(uint256)` and selector `0xc87b56dd`
#[derive(
Clone,
::ethers_contract::EthAbiType,
::ethers_contract::EthAbiCodec,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
pub struct TokenURIReturn(pub ::std::string::String);
}