Skip to content

Commit

Permalink
Merge pull request #12 from gnosisguild/sepolia
Browse files Browse the repository at this point in the history
Sepolia support
  • Loading branch information
samepant authored Mar 1, 2024
2 parents 6bfa358 + 0cf597a commit 7ba08a5
Show file tree
Hide file tree
Showing 14 changed files with 63 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/dev-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/prod-release-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions packages/app/.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 23 additions & 0 deletions packages/app/src/data/chains.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions packages/app/src/utils/explorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ const explorerConfig: Record<Network, ExplorerConfig> = {
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/",
},
Expand Down
2 changes: 2 additions & 0 deletions packages/app/src/utils/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -21,6 +22,7 @@ export enum Network {
export const NETWORKS = [
Network.MAINNET,
Network.GOERLI,
Network.SEPOLIA,
Network.OPTIMISM,
Network.BINANCE,
Network.GNOSIS,
Expand Down
9 changes: 8 additions & 1 deletion packages/evm/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`
);
Expand Down Expand Up @@ -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/",
Expand Down
2 changes: 1 addition & 1 deletion packages/evm/src/deploy/verify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
9 changes: 8 additions & 1 deletion packages/sdk/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`
)
Expand Down Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions packages/sdk/src/safeTxService.ts
Original file line number Diff line number Diff line change
@@ -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/",
Expand Down
2 changes: 2 additions & 0 deletions packages/sdk/src/subgraph.ts
Original file line number Diff line number Diff line change
@@ -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]:
Expand Down
1 change: 1 addition & 0 deletions packages/subgraph/.env.sample
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 4 additions & 0 deletions packages/subgraph/network_configs/sepolia.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"network": "sepolia",
"startBlock": 3059000
}
2 changes: 2 additions & 0 deletions packages/subgraph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 7ba08a5

Please sign in to comment.