Class: Casper::Entity::AuctionState

Inherits:
Object
  • Object
show all
Defined in:
lib/entity/auction_state.rb

Instance Method Summary collapse

Constructor Details

#initialize(state_root_hash, block_height, era_validators, bids) ⇒ AuctionState

Returns a new instance of AuctionState.

Parameters:

  • state_root_hash (String)
  • block_height (Integer)
  • era_validators (Array)
  • bids (Array)


8
9
10
11
12
13
# File 'lib/entity/auction_state.rb', line 8

def initialize(state_root_hash, block_height, era_validators, bids)
  @state_root_hash = state_root_hash
  @block_height = block_height
  @era_validators = era_validators
  @bids = bids
end

Instance Method Details

#get_bidsArray<Hash>

Returns array of hashes

Returns:

  • (Array<Hash>)

    returns array of hashes



31
32
33
# File 'lib/entity/auction_state.rb', line 31

def get_bids
  @bids
end

#get_block_heightInteger

Returns block height as an Integer

Returns:

  • (Integer)

    returns block height as an Integer



21
22
23
# File 'lib/entity/auction_state.rb', line 21

def get_block_height
  @block_height
end

#get_era_validatorsArray<Hash>

Returns array of hashes

Returns:

  • (Array<Hash>)

    returns array of hashes



26
27
28
# File 'lib/entity/auction_state.rb', line 26

def get_era_validators
  @era_validators
end

#get_state_root_hashString

Returns state root hash as a String

Returns:

  • (String)

    returns state root hash as a String



16
17
18
# File 'lib/entity/auction_state.rb', line 16

def get_state_root_hash
  @state_root_hash
end