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 basic Sepolia support to tasks #73

Merged
merged 2 commits into from
Mar 6, 2024
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
3 changes: 2 additions & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,9 @@ export default {
chainId: 5,
},
sepolia: {
...sharedNetworkConfig,
url: "https://ethereum-sepolia.publicnode.com",
...sharedNetworkConfig,
chainId: 11155111,
},
xdai: {
url: "https://rpc.gnosischain.com",
Expand Down
8 changes: 7 additions & 1 deletion src/tasks/ts/deployment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ import { HardhatRuntimeEnvironment } from "hardhat/types";

import { ContractName } from "../../ts";

const supportedNetworks = ["rinkeby", "goerli", "xdai", "mainnet"] as const;
const supportedNetworks = [
"rinkeby",
"goerli",
"xdai",
"mainnet",
"sepolia",
] as const;
export type SupportedNetwork = (typeof supportedNetworks)[number];
export function isSupportedNetwork(
network: string,
Expand Down
2 changes: 2 additions & 0 deletions src/tasks/ts/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ export const NATIVE_TOKEN_SYMBOL: Record<SupportedNetwork | "hardhat", string> =
mainnet: "ETH",
rinkeby: "ETH",
goerli: "ETH",
sepolia: "ETH",
xdai: "xDAI",
};

export const WRAPPED_NATIVE_TOKEN_ADDRESS: Record<SupportedNetwork, string> = {
mainnet: WethNetworks.WETH9[1].address,
rinkeby: WethNetworks.WETH9[4].address,
sepolia: "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14",
goerli: "0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6",
xdai: "0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d",
};
Expand Down
5 changes: 5 additions & 0 deletions src/tasks/ts/value.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ export const REFERENCE_TOKEN: Record<SupportedNetwork, ReferenceToken> = {
decimals: 18,
address: "0x6b175474e89094c44da98b954eedeac495271d0f",
},
sepolia: {
symbol: "DAI",
decimals: 18,
address: "0xB4F1737Af37711e9A5890D9510c9bB60e170CB0D",
},
xdai: {
// todo: replace with XDAI when native token price queries will be supported
// by the services.
Expand Down
2 changes: 1 addition & 1 deletion src/tasks/withdraw/safe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface Transaction {
}

function serviceUrlForNetwork(network: string): string {
if (["goerli", "mainnet", "gnosis-chain"].includes(network)) {
if (["goerli", "mainnet", "gnosis-chain", "sepolia"].includes(network)) {
return `https://safe-transaction-${network}.safe.global`;
} else if (network === "xdai") {
return "https://safe-transaction-gnosis-chain.safe.global/";
Expand Down
Loading