Token-gated launches
A token-gated offer attaches a Condition that the buyer's wallet must satisfy at commit time. Built into the protocol — no off-chain allow-listing required.
Condition shape
{
method: 0 | 1 | 2, // 0=None, 1=Threshold, 2=TokenRange
tokenType: 0 | 1 | 2, // 0=ERC-20, 1=ERC-721, 2=ERC-1155
tokenAddress: "0x…",
tokenId: "<token id, for 721/1155>",
threshold: "<min balance, for 20>",
maxCommits: "1", // per address
gating: 0 | 1, // 0=PerAddress, 1=PerTokenId
}Create a token-gated offer
const tx = await sdk.createOfferWithCondition({
offer: { /* …regular offer fields… */ },
condition: {
method: 1, // Threshold
tokenType: 0, // ERC-20
tokenAddress: USDC_ADDRESS,
threshold: "100000000", // must hold ≥ 100 USDC
maxCommits: "1",
gating: 0, // per address
},
})Or via MCP: create_offer_with_condition.
Per-tokenId gating (drops)
For drops where each token in a collection gets one commit, use gating: 1 (PerTokenId) with an ERC-721 / 1155 condition. Each tokenId can be used maxCommits times in total.
Common gotchas
- The condition is checked at commit time, not creation time. If the buyer no longer holds the gating token at commit, the tx reverts.
maxCommitsis per-address (or per-tokenId). A buyer withmaxCommits = 1can't commit a second time, even if they hold more tokens.- Condition enum naming. "TokenRange" sometimes appears as "SpecificToken" in older SDK versions. Pin SDK version.
Next
- Reference → Core SDK → Groups mixin.
- Reference → MCP tools →
create_offer_with_condition. - Recipes → Token-gated launch.