Struct casper_execution_engine::core::runtime::Runtime[][src]

pub struct Runtime<'a, R> { /* fields omitted */ }

Implementations

Calls contract living under a key, with supplied args.

Calls version of the contract living at key, invoking method with supplied args. This function also checks the args conform with the types given in the contract header.

If host_buffer set, clears the host_buffer and returns value, else None

Trait Implementations

Get currently executing account’s purse.

Get currently executing account’s purse.

Returns era_validators. Read more

Returns validators in era_validators, mapped to their bids or founding stakes, delegation rates and lists of delegators together with their delegated quantities from delegators. This function is publicly accessible, but intended for system use by the Handle Payment contract, because this data is necessary for distributing seigniorage. Read more

For a non-founder validator, this adds, or modifies, an entry in the bids collection and calls bond in the Mint contract to create (or top off) a bid purse. It also adjusts the delegation rate. Read more

For a non-founder validator, implements essentially the same logic as add_bid, but reducing the number of tokens and calling unbond in lieu of bond. Read more

Adds a new delegator to delegators, or tops off a current one. If the target validator is not in founders, the function call returns an error and does nothing. Read more

Removes an amount of motes (or the entry altogether, if the remaining amount is 0) from the entry in delegators and calls unbond in the Mint contract to create a new unbonding purse. Read more

Slashes each validator. Read more

Takes active_bids and delegators to construct a list of validators’ total bids (their own added to their delegators’) ordered by size from largest to smallest, then takes the top N (number of auction slots) bidders and replaces era_validators with these. Read more

Mint and distribute seigniorage rewards to validators and their delegators, according to reward_factors returned by the consensus component. Read more

Reads current era id.

Activates a given validator’s bid. To be used when a validator has been marked as inactive by consensus (aka “evicted”). Read more

Perform invoke of a host function by specified index.

Get payment purse.

Set refund purse.

Get refund purse.

Finalize payment with amount_spent and a given account.

Get payment purse for given deploy.

Mint new token with given initial_balance balance. Returns new purse on success, otherwise an error. Read more

Reduce total supply by amount. Returns unit on success, otherwise an error. Read more

Read balance of given purse.

Transfers amount of tokens from source purse to a target purse.

Retrieves the base round reward.

Allows optimized auction and mint interaction. Intended to be used only by system contracts to manage staked purses. NOTE: Never expose this through FFI.

Returns successfully unbonded stake to origin account.

Creates new purse.

Gets purse balance.

Reads the base round reward.

Mints new token with given initial_balance balance. Returns new purse on success, otherwise an error. Read more

Reduce total supply by amount. Returns unit on success, otherwise an error. Read more

Transfer amount from source purse to a target account.

Transfer amount from source purse to a target purse.

Checks balance of a purse. Returns None if given purse does not exist.

Transfer amount of tokens from source purse to a target purse.

This method should return the caller of the current context.

Checks if account_hash matches the active session’s account.

Gets named key under a name.

Gets keys in a given keyspace

Returns a 32-byte BLAKE2b digest

This method should return the caller of the current context.

This method should return the immediate caller of the current context.

Gets execution phase

This method should handle storing given Key under name.

This method should handle obtaining a given named Key under a name.

Get named key under a name.

Put key under a name.

Remove a named key by name.

Get current execution phase.

Get current block time.

Get caller.

Pay amount to a payment purse.

Reads data from URef.

Writes data to `URef.

Reads Bid at account hash derived from given public key

Writes given Bid at account hash derived from given public key

Reads collection of UnbondingPurses at account hash derived from given public key

Writes given UnbondingPurses at account hash derived from given public key

Records era info at the given era id.

Create new URef.

Read data from URef.

Write data under a URef.

Add data to a URef.

Read balance.

Write balance.

Add amount to an existing balance.

Records a transfer.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Converts self into a target type. Read more

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more

Causes self to use its Binary implementation when Debug-formatted.

Causes self to use its Display implementation when Debug-formatted. Read more

Causes self to use its LowerExp implementation when Debug-formatted. Read more

Causes self to use its LowerHex implementation when Debug-formatted. Read more

Causes self to use its Octal implementation when Debug-formatted.

Causes self to use its Pointer implementation when Debug-formatted. Read more

Causes self to use its UpperExp implementation when Debug-formatted. Read more

Causes self to use its UpperHex implementation when Debug-formatted. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Pipes a value into a function that cannot ordinarily be called in suffix position. Read more

Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more

Pipes a trait mutable borrow into a function that cannot normally be called in suffix position. Read more

Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more

Pipes a trait mutable borrow into a function that cannot normally be called in suffix position. Read more

Pipes a dereference into a function that cannot normally be called in suffix position. Read more

Pipes a mutable dereference into a function that cannot normally be called in suffix position. Read more

Pipes a reference into a function that cannot ordinarily be called in suffix position. Read more

Pipes a mutable reference into a function that cannot ordinarily be called in suffix position. Read more

Should always be Self

Provides immutable access for inspection. Read more

Calls tap in debug builds, and does nothing in release builds.

Provides mutable access for modification. Read more

Calls tap_mut in debug builds, and does nothing in release builds.

Provides immutable access to the reference for inspection.

Calls tap_ref in debug builds, and does nothing in release builds.

Provides mutable access to the reference for modification.

Calls tap_ref_mut in debug builds, and does nothing in release builds.

Provides immutable access to the borrow for inspection. Read more

Calls tap_borrow in debug builds, and does nothing in release builds.

Provides mutable access to the borrow for modification.

Calls tap_borrow_mut in debug builds, and does nothing in release builds. Read more

Immutably dereferences self for inspection.

Calls tap_deref in debug builds, and does nothing in release builds.

Mutably dereferences self for modification.

Calls tap_deref_mut in debug builds, and does nothing in release builds. Read more

Attempts to convert self into a target type. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more