Class: Radiator::SSC::Contracts
- Inherits:
-
BaseSteemSmartContractRPC
- Object
- BaseSteemSmartContractRPC
- Radiator::SSC::Contracts
- Defined in:
- lib/radiator/ssc/contracts.rb
Overview
The “contracts” endpoint
Constant Summary
Constants inherited from BaseSteemSmartContractRPC
BaseSteemSmartContractRPC::MAX_BACKOFF, BaseSteemSmartContractRPC::POST_HEADERS
Instance Method Summary collapse
-
#contract(name) ⇒ Object
Example using the defaults, backed by Steem Engine:.
-
#find(options = {}) ⇒ Object
Example using the defaults, backed by Steem Engine:.
-
#find_one(options = {}) ⇒ Object
Example using the defaults, backed by Steem Engine:.
-
#initialize(options = {}) ⇒ Contracts
constructor
A new instance of Contracts.
Methods inherited from BaseSteemSmartContractRPC
Constructor Details
#initialize(options = {}) ⇒ Contracts
Returns a new instance of Contracts.
9 10 11 12 |
# File 'lib/radiator/ssc/contracts.rb', line 9 def initialize( = {}) super @url = [:url] || "#{@root_url}/contracts" end |
Instance Method Details
#contract(name) ⇒ Object
21 22 23 |
# File 'lib/radiator/ssc/contracts.rb', line 21 def contract(name) request(method: 'getContract', params: {name: name}) end |
#find(options = {}) ⇒ Object
66 67 68 |
# File 'lib/radiator/ssc/contracts.rb', line 66 def find( = {}) request(method: 'find', params: ) end |
#find_one(options = {}) ⇒ Object
42 43 44 |
# File 'lib/radiator/ssc/contracts.rb', line 42 def find_one( = {}) request(method: 'findOne', params: ) end |