superrare-mint
Mint aaigotchi art into a SuperRare-compatible ERC-721 contract using Bankr signing.
Required mint choice
Before any mint, aaigotchi must clearly choose and state one of these modes:
- mint into an existing collection already owned or handed over by a SuperRare artist
- requires
--contract or
config.json collectionContract
- mint into a collection deployed through
superrare-deploy
- requires a
superrare-deploy receipt, either explicit or auto-resolved
Do not broadcast a mint without an explicit contract mode.
Scripts
- Uploads media to SuperRare and pins metadata.
- Prints JSON including
tokenUri and
gatewayUrl.
- Builds calldata for
mintTo(string,address,address) or
addNewToken(string).
- Refuses to run without a clear contract mode.
- Prints the chosen mode and collection source before any broadcast.
- Validates that an
own-deployed receipt matches the selected chain.
- Defaults to dry-run unless
--broadcast is passed or
DRY_RUN=0.
- Submits without waiting on Bankr, then polls chain directly for the receipt.
- Writes a JSON receipt on successful broadcast.
- End-to-end wrapper: upload metadata, then mint via Bankr.
- Use
--metadata-only to stop after pinning and print the token URI.
Config
Default config path:
- -
config.json in this skill directory
Override with:
Expected keys:
- -
chain: mainnet, sepolia, base, or INLINECODE24 - INLINECODE25 :
ownership-given or INLINECODE27 - INLINECODE28
- INLINECODE29 (optional explicit path to a
superrare-deploy receipt) - INLINECODE31
- INLINECODE32
- INLINECODE33
- INLINECODE34
- INLINECODE35
Defaults and safety
- - Dry-run is the default. Mint transactions only broadcast with
--broadcast or DRY_RUN=0. - Supported chains are
mainnet, sepolia, base, and base-sepolia. - Broadcast mode uses a short Bankr submit timeout and then waits for the onchain receipt directly, which avoids hanging on long confirmation waits.
- INLINECODE42 still uploads media/metadata to SuperRare before the dry-run mint preview. Use
--metadata-only if you want to stop after pinning and inspect the token URI. - If neither
receiver nor royaltyReceiver is set, the skill calls addNewToken(string). - If either receiver field is provided, the skill calls
mintTo(string,address,address). - If only one of
receiver or royaltyReceiver is set, the other defaults to the same address. - Successful broadcasts write receipts into
receipts/.
Deploy receipt auto-resolution
In own-deployed mode, the skill looks for a deploy receipt in this order:
- 1. INLINECODE52
- INLINECODE53
- INLINECODE54 INLINECODE55
- the latest receipt in a sibling
superrare-deploy/receipts/ directory
The resolved deploy receipt must match the selected mint chain.
Bankr API key resolution
- 1. INLINECODE57
- INLINECODE58
- INLINECODE59
- INLINECODE60
- INLINECODE61
Quick use
CODEBLOCK0
Timeouts
Optional environment variables:
- -
BANKR_SUBMIT_TIMEOUT_SECONDS (default 60) - INLINECODE64 (default
300) - INLINECODE66 (default
5)
superrare-mint
使用Bankr签名将aaigotchi艺术品铸造到兼容SuperRare的ERC-721合约中。
必需的铸造模式
在铸造前,aaigotchi必须明确选择并声明以下模式之一:
- 铸造到SuperRare艺术家已拥有或移交的现有收藏中
- 需要--contract或config.json中的collectionContract
- 铸造到通过superrare-deploy部署的收藏中
- 需要superrare-deploy收据,可显式指定或自动解析
未指定合约模式时不得广播铸造。
脚本
- - ./scripts/pin-metadata.mjs --name ... --description ... --image ... [--video ...] [--tag ...] [--attribute trait=value]
- 将媒体上传至SuperRare并固定元数据。
- 打印包含tokenUri和gatewayUrl的JSON。
- - ./scripts/mint-via-bankr.sh --token-uri --contract-mode ownership-given|own-deployed [--contract ] [--deploy-receipt ] [--receiver ] [--royalty-receiver ] [--chain mainnet|sepolia|base|base-sepolia] [--broadcast]
- 为mintTo(string,address,address)或addNewToken(string)构建调用数据。
- 未明确合约模式时拒绝运行。
- 在任何广播前打印所选模式和收藏来源。
- 验证own-deployed收据是否与所选链匹配。
- 默认为模拟运行,除非传递--broadcast或设置DRY_RUN=0。
- 提交时不等待Bankr,直接轮询链获取收据。
- 成功广播后写入JSON收据。
- - ./scripts/mint-art.sh --name ... --description ... --image ... --contract-mode ownership-given|own-deployed [options]
- 端到端封装:上传元数据,然后通过Bankr铸造。
- 使用--metadata-only可在固定后停止并打印代币URI。
配置
默认配置路径:
可通过以下方式覆盖:
- - SUPERRARECONFIG_FILE=/path/to/config.json
预期键值:
- - chain:mainnet、sepolia、base或base-sepolia
- contractMode:ownership-given或own-deployed
- collectionContract
- deployReceiptFile(superrare-deploy收据的可选显式路径)
- receiver
- royaltyReceiver
- rpcUrl
- apiBaseUrl
- descriptionPrefix
默认与安全
- - 默认为模拟运行。仅当使用--broadcast或DRY_RUN=0时才会广播铸造交易。
- 支持的链为mainnet、sepolia、base和base-sepolia。
- 广播模式使用较短的Bankr提交超时,然后直接等待链上收据,避免因长时间确认等待而挂起。
- mint-art.sh在模拟铸造预览前仍会将媒体/元数据上传至SuperRare。如需在固定后停止并检查代币URI,请使用--metadata-only。
- 如果未设置receiver和royaltyReceiver,技能将调用addNewToken(string)。
- 如果提供了任一接收者字段,技能将调用mintTo(string,address,address)。
- 如果仅设置了receiver或royaltyReceiver之一,另一个将默认为同一地址。
- 成功广播会将收据写入receipts/目录。
部署收据自动解析
在own-deployed模式下,技能按以下顺序查找部署收据:
- 1. --deploy-receipt
- SUPERRAREDEPLOYRECEIPTFILE
- config.json中的deployReceiptFile
- 同级superrare-deploy/receipts/目录中的最新收据
解析到的部署收据必须与所选铸造链匹配。
Bankr API密钥解析
- 1. BANKRAPIKEY
- systemctl --user show-environment
- ~/.openclaw/skills/bankr/config.json
- ~/.openclaw/workspace/skills/bankr/config.json
- ~/.bankr/config.json
快速使用
bash
cp config.example.json config.json
./scripts/mint-via-bankr.sh \
--token-uri ipfs://... \
--contract-mode ownership-given \
--contract 0xYourArtistGivenCollection \
--broadcast
./scripts/mint-via-bankr.sh \
--token-uri ipfs://... \
--contract-mode own-deployed \
--chain base \
--deploy-receipt ../superrare-deploy/receipts/2026-03-15T00-00-00Z-superrare-deploy.json \
--broadcast
./scripts/mint-art.sh \
--name aaigotchi genesis #1 \
--description First aaigotchi genesis mint \
--image ./art.png \
--contract-mode own-deployed \
--chain base \
--broadcast
超时设置
可选环境变量:
- - BANKRSUBMITTIMEOUTSECONDS(默认60)
- RECEIPTWAITTIMEOUTSECONDS(默认300)
- RECEIPTPOLLINTERVAL_SECONDS(默认5)