Skip to content

Commit

Permalink
feat(pg): Support mainnets
Browse files Browse the repository at this point in the history
  • Loading branch information
RPate97 committed Aug 8, 2023
1 parent 54be0a0 commit f5d7503
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 103 deletions.
5 changes: 5 additions & 0 deletions .changeset/strange-experts-raise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sphinx-labs/core': patch
---

Output network name during etherscan verification
19 changes: 17 additions & 2 deletions packages/core/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const config: HardhatUserConfig = {
},
arbitrum: {
chainId: 42161,
url: 'https://arb1.arbitrum.io/rpc',
url: `https://arb-mainnet.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY}`,
accounts,
},
'arbitrum-goerli': {
Expand All @@ -64,19 +64,34 @@ const config: HardhatUserConfig = {
},
bnbt: {
chainId: 97,
url: `https://young-wandering-energy.bsc-testnet.discover.quiknode.pro/${process.env.QUICKNODE_API_KEY}`,
url: process.env.BNB_TESTNET_URL,
accounts,
},
bnb: {
chainId: 56,
url: process.env.BNB_MAINNET_URL,
accounts,
},
'gnosis-chiado': {
chainId: 10200,
url: `https://nd-706-500-091.p2pify.com/${process.env.CHAINSTACK_API_KEY}`,
accounts,
},
gnosis: {
chainId: 100,
url: process.env.GNOSIS_MAINNET_URL,
accounts,
},
maticmum: {
chainId: 80001,
url: `https://polygon-mumbai.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY}`,
accounts,
},
polygon: {
chainId: 137,
url: `https://polygon-mainnet.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY}`,
accounts,
},
},
}

Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/etherscan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ export const attemptVerification = async (

console.log(
`Successfully submitted source code for contract
${sourceName}:${contractName} at ${contractAddress}
${sourceName}:${contractName} at ${contractAddress} on ${networkName}
for verification on the block explorer. Waiting for verification result...
`
)
Expand Down Expand Up @@ -258,13 +258,13 @@ export const attemptVerification = async (
if (verificationStatus.isVerificationSuccess()) {
const contractURL = buildContractUrl(urls.browserURL, contractAddress)
console.log(
`Successfully verified ${contractName} on Etherscan:
`Successfully verified ${contractName} on ${networkName} Etherscan:
${contractURL}`
)
} else {
// Reaching this point shouldn't be possible unless the API is behaving in a new way.
throw new Error(
`The Etherscan API responded with an unexpected message.
`The ${networkName} Etherscan API responded with an unexpected message.
Contract verification may have succeeded and should be checked manually.
Message: ${verificationStatus.message}`
)
Expand Down
131 changes: 39 additions & 92 deletions packages/plugins/contracts/foundry/SphinxConstants.sol

Large diffs are not rendered by default.

35 changes: 32 additions & 3 deletions packages/plugins/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,31 +38,61 @@ const config: HardhatUserConfig = {
// 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.ALCHEMY_API_KEY}`,
// accounts,
// },
// 'optimism-goerli': {
// chainId: 420,
// url: `https://opt-goerli.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY}`,
// accounts,
// },
// optimism: {
// chainId: 10,
// url: `https://opt-mainnet.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY}`,
// accounts,
// },
// arbitrum: {
// chainId: 42161,
// url: `https://arb-mainnet.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY}`,
// accounts,
// },
// 'arbitrum-goerli': {
// chainId: 421613,
// url: `https://arb-goerli.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY}`,
// accounts,
// },
// bnbt: {
// chainId: 97,
// url: `https://young-wandering-energy.bsc-testnet.discover.quiknode.pro/${process.env.QUICKNODE_API_KEY}`,
// url: process.env.BNB_TESTNET_URL,
// accounts,
// },
// bnb: {
// chainId: 56,
// url: process.env.BNB_MAINNET_URL,
// accounts,
// },
// 'gnosis-chiado': {
// chainId: 10200,
// url: `https://rpc.chiadochain.net`,
// url: `https://nd-706-500-091.p2pify.com/${process.env.CHAINSTACK_API_KEY}`,
// accounts,
// },
// gnosis: {
// chainId: 100,
// url: process.env.GNOSIS_MAINNET_URL,
// accounts,
// },
// maticmum: {
// chainId: 80001,
// url: `https://polygon-mumbai.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY}`,
// accounts,
// },
// polygon: {
// chainId: 137,
// url: `https://polygon-mainnet.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY}`,
// accounts,
// },

goerli: {
chainId: 5,
Expand Down Expand Up @@ -94,7 +124,6 @@ const config: HardhatUserConfig = {
url: 'http://127.0.0.1:42001',
accounts,
},

ethereum: {
chainId: 1,
url: 'http://127.0.0.1:10001',
Expand Down
6 changes: 3 additions & 3 deletions packages/plugins/sphinx/Website.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ const ownerAddress = '0x9fd58Bf0F2E6125Ffb0CBFa9AE91893Dbc1D5c51'

// Used for testing the website, please do not delete
const config: UserConfigWithOptions = {
projectName: 'Foundry Deployment 3',
projectName: 'Foundry Deployment',
options: {
orgId: 'clkr8uf810000gecb3w80g8cl',
orgId: 'clku3cgou00002gcb837z3j3j',
owners: [ownerAddress],
threshold: 1,
testnets: [
'goerli',
'arbitrum-goerli',
'gnosis-chiado',
'maticmum',
'bnbt',
'optimism-goerli',
'goerli',
],
mainnets: ['ethereum', 'optimism'],
proposers: [ownerAddress],
Expand Down

0 comments on commit f5d7503

Please sign in to comment.