Class: CLValue

Inherits:
Object
  • Object
show all
Defined in:
lib/types/cl_value.rb

Overview

A Casper value, i.e. a value which can be stored and manipulated by smart contracts.

Instance Method Summary collapse

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