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

Add monad testnet #40

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
1 change: 1 addition & 0 deletions packages/nextjs/hooks/balancer/useApiConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ export const CHAIN_NAMES: { [key: number]: string } = {
11155111: "SEPOLIA",
42161: "ARBITRUM",
8453: "BASE",
// 10143: "MONAD", does not exist in API yet
};
2 changes: 1 addition & 1 deletion packages/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"vercel:yolo": "vercel --build-env NEXT_PUBLIC_IGNORE_BUILD_ERROR=true"
},
"dependencies": {
"@balancer/sdk": "^2.1.1",
"@balancer/sdk": "^2.3.0",
"@heroicons/react": "^2.0.11",
"@rainbow-me/rainbowkit": "2.1.2",
"@safe-global/safe-apps-provider": "^0.18.5",
Expand Down
3 changes: 2 additions & 1 deletion packages/nextjs/scaffold.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as chains from "viem/chains";
import { monadTestnet } from "~~/utils/customChains";

export type ScaffoldConfig = {
targetNetworks: readonly chains.Chain[];
Expand All @@ -12,7 +13,7 @@ export type ScaffoldConfig = {

const scaffoldConfig = {
// The networks on which your DApp is live
targetNetworks: [chains.sepolia, chains.mainnet, chains.gnosis, chains.arbitrum, chains.base],
targetNetworks: [chains.sepolia, chains.mainnet, chains.gnosis, chains.arbitrum, chains.base, monadTestnet],

// If using chains.foundry as your targetNetwork, you must specify a network to fork
targetFork: chains.sepolia,
Expand Down
29 changes: 29 additions & 0 deletions packages/nextjs/utils/customChains.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { defineChain } from "viem";

export const monadTestnet = /*#__PURE__*/ defineChain({
id: 10_143,
name: "Monad Testnet",
nativeCurrency: {
name: "Testnet MON Token",
symbol: "MON",
decimals: 18,
},
rpcUrls: {
default: {
http: ["https://testnet-rpc.monad.xyz"],
},
},
blockExplorers: {
default: {
name: "Monad Testnet explorer",
url: "https://testnet.monadexplorer.com",
},
},
contracts: {
multicall3: {
address: "0xcA11bde05977b3631167028862bE2a173976CA11",
blockCreated: 251449,
},
},
testnet: true,
});
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -286,14 +286,14 @@ __metadata:
languageName: node
linkType: hard

"@balancer/sdk@npm:^2.1.1":
version: 2.1.1
resolution: "@balancer/sdk@npm:2.1.1"
"@balancer/sdk@npm:^2.3.0":
version: 2.3.0
resolution: "@balancer/sdk@npm:2.3.0"
dependencies:
decimal.js-light: ^2.5.1
lodash.clonedeep: ^4.5.0
viem: ^2.22.3
checksum: 4c1788af0e3c130249534d79337aed7841d1bb2330aa20287b9b48c28dd0c5db5877a1d0ee6f7ebdedfd06019c722b10b4b04018750a3dec2492000b9d1aa18e
checksum: 890125bee1033c39bbabb203cf7ccc1da20d9f7d8ad644b45fcd26e4c859c88121d7050c05250181a8bbae9bd462cd9cae0eec1483a9f321d86fd4001bd3b52d
languageName: node
linkType: hard

Expand Down Expand Up @@ -1547,9 +1547,9 @@ __metadata:
linkType: hard

"@scure/base@npm:~1.1.6":
version: 1.1.7
resolution: "@scure/base@npm:1.1.7"
checksum: d9084be9a2f27971df1684af9e40bb750e86f549345e1bb3227fb61673c0c83569c92c1cb0a4ddccb32650b39d3cd3c145603b926ba751c9bc60c27317549b20
version: 1.1.9
resolution: "@scure/base@npm:1.1.9"
checksum: 120820a37dfe9dfe4cab2b7b7460552d08e67dee8057ed5354eb68d8e3440890ae983ce3bee957d2b45684950b454a2b6d71d5ee77c1fd3fddc022e2a510337f
languageName: node
linkType: hard

Expand Down Expand Up @@ -1659,7 +1659,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@se-2/nextjs@workspace:packages/nextjs"
dependencies:
"@balancer/sdk": ^2.1.1
"@balancer/sdk": ^2.3.0
"@heroicons/react": ^2.0.11
"@rainbow-me/rainbowkit": 2.1.2
"@safe-global/safe-apps-provider": ^0.18.5
Expand Down