Class: Casper::Entity::DeployHeader

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

Overview

Header information of a Deploy.

Instance Method Summary collapse

Constructor Details

#initialize(header = {}) ⇒ DeployHeader

Returns a new instance of DeployHeader.

Parameters:

  • header (Hash) (defaults to: {})

Options Hash (header):

  • :account (String)
  • :timestamp (Integer)
  • :ttl (Integer)
  • :gas_price (Integer)
  • :body_hash (String)
  • :dependencies (Array)
  • :chain_name (String)


14
15
16
17
18
19
20
21
22
# File 'lib/entity/deploy_header.rb', line 14

def initialize(header = {})
  @account = header[:account]
  @timestamp = header[:timestamp]
  @ttl = header[:ttl]
  @gas_price = header[:gas_price]
  @body_hash = header[:body_hash]
  @dependencies = header[:dependencies]
  @chain_name = header[:chain_name]
end

Instance Method Details

#get_accountString

Returns account.

Returns:

  • (String)

    account



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

def 
  @account
end

#get_body_hashString

Returns body_hash.

Returns:

  • (String)

    body_hash



46
47
48
# File 'lib/entity/deploy_header.rb', line 46

def get_body_hash
  @body_hash
end

#get_chain_nameString

Returns chain_name.

Returns:

  • (String)

    chain_name



56
57
58
# File 'lib/entity/deploy_header.rb', line 56

def get_chain_name
  @chain_name
end

#get_dependenciesArray

Returns dependencies.

Returns:

  • (Array)

    dependencies



51
52
53
# File 'lib/entity/deploy_header.rb', line 51

def get_dependencies
  @dependencies
end

#get_gas_priceInteger

Returns gas_price.

Returns:

  • (Integer)

    gas_price



41
42
43
# File 'lib/entity/deploy_header.rb', line 41

def get_gas_price
  @gas_price
end

#get_timestampInteger

Returns timestamp.

Returns:

  • (Integer)

    timestamp



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

def get_timestamp
  @timestamp
end

#get_ttlInteger

Returns ttl.

Returns:

  • (Integer)

    ttl



36
37
38
# File 'lib/entity/deploy_header.rb', line 36

def get_ttl
  @ttl
end