Class: CLValue
- Inherits:
-
Object
- Object
- CLValue
- Defined in:
- lib/types/cl_value.rb
Overview
A Casper value, i.e. a value which can be stored and manipulated by smart contracts.
Direct Known Subclasses
CLAny, CLBool, CLByteArray, CLKey, CLList, CLMap, CLOption, CLPublicKey, CLResult, CLString, CLTuple, CLURef, CLUnit, CLi32, CLi64, CLu128, CLu256, CLu32, CLu512, CLu64, CLu8
Instance Method Summary collapse
-
#initialize(bytes = nil, cl_type = nil, parsed = nil) ⇒ CLValue
constructor
A new instance of CLValue.
- #to_hash(bytes, value, type) ⇒ Object
Constructor Details
#initialize(bytes = nil, cl_type = nil, parsed = nil) ⇒ CLValue
Returns a new instance of CLValue.
6 7 8 9 10 |
# File 'lib/types/cl_value.rb', line 6 def initialize(bytes = nil, cl_type = nil, parsed = nil) @bytes = bytes @cl_type = cl_type @parsed = parsed end |
Instance Method Details
#to_hash(bytes, value, type) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/types/cl_value.rb', line 12 def to_hash(bytes, value, type) { "bytes": bytes, "parsed": value, "cl_type": type } end |