Skip to content

Commit

Permalink
Add basic Sepolia support to tasks (#73)
Browse files Browse the repository at this point in the history
Adds basic Sepolia support to tasks.

### Test Plan

Code builds.
  • Loading branch information
fedgiac authored Mar 6, 2024
1 parent fbb2bb9 commit 5cb4180
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
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

0 comments on commit 5cb4180

Please sign in to comment.