-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfoundry.toml
More file actions
128 lines (114 loc) · 5.66 KB
/
Copy pathfoundry.toml
File metadata and controls
128 lines (114 loc) · 5.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# Release metadata, not foundry config: `rainix-tag-release` rewrites `version`
# from the tag it is triggered by. `[external.*]` is the section foundry
# reserves for another tool's config: it never merges it into a profile and
# never warns about it.
[external.package]
name = "rain-math-float-deploy"
# Deploy repo: a normal PR does not bump this; only a release moves it, in
# lockstep with the frozen `src/generated/<tag>/` snapshot it names.
version = "0.1.2"
[profile.default]
src = 'src'
test = 'test'
out = 'out'
# See more config options https://github.com/foundry-rs/foundry/tree/master/config
solc = "0.8.25"
optimizer = true
# CRITICAL: 1_000_000, NOT the 100_000 that rain.factory.deploy /
# rain.extrospection.deploy use. `DecimalFloat`'s deterministic Zoltu address
# (ZOLTU_DEPLOYED_DECIMAL_FLOAT_ADDRESS = 0x799632d2…) and codehash
# (DECIMAL_FLOAT_CONTRACT_HASH = 0xdc4688…) are a pure function of its creation
# bytecode, which is a pure function of these settings AND the library sources
# it compiles against (the `rain-math-float` package). These match the exact
# settings the live deployment was produced with in the pre-split hybrid
# `rain.math.float` repo; changing the run count regenerates the
# `src/generated/candidate/` pins at a different address, off the live
# deployment that `src/lib/deploy/LibDecimalFloatDeploy.sol` aliases them as.
optimizer_runs = 1000000
evm_version = "cancun"
bytecode_hash = "none"
cbor_metadata = false
# `script/lib/LibCopyArtifacts.sol` extracts each committed ABI from the forge
# artifact via `jq` over `vm.ffi`.
ffi = true
libs = ["dependencies"]
# Write access is scoped to exactly the files `script/Build.sol` generates:
# everything under `src/generated/` (the candidate snapshots, the frozen tag
# dirs `cutRelease()` adds, `LogTables.pointers.sol`) and the three generated
# released-suites libs in `src/lib/` — never hand-written source. It reads the
# release version from this file when `cutRelease()` runs, and
# `DecimalFloatDeploySnapshotTest`'s inherited frozen-record walk reads
# `src/generated/` too.
#
# `script/CopyArtifacts.sol` reads the freshly built forge artifacts under
# `./out` and writes the committed ABI copies the Rust crate compiles against
# into `./crates/float/abi`; `test/script/CopyArtifacts.t.sol` reads them back.
fs_permissions = [
{ access = "read", path = "./foundry.toml" },
{ access = "read-write", path = "./src/generated" },
{ access = "read-write", path = "./src/lib/LibLogTablesReleased.sol" },
{ access = "read-write", path = "./src/lib/LibDecimalFloatReleased.sol" },
{ access = "read-write", path = "./src/lib/LibReleasedSuites.sol" },
{ access = "read", path = "./out" },
{ access = "read-write", path = "./crates/float/abi" },
]
[fuzz]
runs = 2048
# `recursive_deps` is off, so every package an import resolves through is
# declared here, including the ones reached only transitively through
# `rain-math-float` (the concrete compiles `LibFormatDecimalFloat` →
# `@openzeppelin-contracts` Strings and `LibParseDecimalFloat` → `rain-string`)
# and via `rain-datacontract` (`LibDataContract` re-exports `rain-solmem`'s
# `LibPointer`).
[dependencies]
forge-std = "1.16.2"
"@openzeppelin-contracts" = "5.6.1"
"rain-solmem" = "0.1.28"
"rain-string" = "0.2.0"
"rain-datacontract" = "0.1.9"
"rain-deploy" = "0.1.11"
"rain-lib-memkv" = "0.2.0"
"rain-sol-codegen" = "0.1.37"
"rain-math-float" = "0.2.4"
[soldeer]
recursive_deps = false
# One alias per network `script/Deploy.sol` broadcasts to, which is
# `LibRainDeploy.supportedNetworks()` — all seven. A network the script
# selects but this section does not name is not a skip: `vm.createSelectFork`
# reverts with "invalid rpc url: <alias>" and takes the whole deploy down,
# after it has already broadcast to the networks ahead of it in the list.
[rpc_endpoints]
arbitrum = "${ARBITRUM_RPC_URL}"
base = "${BASE_RPC_URL}"
base_sepolia = "${BASE_SEPOLIA_RPC_URL}"
ethereum = "${ETHEREUM_RPC_URL}"
flare = "${FLARE_RPC_URL}"
hyperevm = "${HYPEREVM_RPC_URL}"
robinhood = "${ROBINHOOD_RPC_URL}"
bsc = "${BSC_RPC_URL}"
polygon = "${POLYGON_RPC_URL}"
# `rainix-manual-sol-artifacts` passes `--verify` by default and exports exactly
# these variable names, so a deploy without this section broadcasts and then
# fails with no API key configured for the chain. One entry per
# `[rpc_endpoints]` alias, because the deploy goes to all of them.
#
# "chain" is stated on ethereum and hyperevm because foundry does not know
# those alias strings as chain names — its own names for them are "mainnet"
# and "hyperliquid" — so without it the entry cannot be matched to the chain
# being verified against. The other five aliases foundry resolves itself.
# `forge config` prints the resolved chain per entry.
[etherscan]
arbitrum = { key = "${CI_DEPLOY_ARBITRUM_ETHERSCAN_API_KEY}" }
base = { key = "${CI_DEPLOY_BASE_ETHERSCAN_API_KEY}" }
base_sepolia = { key = "${CI_DEPLOY_BASE_SEPOLIA_ETHERSCAN_API_KEY}" }
ethereum = { key = "${CI_DEPLOY_ETHEREUM_ETHERSCAN_API_KEY}", chain = 1 }
flare = { key = "${CI_DEPLOY_FLARE_ETHERSCAN_API_KEY}" }
hyperevm = { key = "${CI_DEPLOY_HYPEREVM_ETHERSCAN_API_KEY}", chain = 999 }
# Robinhood Chain (4663) is not indexed by Etherscan V2. Its Blockscout speaks
# the Etherscan API, so the entry points there (the key is ignored). That
# explorer has rejected non-browser clients, so if `--verify` fails there,
# verify afterwards through Sourcify: `forge verify-contract --verifier
# sourcify --chain 4663 ...`.
robinhood = { key = "${CI_DEPLOY_ROBINHOOD_ETHERSCAN_API_KEY}", chain = 4663, url = "https://robinhoodchain.blockscout.com/api" }
bsc = { key = "${CI_DEPLOY_BSC_ETHERSCAN_API_KEY}", chain = 56 }
polygon = { key = "${CI_DEPLOY_POLYGON_ETHERSCAN_API_KEY}" }