Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: v2.1.1 #122

Merged
merged 81 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
13b0f1e
Basic Crosschain working
ytham May 16, 2024
57e93e2
Update address lib
ytham May 16, 2024
184604f
Update CLI
ytham May 16, 2024
f0f1d3f
WIP: React composition
ytham May 16, 2024
0c4f6b7
Update CLI message
ytham May 18, 2024
5525406
WIP: Webworkers
ytham May 17, 2024
0125e8b
WIP: refactor
ytham May 17, 2024
50f4447
Working single chain react
ytham May 18, 2024
054f4c3
WIP: compose react part
ytham May 18, 2024
8d3ee02
WIP: Circuit context
ytham May 20, 2024
aaae88f
Streamline; React working
ytham May 20, 2024
86e1028
Add crosschain section to buildSendQuery
ytham May 20, 2024
9370627
Update circuit tests; add stubs
ytham May 20, 2024
b4d1b09
Update RPC getter
ytham May 20, 2024
de4b55d
Update tests for crosschain
ytham May 20, 2024
5c2aa06
Update test params
ytham May 20, 2024
f48e4e0
Spacing
ytham May 21, 2024
1d3061b
Switch back test env var; Update payment calc
ytham May 21, 2024
c93a6a7
Update buildSendQuery crosschain object to target object
ytham May 21, 2024
2d3e77b
Update buildSendQuery and CLI query-params for target
ytham May 21, 2024
3b0ff9c
Update harness test flag
ytham May 21, 2024
89d2e6c
Add additional test cases
ytham May 21, 2024
94ea8c9
Update version
ytham May 21, 2024
2b27db2
Update imports
ytham May 21, 2024
d5979fc
Some PR comments addressed
ytham May 22, 2024
29def23
Reformat address getters
ytham May 22, 2024
9a433ff
Add axiom class readme
ytham May 22, 2024
8ab5f9f
Update query-params CLI crosschain logic
ytham May 22, 2024
bacca02
Update harness circuitTest for sourceRpcUrl flag
ytham May 22, 2024
9b4b5c7
v2.1.0-alpha.7
ytham May 22, 2024
278bc7f
Fix refund address flag
ytham May 22, 2024
890f1eb
v2.1.0-alpha.8
ytham May 22, 2024
38b2f9f
Show gas threshold notification
ytham May 22, 2024
5918a5b
v2.1.0-alpha.10
ytham May 24, 2024
95bc84b
Revert bigint conversion
ytham May 24, 2024
3db2bfe
Test
ytham May 24, 2024
f7dc908
Test worker
ytham May 24, 2024
5212029
Fix test error
ytham May 24, 2024
a6e5574
[feat] Crosschain SDK (#104)
ytham May 24, 2024
d3194d2
Update env vars: PROVIDER_URI -> RPC_URL
ytham May 28, 2024
87c5be9
Update named chains to chainId
ytham May 28, 2024
cc2501f
Fix issue with passed-in maxFeePerGas
ytham May 28, 2024
0f5c530
Use old env var
ytham May 28, 2024
c51c41a
[fix] Use passed-in maxFeePerGas if available (#107)
ytham May 28, 2024
433176b
Update env var
ytham May 28, 2024
1b98a6b
Update env var
ytham May 28, 2024
bb63695
Fix merge conflicts
ytham May 28, 2024
dd5ec90
[chore] Update env var names (#106)
ytham May 28, 2024
476b393
Remove error for payment functions
ytham May 28, 2024
9f883c0
Remove error for payment functions (#108)
ytham May 28, 2024
5a2ef45
Use Mainnet chainDefaults for unsupported chain IDs
ytham May 28, 2024
ca83cc4
[chore] Use mainnet chainDefaults for unsupported chainIds (#109)
ytham May 28, 2024
520c25f
Change CLI params from camelCase to lowercase-dash
ytham May 28, 2024
0e4dae8
[chore] Change CLI params from camelCase to lowercase-dash (#110)
ytham May 29, 2024
9227ab8
Remove project scaffold
ytham Jun 3, 2024
52fb2be
Fix harness --rpc-url flag
ytham Jun 3, 2024
fecf0d2
Fix L1 fee multiplier
ytham Jun 3, 2024
d69fb7c
Fix nit
ytham Jun 3, 2024
aa38422
Clean up
ytham Jun 3, 2024
f8eb2ae
Split harness commands
ytham Jun 3, 2024
ab3f93a
Split harness commands
ytham Jun 3, 2024
a334390
Update wording for prove+sendQuery function
ytham Jun 3, 2024
90c4d4d
Update external functions
ytham Jun 3, 2024
c73053f
Remove unused type
ytham Jun 3, 2024
82b5374
Update comment
ytham Jun 3, 2024
ad33678
v2.1.0-rc.0
ytham Jun 4, 2024
82ad8e4
Update deployed contract addr
ytham Jun 5, 2024
7b10d49
v2.1.0-rc.1
ytham Jun 5, 2024
08ad7a4
Fix merge conflicts
ytham Jun 7, 2024
698204a
Fix merge conflicts
ytham Jun 7, 2024
9ef358e
Upgrade base-sepolia tests for the Fjord upgrade (#116)
HrikB Jun 7, 2024
e6feb15
Fix targetChainId passed into QueryBuilder
ytham Jun 27, 2024
f779f2c
Add tests
ytham Jun 27, 2024
645396c
Bump v2.1.0-rc.2
ytham Jun 27, 2024
1ae553f
[feat] harness integration tests (#119)
shayanh Jul 10, 2024
43121be
Update contract address
ytham Jul 12, 2024
3a0053c
Update integration tests
ytham Jul 16, 2024
6e7ae2a
feat: Deprecate Base Sepolia (#121)
ytham Oct 21, 2024
665d3be
Release v2.1.1
ytham Oct 21, 2024
fffb58a
Fix merge conflicts
ytham Oct 21, 2024
55d9965
Fix merge conflicts
ytham Oct 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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",
"version": "2.1.1",
"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",
"version": "2.1.1",
"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": "link:../circuit/dist",
"@axiom-crypto/circuit": "2.1.1-alpha.0",
"chalk": "^4.1.2",
"commander": "^11.1.0",
"prompts": "^2.4.2",
Expand Down
22 changes: 20 additions & 2 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";
export const CLIENT_VERSION = "2.1.1-alpha.0";
Loading
Loading