Tests/Debug
Gateways

Gateways

The gateway folder holds individual test files for each of the chains that we support.

Each file deploys a Solidity contract (SlotDataReader.sol) to a locally running anvil node that executes a series of predefined GatewayRequests against a helper contract (SlotDataContract.sol) deployed to the network in question. The contract includes properties that test the many complex storage rules outlined in the Solidity documentation: Layout of State Variables in Storage (opens in a new tab).

Running Tests

Run the tests for a particular chain using:

bun test test/gateway/FILE_NAME.test.ts

The chains for which we have defined tests are:

arb1.test.ts
base-sepolia.test.ts
base.test.ts
blast.test.ts
fraxtal.test.ts
linea.test.ts
op.test.ts
polygon-pos.test.ts
scroll.test.ts
taiko.test.ts
zksync.test.ts
zora.test.ts

Each file extends from tests.ts to implement the predefined tests consistently across chains.