Module: Harmony::Api::V1::Blockchain::Protocol
- Included in:
- Client
- Defined in:
- lib/harmony/api/v1/blockchain/protocol.rb
Instance Method Summary collapse
- #gas_price ⇒ Object
- #get_epoch ⇒ Object
- #get_leader ⇒ Object
- #get_node_metadata ⇒ Object
- #get_sharding_structure ⇒ Object
- #protocol_version ⇒ Object
- #syncing ⇒ Object
Instance Method Details
#gas_price ⇒ Object
24 25 26 |
# File 'lib/harmony/api/v1/blockchain/protocol.rb', line 24 def gas_price response(post('gasPrice'))&.to_i(16) end |
#get_epoch ⇒ Object
20 21 22 |
# File 'lib/harmony/api/v1/blockchain/protocol.rb', line 20 def get_epoch response(post('getEpoch'))&.to_i(16) end |
#get_leader ⇒ Object
16 17 18 |
# File 'lib/harmony/api/v1/blockchain/protocol.rb', line 16 def get_leader response(post('getLeader')) end |
#get_node_metadata ⇒ Object
28 29 30 |
# File 'lib/harmony/api/v1/blockchain/protocol.rb', line 28 def response(post('getNodeMetadata')) end |
#get_sharding_structure ⇒ Object
12 13 14 |
# File 'lib/harmony/api/v1/blockchain/protocol.rb', line 12 def get_sharding_structure response(post('getShardingStructure')) end |
#protocol_version ⇒ Object
8 9 10 |
# File 'lib/harmony/api/v1/blockchain/protocol.rb', line 8 def protocol_version response(post('protocolVersion'))&.to_i(16) end |
#syncing ⇒ Object
32 33 34 |
# File 'lib/harmony/api/v1/blockchain/protocol.rb', line 32 def syncing response(post('syncing')) end |