Class: Beaconcha::Execution
- Inherits:
-
Object
- Object
- Beaconcha::Execution
- Defined in:
- lib/beaconcha/execution.rb
Instance Method Summary collapse
- #address(address:, token: nil) ⇒ Object
- #block(block_number:) ⇒ Object
- #eth1deposit(txhash:) ⇒ Object
- #gasnow ⇒ Object
-
#initialize(api_key: nil, uri_base: nil) ⇒ Execution
constructor
A new instance of Execution.
- #produced(id:, limit: nil, offset: nil) ⇒ Object
Constructor Details
#initialize(api_key: nil, uri_base: nil) ⇒ Execution
Returns a new instance of Execution.
3 4 5 6 |
# File 'lib/beaconcha/execution.rb', line 3 def initialize(api_key: nil, uri_base: nil) Beaconcha.configuration.api_key = api_key if api_key Beaconcha.configuration.uri_base = uri_base if uri_base end |
Instance Method Details
#address(address:, token: nil) ⇒ Object
12 13 14 |
# File 'lib/beaconcha/execution.rb', line 12 def address(address:, token: nil) Beaconcha::Client.get(path: "/execution/address/#{address}", query: { token: token }) end |
#block(block_number:) ⇒ Object
16 17 18 |
# File 'lib/beaconcha/execution.rb', line 16 def block(block_number:) Beaconcha::Client.get(path: "/execution/block/#{block_number}") end |
#eth1deposit(txhash:) ⇒ Object
8 9 10 |
# File 'lib/beaconcha/execution.rb', line 8 def eth1deposit(txhash:) Beaconcha::Client.get(path: "/eth1deposit/#{txhash}") end |