casper_network 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +275 -17
- data/lib/casper_network.rb +22 -8
- data/lib/crypto/00_asymmetric_key.rb +1 -1
- data/lib/crypto/asymmetric_key.rb +1 -1
- data/lib/entity/account.rb +1 -1
- data/lib/entity/action_thresholds.rb +2 -2
- data/lib/entity/associated_key.rb +1 -1
- data/lib/entity/auction_state.rb +57 -8
- data/lib/entity/bid.rb +2 -1
- data/lib/entity/bid_info.rb +2 -1
- data/lib/entity/block.rb +39 -0
- data/lib/entity/block_body.rb +35 -0
- data/lib/entity/block_header.rb +81 -0
- data/lib/entity/block_info.rb +56 -0
- data/lib/entity/block_proof.rb +24 -0
- data/lib/entity/contract.rb +1 -1
- data/lib/entity/delegator.rb +1 -0
- data/lib/entity/deploy.rb +1 -0
- data/lib/entity/deploy_approval.rb +1 -0
- data/lib/entity/deploy_executable.rb +4 -3
- data/lib/entity/deploy_executable_item_internal.rb +1 -0
- data/lib/entity/deploy_executable_transfer.rb +1 -0
- data/lib/entity/deploy_hash.rb +1 -0
- data/lib/entity/deploy_header.rb +1 -0
- data/lib/entity/deploy_info.rb +1 -0
- data/lib/entity/deploy_named_argument.rb +1 -0
- data/lib/entity/deploy_transfer.rb +1 -0
- data/lib/entity/era_summary.rb +14 -12
- data/lib/entity/era_validator.rb +1 -0
- data/lib/entity/executable_deploy_item.rb +1 -1
- data/lib/entity/group.rb +2 -2
- data/lib/entity/module_bytes.rb +1 -0
- data/lib/entity/peer.rb +1 -0
- data/lib/entity/status.rb +80 -0
- data/lib/entity/stored_contract_by_hash.rb +1 -0
- data/lib/entity/stored_contract_by_name.rb +2 -0
- data/lib/entity/stored_value.rb +86 -11
- data/lib/entity/stored_versioned_contract_by_hash.rb +2 -0
- data/lib/entity/stored_versioned_contract_by_name.rb +2 -0
- data/lib/entity/transfer.rb +8 -7
- data/lib/entity/validator_weight.rb +1 -0
- data/lib/rpc/rpc_client.rb +1 -1
- data/lib/rpc/rpc_error.rb +1 -0
- data/lib/serialization/cl_type_serializer.rb +1 -0
- data/lib/serialization/cl_value_bytes_parsers.rb +1 -1
- data/lib/serialization/cl_value_serializer.rb +1 -0
- data/lib/serialization/deploy_approval_serializer.rb +1 -0
- data/lib/serialization/deploy_executable_serializer.rb +3 -2
- data/lib/serialization/deploy_header_serializer.rb +2 -2
- data/lib/serialization/deploy_named_arg_serializer.rb +1 -0
- data/lib/serialization/deploy_serializer.rb +1 -0
- data/lib/types/cl_type.rb +5 -3
- data/lib/types/cl_uref.rb +2 -1
- data/lib/types/cl_value.rb +1 -0
- data/lib/utils/byte_utils.rb +3 -3
- data/lib/version.rb +1 -1
- data/spec/client_spec.rb +20 -20
- metadata +8 -2
@@ -0,0 +1,81 @@
|
|
1
|
+
module Casper
|
2
|
+
module Entity
|
3
|
+
# BlockHeader
|
4
|
+
class BlockHeader
|
5
|
+
|
6
|
+
# @param [Hash] header
|
7
|
+
# @option header [String] :parent_hash
|
8
|
+
# @option header [String] :state_root_hash
|
9
|
+
# @option header [String] :parent_hash
|
10
|
+
# @option header [String] :body_hash
|
11
|
+
# @option header [Boolean] :random_bit
|
12
|
+
# @option header [String] :accumulated_seed
|
13
|
+
# @option header [String] :era_end
|
14
|
+
# @option header [Integer] :timestamp
|
15
|
+
# @option header [Integer] :era_id
|
16
|
+
# @option header [Integer] :height
|
17
|
+
def initialize(header = {})
|
18
|
+
@parent_hash = header[:parent_hash]
|
19
|
+
@state_root_hash = header[:state_root_hash]
|
20
|
+
@body_hash = header[:body_hash]
|
21
|
+
@random_bit = header[:random_bit]
|
22
|
+
@accumulated_seed = header[:accumulated_seed]
|
23
|
+
@era_end = header[:era_end]
|
24
|
+
@timestamp = header[:timestamp]
|
25
|
+
@era_id = header[:era_id]
|
26
|
+
@height = header[:height]
|
27
|
+
@protocol_version = header[:protocol_version]
|
28
|
+
end
|
29
|
+
|
30
|
+
# @return [String] parent_hash
|
31
|
+
def get_parent_hash
|
32
|
+
@parent_hash
|
33
|
+
end
|
34
|
+
|
35
|
+
# @return [String] state_root_hash
|
36
|
+
def get_state_root_hash
|
37
|
+
@state_root_hash
|
38
|
+
end
|
39
|
+
|
40
|
+
# @return [String] body_hash
|
41
|
+
def get_body_hash
|
42
|
+
@body_hash
|
43
|
+
end
|
44
|
+
|
45
|
+
# @return [Boolean] random_bit
|
46
|
+
def get_random_bit
|
47
|
+
@random_bit
|
48
|
+
end
|
49
|
+
|
50
|
+
# @return [String] accumulated_seed
|
51
|
+
def get_accumulated_seed
|
52
|
+
@accumulated_seed
|
53
|
+
end
|
54
|
+
|
55
|
+
# @return [String] era_end
|
56
|
+
def get_era_end
|
57
|
+
@era_end
|
58
|
+
end
|
59
|
+
|
60
|
+
# @return [Integer] timestamp
|
61
|
+
def get_timestamp
|
62
|
+
@timestamp
|
63
|
+
end
|
64
|
+
|
65
|
+
# @return [Integer] era_id
|
66
|
+
def get_era_id
|
67
|
+
@era_id
|
68
|
+
end
|
69
|
+
|
70
|
+
# @return [Integer] height
|
71
|
+
def get_height
|
72
|
+
@height
|
73
|
+
end
|
74
|
+
|
75
|
+
# @return [String] protocol_version
|
76
|
+
def get_protocol_version
|
77
|
+
@protocol_version
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
module Casper
|
2
|
+
module Entity
|
3
|
+
# BlockInfo class entity
|
4
|
+
class BlockInfo
|
5
|
+
|
6
|
+
# @param [Hash] last_added_block_info
|
7
|
+
# @option last_added_block_info [String] :hash
|
8
|
+
# @option last_added_block_info [String] :timestamp
|
9
|
+
# @option last_added_block_info [Integer] :era_id
|
10
|
+
# @option last_added_block_info [Integer] :height
|
11
|
+
# @option last_added_block_info [String] :state_root_hash
|
12
|
+
# @option last_added_block_info [String] :creator
|
13
|
+
def initialize(last_added_block_info = {})
|
14
|
+
@hash = last_added_block_info[:hash]
|
15
|
+
@timestamp = last_added_block_info[:timestamp]
|
16
|
+
@era_id = last_added_block_info[:era_id]
|
17
|
+
@height = last_added_block_info[:height]
|
18
|
+
@state_root_hash = last_added_block_info[:state_root_hash]
|
19
|
+
@creator = last_added_block_info[:creator]
|
20
|
+
end
|
21
|
+
|
22
|
+
# @return [String] a cryptographic hash identifying a Block.
|
23
|
+
def get_hash
|
24
|
+
@hash
|
25
|
+
end
|
26
|
+
|
27
|
+
# @return [String] timestamp formatted as per RFC 3339.
|
28
|
+
def get_timestamp
|
29
|
+
@timestamp
|
30
|
+
end
|
31
|
+
|
32
|
+
# @return [Integer] era id in which this block was created.
|
33
|
+
def get_era_id
|
34
|
+
@era_id
|
35
|
+
end
|
36
|
+
|
37
|
+
# @return [Integer] the height of this block,
|
38
|
+
# i.e., the number of ancestors.
|
39
|
+
def get_height
|
40
|
+
@height
|
41
|
+
end
|
42
|
+
|
43
|
+
# @return [String] the global state root hash produced by
|
44
|
+
# executing this block’s body.
|
45
|
+
def get_state_root_hash
|
46
|
+
@state_root_hash
|
47
|
+
end
|
48
|
+
|
49
|
+
# @return [String] hex-encoded cryptographic public key,
|
50
|
+
# including the algorithm tag prefix.
|
51
|
+
def get_creator
|
52
|
+
@creator
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Casper
|
2
|
+
module Entity
|
3
|
+
# BlockProof
|
4
|
+
class BlockProof
|
5
|
+
# @param [Hash] proof
|
6
|
+
# @option proof [String] :public_key
|
7
|
+
# @option proof [String] :signature
|
8
|
+
def initialize(proof = {})
|
9
|
+
@public_key = proof[:public_key]
|
10
|
+
@signature = proof[:signature]
|
11
|
+
end
|
12
|
+
|
13
|
+
# @return [String] public_key
|
14
|
+
def get_public_key
|
15
|
+
@public_key
|
16
|
+
end
|
17
|
+
|
18
|
+
# @return [String] signature
|
19
|
+
def get_signature
|
20
|
+
@signature
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/lib/entity/contract.rb
CHANGED
data/lib/entity/delegator.rb
CHANGED
data/lib/entity/deploy.rb
CHANGED
@@ -4,6 +4,7 @@ require_relative './deploy_executable_transfer.rb'
|
|
4
4
|
|
5
5
|
module Casper
|
6
6
|
module Entity
|
7
|
+
# DeployExecutable
|
7
8
|
class DeployExecutable
|
8
9
|
attr_accessor :module_bytes, :transfer, :stored_contract_by_hash, :stored_contract_by_name,
|
9
10
|
:stored_versioned_contract_by_hash, :stored_versioned_contract_by_name
|
@@ -81,7 +82,7 @@ module Casper
|
|
81
82
|
@transfer != nil
|
82
83
|
end
|
83
84
|
|
84
|
-
# @param [StoredContractByHash]
|
85
|
+
# @param [StoredContractByHash] stored_contract_by_hash
|
85
86
|
def set_stored_contract_by_hash(stored_contract_by_hash)
|
86
87
|
@stored_contract_by_hash = stored_contract_by_hash
|
87
88
|
end
|
@@ -109,7 +110,7 @@ module Casper
|
|
109
110
|
@stored_contract_by_name != nil
|
110
111
|
end
|
111
112
|
|
112
|
-
# @param [StoredVersionedContractByHash]
|
113
|
+
# @param [StoredVersionedContractByHash] stored_versioned_contract_by_hash
|
113
114
|
def set_stored_versioned_contract_by_hash(stored_versioned_contract_by_hash)
|
114
115
|
@stored_versioned_contract_by_hash = stored_versioned_contract_by_hash
|
115
116
|
end
|
@@ -123,7 +124,7 @@ module Casper
|
|
123
124
|
@stored_versioned_contract_by_hash != nil
|
124
125
|
end
|
125
126
|
|
126
|
-
# @param [StoredVersionedContractByName]
|
127
|
+
# @param [StoredVersionedContractByName] stored_versioned_contract_by_name
|
127
128
|
def set_stored_versioned_contract_by_name(stored_versioned_contract_by_name)
|
128
129
|
@stored_versioned_contract_by_name = stored_versioned_contract_by_name
|
129
130
|
end
|
@@ -17,6 +17,7 @@ require_relative './deploy_executable_item_internal.rb'
|
|
17
17
|
=end
|
18
18
|
module Casper
|
19
19
|
module Entity
|
20
|
+
# A native transfer which does not contain or reference a Wasm code.
|
20
21
|
class DeployExecutableTransfer < DeployExecutableItemInternal
|
21
22
|
|
22
23
|
# @param [Array<Array<DeployNamedArgument>>] args
|
data/lib/entity/deploy_hash.rb
CHANGED
data/lib/entity/deploy_header.rb
CHANGED
data/lib/entity/deploy_info.rb
CHANGED
data/lib/entity/era_summary.rb
CHANGED
@@ -1,18 +1,20 @@
|
|
1
1
|
module Casper
|
2
2
|
module Entity
|
3
|
+
# The summary of an era.
|
3
4
|
class EraSummary
|
4
5
|
|
5
|
-
# @param [
|
6
|
-
# @
|
7
|
-
# @
|
8
|
-
# @
|
9
|
-
# @
|
10
|
-
|
11
|
-
|
12
|
-
@
|
13
|
-
@
|
14
|
-
@
|
15
|
-
@
|
6
|
+
# @param [Hash] era_summary
|
7
|
+
# @option era_summary [String] :block_hash
|
8
|
+
# @option era_summary [Integer] :era_id
|
9
|
+
# @option era_summary [Hash] :stored_value
|
10
|
+
# @option era_summary [String] :state_root_hash
|
11
|
+
# @option era_summary [String] :merkle_proof
|
12
|
+
def initialize(era_summary = {})
|
13
|
+
@block_hash = era_summary[:block_hash]
|
14
|
+
@era_id = era_summary[:era_id]
|
15
|
+
@stored_value = Casper::Entity::StoredValue.new(era_summary[:stored_value])
|
16
|
+
@state_root_hash = era_summary[:state_root_hash]
|
17
|
+
@merkle_proof = era_summary[:merkle_proof]
|
16
18
|
end
|
17
19
|
|
18
20
|
# @return [String] block_hash
|
@@ -25,7 +27,7 @@ module Casper
|
|
25
27
|
@era_id
|
26
28
|
end
|
27
29
|
|
28
|
-
# @return [
|
30
|
+
# @return [Hash] StoredValue
|
29
31
|
def get_stored_value
|
30
32
|
@stored_value
|
31
33
|
end
|
data/lib/entity/era_validator.rb
CHANGED
data/lib/entity/group.rb
CHANGED
data/lib/entity/module_bytes.rb
CHANGED
@@ -2,6 +2,7 @@ require_relative './deploy_executable_item_internal.rb'
|
|
2
2
|
|
3
3
|
module Casper
|
4
4
|
module Entity
|
5
|
+
# Executable specified as raw bytes that represent Wasm code and an instance of RuntimeArgs.
|
5
6
|
class ModuleBytes < DeployExecutableItemInternal
|
6
7
|
|
7
8
|
# @param [String] module_bytes
|
data/lib/entity/peer.rb
CHANGED
@@ -0,0 +1,80 @@
|
|
1
|
+
module Casper
|
2
|
+
module Entity
|
3
|
+
class Status
|
4
|
+
# @param [Hash] status
|
5
|
+
# @option status [String] :api_version
|
6
|
+
# @option status [String] :chainspec_name
|
7
|
+
# @option status [String] :starting_state_root_hash
|
8
|
+
# @option status [Array<Hash>] :peers
|
9
|
+
# @option status [Hash] :last_added_block_info
|
10
|
+
# @option status [String] :our_public_signing_key
|
11
|
+
# @option status [Integer] :round_length
|
12
|
+
# @option status [String] :next_upgrade
|
13
|
+
# @option status [String] :build_version
|
14
|
+
# @option status [String] :uptime
|
15
|
+
def initialize(status = {})
|
16
|
+
@api_version = status[:api_version]
|
17
|
+
@chainspec_name = status[:chainspec_name]
|
18
|
+
@starting_state_root_hash = status[:starting_state_root_hash]
|
19
|
+
@peers = []
|
20
|
+
status[:peers].map { |peer| @peers << Casper::Entity::Peer.new(peer)}
|
21
|
+
@last_added_block_info = status[:last_added_block_info]
|
22
|
+
@our_public_signing_key = status[:our_public_signing_key]
|
23
|
+
@round_length = status[:round_length]
|
24
|
+
@next_upgrade = status[:next_upgrade]
|
25
|
+
@build_version = status[:build_version]
|
26
|
+
@uptime = status[:uptime]
|
27
|
+
end
|
28
|
+
|
29
|
+
# @return [String] the RPC API version.
|
30
|
+
def get_api_version
|
31
|
+
@api_version
|
32
|
+
end
|
33
|
+
|
34
|
+
# @return [String] the chainspec name.
|
35
|
+
def get_chainspec_name
|
36
|
+
@chainspec_name
|
37
|
+
end
|
38
|
+
|
39
|
+
# @return [String] the state root hash used at the start of the current sessio
|
40
|
+
def get_starting_state_root_hash
|
41
|
+
@starting_state_root_hash
|
42
|
+
end
|
43
|
+
|
44
|
+
# @return [Array<Peer>] the node ID and network address of each connected peer.
|
45
|
+
def get_peers
|
46
|
+
@peers
|
47
|
+
end
|
48
|
+
|
49
|
+
# @return [Hash] the minimal info of the last block from the linear chain.
|
50
|
+
def get_last_added_block_info
|
51
|
+
@last_added_block_info
|
52
|
+
end
|
53
|
+
|
54
|
+
# @return [String] Our public signing key.
|
55
|
+
def get_our_public_signing_key
|
56
|
+
@our_public_signing_key
|
57
|
+
end
|
58
|
+
|
59
|
+
# @return [Integer] the next round length if this node is a validator.
|
60
|
+
def get_round_length
|
61
|
+
@round_length
|
62
|
+
end
|
63
|
+
|
64
|
+
# @return [String] information about the next scheduled upgrade.
|
65
|
+
def get_next_upgrade
|
66
|
+
@next_upgrade
|
67
|
+
end
|
68
|
+
|
69
|
+
# @return [String] the compiled node version.
|
70
|
+
def get_build_version
|
71
|
+
@build_version
|
72
|
+
end
|
73
|
+
|
74
|
+
# @return [String] the time that passed since the node has started.
|
75
|
+
def get_uptime
|
76
|
+
@uptime
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
@@ -2,6 +2,7 @@ require_relative './deploy_executable_item_internal.rb'
|
|
2
2
|
|
3
3
|
module Casper
|
4
4
|
module Entity
|
5
|
+
# Stored contract referenced by its ContractHash, entry point and an instance of RuntimeArgs.
|
5
6
|
class StoredContractByHash < DeployExecutableItemInternal
|
6
7
|
|
7
8
|
# @param [String] hash
|
@@ -2,6 +2,8 @@ require_relative './deploy_executable_item_internal.rb'
|
|
2
2
|
|
3
3
|
module Casper
|
4
4
|
module Entity
|
5
|
+
# Stored contract referenced by a named key existing in the signer's Account context,
|
6
|
+
# entry point and an instance of RuntimeArgs.
|
5
7
|
class StoredContractByName < DeployExecutableItemInternal
|
6
8
|
|
7
9
|
# @param [String] name
|
data/lib/entity/stored_value.rb
CHANGED
@@ -1,57 +1,132 @@
|
|
1
|
+
|
1
2
|
module Casper
|
2
3
|
module Entity
|
3
4
|
|
4
5
|
# A class that represents a value stored in global state.
|
5
6
|
class StoredValue
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
8
|
+
# @param [Hash] stored_value
|
9
|
+
# @option stored_value [CLValue] :CLValue
|
10
|
+
# @option stored_value [Account] :Account
|
11
|
+
# @option stored_value [String] :ContractWasm
|
12
|
+
# @option stored_value [Contract] :Contract
|
13
|
+
# @option stored_value [ContractPackage] :ContractPackage
|
14
|
+
# @option stored_value [Transfer] :Transfer
|
15
|
+
# @option stored_value [DeployInfo] :DeployInfo
|
16
|
+
# @option stored_value [EraInfo] :EraInfo
|
17
|
+
# @option stored_value [Bid] :Bid
|
18
|
+
# @option stored_value [Array] :Withdraw
|
19
|
+
def initialize(stored_value = {})
|
20
|
+
@stored_value = stored_value
|
21
|
+
@cl_value = nil
|
22
|
+
@account = nil
|
23
|
+
@contract_wasm = nil
|
24
|
+
@contract = nil
|
25
|
+
@contract_package = nil
|
26
|
+
@transfer = nil
|
27
|
+
@deploy_info = nil
|
28
|
+
@era_info = nil
|
29
|
+
@bid = nil
|
30
|
+
@withdraw = nil
|
31
|
+
@key = nil
|
32
|
+
if stored_value.has_key?(:CLValue)
|
33
|
+
@cl_value = stored_value[:CLValue]
|
34
|
+
@key = :CLValue
|
35
|
+
end
|
36
|
+
if stored_value.has_key?(:Account)
|
37
|
+
@account = stored_value[:Account]
|
38
|
+
@key = :Account
|
39
|
+
end
|
40
|
+
if stored_value.has_key?(:ContractWasm)
|
41
|
+
@contract_wasm = stored_value[:ContractWasm]
|
42
|
+
@key = :ContractWasm
|
43
|
+
end
|
44
|
+
if stored_value.has_key?(:Contract)
|
45
|
+
@contract = stored_value[:Contract]
|
46
|
+
@key = :Contract
|
47
|
+
end
|
48
|
+
if stored_value.has_key?(:ContractPackage)
|
49
|
+
@contract_package = stored_value[:ContractPackage]
|
50
|
+
@key = :ContractPackage
|
51
|
+
end
|
52
|
+
if stored_value.has_key?(:Transfer)
|
53
|
+
@transfer = stored_value[:Transfer]
|
54
|
+
@key = :Transfer
|
55
|
+
end
|
56
|
+
if stored_value.has_key?(:DeployInfo)
|
57
|
+
@transfer = stored_value[:DeployInfo]
|
58
|
+
@key = :Deploy
|
59
|
+
end
|
60
|
+
if stored_value.has_key?(:EraInfo)
|
61
|
+
@era_info = stored_value[:EraInfo]
|
62
|
+
@key = :EraInfo
|
63
|
+
end
|
64
|
+
if stored_value.has_key?(:Bid)
|
65
|
+
@bid = stored_value[:Bid]
|
66
|
+
@key = :Bid
|
67
|
+
end
|
68
|
+
if stored_value.has_key?(:Withdraw)
|
69
|
+
@withdraw = stored_value[:Withdraw]
|
70
|
+
@key = :Withdraw
|
71
|
+
end
|
17
72
|
end
|
18
73
|
|
74
|
+
# @return [CLValue] a CasperLabs value.
|
19
75
|
def get_cl_value
|
20
76
|
@cl_value
|
21
77
|
end
|
22
78
|
|
79
|
+
# @return [Account] an account.
|
23
80
|
def get_account
|
24
81
|
@account
|
25
82
|
end
|
26
83
|
|
84
|
+
# @return [String] a contract’s Wasm
|
27
85
|
def get_contract
|
28
86
|
@contract
|
29
87
|
end
|
30
|
-
|
88
|
+
|
89
|
+
# @return [Contract] methods and type signatures supported by a contract.
|
90
|
+
def get_contract
|
91
|
+
@contract
|
92
|
+
end
|
93
|
+
# @return [ContractPackage] contract definition, metadata, and security container.
|
31
94
|
def get_contract_package
|
32
95
|
@contract_package
|
33
96
|
end
|
34
97
|
|
98
|
+
# @return [Transfer] record of a transfer
|
35
99
|
def get_transfer
|
36
100
|
@transfer
|
37
101
|
end
|
38
102
|
|
103
|
+
# @return [DeployInfo] record of a deploy
|
39
104
|
def get_deploy_info
|
40
105
|
@deploy_info
|
41
106
|
end
|
42
107
|
|
108
|
+
# @return [EraInfo] auction metadata
|
43
109
|
def get_era_info
|
44
110
|
@era_info
|
45
111
|
end
|
46
112
|
|
113
|
+
# @return [Bid] a bid
|
47
114
|
def get_bid
|
48
115
|
@bid
|
49
116
|
end
|
50
117
|
|
118
|
+
# @return [Array] a withdraw
|
51
119
|
def get_withdraw
|
52
120
|
@withdraw
|
53
121
|
end
|
54
122
|
|
123
|
+
def get_stored_value
|
124
|
+
@stored_value[@key]
|
125
|
+
end
|
126
|
+
|
127
|
+
def get_key
|
128
|
+
@key
|
129
|
+
end
|
55
130
|
end
|
56
131
|
end
|
57
132
|
end
|
@@ -2,6 +2,8 @@ require_relative './deploy_executable_item_internal.rb'
|
|
2
2
|
|
3
3
|
module Casper
|
4
4
|
module Entity
|
5
|
+
# Stored versioned contract referenced by its ContractPackageHash,
|
6
|
+
# entry point and an instance of RuntimeArgs.
|
5
7
|
class StoredVersionedContractByHash < DeployExecutableItemInternal
|
6
8
|
|
7
9
|
# @param [String] hash
|
@@ -2,6 +2,8 @@ require_relative './deploy_executable_item_internal.rb'
|
|
2
2
|
|
3
3
|
module Casper
|
4
4
|
module Entity
|
5
|
+
# Stored versioned contract referenced by a named key existing in the signer's Account context,
|
6
|
+
# entry point and an instance of RuntimeArgs.
|
5
7
|
class StoredVersionedContractByName < DeployExecutableItemInternal
|
6
8
|
|
7
9
|
# @param [String] name
|