Skip to content

Commit

Permalink
feat: Deprecate Base Sepolia (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
ytham authored Oct 21, 2024
1 parent 3a0053c commit 6e7ae2a
Show file tree
Hide file tree
Showing 37 changed files with 78 additions and 7,994 deletions.
33 changes: 1 addition & 32 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ on:
env:
PRIVATE_KEY_ANVIL: ${{ secrets.PRIVATE_KEY_ANVIL }}
PRIVATE_KEY_SEPOLIA: ${{ secrets.PRIVATE_KEY_SEPOLIA }}
PRIVATE_KEY_84532: ${{ secrets.PRIVATE_KEY_84532 }}
PRIVATE_KEY_11155111: ${{ secrets.PRIVATE_KEY_11155111 }}
RPC_URL_1: ${{ secrets.RPC_URL_1 }}
RPC_URL_84532: ${{ secrets.RPC_URL_84532 }}
RPC_URL_11155111: ${{ secrets.RPC_URL_11155111 }}
PINATA_JWT: ${{ secrets.PINATA_JWT }}

Expand Down Expand Up @@ -47,7 +45,7 @@ jobs:
- name: Run Unit Tests
working-directory: ./circuit
run: pnpm test

client-unit-tests:
name: Client Unit Tests
runs-on: ubuntu-latest
Expand Down Expand Up @@ -105,32 +103,3 @@ jobs:
- name: Run Integration Tests (Client)
working-directory: ./harness
run: CHAIN_ID=11155111 pnpm test test/integration/start.test.ts

harness-integration-tests-84532:
name: "Harness: Client Integration Tests (84532)"
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8

- name: "Install Node.js"
uses: "actions/setup-node@v4"
with:
node-version: "20.x"
cache: "pnpm"
registry-url: "https://registry.npmjs.org"
cache-dependency-path: client/pnpm-lock.yaml

- name: Set all packages to local and build
working-directory: ./
run: pnpm local

- name: Run Integration Tests (Client)
working-directory: ./harness
run: CHAIN_ID=84532 pnpm test test/integration/start.test.ts
2 changes: 1 addition & 1 deletion circuit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@axiom-crypto/circuit",
"version": "2.1.0-rc.4",
"version": "2.1.1-alpha.0",
"author": "Intrinsic Technologies",
"license": "MIT",
"description": "Client SDK to write custom queries for Axiom, the ZK Coprocessor for Ethereum.",
Expand Down
4 changes: 2 additions & 2 deletions client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@axiom-crypto/client",
"version": "2.1.0-rc.4",
"version": "2.1.1-alpha.0",
"author": "Intrinsic Technologies",
"license": "MIT",
"description": "Client SDK to write custom queries for Axiom, the ZK Coprocessor for Ethereum.",
Expand All @@ -24,7 +24,7 @@
"crypto"
],
"dependencies": {
"@axiom-crypto/circuit": "2.1.0-rc.4",
"@axiom-crypto/circuit": "2.1.1-alpha.0",
"chalk": "^4.1.2",
"commander": "^11.1.0",
"prompts": "^2.4.2",
Expand Down
10 changes: 5 additions & 5 deletions client/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions client/src/axiom/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ export function validateChainId(chainId: string) {
switch (chainId) {
case "1": // Mainnet
case "11155111": // Sepolia
case "8453": // Base
case "84532": // Base Sepolia
return;
default:
throw new Error(`Unsupported chainId ${chainId}`);
Expand Down
5 changes: 0 additions & 5 deletions client/src/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ circuit
.option("-pv, --proven <proven>", "`axiom circuit prove` outputs path")
.option("-o, --outputs <outputs>", "query-params outputs path")
.option("-a, --args-map", "sendQuery argments output as mapping for use with Forge")
.option("-t, --target-chain-id <chain id>", "(crosschain) target chain id")
.option("-tr, --target-rpc-url <https url>", "(crosschain) target chain JSON-RPC provider URL (https)")
.option("-b, --bridge-id <bridge id>", "(crosschain) bridge id", parseInt)
.option("-br, --is-broadcaster", "(crosschain) Use crosschain broadcaster")
.option("-bo, --is-blockhash-oracle", "(crosschain) Use crosschain blockhash oracle")
.action(queryParams);

program.parseAsync(process.argv);
28 changes: 2 additions & 26 deletions client/src/lib/address.ts
Original file line number Diff line number Diff line change
@@ -1,42 +1,18 @@
import {
arbitrum,
arbitrumSepolia,
base,
baseSepolia,
mainnet,
optimism,
optimismSepolia,
scroll,
scrollSepolia,
sepolia
} from "viem/chains";

const axiomV2QueryAddresses = {
[mainnet.id.toString()]: "0x83c8c0B395850bA55c830451Cfaca4F2A667a983",
[sepolia.id.toString()]: "0x83c8c0B395850bA55c830451Cfaca4F2A667a983",
[base.id.toString()]: "0xfe059442B0379D5f22Bec384A588766f98A36812",
[baseSepolia.id.toString()]: "0xfe059442B0379D5f22Bec384A588766f98A36812",
};

// TargetChainId -> SourceChainId
const axiomV2QueryBlockhashOracleAddresses = {
[base.id.toString()]: {
[mainnet.id.toString()]: undefined,
},
[baseSepolia.id.toString()]: {
[sepolia.id.toString()]: "0xFa44Fc4CDE68177Bd8212774a09E32d23fA1F41f",
},
};
const axiomV2QueryBlockhashOracleAddresses: Record<string, Record<string, undefined>> = {};

// TargetChainId -> SourceChainId -> BridgeId
const axiomV2QueryBroadcasterAddresses = {
[arbitrum.id.toString()]: {
[mainnet.id.toString()]: [],
},
[arbitrumSepolia.id.toString()]: {
[sepolia.id.toString()]: [],
},
};
const axiomV2QueryBroadcasterAddresses: Record<string, Record<string, Array<string>>> = {};

export function getAxiomV2QueryAddress(chainId: string) {
const address = axiomV2QueryAddresses[chainId];
Expand Down
16 changes: 2 additions & 14 deletions client/src/lib/chain.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BaseDefaults, MainnetDefaults } from "./constants";
import { MainnetDefaults } from "./constants";
import { ChainDefaults } from "../types";

export function isMainnetChain(chainId: string) {
Expand All @@ -21,18 +21,8 @@ export function isOptimismChain(chainId: string) {
}
}

export function isBaseChain(chainId: string) {
switch (chainId) {
case "8453": // Base
case "84532": // Base Sepolia
return true;
default:
return false;
}
}

export function isOpStackChain(chainId: string) {
if (isOptimismChain(chainId) || isBaseChain(chainId)) {
if (isOptimismChain(chainId)) {
return true;
}
return false;
Expand Down Expand Up @@ -61,8 +51,6 @@ export function isScrollChain(chainId: string) {
export function getChainDefaults(chainId: string): Readonly<ChainDefaults> {
if (isMainnetChain(chainId)) {
return MainnetDefaults;
} else if (isBaseChain(chainId)) {
return BaseDefaults;
} else {
console.warn(`Unsupported chain ${chainId}; using Mainnet defaults`);
return MainnetDefaults;
Expand Down
8 changes: 0 additions & 8 deletions client/src/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,3 @@ export const MainnetDefaults: Readonly<ChainDefaults> = Object.freeze({
proofVerificationGas: 420000n,
axiomQueryFeeWei: 3000000000000000n,
});

export const BaseDefaults: Readonly<ChainDefaults> = Object.freeze({
maxFeePerGasWei: 750000000n,
minMaxFeePerGasWei: 250000000n,
callbackGasLimit: 100000n,
proofVerificationGas: 420000n,
axiomQueryFeeWei: 3000000000000000n,
});
2 changes: 1 addition & 1 deletion client/src/version.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This is an autogenerated file. It should match the version number in package.json.
// Do not modify this file directly.

export const CLIENT_VERSION = "2.1.0-rc.4";
export const CLIENT_VERSION = "2.1.1-alpha.0";
Loading

0 comments on commit 6e7ae2a

Please sign in to comment.