You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: challenge/README.md
+19-9Lines changed: 19 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,15 +84,25 @@ await community.edit({
84
84
85
85
#### Challenge options
86
86
87
-
All option values must be strings (pkc-js challenge convention).
88
-
89
-
| Option | Default | Description |
90
-
|--------|---------|-------------|
91
-
|`chainTicker`|`"base"`| Chain where MintPass contract is deployed |
92
-
|`contractAddress`| Known deployment per chain | If omitted and `chainTicker` is supported, defaults to the known MintPass deployment for that chain |
93
-
|`requiredTokenType`|`"0"`| Required token type (0=SMS, 1=Email, 2+=future methods) |
94
-
|`transferCooldownSeconds`|`"604800"`| Cooldown period after NFT transfer (1 week) |
95
-
|`error`| Default message | Custom error message for users without NFT. Use `{authorAddress}` as a placeholder |
87
+
All option values must be strings (pkc-js challenge convention). Options are validated on community edit/create/start (pkc-js `>= 0.0.85`): `chainTicker`, `contractAddress` and `requiredTokenType` are required, unknown option keys are rejected, and malformed values fail the edit instead of silently rejecting every author.
88
+
89
+
| Option | Required | Default | Description |
90
+
|--------|----------|---------|-------------|
91
+
|`chainTicker`| yes |`"base"`| Chain where MintPass contract is deployed; `"base"` or `"eth"`|
92
+
|`contractAddress`| yes | Base Sepolia deployment | MintPass contract address; must be a well-formed EVM address |
|`bindToFirstAuthor`| no |`"true"`| Bind each tokenId to the first author that uses it in this community (`"true"`/`"false"`/`"1"`/`"0"`) |
95
+
|`noChallengeUrl`| no |`"false"`| Fail immediately when the NFT is missing instead of showing the mintpass.org iframe (`"true"`/`"false"`/`"1"`/`"0"`) |
96
+
|`transferCooldownSeconds`| no |`"604800"`| Cooldown period after NFT transfer (1 week); non-negative integer |
97
+
|`error`| no | Default message | Custom error message for users without NFT. Use `{authorAddress}` as a placeholder |
98
+
|`rpcUrl`| no | Chain default | Custom RPC URL (mainly for testing). **Must not** be listed in `publicOptions`; the challenge rejects that since RPC URLs often embed provider API keys |
99
+
100
+
#### Public options
101
+
102
+
`publicOptions` controls which options are written into the published community record. Recommended for MintPass:
103
+
104
+
- Publish `chainTicker`, `contractAddress`, `requiredTokenType` and `noChallengeUrl` so clients can tell authors up front which MintPass they need (and, with `noChallengeUrl`, that no iframe verification will be offered). Publishing `error`, `bindToFirstAuthor` and `transferCooldownSeconds` is harmless and explains rejections; that is the owner's call.
0 commit comments