Class: Ethereum::FastVM::State
Instance Attribute Summary collapse
-
#gas ⇒ Object
Returns the value of attribute gas.
-
#memory ⇒ Object
Returns the value of attribute memory.
-
#pc ⇒ Object
Returns the value of attribute pc.
-
#stack ⇒ Object
Returns the value of attribute stack.
Instance Method Summary collapse
-
#initialize(**kwargs) ⇒ State
constructor
A new instance of State.
Constructor Details
#initialize(**kwargs) ⇒ State
Returns a new instance of State.
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/ethereum/fast_vm/state.rb', line 9 def initialize(**kwargs) @memory = [] @stack = [] @pc = 0 @gas = 0 kwargs.each do |k,v| class <<self self end.class_eval("attr_accessor :#{k}") send :"#{k}=", v end end |
Instance Attribute Details
#gas ⇒ Object
Returns the value of attribute gas.
7 8 9 |
# File 'lib/ethereum/fast_vm/state.rb', line 7 def gas @gas end |
#memory ⇒ Object
Returns the value of attribute memory.
7 8 9 |
# File 'lib/ethereum/fast_vm/state.rb', line 7 def memory @memory end |
#pc ⇒ Object
Returns the value of attribute pc.
7 8 9 |
# File 'lib/ethereum/fast_vm/state.rb', line 7 def pc @pc end |
#stack ⇒ Object
Returns the value of attribute stack.
7 8 9 |
# File 'lib/ethereum/fast_vm/state.rb', line 7 def stack @stack end |