# FP127 deployment record

The FP127 Yul object is deployed with CREATE2 through Arachnid's
deterministic-deployment proxy, so the same source at the same compiler
settings lands at the same address on every chain that proxy exists on.
The machine-readable copy of this record is `FP127.json` beside this file;
`FP127.sepolia.receipt.json` is the raw transaction receipt.

| | |
|---|---|
| address | `0xe43F720861074497db2e974E5c4554E4A3b341B9` |
| chain | Ethereum Sepolia, chainId 11155111 |
| CREATE2 proxy | `0x4e59b44847b379578588920cA78FbF26c0B4956C` |
| salt | `0x4650313237207633000000000000000000000000000000000000000000000000` (ASCII `FP127 v3`, right-padded) |
| init code hash | `0x67362c4ef1771ae6109a3d8a8291ab42dcde9619a2f1deb849292c81823a65e8` |
| runtime keccak256 | `0xab019bcc0e8ce61720b018c96fae06f7b05cc7caaf7c30550c095f82922db496` (7,593 bytes) |
| source | `contracts/src/fp127/FP127.yul`, generated from `FP127.yul.src` |
| compiler | solc 0.8.24+commit.e11b9ed9, language Yul, optimizer on, 200 runs, evm shanghai |
| deployment tx | [`0xc7eabd1f…89a002`](https://sepolia.etherscan.io/tx/0xc7eabd1f47f64f53b26c0299ece0564c286a2fdbef38f461d432f0093489a002), block 11,861,162, 11,955,003 gas, 2026-10-07 |
| source commit | `7b74fbc` (master after PR #61) |
| verification | [Sourcify](https://repo.sourcify.dev/11155111/0xe43F720861074497db2e974E5c4554E4A3b341B9), [Blockscout](https://eth-sepolia.blockscout.com/address/0xe43F720861074497db2e974E5c4554E4A3b341B9?tab=contract); Etherscan unverified (no Yul support) |
| Sourcify match | `match` on creation and runtime bytecode |
| smoke test | `make smoke-sepolia`: every committed vector across 38 ops matches the live contract |

Version 3 (2026-10-07) adds `pi(terms)`, Ramanujan's series; every other
op is bit-identical to version 2. Versions 1 and 2 stay deployed and
verified and are recorded below.

address = keccak256(0xff ++ proxy ++ salt ++ keccak256(initCode))[12:]. There
are no constructor arguments, so the init code is the artifact's
`.bytecode.object` unchanged.

## Reproduce the bytecode

```sh
make build                              # generates FP127.yul and compiles it
uv run scripts/fp127/stdjson.py check   # solc standard-json (language Yul) == Foundry artifact
make predict                            # the address above, from the artifact alone
uv run scripts/fp127/stdjson.py onchain https://ethereum-sepolia-rpc.publicnode.com 0xe43F720861074497db2e974E5c4554E4A3b341B9
```

The last command fetches the live runtime and compares its keccak256 with
the artifact's. That comparison, not an explorer badge, is the proof that
what is on chain is what is in this repository.

## Gas note

Sepolia is on the Amsterdam fork, where depositing contract code costs
about 1,550 gas per byte rather than 200 (measured: a 256-byte deposit
estimates at 615k gas, a 6,512-byte one at 10.34M). Forge 1.7.1's local
EVM still uses the old schedule and estimated 2.14M for this transaction,
which ran out of gas inside the proxy's CREATE2 (tx
`0xe4d91708…896d55`). `make deploy-sepolia` therefore sends the proxy call
with an explicit 12M limit (`DEPLOY_GAS`) instead of trusting the
estimate.

## Explorer verification

Etherscan's verification API accepts only Solidity (single file or
standard-json) and has no path for a Yul object, so Etherscan shows the
contract as unverified. Sourcify supports Yul and Blockscout's verifier
accepts standard-json with `language: Yul`; both receive the exact input
that `stdjson.py check` proves reproduces the artifact
(`make verify-sepolia`).

## Trust model

The object has no storage, no owner, no upgrade path and no selfdestruct;
it reads calldata and returns a word or reverts with one of three custom
errors. A CREATE2 deployment of such a contract is immutable by
construction. There is nothing to freeze after an audit and nothing to
register in an append-only list, because the address already commits to
the bytecode: anyone can recompute it from the source and the salt.

A new version is a new source, a new init-code hash and therefore a new
address, published here with a new salt string. Nothing can change the
code behind an address that has been published.

## Other chains

The proxy exists on mainnet and most L2s. Running `make deploy-sepolia`
with a different RPC (and chainId in the Makefile targets) lands the same
bytecode at the same address there. The address is recorded here only for
the chains it has actually been deployed to.

## Legacy

The Huff-era contract at `0xfae694D0c2c44181791F838c54Ed64C3151FfE30`
(plain CREATE, `uint256` ABI with `*Raw` names) stays live on Sepolia as
the equivalence baseline; see `contracts/archive/huff/README.md`. The site
at blockulator.com still calls it until the site rewrite.

## Version 2 (guard-bit transcendentals)

| | |
|---|---|
| address | `0xD8688E72dD6745719484da894C63Cd2685fD7E71` |
| chain | Ethereum Sepolia, chainId 11155111 |
| CREATE2 proxy | `0x4e59b44847b379578588920cA78FbF26c0B4956C` |
| salt | `0x4650313237207632000000000000000000000000000000000000000000000000` (ASCII `FP127 v2`, right-padded) |
| init code hash | `0x3d5cbdd04fe4c0d6df04201f2ec936f06fc0078cc9fc6f402f38340a41620715` |
| runtime keccak256 | `0x2d357104a339080c80a3145d4070d6df90d03e2196f2149dbcd436461016fb16` (7,783 bytes) |
| source | `contracts/src/fp127/FP127.yul`, generated from `FP127.yul.src` |
| compiler | solc 0.8.24+commit.e11b9ed9, language Yul, optimizer on, 200 runs, evm shanghai |
| deployment tx | [`0x02e012ea…a5b64a`](https://sepolia.etherscan.io/tx/0x02e012ead20235e8241b8e84eb93ac70e3fa65af1de74291ce573bb016a5b64a), block 11,860,704, 12,248,539 gas, 2026-10-07 (a first attempt at the old 12M limit ran out of gas; the default is now 16M) |
| source commit | `209b476` (master after PR #57) |
| verification | [Sourcify](https://repo.sourcify.dev/11155111/0xD8688E72dD6745719484da894C63Cd2685fD7E71), [Blockscout](https://eth-sepolia.blockscout.com/address/0xD8688E72dD6745719484da894C63Cd2685fD7E71?tab=contract); Etherscan unverified (no Yul support) |
| Sourcify match | `match` on creation and runtime bytecode (a Yul object carries no metadata hash) |
| smoke test | `make smoke-sepolia`: all 6,928 committed vectors across 37 ops match the live contract |

Version 2 (2026-10-07) changed the transcendental kernels: `exp2`, `exp`,
`exp10`, `log2`, `ln` and `log10` compute with 64 guard bits and round to
nearest once, where version 1 floored every step (issue #50). Every other
op is bit-identical to version 1. Version 1 stays deployed and verified and
is recorded below; the ladder's version 2 adapters still call it.

## Version 1 (floor kernels)

| | |
|---|---|
| address | `0xA7Fb462A3733f24785a9AE8d7FbD4F87D8BC4c28` |
| chain | Ethereum Sepolia, chainId 11155111 |
| CREATE2 proxy | `0x4e59b44847b379578588920cA78FbF26c0B4956C` |
| salt | `0x4650313237207631000000000000000000000000000000000000000000000000` (ASCII `FP127 v1`, right-padded) |
| init code hash | `0x5d86a72291f2abba6b311a94d55253789b0cd17ba1020e1120f7d41ec96dfbc2` |
| runtime keccak256 | `0xea2e14cacd103541f26ee0bd599375e890bbdc302a86a0074fcb8b28657159e2` (6,512 bytes) |
| source | `contracts/src/fp127/FP127.yul`, generated from `FP127.yul.src` |
| compiler | solc 0.8.24+commit.e11b9ed9, language Yul, optimizer on, 200 runs, evm shanghai |
| deployment tx | [`0x578ac853…c5bbd0`](https://sepolia.etherscan.io/tx/0x578ac85389cd1143202fd4761282592b5177d393833181b5d49ca9a625c5bbd0), block 11,859,242, 10,283,867 gas, 2026-10-06 |
| source commit | `3bc3c5a` (master after PR #41) |
| verification | [Sourcify](https://repo.sourcify.dev/11155111/0xA7Fb462A3733f24785a9AE8d7FbD4F87D8BC4c28), [Blockscout](https://eth-sepolia.blockscout.com/address/0xA7Fb462A3733f24785a9AE8d7FbD4F87D8BC4c28?tab=contract); Etherscan unverified (no Yul support) |
| Sourcify match | `match` on both creation and runtime bytecode (a Yul object carries no metadata hash, so `exact_match` cannot apply) |
| smoke test | `make smoke-sepolia`: all 6,928 committed vectors across 37 ops match the live contract |

