pub struct PauseModuleImpl<T, BigInt, BigUint>
where for<'b> BigUint: BigUintApi + 'static + AddAssign<&'b BigUint> + SubAssign<&'b BigUint> + MulAssign<&'b BigUint> + DivAssign<&'b BigUint> + RemAssign<&'b BigUint> + BitAndAssign<&'b BigUint> + BitOrAssign<&'b BigUint> + BitXorAssign<&'b BigUint>, for<'a, 'b> &'a BigUint: Add<&'b BigUint, Output = BigUint> + Sub<&'b BigUint, Output = BigUint> + Mul<&'b BigUint, Output = BigUint> + Div<&'b BigUint, Output = BigUint> + Rem<&'b BigUint, Output = BigUint> + BitAnd<&'b BigUint, Output = BigUint> + BitOr<&'b BigUint, Output = BigUint> + BitXor<&'b BigUint, Output = BigUint> + Shr<usize, Output = BigUint> + Shl<usize, Output = BigUint>, for<'b> BigInt: BigIntApi<BigUint> + 'static + AddAssign<&'b BigInt> + SubAssign<&'b BigInt> + MulAssign<&'b BigInt> + DivAssign<&'b BigInt> + RemAssign<&'b BigInt>, for<'a, 'b> &'a BigInt: Add<&'b BigInt, Output = BigInt> + Sub<&'b BigInt, Output = BigInt> + Mul<&'b BigInt, Output = BigInt> + Div<&'b BigInt, Output = BigInt> + Rem<&'b BigInt, Output = BigInt>, T: ContractHookApi<BigInt, BigUint> + ErrorApi + CallValueApi<BigUint> + SendApi<BigUint> + EndpointArgumentApi + EndpointFinishApi + StorageReadApi + StorageWriteApi + LogApi + Clone + 'static,
{ /* private fields */ }

Implementations§

source§

impl<T, BigInt, BigUint> PauseModuleImpl<T, BigInt, BigUint>
where for<'b> BigUint: BigUintApi + 'static + AddAssign<&'b BigUint> + SubAssign<&'b BigUint> + MulAssign<&'b BigUint> + DivAssign<&'b BigUint> + RemAssign<&'b BigUint> + BitAndAssign<&'b BigUint> + BitOrAssign<&'b BigUint> + BitXorAssign<&'b BigUint>, for<'a, 'b> &'a BigUint: Add<&'b BigUint, Output = BigUint> + Sub<&'b BigUint, Output = BigUint> + Mul<&'b BigUint, Output = BigUint> + Div<&'b BigUint, Output = BigUint> + Rem<&'b BigUint, Output = BigUint> + BitAnd<&'b BigUint, Output = BigUint> + BitOr<&'b BigUint, Output = BigUint> + BitXor<&'b BigUint, Output = BigUint> + Shr<usize, Output = BigUint> + Shl<usize, Output = BigUint>, for<'b> BigInt: BigIntApi<BigUint> + 'static + AddAssign<&'b BigInt> + SubAssign<&'b BigInt> + MulAssign<&'b BigInt> + DivAssign<&'b BigInt> + RemAssign<&'b BigInt>, for<'a, 'b> &'a BigInt: Add<&'b BigInt, Output = BigInt> + Sub<&'b BigInt, Output = BigInt> + Mul<&'b BigInt, Output = BigInt> + Div<&'b BigInt, Output = BigInt> + Rem<&'b BigInt, Output = BigInt>, T: ContractHookApi<BigInt, BigUint> + ErrorApi + CallValueApi<BigUint> + SendApi<BigUint> + EndpointArgumentApi + EndpointFinishApi + StorageReadApi + StorageWriteApi + LogApi + Clone + 'static,

source

pub fn new(api: T) -> Self

Trait Implementations§

source§

impl<T, BigInt, BigUint> CallableContract<T> for PauseModuleImpl<T, BigInt, BigUint>
where for<'b> BigUint: BigUintApi + 'static + AddAssign<&'b BigUint> + SubAssign<&'b BigUint> + MulAssign<&'b BigUint> + DivAssign<&'b BigUint> + RemAssign<&'b BigUint> + BitAndAssign<&'b BigUint> + BitOrAssign<&'b BigUint> + BitXorAssign<&'b BigUint>, for<'a, 'b> &'a BigUint: Add<&'b BigUint, Output = BigUint> + Sub<&'b BigUint, Output = BigUint> + Mul<&'b BigUint, Output = BigUint> + Div<&'b BigUint, Output = BigUint> + Rem<&'b BigUint, Output = BigUint> + BitAnd<&'b BigUint, Output = BigUint> + BitOr<&'b BigUint, Output = BigUint> + BitXor<&'b BigUint, Output = BigUint> + Shr<usize, Output = BigUint> + Shl<usize, Output = BigUint>, for<'b> BigInt: BigIntApi<BigUint> + 'static + AddAssign<&'b BigInt> + SubAssign<&'b BigInt> + MulAssign<&'b BigInt> + DivAssign<&'b BigInt> + RemAssign<&'b BigInt>, for<'a, 'b> &'a BigInt: Add<&'b BigInt, Output = BigInt> + Sub<&'b BigInt, Output = BigInt> + Mul<&'b BigInt, Output = BigInt> + Div<&'b BigInt, Output = BigInt> + Rem<&'b BigInt, Output = BigInt>, T: ContractHookApi<BigInt, BigUint> + ErrorApi + CallValueApi<BigUint> + SendApi<BigUint> + EndpointArgumentApi + EndpointFinishApi + StorageReadApi + StorageWriteApi + LogApi + Clone + 'static,

source§

fn call(&self, fn_name: &[u8]) -> bool

source§

fn clone_contract(&self) -> Box<dyn CallableContract<T>>

source§

fn into_api(self: Box<Self>) -> T

source§

impl<T, BigInt, BigUint> ContractHookApi<BigInt, BigUint> for PauseModuleImpl<T, BigInt, BigUint>
where for<'b> BigUint: BigUintApi + 'static + AddAssign<&'b BigUint> + SubAssign<&'b BigUint> + MulAssign<&'b BigUint> + DivAssign<&'b BigUint> + RemAssign<&'b BigUint> + BitAndAssign<&'b BigUint> + BitOrAssign<&'b BigUint> + BitXorAssign<&'b BigUint>, for<'a, 'b> &'a BigUint: Add<&'b BigUint, Output = BigUint> + Sub<&'b BigUint, Output = BigUint> + Mul<&'b BigUint, Output = BigUint> + Div<&'b BigUint, Output = BigUint> + Rem<&'b BigUint, Output = BigUint> + BitAnd<&'b BigUint, Output = BigUint> + BitOr<&'b BigUint, Output = BigUint> + BitXor<&'b BigUint, Output = BigUint> + Shr<usize, Output = BigUint> + Shl<usize, Output = BigUint>, for<'b> BigInt: BigIntApi<BigUint> + 'static + AddAssign<&'b BigInt> + SubAssign<&'b BigInt> + MulAssign<&'b BigInt> + DivAssign<&'b BigInt> + RemAssign<&'b BigInt>, for<'a, 'b> &'a BigInt: Add<&'b BigInt, Output = BigInt> + Sub<&'b BigInt, Output = BigInt> + Mul<&'b BigInt, Output = BigInt> + Div<&'b BigInt, Output = BigInt> + Rem<&'b BigInt, Output = BigInt>, T: ContractHookApi<BigInt, BigUint> + ErrorApi + CallValueApi<BigUint> + SendApi<BigUint> + EndpointArgumentApi + EndpointFinishApi + StorageReadApi + StorageWriteApi + LogApi + Clone + 'static,

§

type Storage = <T as ContractHookApi<BigInt, BigUint>>::Storage

Abstracts the lower-level storage functionality.
§

type CallValue = <T as ContractHookApi<BigInt, BigUint>>::CallValue

Abstracts the call value handling at the beginning of a function call.
§

type SendApi = <T as ContractHookApi<BigInt, BigUint>>::SendApi

Abstracts the sending of MOAX & DCT transactions, as well as async calls.
source§

fn get_storage_raw(&self) -> Self::Storage

Gateway into the lower-level storage functionality. Storage related annotations make use of this. Using it directly is not recommended.
source§

fn call_value(&self) -> Self::CallValue

Gateway into the call value retrieval functionality. The payment annotations should normally be the ones to handle this, but the developer is also given direct access to the API.
source§

fn send(&self) -> Self::SendApi

Gateway to the functionality related to sending transactions from the current contract.
source§

fn get_sc_address(&self) -> Address

source§

fn get_owner_address(&self) -> Address

source§

fn get_shard_of_address(&self, address: &Address) -> u32

source§

fn is_smart_contract(&self, address: &Address) -> bool

source§

fn get_caller(&self) -> Address

source§

fn get_balance(&self, address: &Address) -> BigUint

source§

fn get_tx_hash(&self) -> H256

source§

fn get_gas_left(&self) -> u64

source§

fn get_block_timestamp(&self) -> u64

source§

fn get_block_nonce(&self) -> u64

source§

fn get_block_round(&self) -> u64

source§

fn get_block_epoch(&self) -> u64

source§

fn get_block_random_seed(&self) -> Box<[u8; 48]>

source§

fn get_prev_block_timestamp(&self) -> u64

source§

fn get_prev_block_nonce(&self) -> u64

source§

fn get_prev_block_round(&self) -> u64

source§

fn get_prev_block_epoch(&self) -> u64

source§

fn get_prev_block_random_seed(&self) -> Box<[u8; 48]>

source§

fn get_current_dct_nft_nonce(&self, address: &Address, token: &[u8]) -> u64

source§

fn get_dct_balance( &self, address: &Address, token: &[u8], nonce: u64 ) -> BigUint

source§

fn get_dct_token_data( &self, address: &Address, token: &[u8], nonce: u64 ) -> DctTokenData<BigUint>

source§

fn get_sc_balance(&self) -> BigUint

source§

fn storage_load_cumulated_validator_reward(&self) -> BigUint

source§

impl<T, BigInt, BigUint> ContractWithAbi for PauseModuleImpl<T, BigInt, BigUint>
where for<'b> BigUint: BigUintApi + 'static + AddAssign<&'b BigUint> + SubAssign<&'b BigUint> + MulAssign<&'b BigUint> + DivAssign<&'b BigUint> + RemAssign<&'b BigUint> + BitAndAssign<&'b BigUint> + BitOrAssign<&'b BigUint> + BitXorAssign<&'b BigUint>, for<'a, 'b> &'a BigUint: Add<&'b BigUint, Output = BigUint> + Sub<&'b BigUint, Output = BigUint> + Mul<&'b BigUint, Output = BigUint> + Div<&'b BigUint, Output = BigUint> + Rem<&'b BigUint, Output = BigUint> + BitAnd<&'b BigUint, Output = BigUint> + BitOr<&'b BigUint, Output = BigUint> + BitXor<&'b BigUint, Output = BigUint> + Shr<usize, Output = BigUint> + Shl<usize, Output = BigUint>, for<'b> BigInt: BigIntApi<BigUint> + 'static + AddAssign<&'b BigInt> + SubAssign<&'b BigInt> + MulAssign<&'b BigInt> + DivAssign<&'b BigInt> + RemAssign<&'b BigInt>, for<'a, 'b> &'a BigInt: Add<&'b BigInt, Output = BigInt> + Sub<&'b BigInt, Output = BigInt> + Mul<&'b BigInt, Output = BigInt> + Div<&'b BigInt, Output = BigInt> + Rem<&'b BigInt, Output = BigInt>, T: ContractHookApi<BigInt, BigUint> + ErrorApi + CallValueApi<BigUint> + SendApi<BigUint> + EndpointArgumentApi + EndpointFinishApi + StorageReadApi + StorageWriteApi + LogApi + Clone + 'static,

§

type Storage = <T as ContractHookApi<BigInt, BigUint>>::Storage

The generated ABI generation code sometimes references the contract storage manager type, e.g. with storage mappers.
source§

fn abi(&self, include_modules: bool) -> ContractAbi

Generate a raw ABI object. Contracts would not call this function, so it never ends up in the wasm bytecode. It is, however, still no_std.
source§

impl<T, BigInt, BigUint> CryptoApi for PauseModuleImpl<T, BigInt, BigUint>
where for<'b> BigUint: BigUintApi + 'static + AddAssign<&'b BigUint> + SubAssign<&'b BigUint> + MulAssign<&'b BigUint> + DivAssign<&'b BigUint> + RemAssign<&'b BigUint> + BitAndAssign<&'b BigUint> + BitOrAssign<&'b BigUint> + BitXorAssign<&'b BigUint>, for<'a, 'b> &'a BigUint: Add<&'b BigUint, Output = BigUint> + Sub<&'b BigUint, Output = BigUint> + Mul<&'b BigUint, Output = BigUint> + Div<&'b BigUint, Output = BigUint> + Rem<&'b BigUint, Output = BigUint> + BitAnd<&'b BigUint, Output = BigUint> + BitOr<&'b BigUint, Output = BigUint> + BitXor<&'b BigUint, Output = BigUint> + Shr<usize, Output = BigUint> + Shl<usize, Output = BigUint>, for<'b> BigInt: BigIntApi<BigUint> + 'static + AddAssign<&'b BigInt> + SubAssign<&'b BigInt> + MulAssign<&'b BigInt> + DivAssign<&'b BigInt> + RemAssign<&'b BigInt>, for<'a, 'b> &'a BigInt: Add<&'b BigInt, Output = BigInt> + Sub<&'b BigInt, Output = BigInt> + Mul<&'b BigInt, Output = BigInt> + Div<&'b BigInt, Output = BigInt> + Rem<&'b BigInt, Output = BigInt>, T: ContractHookApi<BigInt, BigUint> + ErrorApi + CallValueApi<BigUint> + SendApi<BigUint> + EndpointArgumentApi + EndpointFinishApi + StorageReadApi + StorageWriteApi + LogApi + Clone + 'static,

source§

fn sha256(&self, data: &[u8]) -> H256

source§

fn keccak256(&self, data: &[u8]) -> H256

source§

fn verify_bls(&self, key: &[u8], message: &[u8], signature: &[u8]) -> bool

source§

fn verify_ed25519(&self, key: &[u8], message: &[u8], signature: &[u8]) -> bool

source§

fn verify_secp256k1(&self, key: &[u8], message: &[u8], signature: &[u8]) -> bool

Note: the signature is minimum 2 bytes in length, the second byte encodes the length of the remaining signature bytes.
source§

impl<T, BigInt, BigUint> PauseModule<T, BigInt, BigUint> for PauseModuleImpl<T, BigInt, BigUint>
where for<'b> BigUint: BigUintApi + 'static + AddAssign<&'b BigUint> + SubAssign<&'b BigUint> + MulAssign<&'b BigUint> + DivAssign<&'b BigUint> + RemAssign<&'b BigUint> + BitAndAssign<&'b BigUint> + BitOrAssign<&'b BigUint> + BitXorAssign<&'b BigUint>, for<'a, 'b> &'a BigUint: Add<&'b BigUint, Output = BigUint> + Sub<&'b BigUint, Output = BigUint> + Mul<&'b BigUint, Output = BigUint> + Div<&'b BigUint, Output = BigUint> + Rem<&'b BigUint, Output = BigUint> + BitAnd<&'b BigUint, Output = BigUint> + BitOr<&'b BigUint, Output = BigUint> + BitXor<&'b BigUint, Output = BigUint> + Shr<usize, Output = BigUint> + Shl<usize, Output = BigUint>, for<'b> BigInt: BigIntApi<BigUint> + 'static + AddAssign<&'b BigInt> + SubAssign<&'b BigInt> + MulAssign<&'b BigInt> + DivAssign<&'b BigInt> + RemAssign<&'b BigInt>, for<'a, 'b> &'a BigInt: Add<&'b BigInt, Output = BigInt> + Sub<&'b BigInt, Output = BigInt> + Mul<&'b BigInt, Output = BigInt> + Div<&'b BigInt, Output = BigInt> + Rem<&'b BigInt, Output = BigInt>, T: ContractHookApi<BigInt, BigUint> + ErrorApi + CallValueApi<BigUint> + SendApi<BigUint> + EndpointArgumentApi + EndpointFinishApi + StorageReadApi + StorageWriteApi + LogApi + Clone + 'static,

source§

fn is_paused(&self) -> bool

source§

fn set_paused(&self, paused: bool)

source§

fn callback(&self)

source§

fn callbacks(&self) -> CallbackProxies<T, BigInt, BigUint>

source§

fn not_paused(&self) -> bool

source§

fn pause_endpoint(&self) -> SCResult<()>

source§

fn unpause_endpoint(&self) -> SCResult<()>

Auto Trait Implementations§

§

impl<T, BigInt, BigUint> RefUnwindSafe for PauseModuleImpl<T, BigInt, BigUint>
where BigInt: RefUnwindSafe, BigUint: RefUnwindSafe, T: RefUnwindSafe,

§

impl<T, BigInt, BigUint> Send for PauseModuleImpl<T, BigInt, BigUint>
where BigInt: Send, BigUint: Send, T: Send,

§

impl<T, BigInt, BigUint> Sync for PauseModuleImpl<T, BigInt, BigUint>
where BigInt: Sync, BigUint: Sync, T: Sync,

§

impl<T, BigInt, BigUint> Unpin for PauseModuleImpl<T, BigInt, BigUint>
where BigInt: Unpin, BigUint: Unpin, T: Unpin,

§

impl<T, BigInt, BigUint> UnwindSafe for PauseModuleImpl<T, BigInt, BigUint>
where BigInt: UnwindSafe, BigUint: UnwindSafe, T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.