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.

ContractAddressVerified
AffixFactory0x217e2225a623412A7e9F43Bc0207c1bD1ed4f9DcYes
AffixRegistry0x94E5E95128aA2684B0A51b5Ea30C601e6f72aeB7Yes

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_RPC

Then the broadcast, with verification on Blockscout:

forge script script/DeployAffixFactory.sol --rpc-url $BOT_RPC --broadcast \
  --verify --verifier blockscout --verifier-url $BOT_SCAN
FieldValue
Salt0x6d34fa6aaad013a13dd309180dcadb06ade09971b76f64f9e573e4ea5f35c3dc
Creation code13,007 bytes
Transaction0x67df0a47…3f19
Block26756147
Gas2,837,128 at 20 gwei, 0.05674256 ETH paid
Constructor0x0000000000000000000000009747098f57d9d7994fe416e4160f2ad1d15f2a99 (initial owner)
VerificationGUID 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 --broadcast

The factory owner called registerEntity, which deployed a new AffixRegistry:

FieldValue
NameAffix Official
URLhttps://affix.w3hc.org/about
Owner0x9747098f57D9D7994fe416e4160F2aD1D15F2a99
Agents0
Transaction0xe2a02456…d0d9
Block26756387
Gas1,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:

FieldValue
Issuer0xA3bc3Bb144f1E1834a1b92245BF10F33EB331557 (nonce 0)
Registry0x94E5E95128aA2684B0A51b5Ea30C601e6f72aeB7
CIDbafkreidj2f2tnm4krqvighogrbtdez6ovksp2ap6fmkaokbky5kwaobyku
MetadataNone
Transaction0xbc98b657…8d58
Block26759348
Gas limit259,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/.

Further reading