Skip to content
This repository was archived by the owner on Jan 9, 2026. It is now read-only.

Commit 7efc40e

Browse files
committed
Don't read from config for tests
1 parent 82e1faf commit 7efc40e

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/Chainweb.sol

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,16 +150,15 @@ contract ChainwebConfigReader is CommonBase {
150150
}
151151
}
152152

153-
contract ChainwebTest is Test, ChainwebConfigReader {
153+
contract ChainwebTest is Test {
154154
Chainweb public chainweb;
155155

156-
constructor(string memory environment) {
157-
ChainwebConfig memory config = readChainwebConfig(environment);
156+
constructor(uint24 chainNumbers, uint24 chainwebChainIdOffset) {
158157
chainweb = new Chainweb(
159-
uint24(config.numberOfChains),
158+
chainNumbers,
160159
block.chainid,
161-
uint24(config.chainwebChainIdOffset),
162-
config.extenalHostUrl
160+
chainwebChainIdOffset,
161+
""
163162
);
164163
chainweb.setupChainsForTest();
165164
}

src/example/test/Counter.t.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {Test, console} from "forge-std/Test.sol";
55
import {Counter} from "../src/Counter.sol";
66
import {ChainwebTest, ChainwebConfig} from "kadena-io/foundry-chainweb/Chainweb.sol";
77

8-
contract CounterTest is ChainwebTest("anvil") {
8+
contract CounterTest is ChainwebTest(4, 0) {
99
function test_MultiChains() public {
1010
uint256[] memory chainIds = chainweb.getChainIds();
1111
console.log("Available chain IDs:", chainIds.length);

0 commit comments

Comments
 (0)