[][src]Module casper_types::auction

Contains implementation of a Auction contract functionality.

Structs

Bid

An entry in a founding validator map.

SeigniorageRecipient

The seigniorage recipient details.

UnbondingPurse

Unbonding purse.

Constants

ARG_AMOUNT

Named constant for amount.

ARG_AUCTION_DELAY

Named constant of auction_delay

ARG_DELEGATION_RATE

Named constant for delegation_rate.

ARG_DELEGATOR

Named constant for delegator.

ARG_DELEGATOR_PUBLIC_KEY

Named constant for delegator_public_key.

ARG_ERA_ID

Named constant for era_id.

ARG_GENESIS_VALIDATORS

Named constant for genesis_validators

ARG_LOCKED_FUNDS_PERIOD

Named constant for locked_funds_period

ARG_MINT_CONTRACT_PACKAGE_HASH

Named constant for mint_contract_package_hash

ARG_PUBLIC_KEY

Named constant for account_hash.

ARG_REWARD_FACTORS

Named constant for reward_factors.

ARG_SOURCE_PURSE

Named constant for source_purse.

ARG_TARGET_PURSE

Named constant for target_purse.

ARG_UNBOND_PURSE

Named constant for unbond_purse.

ARG_VALIDATOR

Named constant for validator.

ARG_VALIDATOR_KEYS

Named constant for validator_keys.

ARG_VALIDATOR_PUBLIC_KEY

Named constant for validator_public_key.

ARG_VALIDATOR_PUBLIC_KEYS

Named constant for validator_public_keys.

ARG_VALIDATOR_PURSE

Named constant for validator_purse.

ARG_VALIDATOR_SLOTS

Named constant for validator_slots argument.

AUCTION_DELAY_KEY

Amount of auction delay.

BIDS_KEY

Storage for Bids.

BID_PURSES_KEY

Storage for BidPurses.

BLOCK_REWARD

We use one trillion as a block reward unit because it's large enough to allow precise fractions, and small enough for many block rewards to fit into a u64.

DEFAULT_UNBONDING_DELAY

Default number of eras that need to pass to be able to withdraw unbonded funds.

DELEGATION_RATE_DENOMINATOR

Delegation rate is a fraction between 0-1. Validator sets the delegation rate in integer terms, which is then divided by the denominator to obtain the fraction.

DELEGATORS_KEY

Storage for Delegators.

DELEGATOR_REWARD_MAP_KEY

Storage for DelegatorRewardMap.

DELEGATOR_REWARD_PURSE_KEY

Storage for delegator reward purse

ERA_ID_KEY

Storage for EraId.

ERA_VALIDATORS_KEY

Storage for EraValidators.

INITIAL_ERA_ID

Initial value of era id we start at genesis.

LOCKED_FUNDS_PERIOD_KEY

Default lock period for new bid entries represented in eras.

METHOD_ADD_BID

Named constant for method add_bid.

METHOD_DELEGATE

Named constant for method delegate.

METHOD_DISTRIBUTE

Named constant for method distribute.

METHOD_GET_ERA_VALIDATORS

Named constant for method get_era_validators.

METHOD_READ_ERA_ID

Named constant for method read_era_id.

METHOD_READ_SEIGNIORAGE_RECIPIENTS

Named constant for method read_seigniorage_recipients.

METHOD_RELEASE_FOUNDER_STAKE

Named constant for method release_founder_stake.

METHOD_RUN_AUCTION

Named constant for method run_auction.

METHOD_SLASH

Named constant for method slash.

METHOD_UNDELEGATE

Named constant for method undelegate.

METHOD_WITHDRAW_BID

Named constant for method withdraw_bid.

METHOD_WITHDRAW_DELEGATOR_REWARD

Named constant for method withdraw_delegator_reward.

METHOD_WITHDRAW_VALIDATOR_REWARD

Named constant for method withdraw_validator_reward.

SEIGNIORAGE_RECIPIENTS_SNAPSHOT_KEY

Storage for SeigniorageRecipientsSnapshot.

SYSTEM_ACCOUNT

System account hash.

UNBONDING_PURSES_KEY

Storage for UnbondingPurses

VALIDATOR_REWARD_MAP_KEY

Storage for ValidatorRewardMap.

VALIDATOR_REWARD_PURSE_KEY

Storage for validator reward purse

VALIDATOR_SLOTS_KEY

Total validator slots allowed.

Traits

Auction

Bonding auction contract interface

MintProvider

Provides an access to mint.

RuntimeProvider

Provider of runtime host functionality.

StorageProvider

Provides functionality of a contract storage.

SystemProvider

Provides functionality of a system module.

Type Definitions

BidPurses

Bidders mapped to their bidding purses and tokens contained therein. Delegators' tokens are kept in the validator bid purses, available for withdrawal up to the delegated number of tokens. Withdrawal moves the tokens to a delegator-controlled unbonding purse.

Bids

Validators mapped to their bids.

DelegatedAmounts

Delegators mapped to their bids.

DelegationRate

Representation of delegation rate of tokens. Fraction of 1 in trillionths (12 decimal places).

DelegatorRewardMap

Validators mapped to their delegators mapped to their reward amounts.

Delegators

Validators mapped to their delegators mapped to their bids.

EraId

Era index type.

EraValidators

List of era validators

SeigniorageRecipients

Collection of seigniorage recipients.

SeigniorageRecipientsSnapshot

Snapshot of SeigniorageRecipients for a given era.

UnbondingPurses

Validators and delegators mapped to their unbonding purses.

ValidatorRewardMap

Validators mapped to their reward amounts.

ValidatorWeights

Weights of validators. "Weight" in this context means a sum of their stakes.