feat: network faucet field and akt faucet command - #92
Open
cloud-j-luna wants to merge 1 commit into
Open
Conversation
cloud-j-luna
force-pushed
the
feat/network-faucet
branch
2 times, most recently
from
September 1, 2026 14:23
42887d5 to
9bd9eba
Compare
cloud-j-luna
marked this pull request as ready for review
September 1, 2026 15:52
Networks gain an optional faucet URL, populated from the upstream akash-network/net registry meta.json faucets entry and settable with --faucet on 'akt context network create/edit'. Mainnet publishes no faucet entry, so it never gets one; the field shows in network show. 'akt faucet' resolves the active context's network faucet and default account. By default it prints the faucet URL and the address to paste; with --send it submits the address to the faucet's /faucet endpoint and reports the returned transaction hash. Behavior is a single ordered state machine covering Console-managed, network-less, mainnet, and unconfigured contexts. --send records a type=faucet action-log entry and is refused on mainnet. 'akt context show' points at the command.
cloud-j-luna
force-pushed
the
feat/network-faucet
branch
from
September 1, 2026 16:38
9bd9eba to
f7003bd
Compare
cloud-j-luna
requested a deployment
to
console-sandbox
September 1, 2026 16:44 — with
GitHub Actions
Waiting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds an optional
faucetURL to each network and a top-levelakt faucetcommand for requesting test funds.For someone testing on sandbox or testnet,
akt faucetprints the active network's faucet URL and the account address to paste;akt faucet --sendsubmits the request for you and reports the transaction hash. For the maintainer, it is one optional field on the network model plus a command whose behavior is a single ordered state machine.Details
Network.Faucet, optional. Populated from the upstreamakash-network/netregistrymeta.jsonfaucets[0].urlduring first-run bootstrap, from the sandbox template, and manually via--faucetonakt context network create/edit. Renders innetwork show(pretty and json), omitted when empty. Mainnet publishes nofaucetsentry upstream, so it never gets one.akt faucet(display) is read-only.akt faucet --sendPOSTs the address to the faucet's/faucetendpoint. The deployed sandbox/test faucets accept this unauthenticated and broadcast aMsgSend, returning a transaction hash; verified end to end on sandbox-2 (25 AKT credited, txcode 0).--sendrecords atype=faucetaction-log entry (state-changing per SPEC §5.6) and is refused on mainnet.akt context showpoints at the command for discovery.Behavior
akt faucetruns an ordered check, first match wins:akt context network edit ... --faucet <url>.--sendadditionally refuses on mainnet and requires a resolvable default account. The faucet enforces a per-address rate limit (about one grant/day), which surfaces as the faucet's error message.Verification
GOWORK=off go test, e2e excluded as CI does), including new tests for the--sendHTTP path, action-log entries on success and failure, mainnet refusal, and JSON output shape (viahttptest, no real network in tests).--sendand--output json, and confirmed the resulting transaction on-chain.