Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions .changeset/tall-feet-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@axis-finance/subgraph-client": patch
"@axis-finance/deployments": patch
---

Add support for new chains
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ jobs:
node-version: "21.6.0"
cache: "pnpm"

- name: Setup Playwright
run: pnpx playwright install chromium --with-deps --only-shell

- name: Install dependencies
run: pnpm i --frozen-lockfile

- name: Setup Playwright
run: pnpx playwright@1.50.1 install chromium --with-deps --only-shell

- name: Build
run: pnpm build

Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"format": "prettier --write \"**/*.{ts,tsx,md,json,css,html}\"",
"prepare": "husky",
"test": "turbo run test",
"test:unit": "turbo run test:unit"
"test:unit": "turbo run test:unit",
"cs-version": "changeset"
},
"devDependencies": {
"eslint": "8.57.1",
Expand All @@ -23,15 +24,15 @@
"prettier": "^3.1.1",
"turbo": "^1.12.4"
},
"dependencies": {
"@changesets/cli": "2.27.10"
},
"packageManager": "pnpm@8.15.5+sha256.4b4efa12490e5055d59b9b9fc9438b7d581a6b7af3b5675eb5c5f447cee1a589",
"resolutions": {
"@tanstack/react-query": "5.18.1",
"graphql": "16.8.1",
"react": "18.3.1"
},
"dependencies": {
"@changesets/cli": "2.27.10"
},
"pnpm": {
"neverBuiltDependencies": [
"bufferutil",
Expand Down
22 changes: 12 additions & 10 deletions packages/deployments/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@ This repo contains all the data that describes an Axis Deployment per chain. Thi

For chains we extend [viem's chain definition](https://viem.sh/docs/chains/introduction.html)

## Adding deployments
## Adding a new chain deployment

- Create a new file with the network name in the corresponding dir on the project root (`./testnets` or `./mainnets`)
- Add the required information
- Add your file to its directory index.ts
- ???
- Done
1. Obtain the deployment configuration for the [core](https://github.com/Axis-Fi/axis-core/tree/master/deployments), [periphery](https://github.com/Axis-Fi/axis-periphery/tree/master/deployments), and [utils](https://github.com/Axis-Fi/axis-registry) contracts from the linked repos.

## Syncing contract addresses
2. Copy the deployment configs into `./src/axis-core`, `./src/axis-periphery`, and `./src/axis-utils`

Ensure axis-core and axis-periphery are sibling directories to this monorepo and have the latest verion.
Run `pnpm sync` on this directory.
This script will take the latest version of the deployment jsons and update them here.
3. Create a new file with the network name in the corresponding dir on the project root (`./src/chains/testnet` or `./src/chains/mainnet`)

4. Add the chain information including RPC and subgraph URLs

5. Add your file to the `index.ts` barrel file in the same directory

6. Commit a changeset for this package from the monorepo root with `pnpm build && pnpm cs-version`

7. Approve the changeset on Github to trigger an npm release
103 changes: 0 additions & 103 deletions packages/deployments/get-deployments.cjs

This file was deleted.

1 change: 0 additions & 1 deletion packages/deployments/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
"@axis-finance/tsup-config": "workspace:*"
},
"scripts": {
"sync": "node ./get-deployments.cjs",
"build": "tsup"
}
}
14 changes: 14 additions & 0 deletions packages/deployments/src/axis-periphery/.bsc-testnet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"deployments.callbacks.BatchCappedMerkleAllowlist": [
"0x98AdAeb0A575d5ef6c7385BE55EB55B25F60c61f"
],
"deployments.callbacks.BatchMerkleAllowlist": [
"0x98F2ce54059a296df7e63355b4E2FCD3943A4F3d"
],
"deployments.callbacks.BatchTokenAllowlist": [
"0x987BF7a19894aD855F8f51e62611590295DC1255"
],
"deployments.callbacks.BatchAllocatedMerkleAllowlist": [
"0x98118d3ddD377ecbf39C702453643eFC68B73093"
]
}
14 changes: 14 additions & 0 deletions packages/deployments/src/axis-periphery/.bsc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"deployments.callbacks.BatchCappedMerkleAllowlist": [
"0x9854F3dA1692E7b95C5bcF62b7f8D0413216a828"
],
"deployments.callbacks.BatchMerkleAllowlist": [
"0x989E0dA548D05c45ee0Ef1BEBa20472cDFFdEa22"
],
"deployments.callbacks.BatchTokenAllowlist": [
"0x98606a2A147DeEAAB12D60928C85d0c6B59621bD"
],
"deployments.callbacks.BatchAllocatedMerkleAllowlist": [
"0x980157254aD105A609C83482c2a473e924F077b2"
]
}
Empty file.
14 changes: 14 additions & 0 deletions packages/deployments/src/axis-periphery/.monad-testnet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"deployments.callbacks.BatchCappedMerkleAllowlist": [
"0x9822C0AA01Abba260764a1519f8724f821c85358"
],
"deployments.callbacks.BatchMerkleAllowlist": [
"0x98c27B29BB2aB88f419632EED268D6f38903573b"
],
"deployments.callbacks.BatchTokenAllowlist": [
"0x98aa8Ae03dCA54aFb23b5D91fBAb4E57e2b17952"
],
"deployments.callbacks.BatchAllocatedMerkleAllowlist": [
"0x9896Fc91bFe40a874b1f1f185a5E2466569E93f5"
]
}
6 changes: 6 additions & 0 deletions packages/deployments/src/axis-periphery/.sepolia.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"deployments.callbacks.BatchCappedMerkleAllowlist": "0x98AdAeb0A575d5ef6c7385BE55EB55B25F60c61f",
"deployments.callbacks.BatchMerkleAllowlist": "0x98F2ce54059a296df7e63355b4E2FCD3943A4F3d",
"deployments.callbacks.BatchTokenAllowlist": "0x987BF7a19894aD855F8f51e62611590295DC1255",
"deployments.callbacks.BatchAllocatedMerkleAllowlist": "0x98118d3ddD377ecbf39C702453643eFC68B73093"
}
14 changes: 14 additions & 0 deletions packages/deployments/src/axis-periphery/.sonic.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"deployments.callbacks.BatchCappedMerkleAllowlist": [
"0x9854F3dA1692E7b95C5bcF62b7f8D0413216a828"
],
"deployments.callbacks.BatchMerkleAllowlist": [
"0x989E0dA548D05c45ee0Ef1BEBa20472cDFFdEa22"
],
"deployments.callbacks.BatchTokenAllowlist": [
"0x98606a2A147DeEAAB12D60928C85d0c6B59621bD"
],
"deployments.callbacks.BatchAllocatedMerkleAllowlist": [
"0x980157254aD105A609C83482c2a473e924F077b2"
]
}
35 changes: 35 additions & 0 deletions packages/deployments/src/chains/mainnet/bsc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { bsc } from "viem/chains";
import type { AxisDeploymentConfig } from "../../types";
import { usdc } from "../../tokens/common";
import core from "../../axis-core/.bsc.json";
import periphery from "../../axis-periphery/.bsc.json";
import { extractAddresses, extractCallbacks } from "../helpers";

const config: AxisDeploymentConfig = {
name: "bsc",
chain: bsc,
chainIconUrl: "/bsc.webp",
subgraphURL:
"https://subgraph.satsuma-prod.com/44c4cc082f74/spaces-team/axis-origin-bsc/version/v<VERSION>/api",
rpcURL:
"https://bnb-mainnet.g.alchemy.com/v2/h6OEviwRZGmTSXHYPRmMquo5u-YoWLeY",
tokenList: [
{
...usdc,
address: "0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d",
decimals: 6,
},
{
name: "Wrapped BNB",
symbol: "WBNB",
logoURI:
"https://assets.coingecko.com/coins/images/825/standard/bnb-icon2_2x.png",
decimals: 18,
address: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c",
},
],
...extractAddresses(core),
...extractCallbacks(periphery),
};

export default config;
4 changes: 3 additions & 1 deletion packages/deployments/src/chains/mainnet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ import blast from "./blast";
import mantle from "./mantle";
import mode from "./mode";
import mainnet from "./mainnet";
import bsc from "./bsc";
import sonic from "./sonic";

export default [arbitrum, base, blast, mantle, mode, mainnet];
export default [arbitrum, base, blast, mantle, mode, mainnet, bsc, sonic];
33 changes: 33 additions & 0 deletions packages/deployments/src/chains/mainnet/sonic.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { sonic } from "viem/chains";
import type { AxisDeploymentConfig } from "../../types";
import core from "../../axis-core/.sonic.json";
import periphery from "../../axis-periphery/.sonic.json";
import { extractAddresses, extractCallbacks } from "../helpers";
import { usdc } from "../../tokens/common";

const config: AxisDeploymentConfig = {
name: "sonic",
chain: sonic,
chainIconUrl: "/sonic-logo.png",
subgraphURL:
"https://subgraph.satsuma-prod.com/44c4cc082f74/spaces-team/axis-origin-sonic/version/v<VERSION>/api",
rpcURL:
"https://sonic-mainnet.g.alchemy.com/v2/h6OEviwRZGmTSXHYPRmMquo5u-YoWLeY",
tokenList: [
{
...usdc,
address: "0x29219dd400f2Bf60E5a23d13Be72B486D4038894",
},
{
name: "Wrapped Sonic",
symbol: "wS",
logoURI: `https://assets.coingecko.com/coins/images/38108/standard/200x200_Sonic_Logo.png`,
decimals: 18,
address: "0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38",
},
],
...extractAddresses(core),
...extractCallbacks(periphery),
};

export default config;
2 changes: 2 additions & 0 deletions packages/deployments/src/chains/testnet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import modeTestnet from "./mode-testnet";
import baseSepolia from "./base-sepolia";
import mantleSepolia from "./mantle-sepolia";
import sepolia from "./sepolia";
import monadTestnet from "./monad-testnet";

export default [
blastSepolia,
Expand All @@ -12,4 +13,5 @@ export default [
baseSepolia,
mantleSepolia,
sepolia,
monadTestnet,
];
31 changes: 31 additions & 0 deletions packages/deployments/src/chains/testnet/monad-testnet.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { monadTestnet } from "viem/chains";
import type { AxisDeploymentConfig } from "../../types";
import { weth, usdc } from "../../tokens/common";
import core from "../../axis-core/.monad-testnet.json";
import periphery from "../../axis-periphery/.monad-testnet.json";
import { extractAddresses, extractCallbacks } from "../helpers";

const config: AxisDeploymentConfig = {
name: "monad-testnet",
chain: monadTestnet,
chainIconUrl: "/monad.svg",
subgraphURL:
"https://subgraph.satsuma-prod.com/44c4cc082f74/spaces-team/axis-origin-monad-testnet/version/v<VERSION>/api",
rpcURL:
"https://monad-testnet.g.alchemy.com/v2/h6OEviwRZGmTSXHYPRmMquo5u-YoWLeY",
tokenList: [
{
...usdc,
address: "0xf817257fed379853cDe0fa4F97AB987181B1E5Ea",
decimals: 6,
},
{
...weth,
address: "0xB5a30b0FDc5EA94A52fDc42e3E9760Cb8449Fb37",
},
],
...extractAddresses(core),
...extractCallbacks(periphery),
};

export default config;
2 changes: 1 addition & 1 deletion packages/deployments/src/subgraph-config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The deployed subgraph version
// NOTE: if the subgraph schema changes, please update packages/subgraph-client/codegen.ts ENDPOINT
const version = "1.0.6";
const version = "1.0.7";

export default {
graph: "/axis-origin",
Expand Down
Loading