Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support requesting faucet funds for address #24

Merged
merged 2 commits into from
May 2, 2024

Conversation

alex-stone
Copy link
Contributor

@alex-stone alex-stone commented May 1, 2024

What changed? Why?

This adds support for requesting faucet funds for a given address. This will be rate limited by the address via the smart contract that backs the faucet and via the API key (1 request every 24 hours).

This may be able to be loosened for base-sepolia via the Platform API, but those are the current rate limit parameters.

Qualified Impact

This adds a new functionality to an unreleased version. This only impacts the address model.

@@ -123,6 +123,10 @@ def to_s
address_id
end

def faucet

This comment was marked as resolved.

@alex-stone alex-stone force-pushed the stone/v0.0.3/faucet branch 4 times, most recently from d0c0155 to bf2c8d1 Compare May 2, 2024 17:28
lib/coinbase.rb Outdated
@@ -1,11 +1,14 @@
# frozen_string_literal: true

module Coinbase; end

require_relative 'coinbase/client'

This comment was marked as resolved.

This comment was marked as resolved.

# frozen_string_literal: true

module Coinbase
class FaucetTransaction
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These can be follow-ups but:

  1. Yardocs
  2. Can we addwait! and status functions as we do with Transfer. Possibly an opportunity to factor out an class or module that has those methods

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added docs fro this class.

The wait! and status functions could be added, but this transaction is only returned after it lands on-chain.

alex-stone added 2 commits May 2, 2024 11:50
This adds support for requesting faucet funds for a given address.
This will be rate limited by the address via the smart contract
that backs the faucet and via the API key (1 request every 24 hours).

This may be able to be loosened for base-sepolia via the Platform API,
but those are the current rate limit parameters.
@alex-stone alex-stone force-pushed the stone/v0.0.3/faucet branch from bf2c8d1 to e80053d Compare May 2, 2024 18:50
@alex-stone alex-stone requested a review from yuga-cb May 2, 2024 18:52
@alex-stone alex-stone merged commit 91a9ad9 into v0.0.3 May 2, 2024
5 checks passed
@alex-stone alex-stone deleted the stone/v0.0.3/faucet branch May 2, 2024 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants