diff --git a/.github/workflows/dev-cd.yaml b/.github/workflows/dev-cd.yaml index 2c9c93108..500cbb55e 100644 --- a/.github/workflows/dev-cd.yaml +++ b/.github/workflows/dev-cd.yaml @@ -16,6 +16,7 @@ env: REACT_APP_ONBOARD_JS_DAPP_ID: 30fd8cd4-93a1-4c0e-a463-b5eceb9a3956 REACT_APP_SUBGRAPH_BASE_URL: https://api.thegraph.com/subgraphs/name/ REACT_APP_SUBGRAPH_GOERLI: samepant/zodiac-roles-mod-goerli + REACT_APP_SUBGRAPH_SEPOLIA: samepant/zodiac-roles-mod-sepolia REACT_APP_SUBGRAPH_GNOSIS_CHAIN: samepant/zodiac-roles-mod-gnosis-chain REACT_APP_SUBGRAPH_MAINNET: samepant/zodiac-roles-mod-mainnet REACT_APP_SUBGRAPH_POLYGON: samepant/zodiac-roles-mod-polygon @@ -83,6 +84,7 @@ jobs: HOSTED_SERVICE_SUBGRAPH__GNOSIS_CHAIN: samepant/zodiac-roles-mod-gnosis-chain HOSTED_SERVICE_SUBGRAPH__ARBITRUM_ONE: samepant/zodiac-roles-mod-arbitrum HOSTED_SERVICE_SUBGRAPH__GOERLI: samepant/zodiac-roles-mod-goerli + HOSTED_SERVICE_SUBGRAPH__SEPOLIA: samepant/zodiac-roles-mod-sepolia HOSTED_SERVICE_SUBGRAPH__AVALANCHE: samepant/zodiac-roles-mod-avalanche HOSTED_SERVICE_SUBGRAPH__BSC: samepant/zodiac-roles-mod-bsc HOSTED_SERVICE_SUBGRAPH__MAINNET: samepant/zodiac-roles-mod-mainnet @@ -93,6 +95,7 @@ jobs: yarn deploy:arbitrum-one yarn deploy:gnosis-chain yarn deploy:goerli + yarn deploy:sepolia yarn deploy:avalanche yarn deploy:bsc yarn deploy:mainnet diff --git a/.github/workflows/prod-release-deploy.yaml b/.github/workflows/prod-release-deploy.yaml index cb20249d4..20ad2b404 100644 --- a/.github/workflows/prod-release-deploy.yaml +++ b/.github/workflows/prod-release-deploy.yaml @@ -16,6 +16,7 @@ env: REACT_APP_ONBOARD_JS_DAPP_ID: 30fd8cd4-93a1-4c0e-a463-b5eceb9a3956 REACT_APP_SUBGRAPH_BASE_URL: https://api.thegraph.com/subgraphs/name/ REACT_APP_SUBGRAPH_GOERLI: samepant/zodiac-roles-mod-goerli + REACT_APP_SUBGRAPH_SEPOLIA: samepant/zodiac-roles-mod-sepolia REACT_APP_SUBGRAPH_GNOSIS_CHAIN: samepant/zodiac-roles-mod-gnosis-chain REACT_APP_SUBGRAPH_MAINNET: samepant/zodiac-roles-mod-mainnet REACT_APP_SUBGRAPH_POLYGON: samepant/zodiac-roles-mod-polygon @@ -103,6 +104,7 @@ jobs: HOSTED_SERVICE_SUBGRAPH__GNOSIS_CHAIN: samepant/zodiac-roles-mod-gnosis-chain HOSTED_SERVICE_SUBGRAPH__ARBITRUM_ONE: samepant/zodiac-roles-mod-arbitrum HOSTED_SERVICE_SUBGRAPH__GOERLI: samepant/zodiac-roles-mod-goerli + HOSTED_SERVICE_SUBGRAPH__SEPOLIA: samepant/zodiac-roles-mod-sepolia HOSTED_SERVICE_SUBGRAPH__AVALANCHE: samepant/zodiac-roles-mod-avalanche HOSTED_SERVICE_SUBGRAPH__BSC: samepant/zodiac-roles-mod-bsc HOSTED_SERVICE_SUBGRAPH__MAINNET: samepant/zodiac-roles-mod-mainnet @@ -113,6 +115,7 @@ jobs: yarn deploy:arbitrum-one yarn deploy:gnosis-chain yarn deploy:goerli + yarn deploy:sepolia yarn deploy:avalanche yarn deploy:bsc yarn deploy:mainnet diff --git a/packages/app/.env.sample b/packages/app/.env.sample index d0c3afac9..158b2e0c3 100644 --- a/packages/app/.env.sample +++ b/packages/app/.env.sample @@ -13,6 +13,7 @@ REACT_APP_SNOWTRACE_KEY= # Subgraphs REACT_APP_SUBGRAPH_BASE_URL=https://api.thegraph.com/subgraphs/name/ REACT_APP_SUBGRAPH_GOERLI=samepant/zodiac-roles-mod-goerli +REACT_APP_SUBGRAPH_SEPOLIA=samepant/zodiac-roles-mod-sepolia REACT_APP_SUBGRAPH_GNOSIS_CHAIN=samepant/zodiac-roles-mod-gnosis-chain REACT_APP_SUBGRAPH_MAINNET=samepant/zodiac-roles-mod-mainnet REACT_APP_SUBGRAPH_POLYGON=samepant/zodiac-roles-mod-polygon diff --git a/packages/app/src/data/chains.json b/packages/app/src/data/chains.json index c355e2e9d..dfa68e7e8 100644 --- a/packages/app/src/data/chains.json +++ b/packages/app/src/data/chains.json @@ -46,6 +46,29 @@ ], "infoURL": "https://goerli.net/#about" }, + "11155111": { + "name": "Sepolia", + "chainId": 11155111, + "shortName": "sep", + "nativeCurrency": { + "name": "Sepolia Ether", + "symbol": "SEP", + "decimals": 18 + }, + "rpc": [ + "https://sepolia.infura.io/v3/${INFURA_API_KEY}", + "wss://sepolia.infura.io/v3/${INFURA_API_KEY}", + "https://rpc2.sepolia.org" + ], + "explorers": [ + { + "name": "etherscan-sepolia", + "url": "https://sepolia.etherscan.io", + "standard": "EIP3091" + } + ], + "infoURL": "http://sepolia.org" + }, "10": { "name": "Optimism", "chainId": 10, diff --git a/packages/app/src/utils/explorer.ts b/packages/app/src/utils/explorer.ts index ba4f623a8..220a0c821 100644 --- a/packages/app/src/utils/explorer.ts +++ b/packages/app/src/utils/explorer.ts @@ -28,6 +28,10 @@ const explorerConfig: Record = { apiUrl: "https://api-goerli.etherscan.io/api", apiKey: ETHERSCAN_KEY, }, + [Network.SEPOLIA]: { + apiUrl: "https://api-sepolia.etherscan.io/api", + apiKey: ETHERSCAN_KEY, + }, [Network.OPTIMISM_ON_GNOSIS]: { apiUrl: "https://blockscout.com/xdai/optimism/", }, diff --git a/packages/app/src/utils/networks.ts b/packages/app/src/utils/networks.ts index e6622acfe..f44a252e4 100644 --- a/packages/app/src/utils/networks.ts +++ b/packages/app/src/utils/networks.ts @@ -6,6 +6,7 @@ if (!INFURA_KEY) throw new Error("INFURA KEY NOT SET") export enum Network { MAINNET = 1, GOERLI = 5, + SEPOLIA = 11155111, OPTIMISM = 10, OPTIMISM_ON_GNOSIS = 300, BINANCE = 56, @@ -21,6 +22,7 @@ export enum Network { export const NETWORKS = [ Network.MAINNET, Network.GOERLI, + Network.SEPOLIA, Network.OPTIMISM, Network.BINANCE, Network.GNOSIS, diff --git a/packages/evm/hardhat.config.ts b/packages/evm/hardhat.config.ts index 0bc3a2d05..890133646 100644 --- a/packages/evm/hardhat.config.ts +++ b/packages/evm/hardhat.config.ts @@ -36,7 +36,10 @@ if (PK) { }; } -if (["goerli", "mainnet"].includes(argv.network) && INFURA_KEY === undefined) { +if ( + ["goerli", "sepolia", "mainnet"].includes(argv.network) && + INFURA_KEY === undefined +) { throw new Error( `Could not find Infura key in env, unable to connect to network ${argv.network}` ); @@ -70,6 +73,10 @@ const config: HardhatUserConfig = { ...sharedNetworkConfig, url: `https://goerli.infura.io/v3/${INFURA_KEY}`, }, + sepolia: { + ...sharedNetworkConfig, + url: `https://sepolia.infura.io/v3/${INFURA_KEY}`, + }, xdai: { ...sharedNetworkConfig, url: "https://rpc.gnosischain.com/", diff --git a/packages/evm/src/deploy/verify.ts b/packages/evm/src/deploy/verify.ts index 3304d25cf..5ffc8e17c 100644 --- a/packages/evm/src/deploy/verify.ts +++ b/packages/evm/src/deploy/verify.ts @@ -4,7 +4,7 @@ import { HardhatRuntimeEnvironment } from "hardhat/types"; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { run } = hre; - if (!["goerli", "mainnet"].includes(hre.network.name)) { + if (!["goerli", "sepolia", "mainnet"].includes(hre.network.name)) { return; } diff --git a/packages/sdk/hardhat.config.ts b/packages/sdk/hardhat.config.ts index d69182b65..b1c791d21 100644 --- a/packages/sdk/hardhat.config.ts +++ b/packages/sdk/hardhat.config.ts @@ -36,7 +36,10 @@ if (PK) { } } -if (["goerli", "mainnet"].includes(argv.network) && INFURA_KEY === undefined) { +if ( + ["goerli", "sepolia", "mainnet"].includes(argv.network) && + INFURA_KEY === undefined +) { throw new Error( `Could not find Infura key in env, unable to connect to network ${argv.network}` ) @@ -72,6 +75,10 @@ export default { ...sharedNetworkConfig, url: `https://goerli.infura.io/v3/${INFURA_KEY}`, }, + sepolia: { + ...sharedNetworkConfig, + url: `https://sepolia.infura.io/v3/${INFURA_KEY}`, + }, xdai: { ...sharedNetworkConfig, chainId: 100, diff --git a/packages/sdk/src/safeTxService.ts b/packages/sdk/src/safeTxService.ts index 7703e87b3..900194220 100644 --- a/packages/sdk/src/safeTxService.ts +++ b/packages/sdk/src/safeTxService.ts @@ -1,6 +1,7 @@ const SAFE_TX_SERVICE = { [1]: "https://safe-transaction.gnosis.io/", [5]: "https://safe-transaction-goerli.safe.global/", + [11155111]: "https://safe-transaction-sepolia.safe.global/", [100]: "https://safe-transaction.xdai.gnosis.io/", [73799]: "https://safe-transaction.volta.gnosis.io/", [246]: "https://safe-transaction.ewc.gnosis.io/", diff --git a/packages/sdk/src/subgraph.ts b/packages/sdk/src/subgraph.ts index 803e8ebcc..c6e0428b7 100644 --- a/packages/sdk/src/subgraph.ts +++ b/packages/sdk/src/subgraph.ts @@ -1,6 +1,8 @@ const SUBGRAPH = { [1]: "https://api.thegraph.com/subgraphs/name/samepant/zodiac-roles-mod-mainnet", [5]: "https://api.thegraph.com/subgraphs/name/samepant/zodiac-roles-mod-goerli", + [11155111]: + "https://api.thegraph.com/subgraphs/name/samepant/zodiac-roles-mod-sepolia", // [10]: "https://api.thegraph.com/subgraphs/name/samepant/zodiac-roles-mod-optimism", [56]: "https://api.thegraph.com/subgraphs/name/samepant/zodiac-roles-mod-bsc", [100]: diff --git a/packages/subgraph/.env.sample b/packages/subgraph/.env.sample index 73019b6f7..009850a84 100644 --- a/packages/subgraph/.env.sample +++ b/packages/subgraph/.env.sample @@ -1,6 +1,7 @@ HOSTED_SERVICE_SUBGRAPH__GNOSIS_CHAIN=asgeir-eth/zodiac-modifier-roles-gnosis-chain HOSTED_SERVICE_SUBGRAPH__ARBITRUM_ONE=asgeir-eth/zodiac-modifier-roles-arbitrum-one HOSTED_SERVICE_SUBGRAPH__GOERLI=asgeir-eth/zodiac-modifier-roles-goerli +HOSTED_SERVICE_SUBGRAPH__SEPOLIA=asgeir-eth/zodiac-modifier-roles-sepolia HOSTED_SERVICE_SUBGRAPH__AVALANCHE=asgeir-eth/zodiac-modifier-roles-avalanche HOSTED_SERVICE_SUBGRAPH__BSC=asgeir-eth/zodiac-modifier-roles-bsc HOSTED_SERVICE_SUBGRAPH__MAINNET=asgeir-eth/zodiac-modifier-roles-mainnet diff --git a/packages/subgraph/network_configs/sepolia.json b/packages/subgraph/network_configs/sepolia.json new file mode 100644 index 000000000..548bdf772 --- /dev/null +++ b/packages/subgraph/network_configs/sepolia.json @@ -0,0 +1,4 @@ +{ + "network": "sepolia", + "startBlock": 3059000 +} \ No newline at end of file diff --git a/packages/subgraph/package.json b/packages/subgraph/package.json index d34d2fa33..0725435f9 100644 --- a/packages/subgraph/package.json +++ b/packages/subgraph/package.json @@ -14,12 +14,14 @@ "deploy:arbitrum-one": "yarn prepare:arbitrum-one && bash -c 'source .env || true && graph deploy --node https://api.thegraph.com/deploy/ $HOSTED_SERVICE_SUBGRAPH__ARBITRUM_ONE'", "deploy:gnosis-chain": "yarn prepare:gnosis-chain && bash -c 'source .env || true && graph deploy --node https://api.thegraph.com/deploy/ $HOSTED_SERVICE_SUBGRAPH__GNOSIS_CHAIN'", "deploy:goerli": "yarn prepare:goerli && bash -c 'source .env || true && graph deploy --node https://api.thegraph.com/deploy/ $HOSTED_SERVICE_SUBGRAPH__GOERLI'", + "deploy:sepolia": "yarn prepare:sepolia && bash -c 'source .env || true && graph deploy --node https://api.thegraph.com/deploy/ $HOSTED_SERVICE_SUBGRAPH__SEPOLIA'", "deploy:avalanche": "yarn prepare:avalanche && bash -c 'source .env || true && graph deploy --node https://api.thegraph.com/deploy/ $HOSTED_SERVICE_SUBGRAPH__AVALANCHE'", "deploy:bsc": "yarn prepare:bsc && bash -c 'source .env || true && graph deploy --node https://api.thegraph.com/deploy/ $HOSTED_SERVICE_SUBGRAPH__BSC'", "deploy:mainnet": "yarn prepare:mainnet && bash -c 'source .env || true && graph deploy --node https://api.thegraph.com/deploy/ $HOSTED_SERVICE_SUBGRAPH__MAINNET'", "deploy:optimism": "yarn prepare:optimism && bash -c 'source .env || true && graph deploy --node https://api.thegraph.com/deploy/ $HOSTED_SERVICE_SUBGRAPH__OPTIMISM'", "deploy:polygon": "yarn prepare:polygon && bash -c 'source .env || true && graph deploy --node https://api.thegraph.com/deploy/ $HOSTED_SERVICE_SUBGRAPH__POLYGON'", "prepare:goerli": "mustache network_configs/goerli.json subgraph.template.yaml > subgraph.yaml", + "prepare:sepolia": "mustache network_configs/sepolia.json subgraph.template.yaml > subgraph.yaml", "prepare:avalanche": "mustache network_configs/avalanche.json subgraph.template.yaml > subgraph.yaml", "prepare:bsc": "mustache network_configs/bsc.json subgraph.template.yaml > subgraph.yaml", "prepare:mainnet": "mustache network_configs/mainnet.json subgraph.template.yaml > subgraph.yaml",