Skip to content

Commit 17b7417

Browse files
gisk0claude
andauthored
chore: remove Alfajores from fork tests (#722)
## Summary - Remove all Alfajores fork test contracts (ChainForkTest + 19 ExchangeForkTests) from `ForkTests.t.sol` - Remove `ALFAJORES_RPC_URL` from CI workflows, `foundry.toml`, and `.env.example` - Remove `fork-test:alfajores` npm script from `package.json` - Update fork test README to use Celo-only examples ## Motivation Alfajores testnet is dead — no reason to keep fork-testing against it. ## Test plan - [x] Lint passes (verified via pre-push hook) - [ ] CI fork tests pass against Celo mainnet only 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4bb3249 commit 17b7417

File tree

7 files changed

+12
-60
lines changed

7 files changed

+12
-60
lines changed

.env.example

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
CELOSCAN_API_KEY=
2-
CELO_MAINNET_RPC_URL=https://forno.celo.org
3-
ALFAJORES_RPC_URL=https://alfajores-forno.celo-testnet.org
2+
CELO_MAINNET_RPC_URL=https://forno.celo.org

.github/workflows/fork-tests.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name: "ForkTests"
22

33
env:
44
FOUNDRY_PROFILE: "fork-tests"
5-
ALFAJORES_RPC_URL: ${{secrets.ALFAJORES_RPC_URL}}
65
CELO_MAINNET_RPC_URL: ${{secrets.CELO_MAINNET_RPC_URL}}
76

87
on:

.github/workflows/lint_test.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name: CI
22

33
env:
44
FOUNDRY_PROFILE: ci
5-
ALFAJORES_RPC_URL: ${{secrets.ALFAJORES_RPC_URL}}
65
CELO_MAINNET_RPC_URL: ${{secrets.CELO_MAINNET_RPC_URL}}
76

87
on:

foundry.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,3 @@ match_contract = "ForkTest"
3232

3333
[rpc_endpoints]
3434
celo = "${CELO_MAINNET_RPC_URL}"
35-
alfajores = "${ALFAJORES_RPC_URL}"

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
"solhint:tests": "solhint --config \"./test/.solhint.json\" \"test/**/*.sol\" -w 0",
3737
"test": "forge test",
3838
"fork-test": "env FOUNDRY_PROFILE=fork-tests forge test",
39-
"fork-test:alfajores": "env FOUNDRY_PROFILE=fork-tests forge test --match-contract Alfajores",
4039
"fork-test:celo-mainnet": "env FOUNDRY_PROFILE=fork-tests forge test --match-contract Celo",
4140
"check-no-ir": "./bin/check-contracts.sh",
4241
"check-contract-sizes": "env FOUNDRY_PROFILE=optimized forge build --sizes --skip \"test/**/*\"",

test/fork/ForkTests.t.sol

Lines changed: 4 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Thare are two types of test contracts:
99
assets, contract initialization state, etc.
1010
- ExchangeForkTests: Tests that are specific to the exchange, such as trading limits, swaps, circuit breakers, etc.
1111
12-
To make it easier to debug and develop, we have one ChainForkTest for each chain (Alfajores, Celo) and
12+
To make it easier to debug and develop, we have one ChainForkTest for each chain (Celo) and
1313
one ExchangeForkTest for each exchange provider and exchange pair.
1414
1515
The ChainForkTests are instantiated with:
@@ -26,17 +26,17 @@ The ExchangeForkTests are instantiated with:
2626
2727
And the naming convention for them is:
2828
- ${ChainName}_P${ExchangeProviderIndex}E${ExchangeIndex}_ExchangeForkTest
29-
- e.g. "Alfajores_P0E00_ExchangeForkTest (Alfajores, Exchange Provider 0, Exchange 0)"
29+
- e.g. "Celo_P0E00_ExchangeForkTest (Celo, Exchange Provider 0, Exchange 0)"
3030
The Exchange Index is 0 padded to make them align nicely in the file.
3131
Exchange provider counts shouldn't exceed 10. If they do, then we need to update the naming convention.
3232
3333
This makes it easy to drill into which exchange is failing and debug it like:
3434
- `$ env FOUNDRY_PROFILE=fork-tests forge test --match-contract CELO_P0E12`
3535
or run all tests for a chain:
36-
- `$ env FOUNDRY_PROFILE=fork-tests forge test --match-contract Alfajores`
36+
- `$ env FOUNDRY_PROFILE=fork-tests forge test --match-contract Celo`
3737
*/
3838

39-
import { CELO_ID, ALFAJORES_ID } from "mento-std/Constants.sol";
39+
import { CELO_ID } from "mento-std/Constants.sol";
4040
import { uints } from "mento-std/Array.sol";
4141
import { ChainForkTest } from "./ChainForkTest.sol";
4242
import { ExchangeForkTest } from "./ExchangeForkTest.sol";
@@ -45,46 +45,6 @@ import { GoodDollarTradingLimitsForkTest } from "./GoodDollar/TradingLimitsForkT
4545
import { GoodDollarSwapForkTest } from "./GoodDollar/SwapForkTest.sol";
4646
import { GoodDollarExpansionForkTest } from "./GoodDollar/ExpansionForkTest.sol";
4747

48-
contract Alfajores_ChainForkTest is ChainForkTest(ALFAJORES_ID, 1, uints(19)) {}
49-
50-
contract Alfajores_P0E00_ExchangeForkTest is ExchangeForkTest(ALFAJORES_ID, 0, 0) {}
51-
52-
contract Alfajores_P0E01_ExchangeForkTest is ExchangeForkTest(ALFAJORES_ID, 0, 1) {}
53-
54-
contract Alfajores_P0E02_ExchangeForkTest is ExchangeForkTest(ALFAJORES_ID, 0, 2) {}
55-
56-
contract Alfajores_P0E03_ExchangeForkTest is ExchangeForkTest(ALFAJORES_ID, 0, 3) {}
57-
58-
contract Alfajores_P0E04_ExchangeForkTest is ExchangeForkTest(ALFAJORES_ID, 0, 4) {}
59-
60-
contract Alfajores_P0E05_ExchangeForkTest is ExchangeForkTest(ALFAJORES_ID, 0, 5) {}
61-
62-
contract Alfajores_P0E06_ExchangeForkTest is ExchangeForkTest(ALFAJORES_ID, 0, 6) {}
63-
64-
contract Alfajores_P0E07_ExchangeForkTest is ExchangeForkTest(ALFAJORES_ID, 0, 7) {}
65-
66-
contract Alfajores_P0E08_ExchangeForkTest is ExchangeForkTest(ALFAJORES_ID, 0, 8) {}
67-
68-
contract Alfajores_P0E09_ExchangeForkTest is ExchangeForkTest(ALFAJORES_ID, 0, 9) {}
69-
70-
contract Alfajores_P0E10_ExchangeForkTest is ExchangeForkTest(ALFAJORES_ID, 0, 10) {}
71-
72-
contract Alfajores_P0E11_ExchangeForkTest is ExchangeForkTest(ALFAJORES_ID, 0, 11) {}
73-
74-
contract Alfajores_P0E12_ExchangeForkTest is ExchangeForkTest(ALFAJORES_ID, 0, 12) {}
75-
76-
contract Alfajores_P0E13_ExchangeForkTest is ExchangeForkTest(ALFAJORES_ID, 0, 13) {}
77-
78-
contract Alfajores_P0E14_ExchangeForkTest is ExchangeForkTest(ALFAJORES_ID, 0, 14) {}
79-
80-
contract Alfajores_P0E15_ExchangeForkTest is ExchangeForkTest(ALFAJORES_ID, 0, 15) {}
81-
82-
contract Alfajores_P0E16_ExchangeForkTest is ExchangeForkTest(ALFAJORES_ID, 0, 16) {}
83-
84-
contract Alfajores_P0E17_ExchangeForkTest is ExchangeForkTest(ALFAJORES_ID, 0, 17) {}
85-
86-
contract Alfajores_P0E18_ExchangeForkTest is ExchangeForkTest(ALFAJORES_ID, 0, 18) {}
87-
8848
contract Celo_ChainForkTest is ChainForkTest(CELO_ID, 1, uints(19)) {}
8949

9050
contract Celo_P0E00_ExchangeForkTest is ExchangeForkTest(CELO_ID, 0, 0) {}

test/fork/README.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,11 @@
1818
+-----------------+ +--------------------+
1919
^ ^
2020
| |
21-
+-------------------------+ +-------------------------+
22-
| Alfajores_ChainForkTest | | Alfajores_P0E00_... |
23-
+-------------------------+ +-------------------------+
2421
+--------------------+ +-------------------------+
25-
| Celo_ChainForkTest | | Alfajores_P0E01_... |
22+
| Celo_ChainForkTest | | Celo_P0E00_... |
2623
+--------------------+ +-------------------------+
2724
+-------------------------+
28-
| Celo_P0E00_... |
25+
| Celo_P0E01_... |
2926
+-------------------------+
3027
```
3128

@@ -41,17 +38,17 @@ These contracts are abstract and need to be extended by instance specific contra
4138
This happens in `ForkTests.t.sol`. For example:
4239

4340
```solidity
44-
contract Alfajores_ChainForkTest is ChainForkTest(ALFAJORES_ID, 1, uints(14)) {}
41+
contract Celo_ChainForkTest is ChainForkTest(CELO_ID, 1, uints(19)) {}
4542
```
4643

47-
This represents a ChainForkTest for Alfajores, with the expectation that there's a single exchange provider,
48-
and it has 14 exchanges. If the expectations change this will fail and need to be updated.
44+
This represents a ChainForkTest for Celo, with the expectation that there's a single exchange provider,
45+
and it has 19 exchanges. If the expectations change this will fail and need to be updated.
4946

5047
```solidity
51-
contract Alfajores_P0E00_ExchangeForkTest is ExchangeForkTest(ALFAJORES_ID, 0, 0) {}
48+
contract Celo_P0E00_ExchangeForkTest is ExchangeForkTest(CELO_ID, 0, 0) {}
5249
```
5350

54-
This represents an ExchangeForkTest for the 0th exchange of the 0th exchange provider on Alfajores.
51+
This represents an ExchangeForkTest for the 0th exchange of the 0th exchange provider on Celo.
5552
These tests contracts need to be added manually when we add more pairs or exchange providers, but the
5653
assertions at chain level gives us the heads up when this changes.
5754

0 commit comments

Comments
 (0)