Skip to content

Commit

Permalink
- OPFault Sepolia configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
clowestab committed Oct 14, 2024
1 parent e7c82b6 commit 862d502
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@unruggable/gateways",
"version": "0.1.1",
"version": "0.1.2",
"description": "Trustless Ethereum Multichain CCIP-Read Gateway",
"publishConfig": {
"access": "public"
Expand Down
7 changes: 7 additions & 0 deletions scripts/serve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,13 @@ async function createGateway(name: string) {
...OPFaultRollup.mainnetConfig,
minAgeSec: 6 * 3600,
});
case 'op-sepolia':
return createOPFaultGateway(OPFaultRollup.testnetConfig);
case 'unfinalized-op-sepolia':
return createOPFaultGateway({
...OPFaultRollup.testnetConfig,
minAgeSec: 6 * 3600,
});
case 'base-testnet':
return createOPFaultGateway(OPFaultRollup.baseTestnetConfig);
case 'reverse-op': {
Expand Down
7 changes: 7 additions & 0 deletions src/op/OPFaultRollup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ export class OPFaultRollup extends AbstractOPRollup {
GameFinder: GAME_FINDER_MAINNET,
};

static readonly testnetConfig: RollupDeployment<OPFaultConfig> = {
chain1: CHAINS.SEPOLIA,
chain2: CHAINS.OP_SEPOLIA,
OptimismPortal: '0x16Fc5058F25648194471939df75CF27A2fdC48BC',
GameFinder: GAME_FINDER_SEPOLIA,
};

// https://docs.base.org/docs/base-contracts/#ethereum-testnet-sepolia
static readonly baseTestnetConfig: RollupDeployment<OPFaultConfig> = {
chain1: CHAINS.SEPOLIA,
Expand Down
8 changes: 8 additions & 0 deletions test/gateway/op-sepolia.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { OPFaultRollup } from '../../src/op/OPFaultRollup.js';
import { testOPFault } from './common.js';

testOPFault(OPFaultRollup.testnetConfig, {
// https://sepolia-optimism.etherscan.io/address/0xc695404735e0f1587a5398a06cab34d7d7b009da
slotDataContract: '0xc695404735e0f1587a5398a06cab34d7d7b009da',
skipCI: true,
});
11 changes: 11 additions & 0 deletions test/gateway/unfinalized-op-sepolia.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { OPFaultRollup } from '../../src/op/OPFaultRollup.js';
import { testOPFault } from './common.js';

testOPFault(
{ ...OPFaultRollup.testnetConfig, minAgeSec: 3600 },
{
// https://sepolia-optimism.etherscan.io/address/0xc695404735e0f1587a5398a06cab34d7d7b009da
slotDataContract: '0xc695404735e0f1587a5398a06cab34d7d7b009da',
skipCI: true,
}
);

0 comments on commit 862d502

Please sign in to comment.