---
title: Affix deployment to BOT chain
description: Recap of the AffixFactory deployment, the Affix Official entity registration and the first issued document on BOT chain (chain ID 677).
date: 2026-10-15
lang: en-US
author: Julien Béranger
model: Claude Opus 5.5
source: https://julienberanger.com/affix-bot-chain-deployment
---

# Affix deployment to BOT chain

## Summary

The [Affix contracts](https://github.com/julienbrg/affix-contracts) were deployed to BOT chain (chain ID `677`) with
[Foundry](https://getfoundry.sh/)'s [`forge script`](https://getfoundry.sh/forge/scripting). Both contracts are verified on
the chain's [Blockscout](https://www.blockscout.com/) explorer, [scan.botchain.ai](https://scan.botchain.ai). The first
entity, "Affix Official", is registered, and its first agent has issued its first document.

| Contract      | Address                                                                                                                     | Verified |
| ------------- | --------------------------------------------------------------------------------------------------------------------------- | -------- |
| AffixFactory  | [`0x217e2225a623412A7e9F43Bc0207c1bD1ed4f9Dc`](https://scan.botchain.ai/address/0x217e2225a623412a7e9f43bc0207c1bd1ed4f9dc) | Yes      |
| AffixRegistry | [`0x94E5E95128aA2684B0A51b5Ea30C601e6f72aeB7`](https://scan.botchain.ai/address/0x94E5E95128aA2684B0A51b5Ea30C601e6f72aeB7) | Yes      |

Deployer, factory owner and registry owner: `0x9747098f57D9D7994fe416e4160F2aD1D15F2a99`.

## Build settings

- Compiler: [Solidity](https://soliditylang.org/) 0.8.30
- Optimizer: 10,000 runs
- EVM version: `shanghai`

## Factory deployment

[`script/DeployAffixFactory.sol`](https://github.com/julienbrg/affix-contracts/blob/main/script/DeployAffixFactory.sol) deploys `AffixFactory` through the
[Safe Singleton Factory](https://github.com/safe-global/safe-singleton-factory) at
`0x914d7Fec6aaC8cd542e72Bca78B30650d45643d7`. Because it uses [CREATE2](https://eips.ethereum.org/EIPS/eip-1014), 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:

```sh
forge script script/DeployAffixFactory.sol --rpc-url $BOT_RPC
```

Then the broadcast, with verification on Blockscout:

```sh
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`](https://scan.botchain.ai/tx/0x67df0a47ceaf7a2f6ad09653bb39203eb23fd4079a117059bc0aaddb11683f19) |
| 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`](https://github.com/julienbrg/affix-contracts/blob/main/script/RegisterEntity.s.sol) was updated with the new factory address, then run as a dry
run and as a broadcast:

```sh
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`:

| Field       | Value                                                                                                               |
| ----------- | ------------------------------------------------------------------------------------------------------------------- |
| Name        | Affix Official                                                                                                      |
| URL         | [https://affix.w3hc.org/about](https://affix.w3hc.org/about)                                                        |
| Owner       | `0x9747098f57D9D7994fe416e4160F2aD1D15F2a99`                                                                        |
| Agents      | 0                                                                                                                   |
| Transaction | [`0xe2a02456…d0d9`](https://scan.botchain.ai/tx/0xe2a0245681d2fa1c91d9d8c1b94d0b74672d336a0fef2c81136611a7a225d0d9) |
| 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](https://docs.blockscout.com/devs/verification/ethereum-bytecode-database-microservice),
matching it against the sources submitted with the factory. It shows as a
[partial match](https://scan.botchain.ai/address/0x94E5E95128aA2684B0A51b5Ea30C601e6f72aeB7?tab=contract).

## First document

Agent `0xA3bc3Bb144f1E1834a1b92245BF10F33EB331557` was added to the registry, then issued the first document from the
[Affix web app](https://github.com/julienbrg/affix-ui). 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`](https://ipfs.io/ipfs/bafkreidj2f2tnm4krqvighogrbtdez6ovksp2ap6fmkaokbky5kwaobyku) |
| Metadata    | None                                                                                                                |
| Transaction | [`0xbc98b657…8d58`](https://scan.botchain.ai/tx/0xbc98b657c20af0fae60c5e45437a57b7afac6e83248981351eaea72068688d58) |
| 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/`.

## Further reading

- [Foundry book: deploying and verifying](https://getfoundry.sh/forge/deploying)
- [Blockscout docs](https://docs.blockscout.com/)
- [EIP-1014: Skinny CREATE2](https://eips.ethereum.org/EIPS/eip-1014)
