Spore(type)约束Spore (type) Constraints
来源:sporeprotocol/spore-contract / contracts/spore/src/entry.rs + lib/utils + lib/errors · mainnet 0x4a4d…b9f5(data1)/ testnet v2 0x685a…0a0d、v1 0xbbad…3494(data1)(spore-sdk)Source: sporeprotocol/spore-contract / contracts/spore/src/entry.rs + lib/utils + lib/errors · mainnet 0x4a4d…b9f5 (data1) / testnet v2 0x685a…0a0d, v1 0xbbad…3494 (data1) (spore-sdk)
Spore Protocol
- 官网Websitespore.pro
- 文档Docsdocs.spore.pro
- GitHubGitHubgithub.com/sporeprotocol
来源:Source: spore-contract README; sporeprotocol GitHub org profile
0 → 1铸造 MintMint
Inputs 输入Inputs
tx.inputs[0]任意 cell(用于计算 spore_id)any cell (used to derive spore_id)
可选:cluster 授权optional: cluster authorizationcluster cell 在输入+输出
或 cluster 的 lock 在输入+输出(lock proxy)
或 cluster agentcluster cell in inputs+outputs
or the cluster's lock in inputs+outputs (lock proxy)
or a cluster agent
➜
Outputs 输出Outputs
spore cellCell{
type: { codeHash: SPORE, hashType: data1,
args: spore_id = type_id(inputs[0], i) },
data: SporeData{
content_type: "image/png"…,
content: bytes,
cluster_id: Some(32B)?
}
}
data:SporeData(molecule table)data: SporeData (molecule table)
content_typeBytes
contentBytes
cluster_id?BytesOpt
- content_type Bytes MIME,可带 ;immortal=true、mutant[]=…MIME, may carry ;immortal=true, mutant[]=… 非空且可解析non-empty and parsable (64 / 80–87)
- content Bytes NFT 内容NFT content 非空;multipart 需含 --boundarynon-empty; multipart must contain --boundary (66 / 69)
- cluster_id? BytesOpt 所属 cluster 的 type argstype args of the owning cluster cluster cell 在 cell_depscluster cell in cell_deps (6 / 7)
限制Constraints
- group:: 输出 ≤ 1outputs ≤ 1 (67)
- data:: 是合法 SporeDatais a valid SporeData (62)
- args[0..32] = blake2b(inputs[0] ‖ 输出序号 u64)= blake2b(inputs[0] ‖ output index u64) (63)
- cluster_id:: cell_deps 有该 cluster;需 cluster 或其 lock(或 agent)同时在输入输出that cluster is in cell_deps; the cluster or its lock (or agent) must be in both inputs and outputs (6 / 7)
- mutant:: content_type 声明的每个 mutant 都在 cell_deps,执行扩展并支付费用;cluster 要求的 mutant 必须被引用every declared mutant is in cell_deps, runs and is paid; the cluster's required mutant must be applied (71 / 72 / 73 / 74)
- witness:: co-build Message 中恰有一个本脚本的 SporeAction,字段与 cell 一致(HEAD 源码;已部署版本可能不同,未核实)exactly one SporeAction for this script in the co-build Message, fields match the cell (HEAD source; deployed version may differ, unverified) (8–13)
1 → 1转移 TransferTransfer
Inputs 输入Inputs
sporeCell{ lock: A, type: SPORE(id), data: D }
➜
Outputs 输出Outputs
sporeCell{ lock: B, type: SPORE(id), data: D }
限制Constraints
- group:: 输入 ≤ 1、输出 ≤ 1inputs ≤ 1, outputs ≤ 1 (67 / 68)
- data:: 字节完全相同byte-identical (61)
- witness:: co-build Message 中恰有一个本脚本的 SporeAction,字段与 cell 一致(HEAD 源码;已部署版本可能不同,未核实)exactly one SporeAction for this script in the co-build Message, fields match the cell (HEAD source; deployed version may differ, unverified) (8–13)
1 → 0销毁 BurnBurn
Inputs 输入Inputs
sporeCell{ type: SPORE(id), data: D }
➜
Outputs 输出Outputs
outputs不含该 sporeno cell with this spore
限制Constraints
- content_type:: 不能带 immortal=truemust not have immortal=true (65)
- witness:: co-build Message 中恰有一个本脚本的 SporeAction,字段与 cell 一致(HEAD 源码;已部署版本可能不同,未核实)exactly one SporeAction for this script in the co-build Message, fields match the cell (HEAD source; deployed version may differ, unverified) (8–13)
部署与来源Deployments & source 未核验unverified
源码source sporeprotocol/spore-contract@9a6010e4 · contracts/spore/src/entry.rs · lib/utils · lib/errors/src/error.rs (default-branch HEAD recorded at backfill 2026-10-21; spec/plugin were written from the default branch shortly before (exact read commit not recorded))
二进制核验binary check 未核验unverified no binary or checksum at the recorded commit matched the deployed data hash (reproducible build not attempted)
0x4a4dce1df3…7132b9f5: listed in deployment/migration/mainnet/spore/2024-01-25-0.2.2-beta.1.json
0x685a602193…02130a0d: listed in deployment/migration/testnet/spore/2024-03-16-0.2.2-beta.2.json
0xbbad126377…6c133494: listed in deployment/frozen/testnet.toml
0x4a4dce1df3…7132b9f5: listed in deployment/migration/mainnet/spore/2024-01-25-0.2.2-beta.1.json
0x685a602193…02130a0d: listed in deployment/migration/testnet/spore/2024-03-16-0.2.2-beta.2.json
0xbbad126377…6c133494: listed in deployment/frozen/testnet.toml
| 网络network | code_hash | cell_dep | type_id args | 数据哈希data hash | 部署交易deploy tx |
|---|---|---|---|---|---|
| mainnet | 0x4a4dce1df3dffff7f8b2cd7dff7303df3b6150c9788cb75dcf6747247132b9f5 data1 | 0x96b198fb5d…a1b69824:0 code | — | 0x4a4dce1df3…7132b9f5 | 0x96b198fb5d…a1b69824 #12042082 |
| testnet | 0x685a60219309029d01310311dba953d67029170ca4848a4ff638e57002130a0d data1 | 0x5e8d2a517d…7d9d5a1f:0 code | 0xff279a6deb…a234428a | 0x685a602193…02130a0d | 0x5e8d2a517d…7d9d5a1f #12606776 |
| testnet | 0xbbad126377d45f90a8ee120da988a2d7332c78ba8fd679aab478a19d6c133494 data1 | 0xfd694382e6…fc37fd19:0 code | 0x4b4e91f744…e0dae6fe | 0xbbad126377…6c133494 | 0xfd694382e6…fc37fd19 #10228288 |
| mainnet | 0xcfba73b58b6f30e70caed8a999748781b164ef9a1e218424a6fb55ebf641cb33 type | 0xb88032a061…3d960c6d:0 code | 0x62312cd846…13e0e3de | 0x45721f0b3b…45e1d6cd | 0xb88032a061…3d960c6d #15198802 |
| testnet | 0x0b1f412fbae26853ff7d082d422c2bdd9e2ff94ee8aaec11240a5b34cc6e890f type | 0x306961e0eb…5e32dc6f:0 code | 0x80f0d4bf6b…5c36f680 | 0x0766968599…2aa75927 | 0x306961e0eb…5e32dc6f #14415430 |
链上数据核对于 on-chain data checked 2026-10-20
错误码(lib/errors):5 InvalidClusterData · 6 ClusterCellNotInDep · 7 ClusterOwnershipVerifyFailed · 8–13 co-build · 60 BoundaryEncoding · 61 ModifySporePermanentField · 62 InvalidSporeData · 63 InvalidSporeID · 64 InvalidContentType · 65 DestroyImmortalNFT · 66 EmptyContent · 67 ConflictCreation · 68 MultipleSpend · 69 InvalidMultipartContent · 70 MIMEParsingError · 71–74 extension · 80–87 MIMEError codes (lib/errors): 5 InvalidClusterData · 6 ClusterCellNotInDep · 7 ClusterOwnershipVerifyFailed · 8–13 co-build · 60 BoundaryEncoding · 61 ModifySporePermanentField · 62 InvalidSporeData · 63 InvalidSporeID · 64 InvalidContentType · 65 DestroyImmortalNFT · 66 EmptyContent · 67 ConflictCreation · 68 MultipleSpend · 69 InvalidMultipartContent · 70 MIMEParsingError · 71–74 extension · 80–87 MIME
spore-sdk 还列出 tag 为 did 的 Spore 部署(mainnet 0xcfba…cb33 / testnet 0x0b1f…890f,type),本解码器按 Spore 解析spore-sdk also lists a Spore deployment tagged did (mainnet 0xcfba…cb33 / testnet 0x0b1f…890f, type); the decoder treats it as Spore
spore-sdk 还列出 tag 为 did 的 Spore 部署(mainnet 0xcfba…cb33 / testnet 0x0b1f…890f,type),本解码器按 Spore 解析spore-sdk also lists a Spore deployment tagged did (mainnet 0xcfba…cb33 / testnet 0x0b1f…890f, type); the decoder treats it as Spore