Module casper_types::auction[][src]

Contains implementation of a Auction contract functionality.

Structs

Bid

An entry in a founding validator map.

Delegator

Represents a party delegating their stake to a validator (or "delegatee")

EraInfo

Auction metdata. Intended to be recorded at each era.

SeigniorageRecipient

The seigniorage recipient details.

UnbondingPurse

Unbonding purse.

Enums

SeigniorageAllocation

Information about a seigniorage allocation

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_END_TIMESTAMP_MILLIS

Named constant for era_end_timestamp_millis;

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_UNBONDING_DELAY

Named constant for unbonding_delay

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.

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.

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.

DELEGATOR_REWARD_PURSE_KEY

Storage for delegator reward purse

ERA_END_TIMESTAMP_MILLIS_KEY

Storage for era-end timestamp.

ERA_ID_KEY

Storage for EraId.

INITIAL_ERA_END_TIMESTAMP_MILLIS

Initial value of era end timestamp.

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_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_DELAY_KEY

Unbonding delay expressed in eras.

UNBONDING_PURSES_KEY

Storage for UnbondingPurses

VALIDATOR_REWARD_PURSE_KEY

Storage for validator reward purse

VALIDATOR_SLOTS_KEY

Total validator slots allowed.

Traits

AccountProvider

Provider of an account related functionality.

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

Bids

Validators mapped to their bids.

DelegationRate

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

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.

ValidatorWeights

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