pub struct OutcomeTokenInstance<P, N = Ethereum> { /* private fields */ }Expand description
A OutcomeToken instance.
Contains type-safe methods for interacting with an on-chain instance of the
OutcomeToken contract located at a given address, using a given
provider P.
If the contract bytecode is available (see the sol!
documentation on how to provide it), the deploy and deploy_builder methods can
be used to deploy a new instance of the contract.
See the module-level documentation for all the available methods.
Implementations§
Source§impl<P: Provider<N>, N: Network> OutcomeTokenInstance<P, N>
Instantiation and getters/setters.
impl<P: Provider<N>, N: Network> OutcomeTokenInstance<P, N>
Instantiation and getters/setters.
Sourcepub const fn new(address: Address, __provider: P) -> Self
pub const fn new(address: Address, __provider: P) -> Self
Creates a new wrapper around an on-chain OutcomeToken contract instance.
See the wrapper’s documentation for more details.
Sourcepub fn set_address(&mut self, address: Address)
pub fn set_address(&mut self, address: Address)
Sets the address.
Source§impl<P: Clone, N> OutcomeTokenInstance<&P, N>
impl<P: Clone, N> OutcomeTokenInstance<&P, N>
Sourcepub fn with_cloned_provider(self) -> OutcomeTokenInstance<P, N>
pub fn with_cloned_provider(self) -> OutcomeTokenInstance<P, N>
Clones the provider and returns a new instance with the cloned provider.
Source§impl<P: Provider<N>, N: Network> OutcomeTokenInstance<P, N>
Function calls.
impl<P: Provider<N>, N: Network> OutcomeTokenInstance<P, N>
Function calls.
Sourcepub fn call_builder<C: SolCall>(&self, call: &C) -> SolCallBuilder<&P, C, N>
pub fn call_builder<C: SolCall>(&self, call: &C) -> SolCallBuilder<&P, C, N>
Creates a new call builder using this contract instance’s provider and address.
Note that the call can be any function call, not just those defined in this contract. Prefer using the other methods for building type-safe contract calls.
Sourcepub fn DEFAULT_ADMIN_ROLE(
&self,
) -> SolCallBuilder<&P, DEFAULT_ADMIN_ROLECall, N>
pub fn DEFAULT_ADMIN_ROLE( &self, ) -> SolCallBuilder<&P, DEFAULT_ADMIN_ROLECall, N>
Creates a new call builder for the [DEFAULT_ADMIN_ROLE] function.
Sourcepub fn ESCROW_ROLE(&self) -> SolCallBuilder<&P, ESCROW_ROLECall, N>
pub fn ESCROW_ROLE(&self) -> SolCallBuilder<&P, ESCROW_ROLECall, N>
Creates a new call builder for the [ESCROW_ROLE] function.
Sourcepub fn MINTER_ROLE(&self) -> SolCallBuilder<&P, MINTER_ROLECall, N>
pub fn MINTER_ROLE(&self) -> SolCallBuilder<&P, MINTER_ROLECall, N>
Creates a new call builder for the [MINTER_ROLE] function.
Sourcepub fn balanceOf(
&self,
account: Address,
id: U256,
) -> SolCallBuilder<&P, balanceOfCall, N>
pub fn balanceOf( &self, account: Address, id: U256, ) -> SolCallBuilder<&P, balanceOfCall, N>
Creates a new call builder for the [balanceOf] function.
Sourcepub fn balanceOfBatch(
&self,
accounts: Vec<Address>,
ids: Vec<U256>,
) -> SolCallBuilder<&P, balanceOfBatchCall, N>
pub fn balanceOfBatch( &self, accounts: Vec<Address>, ids: Vec<U256>, ) -> SolCallBuilder<&P, balanceOfBatchCall, N>
Creates a new call builder for the [balanceOfBatch] function.
Sourcepub fn burnEscrow(
&self,
from: Address,
tokenId: U256,
amount: U256,
) -> SolCallBuilder<&P, burnEscrowCall, N>
pub fn burnEscrow( &self, from: Address, tokenId: U256, amount: U256, ) -> SolCallBuilder<&P, burnEscrowCall, N>
Creates a new call builder for the [burnEscrow] function.
Sourcepub fn burnPair(
&self,
from: Address,
marketId: U256,
amount: U256,
) -> SolCallBuilder<&P, burnPairCall, N>
pub fn burnPair( &self, from: Address, marketId: U256, amount: U256, ) -> SolCallBuilder<&P, burnPairCall, N>
Creates a new call builder for the [burnPair] function.
Sourcepub fn getRoleAdmin(
&self,
role: FixedBytes<32>,
) -> SolCallBuilder<&P, getRoleAdminCall, N>
pub fn getRoleAdmin( &self, role: FixedBytes<32>, ) -> SolCallBuilder<&P, getRoleAdminCall, N>
Creates a new call builder for the [getRoleAdmin] function.
Sourcepub fn grantRole(
&self,
role: FixedBytes<32>,
account: Address,
) -> SolCallBuilder<&P, grantRoleCall, N>
pub fn grantRole( &self, role: FixedBytes<32>, account: Address, ) -> SolCallBuilder<&P, grantRoleCall, N>
Creates a new call builder for the [grantRole] function.
Sourcepub fn hasRole(
&self,
role: FixedBytes<32>,
account: Address,
) -> SolCallBuilder<&P, hasRoleCall, N>
pub fn hasRole( &self, role: FixedBytes<32>, account: Address, ) -> SolCallBuilder<&P, hasRoleCall, N>
Creates a new call builder for the [hasRole] function.
Sourcepub fn isApprovedForAll(
&self,
account: Address,
operator: Address,
) -> SolCallBuilder<&P, isApprovedForAllCall, N>
pub fn isApprovedForAll( &self, account: Address, operator: Address, ) -> SolCallBuilder<&P, isApprovedForAllCall, N>
Creates a new call builder for the [isApprovedForAll] function.
Sourcepub fn mintPair(
&self,
to: Address,
marketId: U256,
amount: U256,
) -> SolCallBuilder<&P, mintPairCall, N>
pub fn mintPair( &self, to: Address, marketId: U256, amount: U256, ) -> SolCallBuilder<&P, mintPairCall, N>
Creates a new call builder for the [mintPair] function.
Sourcepub fn mintSingle(
&self,
to: Address,
marketId: U256,
amount: U256,
isYes: bool,
) -> SolCallBuilder<&P, mintSingleCall, N>
pub fn mintSingle( &self, to: Address, marketId: U256, amount: U256, isYes: bool, ) -> SolCallBuilder<&P, mintSingleCall, N>
Creates a new call builder for the [mintSingle] function.
Sourcepub fn noTokenId(&self, marketId: U256) -> SolCallBuilder<&P, noTokenIdCall, N>
pub fn noTokenId(&self, marketId: U256) -> SolCallBuilder<&P, noTokenIdCall, N>
Creates a new call builder for the [noTokenId] function.
Sourcepub fn redeem(
&self,
from: Address,
marketId: U256,
amount: U256,
winningOutcome: bool,
) -> SolCallBuilder<&P, redeemCall, N>
pub fn redeem( &self, from: Address, marketId: U256, amount: U256, winningOutcome: bool, ) -> SolCallBuilder<&P, redeemCall, N>
Creates a new call builder for the [redeem] function.
Sourcepub fn renounceRole(
&self,
role: FixedBytes<32>,
callerConfirmation: Address,
) -> SolCallBuilder<&P, renounceRoleCall, N>
pub fn renounceRole( &self, role: FixedBytes<32>, callerConfirmation: Address, ) -> SolCallBuilder<&P, renounceRoleCall, N>
Creates a new call builder for the [renounceRole] function.
Sourcepub fn revokeRole(
&self,
role: FixedBytes<32>,
account: Address,
) -> SolCallBuilder<&P, revokeRoleCall, N>
pub fn revokeRole( &self, role: FixedBytes<32>, account: Address, ) -> SolCallBuilder<&P, revokeRoleCall, N>
Creates a new call builder for the [revokeRole] function.
Sourcepub fn safeBatchTransferFrom(
&self,
from: Address,
to: Address,
ids: Vec<U256>,
values: Vec<U256>,
data: Bytes,
) -> SolCallBuilder<&P, safeBatchTransferFromCall, N>
pub fn safeBatchTransferFrom( &self, from: Address, to: Address, ids: Vec<U256>, values: Vec<U256>, data: Bytes, ) -> SolCallBuilder<&P, safeBatchTransferFromCall, N>
Creates a new call builder for the [safeBatchTransferFrom] function.
Sourcepub fn safeTransferFrom(
&self,
from: Address,
to: Address,
id: U256,
value: U256,
data: Bytes,
) -> SolCallBuilder<&P, safeTransferFromCall, N>
pub fn safeTransferFrom( &self, from: Address, to: Address, id: U256, value: U256, data: Bytes, ) -> SolCallBuilder<&P, safeTransferFromCall, N>
Creates a new call builder for the [safeTransferFrom] function.
Sourcepub fn setApprovalForAll(
&self,
operator: Address,
approved: bool,
) -> SolCallBuilder<&P, setApprovalForAllCall, N>
pub fn setApprovalForAll( &self, operator: Address, approved: bool, ) -> SolCallBuilder<&P, setApprovalForAllCall, N>
Creates a new call builder for the [setApprovalForAll] function.
Sourcepub fn supportsInterface(
&self,
interfaceId: FixedBytes<4>,
) -> SolCallBuilder<&P, supportsInterfaceCall, N>
pub fn supportsInterface( &self, interfaceId: FixedBytes<4>, ) -> SolCallBuilder<&P, supportsInterfaceCall, N>
Creates a new call builder for the [supportsInterface] function.
Sourcepub fn uri(&self, _0: U256) -> SolCallBuilder<&P, uriCall, N>
pub fn uri(&self, _0: U256) -> SolCallBuilder<&P, uriCall, N>
Creates a new call builder for the [uri] function.
Sourcepub fn yesTokenId(
&self,
marketId: U256,
) -> SolCallBuilder<&P, yesTokenIdCall, N>
pub fn yesTokenId( &self, marketId: U256, ) -> SolCallBuilder<&P, yesTokenIdCall, N>
Creates a new call builder for the [yesTokenId] function.
Source§impl<P: Provider<N>, N: Network> OutcomeTokenInstance<P, N>
Event filters.
impl<P: Provider<N>, N: Network> OutcomeTokenInstance<P, N>
Event filters.
Sourcepub fn event_filter<E: SolEvent>(&self) -> Event<&P, E, N>
pub fn event_filter<E: SolEvent>(&self) -> Event<&P, E, N>
Creates a new event filter using this contract instance’s provider and address.
Note that the type can be any event, not just those defined in this contract. Prefer using the other methods for building type-safe event filters.
Sourcepub fn ApprovalForAll_filter(&self) -> Event<&P, ApprovalForAll, N>
pub fn ApprovalForAll_filter(&self) -> Event<&P, ApprovalForAll, N>
Creates a new event filter for the ApprovalForAll event.
Sourcepub fn PairBurned_filter(&self) -> Event<&P, PairBurned, N>
pub fn PairBurned_filter(&self) -> Event<&P, PairBurned, N>
Creates a new event filter for the PairBurned event.
Sourcepub fn PairMinted_filter(&self) -> Event<&P, PairMinted, N>
pub fn PairMinted_filter(&self) -> Event<&P, PairMinted, N>
Creates a new event filter for the PairMinted event.
Sourcepub fn Redeemed_filter(&self) -> Event<&P, Redeemed, N>
pub fn Redeemed_filter(&self) -> Event<&P, Redeemed, N>
Creates a new event filter for the Redeemed event.
Sourcepub fn RoleAdminChanged_filter(&self) -> Event<&P, RoleAdminChanged, N>
pub fn RoleAdminChanged_filter(&self) -> Event<&P, RoleAdminChanged, N>
Creates a new event filter for the RoleAdminChanged event.
Sourcepub fn RoleGranted_filter(&self) -> Event<&P, RoleGranted, N>
pub fn RoleGranted_filter(&self) -> Event<&P, RoleGranted, N>
Creates a new event filter for the RoleGranted event.
Sourcepub fn RoleRevoked_filter(&self) -> Event<&P, RoleRevoked, N>
pub fn RoleRevoked_filter(&self) -> Event<&P, RoleRevoked, N>
Creates a new event filter for the RoleRevoked event.
Sourcepub fn TransferBatch_filter(&self) -> Event<&P, TransferBatch, N>
pub fn TransferBatch_filter(&self) -> Event<&P, TransferBatch, N>
Creates a new event filter for the TransferBatch event.
Sourcepub fn TransferSingle_filter(&self) -> Event<&P, TransferSingle, N>
pub fn TransferSingle_filter(&self) -> Event<&P, TransferSingle, N>
Creates a new event filter for the TransferSingle event.
Trait Implementations§
Source§impl<P: Clone, N: Clone> Clone for OutcomeTokenInstance<P, N>
impl<P: Clone, N: Clone> Clone for OutcomeTokenInstance<P, N>
Source§fn clone(&self) -> OutcomeTokenInstance<P, N>
fn clone(&self) -> OutcomeTokenInstance<P, N>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<P, N> Freeze for OutcomeTokenInstance<P, N>where
P: Freeze,
impl<P, N> RefUnwindSafe for OutcomeTokenInstance<P, N>where
P: RefUnwindSafe,
N: RefUnwindSafe,
impl<P, N> Send for OutcomeTokenInstance<P, N>
impl<P, N> Sync for OutcomeTokenInstance<P, N>
impl<P, N> Unpin for OutcomeTokenInstance<P, N>
impl<P, N> UnsafeUnpin for OutcomeTokenInstance<P, N>where
P: UnsafeUnpin,
impl<P, N> UnwindSafe for OutcomeTokenInstance<P, N>where
P: UnwindSafe,
N: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more