Skip to content

Commit

Permalink
fix(ex): remove infura as rpc service
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-goldman committed Jan 4, 2023
1 parent 9bd2b0e commit a60020a
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 79 deletions.
8 changes: 8 additions & 0 deletions .changeset/short-doors-buy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@chugsplash/contracts': patch
'@chugsplash/demo': patch
'@chugsplash/executor': patch
'@chugsplash/plugins': patch
---

Remove Infura as RPC URL service
66 changes: 0 additions & 66 deletions packages/contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { HardhatUserConfig } from 'hardhat/types'
import { getenv } from '@eth-optimism/core-utils'
import * as dotenv from 'dotenv'

// Load environment variables from .env
Expand All @@ -15,71 +14,6 @@ const config: HardhatUserConfig = {
},
},
},
networks: {
optimism: {
chainId: 10,
url: 'https://mainnet.optimism.io',
verify: {
etherscan: {
apiKey: getenv('OPTIMISTIC_ETHERSCAN_API_KEY'),
},
},
},
'optimism-goerli': {
chainId: 420,
url: 'https://goerli.optimism.io',
verify: {
etherscan: {
apiKey: getenv('OPTIMISTIC_ETHERSCAN_API_KEY'),
},
},
},
ethereum: {
chainId: 1,
url: `https://mainnet.infura.io/v3/${getenv('INFURA_PROJECT_ID')}`,
verify: {
etherscan: {
apiKey: getenv('ETHEREUM_ETHERSCAN_API_KEY'),
},
},
},
goerli: {
chainId: 5,
url: `https://goerli.infura.io/v3/${getenv('INFURA_PROJECT_ID')}`,
verify: {
etherscan: {
apiKey: getenv('ETHEREUM_ETHERSCAN_API_KEY'),
},
},
},
rinkeby: {
chainId: 4,
url: `https://rinkeby.infura.io/v3/${getenv('INFURA_PROJECT_ID')}`,
verify: {
etherscan: {
apiKey: getenv('ETHEREUM_ETHERSCAN_API_KEY'),
},
},
},
ropsten: {
chainId: 3,
url: `https://ropsten.infura.io/v3/${getenv('INFURA_PROJECT_ID')}`,
verify: {
etherscan: {
apiKey: getenv('ETHEREUM_ETHERSCAN_API_KEY'),
},
},
},
kovan: {
chainId: 42,
url: `https://kovan.infura.io/v3/${getenv('INFURA_PROJECT_ID')}`,
verify: {
etherscan: {
apiKey: getenv('ETHEREUM_ETHERSCAN_API_KEY'),
},
},
},
},
}

export default config
2 changes: 1 addition & 1 deletion packages/demo/.env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PRIVATE_KEY=<private key>
INFURA_API_KEY=<infura blockchain network api key>
ALCHEMY_API_KEY=<alchemy blockchain network api key>
IPFS_PROJECT_ID=<infura ipfs project id>
IPFS_API_KEY_SECRET=<infura ipfs api key secret>
10 changes: 5 additions & 5 deletions packages/demo/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,22 @@ const config: HardhatUserConfig = {
networks: {
goerli: {
chainId: 5,
url: `https://goerli.infura.io/v3/${process.env.INFURA_API_KEY}`,
url: `https://eth-goerli.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY}`,
accounts,
},
ethereum: {
chainId: 1,
url: `https://mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
url: `https://eth-mainnet.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY}`,
accounts,
},
'optimism-goerli': {
chainId: 420,
url: `https://optimism-goerli.infura.io/v3/${process.env.INFURA_API_KEY}`,
url: `https://opt-goerli.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY}`,
accounts,
},
optimism: {
chainId: 10,
url: `https://optimism-mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`,
url: `https://opt-mainnet.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY}`,
accounts,
},
arbitrum: {
Expand All @@ -49,7 +49,7 @@ const config: HardhatUserConfig = {
},
'arbitrum-goerli': {
chainId: 421613,
url: 'https://goerli-rollup.arbitrum.io/rpc',
url: `https://arb-goerli.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY}`,
accounts,
},
},
Expand Down
4 changes: 1 addition & 3 deletions packages/executor/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,5 @@ CHUGSPLASH_EXECUTOR__AMPLITUDE_KEY=<amplitude api key for analytics (optional)>
CHUGSPLASH_EXECUTOR__LOG_LEVEL=<filter logs based on this level, i.e 'error', 'warning', 'info'>
IPFS_PROJECT_ID=<ipfs project id to retrieve config file>
IPFS_API_KEY_SECRET=<ipfs api key to retrieve config file>
OPT_ETHERSCAN_API_KEY=<Optimism Etherscan API key>
ETH_ETHERSCAN_API_KEY=<Ethereum Etherscan API key>
INFURA_API_KEY=<Infura Project API Key>
ETHERSCAN_API_KEY=<Etherscan API key>
HARDHAT_NETWORK=<Target hardhat network, used for verification>
5 changes: 1 addition & 4 deletions packages/plugins/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,14 @@ const config: HardhatUserConfig = {
},
},
networks: {
localhost: {
url: 'http://localhost:8545',
},
goerli: {
chainId: 5,
url: `https://eth-goerli.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY}`,
accounts,
},
ethereum: {
chainId: 1,
url: `https://eth-mainnet.g.alchemy.com/v2/${process.env.INFURA_API_KEY}`,
url: `https://eth-mainnet.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY}`,
accounts,
},
'optimism-goerli': {
Expand Down

0 comments on commit a60020a

Please sign in to comment.