Class: Casper::Entity::Contract

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

Overview

Information, entry points and named keys belonging to a Contract

Instance Method Summary collapse

Constructor Details

#initialize(contract_package_hash, contract_wasm_hash, named_keys, entry_points, protocol_version) ⇒ Contract

Returns a new instance of Contract.

Parameters:

  • contract_package_hash (String)
  • contract_wasm_hash (String)
  • entry_points (Array)
  • named_keys (Array)
  • protocol_version (String)


12
13
14
15
16
17
18
# File 'lib/entity/contract.rb', line 12

def initialize(contract_package_hash, contract_wasm_hash, named_keys, entry_points, protocol_version)
  @contract_package_hash = contract_package_hash
  @contract_wasm_hash = contract_wasm_hash
  @entry_points = entry_points
  @named_keys = named_keys
  @protocol_version = protocol_version
end

Instance Method Details

#get_contract_package_hashString

Returns contract_package_hash.

Returns:

  • (String)

    contract_package_hash



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

def get_contract_package_hash
  @contract_package_hash
end

#get_contract_wasm_hashString

Returns contract_wasm_hash.

Returns:

  • (String)

    contract_wasm_hash



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

def get_contract_wasm_hash
  @contract_wasm_hash
end

#get_entry_pointsArray

Returns entry_points.

Returns:

  • (Array)

    entry_points



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

def get_entry_points
  @entry_points
end

#get_named_keysArray

Returns named_keys.

Returns:

  • (Array)

    named_keys



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

def get_named_keys
  @named_keys
end

#get_protocol_versionString

Returns protocol_version.

Returns:

  • (String)

    protocol_version



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

def get_protocol_version
  @protocol_version
end