configure-postparams
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseConfiguring PostParams on Art Blocks Tokens
配置Art Blocks代币的PostParam参数
What Are PostParams?
什么是PostParam?
PostParams (Post-Mint Parameters / PMP) are on-chain configurable parameters embedded in certain Art Blocks art scripts. After minting, authorized wallets can set values that directly affect the token's on-chain visual output — no re-mint required.
Each parameter has an controlling who can configure it:
authOption | Who can configure |
|---|---|
| Project artist only |
| Current token owner only |
| A specific configured contract address only |
| Artist or token owner |
| Artist or specific contract address |
| Token owner or specific contract address |
| Artist, token owner, or specific contract address |
PostParam(铸币后参数/PMP)是嵌入在部分Art Blocks艺术脚本中的链上可配置参数。铸币完成后,授权钱包可以设置参数值,直接影响代币的链上视觉输出——无需重新铸币。
每个参数都有一个字段,用于控制谁可以对其进行配置:
authOption | 可配置主体 |
|---|---|
| 仅项目创作者 |
| 仅当前代币持有者 |
| 仅指定的合约地址 |
| 创作者或代币持有者 |
| 创作者或指定合约地址 |
| 代币持有者或指定合约地址 |
| 创作者、代币持有者或指定合约地址 |
Token ID Format
代币ID格式
<contract_address>-<token_number>Example:
0xa7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd270-78000000<合约地址>-<代币编号>示例:
0xa7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd270-78000000Workflow
操作流程
Step 1 — Discover available params
步骤1 — 发现可用参数
discover_postparams(tokenId, chainId?)Returns: param keys, types, value constraints, current values, and for each param. Always show this to the user before asking for values — they need to know what's configurable and within what constraints.
authOptiondiscover_postparams(tokenId, chainId?)返回结果:每个参数的键、类型、值约束、当前值及。在请求用户输入参数值前,务必先展示这些信息——用户需要了解可配置项及其约束条件。
authOptionStep 2 — Build the configuration transaction
步骤2 — 构建配置交易
build_configure_postparams_transaction(tokenId, values, chainId?, signerAddress?)- is a key-value object — keys must match param keys from
valuesdiscover_postparams - Always pass when known — needed to determine artist status and validate authorization
signerAddress - One transaction configures all passed params at once
Returns an unsigned transaction object ready to sign and submit.
build_configure_postparams_transaction(tokenId, values, chainId?, signerAddress?)- 是键值对对象——键必须与
values返回的参数键匹配discover_postparams - 已知签名者地址时务必传入——这用于判断创作者身份并验证授权
signerAddress - 单次交易可同时配置所有传入的参数
返回一个待签名和提交的未签名交易对象。
Value Formats by Type
按类型划分的值格式
| Type | Format | Example |
|---|---|---|
| | |
| One of the allowed option strings | |
| Non-negative integer string | |
| Integer string (can be negative) | |
| Decimal string | |
| Hex color with | |
| Unix timestamp in seconds | |
| Any text string | |
| 类型 | 格式要求 | 示例 |
|---|---|---|
| | |
| 允许的选项字符串之一 | |
| 非负整数字符串 | |
| 整数字符串(可负数) | |
| 十进制数字字符串 | |
| 带 | |
| 以秒为单位的Unix时间戳 | |
| 任意文本字符串 | |
Notes
注意事项
- Always call first — param keys and types are project-specific and not guessable
discover_postparams - params: the
Stringflag on the built transaction depends on whetherconfiguringArtistStringmatches the project artist — always passsignerAddressforsignerAddresstype paramsString - Authorization: if the user's address doesn't match the for a param, the transaction will revert on-chain. Check
authOptionagainst the user's role before proceedingauthOption - One transaction per call, but you can configure multiple params in a single call by passing multiple keys in
values
- 务必先调用——参数的键和类型是项目专属的,无法猜测
discover_postparams - 类型参数:构建交易时的
String标志取决于configuringArtistString是否与项目创作者匹配——对于signerAddress类型参数,务必传入StringsignerAddress - 授权验证:如果用户地址不符合参数的要求,交易将在链上回滚。在操作前请检查用户角色是否符合
authOption的要求authOption - 单次调用对应一笔交易,但你可以通过在中传入多个键,在单次调用中配置多个参数",
values