feat(token-mint-authority): add testnet faucet mint-authority program - #331
Open
0x-r4bbit wants to merge 1 commit into
Open
feat(token-mint-authority): add testnet faucet mint-authority program#3310x-r4bbit wants to merge 1 commit into
0x-r4bbit wants to merge 1 commit into
Conversation
0x-r4bbit
force-pushed
the
feat/token-minter
branch
2 times, most recently
from
August 27, 2026 07:04
9bd9e2e to
66983e1
Compare
A permissionless faucet that holds the mint authority for faucet token definitions and lets any account self-mint a fixed grant, so testers can fund themselves on testnet. The call chain is user -> token-mint-authority -> token: the program holds no key and delegates every mint to the token program under a PDA seed. - `FaucetMint` (no amount) mints a fixed 10_000e18 to the caller, at most once per 24h per (recipient, token definition), via a chained `Token::MintWithAuthority` authorized by the mint-authority PDA seed. - Rate limiting is a per-(recipient, definition) `MintAllowance` PDA (last-mint timestamp), claimed on first use and rewritten thereafter. - Wall-clock time is read from the system CLOCK_01 account, as the stablecoin program does. Setup: the faucet token must be created via the token program's `NewFungibleDefinition` with `mint_authority` set to `compute_mint_authority_pda(<program id>)`; the program refuses to mint a token whose stored authority is not its PDA.
0x-r4bbit
force-pushed
the
feat/token-minter
branch
from
August 27, 2026 07:35
66983e1 to
a813456
Compare
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.
A permissionless faucet that holds the mint authority for faucet token definitions and lets any account self-mint a fixed grant, so testers can fund themselves on testnet. The call chain is user -> token-mint-authority -> token: the program holds no key and delegates every mint to the token program under a PDA seed.
FaucetMint(no amount) mints a fixed 10_000e18 to the caller, at most once per 24h per (recipient, token definition), via a chainedToken::MintWithAuthorityauthorized by the mint-authority PDA seed.MintAllowancePDA (last-mint timestamp), claimed on first use and rewritten thereafter.Setup: the faucet token must be created via the token program's
NewFungibleDefinitionwithmint_authorityset tocompute_mint_authority_pda(<program id>); the program refuses to mint a token whose stored authority is not its PDA.