Affix deployment to BOT chain
Julien Béranger
+ Claude Opus 5.5
Summary
The Affix contracts were deployed to BOT chain (chain ID 677) with
Foundry's forge script. Both contracts are verified on
the chain's Blockscout explorer, scan.botchain.ai. The first
entity, "Affix Official", is registered, and its first agent has issued its first document.
| Contract | Address | Verified |
|---|---|---|
| AffixFactory | 0x217e2225a623412A7e9F43Bc0207c1bD1ed4f9Dc | Yes |
| AffixRegistry | 0x94E5E95128aA2684B0A51b5Ea30C601e6f72aeB7 | Yes |
Deployer, factory owner and registry owner: 0x9747098f57D9D7994fe416e4160F2aD1D15F2a99.
Build settings
- Compiler: Solidity 0.8.30
- Optimizer: 10,000 runs
- EVM version:
shanghai
Factory deployment
script/DeployAffixFactory.sol deploys AffixFactory through the
Safe Singleton Factory at
0x914d7Fec6aaC8cd542e72Bca78B30650d45643d7. Because it uses CREATE2, the
address can be computed before the deployment. The script did not detect the network, so its logs show "Unknown Network"
and "Unknown explorer".
First a dry run:
forge script script/DeployAffixFactory.sol --rpc-url $BOT_RPCThen the broadcast, with verification on Blockscout:
forge script script/DeployAffixFactory.sol --rpc-url $BOT_RPC --broadcast \
--verify --verifier blockscout --verifier-url $BOT_SCAN| Field | Value |
|---|---|
| Salt | 0x6d34fa6aaad013a13dd309180dcadb06ade09971b76f64f9e573e4ea5f35c3dc |
| Creation code | 13,007 bytes |
| Transaction | 0x67df0a47…3f19 |
| Block | 26756147 |
| Gas | 2,837,128 at 20 gwei, 0.05674256 ETH paid |
| Constructor | 0x0000000000000000000000009747098f57d9d7994fe416e4160f2ad1d15f2a99 (initial owner) |
| Verification | GUID 217e2225a623412a7e9f43bc0207c1bd1ed4f9dc6ad0894c, Pass - Verified after one retry |
The script checked that the deployed address matched the expected one and that ownership was set to the deployer.
Entity registration
script/RegisterEntity.s.sol was updated with the new factory address, then run as a dry
run and as a broadcast:
forge script script/RegisterEntity.s.sol --rpc-url $BOT_RPC
forge script script/RegisterEntity.s.sol --rpc-url $BOT_RPC --broadcastThe factory owner called registerEntity, which deployed a new AffixRegistry:
| Field | Value |
|---|---|
| Name | Affix Official |
| URL | https://affix.w3hc.org/about |
| Owner | 0x9747098f57D9D7994fe416e4160F2aD1D15F2a99 |
| Agents | 0 |
| Transaction | 0xe2a02456…d0d9 |
| Block | 26756387 |
| Gas | 1,901,644 at 20 gwei, 0.03803288 ETH paid |
After registration the factory reported 1 entity in total.
The second command did not pass --verify, but Blockscout verified the registry automatically on 2026-10-15 through
its Ethereum Bytecode Database,
matching it against the sources submitted with the factory. It shows as a
partial match.
First document
Agent 0xA3bc3Bb144f1E1834a1b92245BF10F33EB331557 was added to the registry, then issued the first document from the
Affix web app. The app checked that the agent can issue documents, then called
issueDocument(cid) on the registry, with no metadata:
| Field | Value |
|---|---|
| Issuer | 0xA3bc3Bb144f1E1834a1b92245BF10F33EB331557 (nonce 0) |
| Registry | 0x94E5E95128aA2684B0A51b5Ea30C601e6f72aeB7 |
| CID | bafkreidj2f2tnm4krqvighogrbtdez6ovksp2ap6fmkaokbky5kwaobyku |
| Metadata | None |
| Transaction | 0xbc98b657…8d58 |
| Block | 26759348 |
| Gas limit | 259,392 |
Next steps
- Add more agents with
addAgent(address). It is payable and needs at least 0.000001 ETH. - Issue documents with metadata through
issueDocumentWithMetadata(cid, metadata).
Broadcast receipts are in broadcast/DeployAffixFactory.sol/677/ and broadcast/RegisterEntity.s.sol/677/.