-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
af7f660
commit 663687c
Showing
7 changed files
with
42 additions
and
222 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +0,0 @@ | ||
export declare const pgn: { | ||
readonly id: 424; | ||
readonly name: "Public Goods Network"; | ||
readonly network: "pgn"; | ||
readonly nativeCurrency: { | ||
readonly decimals: 18; | ||
readonly name: "ETH"; | ||
readonly symbol: "ETH"; | ||
}; | ||
readonly rpcUrls: { | ||
readonly default: { | ||
readonly http: readonly ["https://rpc.publicgoods.network"]; | ||
}; | ||
readonly public: { | ||
readonly http: readonly ["https://rpc.publicgoods.network"]; | ||
}; | ||
}; | ||
readonly blockExplorers: { | ||
readonly default: { | ||
readonly name: "Explorer"; | ||
readonly url: "https://explorer.publicgoods.network"; | ||
}; | ||
}; | ||
readonly contracts: { | ||
readonly multicall3: { | ||
readonly address: "0x42c27071b47AE8E6669891487dC6394112748331"; | ||
readonly blockCreated: 1623104; | ||
}; | ||
}; | ||
readonly testnet: false; | ||
}; | ||
export declare const pgnSepolia: { | ||
readonly id: 58008; | ||
readonly name: "PGN Sepolia Testnet"; | ||
readonly network: "pgn-sepolia"; | ||
readonly nativeCurrency: { | ||
readonly decimals: 18; | ||
readonly name: "ETH"; | ||
readonly symbol: "ETH"; | ||
}; | ||
readonly rpcUrls: { | ||
readonly default: { | ||
readonly http: readonly ["https://sepolia.publicgoods.network"]; | ||
}; | ||
readonly public: { | ||
readonly http: readonly ["https://sepolia.publicgoods.network"]; | ||
}; | ||
}; | ||
readonly blockExplorers: { | ||
readonly default: { | ||
readonly name: "Explorer"; | ||
readonly url: "https://explorer.sepolia.publicgoods.network"; | ||
}; | ||
}; | ||
readonly contracts: { | ||
readonly multicall3: { | ||
readonly address: "0xA541E4e79Df59B94B1Db85e997c94E43C685f856"; | ||
readonly blockCreated: 3312423; | ||
}; | ||
}; | ||
readonly testnet: true; | ||
}; | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,3 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.pgnSepolia = exports.pgn = void 0; | ||
// custom chains | ||
exports.pgn = { | ||
id: 424, | ||
name: "Public Goods Network", | ||
network: "pgn", | ||
nativeCurrency: { | ||
decimals: 18, | ||
name: "ETH", | ||
symbol: "ETH", | ||
}, | ||
rpcUrls: { | ||
default: { | ||
http: ["https://rpc.publicgoods.network"], | ||
}, | ||
public: { | ||
http: ["https://rpc.publicgoods.network"], | ||
}, | ||
}, | ||
blockExplorers: { | ||
default: { | ||
name: "Explorer", | ||
url: "https://explorer.publicgoods.network", | ||
}, | ||
}, | ||
contracts: { | ||
multicall3: { | ||
address: "0x42c27071b47AE8E6669891487dC6394112748331", | ||
blockCreated: 1623104, | ||
}, | ||
}, | ||
testnet: false, | ||
}; | ||
exports.pgnSepolia = { | ||
id: 58008, | ||
name: "PGN Sepolia Testnet", | ||
network: "pgn-sepolia", | ||
nativeCurrency: { | ||
decimals: 18, | ||
name: "ETH", | ||
symbol: "ETH", | ||
}, | ||
rpcUrls: { | ||
default: { | ||
http: ["https://sepolia.publicgoods.network"], | ||
}, | ||
public: { | ||
http: ["https://sepolia.publicgoods.network"], | ||
}, | ||
}, | ||
blockExplorers: { | ||
default: { | ||
name: "Explorer", | ||
url: "https://explorer.sepolia.publicgoods.network", | ||
}, | ||
}, | ||
contracts: { | ||
multicall3: { | ||
address: "0xA541E4e79Df59B94B1Db85e997c94E43C685f856", | ||
blockCreated: 3312423, | ||
}, | ||
}, | ||
testnet: true, | ||
}; | ||
// import { Chain } from "viem"; | ||
// Add your custom chains here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,26 @@ | ||
import { Chain, PublicClient, Transport, createPublicClient, http } from "viem"; | ||
|
||
/** | ||
* | ||
* | ||
* Returns a PublicClient instance that can be used to interact with the Allo v2 contracts. | ||
* | ||
* | ||
* @remarks | ||
* This is a wrapper around the viem PublicClient class that sets the correct chain ID and transport. | ||
* | ||
* | ||
* @param chain - The chain ID to connect to (this is a Chain type from viem) | ||
* @param rpc - The url of the RPC endpoint | ||
* @returns - A PublicClient instance | ||
* | ||
* | ||
* @beta | ||
*/ | ||
export const create = (chain: Chain, rpc?: string): PublicClient<Transport, Chain> => { | ||
export const create = ( | ||
chain: Chain, | ||
rpc?: string | ||
): PublicClient<Transport, Chain> => { | ||
const client = createPublicClient({ | ||
chain: chain, | ||
transport: http(rpc ?? ""), | ||
}); | ||
|
||
return client; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,3 @@ | ||
import { Chain } from "viem"; | ||
// import { Chain } from "viem"; | ||
|
||
// custom chains | ||
export const pgn = { | ||
id: 424, | ||
name: "Public Goods Network", | ||
network: "pgn", | ||
nativeCurrency: { | ||
decimals: 18, | ||
name: "ETH", | ||
symbol: "ETH", | ||
}, | ||
rpcUrls: { | ||
default: { | ||
http: ["https://rpc.publicgoods.network"], | ||
}, | ||
public: { | ||
http: ["https://rpc.publicgoods.network"], | ||
}, | ||
}, | ||
blockExplorers: { | ||
default: { | ||
name: "Explorer", | ||
url: "https://explorer.publicgoods.network", | ||
}, | ||
}, | ||
contracts: { | ||
multicall3: { | ||
address: "0x42c27071b47AE8E6669891487dC6394112748331", | ||
blockCreated: 1623104, | ||
}, | ||
}, | ||
testnet: false, | ||
} as const satisfies Chain; | ||
|
||
export const pgnSepolia = { | ||
id: 58008, | ||
name: "PGN Sepolia Testnet", | ||
network: "pgn-sepolia", | ||
nativeCurrency: { | ||
decimals: 18, | ||
name: "ETH", | ||
symbol: "ETH", | ||
}, | ||
rpcUrls: { | ||
default: { | ||
http: ["https://sepolia.publicgoods.network"], | ||
}, | ||
public: { | ||
http: ["https://sepolia.publicgoods.network"], | ||
}, | ||
}, | ||
blockExplorers: { | ||
default: { | ||
name: "Explorer", | ||
url: "https://explorer.sepolia.publicgoods.network", | ||
}, | ||
}, | ||
contracts: { | ||
multicall3: { | ||
address: "0xA541E4e79Df59B94B1Db85e997c94E43C685f856", | ||
blockCreated: 3312423, | ||
}, | ||
}, | ||
testnet: true, | ||
} as const satisfies Chain; | ||
// Add your custom chains here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters