Class: Coinbase::FaucetTransaction
- Inherits:
-
Object
- Object
- Coinbase::FaucetTransaction
- Defined in:
- lib/coinbase/faucet_transaction.rb
Overview
A representation of a transaction from a faucet. a user-controlled Wallet to another address. The fee is assumed to be paid in the native Asset of the Network. Transfers should be created through Wallet#transfer or Address#transfer.
Instance Attribute Summary collapse
-
#model ⇒ Object
readonly
Returns the value of attribute model.
Instance Method Summary collapse
-
#initialize(model) ⇒ FaucetTransaction
constructor
Returns a new FaucetTransaction object.
-
#inspect ⇒ String
Same as to_s.
-
#to_s ⇒ String
Returns a String representation of the FaucetTransaction.
-
#transaction_hash ⇒ String
Returns the transaction hash.
-
#transaction_link ⇒ String
Returns the link to the transaction on the blockchain explorer.
Constructor Details
#initialize(model) ⇒ FaucetTransaction
Returns a new FaucetTransaction object. Do not use this method directly - instead, use Address#faucet.
11 12 13 |
# File 'lib/coinbase/faucet_transaction.rb', line 11 def initialize(model) @model = model end |
Instance Attribute Details
#model ⇒ Object (readonly)
Returns the value of attribute model.
15 16 17 |
# File 'lib/coinbase/faucet_transaction.rb', line 15 def model @model end |
Instance Method Details
#inspect ⇒ String
Same as to_s.
38 39 40 |
# File 'lib/coinbase/faucet_transaction.rb', line 38 def inspect to_s end |
#to_s ⇒ String
Returns a String representation of the FaucetTransaction.
32 33 34 |
# File 'lib/coinbase/faucet_transaction.rb', line 32 def to_s "Coinbase::FaucetTransaction{transaction_hash: '#{transaction_hash}', transaction_link: '#{transaction_link}'}" end |
#transaction_hash ⇒ String
Returns the transaction hash.
19 20 21 |
# File 'lib/coinbase/faucet_transaction.rb', line 19 def transaction_hash model.transaction_hash end |
#transaction_link ⇒ String
Returns the link to the transaction on the blockchain explorer.
25 26 27 28 |
# File 'lib/coinbase/faucet_transaction.rb', line 25 def transaction_link # TODO: Parameterize this by Network. "https://sepolia.basescan.org/tx/#{transaction_hash}" end |