-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: adding addresses on Mode and adjusting static audit #158
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ In a table below one can find OLAS token addresses on corresponding chains and b | |
| Polygon PoS | [0xFEF5d947472e72Efbb2E388c730B7428406F2F95](https://polygonscan.com/token/0xFEF5d947472e72Efbb2E388c730B7428406F2F95) | [Polygon Portal](https://portal.polygon.technology/bridge) | | ||
| Solana | [Ez3nzG9ofodYCvEmw73XhQ87LWNYVRM2s7diB5tBZPyM](https://solscan.io/token/Ez3nzG9ofodYCvEmw73XhQ87LWNYVRM2s7diB5tBZPyM) | [Wormhole Portal](https://portalbridge.com/advanced-tools/#/transfer) | | ||
| Arbitrum | [0x064f8b858c2a603e1b106a2039f5446d32dc81c1](https://arbiscan.io/token/0x064f8b858c2a603e1b106a2039f5446d32dc81c1) | [Arbitrum Bridge](https://bridge.arbitrum.io) | | ||
| Optimism | [0xFC2E6e6BCbd49ccf3A5f029c79984372DcBFE527](https://optimistic.etherscan.io/token/0xFC2E6e6BCbd49ccf3A5f029c79984372DcBFE527) | [Optimism Bridge](https://app.optimism.io/bridge/deposit) | | ||
| Base | [0x54330d28ca3357F294334BDC454a032e7f353416](https://basescan.org/token/0x54330d28ca3357F294334BDC454a032e7f353416) | [Base Bridge](https://bridge.base.org/deposit) | | ||
| Celo | [0xaCFfAe8e57Ec6E394Eb1b41939A8CF7892DbDc51](https://celoscan.io/token/0xacffae8e57ec6e394eb1b41939a8cf7892dbdc51) | [Wormhole Portal](https://portalbridge.com/advanced-tools/#/transfer) | | ||
| Optimism | [0xFC2E6e6BCbd49ccf3A5f029c79984372DcBFE527](https://optimistic.etherscan.io/token/0xFC2E6e6BCbd49ccf3A5f029c79984372DcBFE527) | [Optimism Bridge](https://superbridge.app/optimism) | | ||
| Base | [0x54330d28ca3357F294334BDC454a032e7f353416](https://basescan.org/token/0x54330d28ca3357F294334BDC454a032e7f353416) | [Base Bridge](https://superbridge.app/base) | | ||
| Celo | [0xaCFfAe8e57Ec6E394Eb1b41939A8CF7892DbDc51](https://celoscan.io/token/0xacffae8e57ec6e394eb1b41939a8cf7892dbdc51) | [Wormhole Portal](https://portalbridge.com/advanced-tools/#/transfer) | | ||
| Mode | [0xcfD1D50ce23C46D3Cf6407487B2F8934e96DC8f9](https://explorer.mode.network/address/0xcfD1D50ce23C46D3Cf6407487B2F8934e96DC8f9) | [Mode Bridge](https://superbridge.app/mode) | | ||
Comment on lines
+12
to
+15
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They all switch to superbridge now. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -393,8 +393,8 @@ async function checkWormholeMessenger(chainId, provider, globalsInstance, config | |
|
||
async function main() { | ||
// Check for the API keys | ||
if (!process.env.ALCHEMY_API_KEY_MAINNET || !process.env.ALCHEMY_API_KEY_GOERLI || | ||
!process.env.ALCHEMY_API_KEY_MATIC || !process.env.ALCHEMY_API_KEY_MUMBAI) { | ||
if (!process.env.ALCHEMY_API_KEY_MAINNET || !process.env.ALCHEMY_API_KEY_SEPOLIA || | ||
!process.env.ALCHEMY_API_KEY_MATIC || !process.env.ALCHEMY_API_KEY_AMOY) { | ||
console.log("Check API keys!"); | ||
return; | ||
} | ||
|
@@ -410,17 +410,15 @@ async function main() { | |
// For now gnosis chains are not supported | ||
const networks = { | ||
"mainnet": "etherscan", | ||
"goerli": "goerli.etherscan", | ||
"polygon": "polygonscan", | ||
"polygonMumbai": "testnet.polygonscan", | ||
"optimistic": "optimistic.etherscan" | ||
}; | ||
|
||
console.log("\nVerifying deployed contracts vs the repo... If no error is output, then the contracts are correct."); | ||
|
||
// Traverse all chains | ||
for (let i = 0; i < numChains; i++) { | ||
// Skip gnosis chains | ||
// Skip unsupported chains | ||
if (!networks[configs[i]["name"]]) { | ||
continue; | ||
} | ||
|
@@ -447,32 +445,22 @@ async function main() { | |
if (verifySetup) { | ||
const globalNames = { | ||
"mainnet": "scripts/deployment/globals_mainnet.json", | ||
"goerli": "scripts/deployment/globals_goerli.json", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Getting rid of test and unsupported networks, this never made sense in the first place. |
||
"polygon": "scripts/deployment/bridges/polygon/globals_polygon_mainnet.json", | ||
"polygonMumbai": "scripts/deployment/bridges/polygon/globals_polygon_mumbai.json", | ||
"gnosis": "scripts/deployment/bridges/gnosis/globals_gnosis_mainnet.json", | ||
"chiado": "scripts/deployment/bridges/gnosis/globals_gnosis_chiado.json", | ||
"optimistic": "scripts/deployment/bridges/optimistic/globals_optimistic_mainnet.json", | ||
"optimisticSepolia": "scripts/deployment/bridges/optimistic/globals_optimistic_sepolia.json", | ||
"base": "scripts/deployment/bridges/optimistic/globals_base_mainnet.json", | ||
"baseSepolia": "scripts/deployment/bridges/optimistic/globals_base_sepolia.json", | ||
"celo": "scripts/deployment/bridges/wormhole/globals_celo_mainnet.json", | ||
"celoAlfajores": "scripts/deployment/bridges/wormhole/globals_celo_alfajores.json" | ||
"mode": "scripts/deployment/bridges/optimistic/globals_mode_mainnet.json" | ||
}; | ||
|
||
const providerLinks = { | ||
"mainnet": "https://eth-mainnet.g.alchemy.com/v2/" + process.env.ALCHEMY_API_KEY_MAINNET, | ||
"goerli": "https://eth-goerli.g.alchemy.com/v2/" + process.env.ALCHEMY_API_KEY_GOERLI, | ||
"polygon": "https://polygon-mainnet.g.alchemy.com/v2/" + process.env.ALCHEMY_API_KEY_MATIC, | ||
"polygonMumbai": "https://polygon-mumbai.g.alchemy.com/v2/" + process.env.ALCHEMY_API_KEY_MUMBAI, | ||
"gnosis": "https://rpc.gnosischain.com", | ||
"chiado": "https://rpc.chiadochain.net", | ||
"optimistic": "https://optimism.drpc.org", | ||
"optimisticSepolia": "https://sepolia.optimism.io", | ||
"base": "https://mainnet.base.org", | ||
"baseSepolia": "https://sepolia.base.org", | ||
"celo": "https://forno.celo.org", | ||
"celoAlfajores": "https://alfajores-forno.celo-testnet.org" | ||
"mode": "https://mainnet.mode.network" | ||
}; | ||
|
||
// Get all the globals processed | ||
|
@@ -488,41 +476,39 @@ async function main() { | |
console.log("\nVerifying deployed contracts setup... If no error is output, then the contracts are correct."); | ||
|
||
// L1 contracts | ||
for (let i = 0; i < 2; i++) { | ||
console.log("\n######## Verifying setup on CHAIN ID", configs[i]["chainId"]); | ||
console.log("\n######## Verifying setup on CHAIN ID", configs[0]["chainId"]); | ||
|
||
const initLog = "ChainId: " + configs[i]["chainId"] + ", network: " + configs[i]["name"]; | ||
const initLog = "ChainId: " + configs[0]["chainId"] + ", network: " + configs[0]["name"]; | ||
|
||
let log = initLog + ", contract: " + "OLAS"; | ||
await checkOLAS(configs[i]["chainId"], providers[i], globals[i], configs[i]["contracts"], "OLAS", log); | ||
let log = initLog + ", contract: " + "OLAS"; | ||
await checkOLAS(configs[0]["chainId"], providers[0], globals[0], configs[0]["contracts"], "OLAS", log); | ||
|
||
log = initLog + ", contract: " + "Timelock"; | ||
await checkTimelock(configs[i]["chainId"], providers[i], globals[i], configs[i]["contracts"], "Timelock", log); | ||
log = initLog + ", contract: " + "Timelock"; | ||
await checkTimelock(configs[0]["chainId"], providers[0], globals[0], configs[0]["contracts"], "Timelock", log); | ||
|
||
log = initLog + ", contract: " + "veOLAS"; | ||
await checkVEOLAS(configs[i]["chainId"], providers[i], globals[i], configs[i]["contracts"], "veOLAS", log); | ||
log = initLog + ", contract: " + "veOLAS"; | ||
await checkVEOLAS(configs[0]["chainId"], providers[0], globals[0], configs[0]["contracts"], "veOLAS", log); | ||
|
||
log = initLog + ", contract: " + "buOLAS"; | ||
await checkBUOLAS(configs[i]["chainId"], providers[i], globals[i], configs[i]["contracts"], "buOLAS", log); | ||
log = initLog + ", contract: " + "buOLAS"; | ||
await checkBUOLAS(configs[0]["chainId"], providers[0], globals[0], configs[0]["contracts"], "buOLAS", log); | ||
|
||
log = initLog + ", contract: " + "wveOLAS"; | ||
await checkWrappedVEOLAS(configs[i]["chainId"], providers[i], globals[i], configs[i]["contracts"], "wveOLAS", log); | ||
log = initLog + ", contract: " + "wveOLAS"; | ||
await checkWrappedVEOLAS(configs[0]["chainId"], providers[0], globals[0], configs[0]["contracts"], "wveOLAS", log); | ||
|
||
log = initLog + ", contract: " + "GovernorOLAS"; | ||
await checkGovernorOLAS(configs[i]["chainId"], providers[i], globals[i], globals[0], configs[i]["contracts"], "GovernorOLAS", log); | ||
log = initLog + ", contract: " + "GovernorOLAS"; | ||
await checkGovernorOLAS(configs[0]["chainId"], providers[0], globals[0], globals[0], configs[0]["contracts"], "GovernorOLAS", log); | ||
|
||
log = initLog + ", contract: " + "GuardCM"; | ||
await checkGuardCM(configs[i]["chainId"], providers[i], globals[i], configs[i]["contracts"], "GuardCM", log); | ||
log = initLog + ", contract: " + "GuardCM"; | ||
await checkGuardCM(configs[0]["chainId"], providers[0], globals[0], configs[0]["contracts"], "GuardCM", log); | ||
|
||
log = initLog + ", contract: " + "BridgedERC20"; | ||
await checkBridgedERC20(configs[i]["chainId"], providers[i], globals[i], configs[i]["contracts"], "BridgedERC20", log); | ||
log = initLog + ", contract: " + "BridgedERC20"; | ||
await checkBridgedERC20(configs[0]["chainId"], providers[0], globals[0], configs[0]["contracts"], "BridgedERC20", log); | ||
|
||
log = initLog + ", contract: " + "FxERC20RootTunnel"; | ||
await checkFxERC20RootTunnel(configs[i]["chainId"], providers[i], globals[i], configs[i]["contracts"], "FxERC20RootTunnel", log); | ||
} | ||
log = initLog + ", contract: " + "FxERC20RootTunnel"; | ||
await checkFxERC20RootTunnel(configs[0]["chainId"], providers[0], globals[0], configs[0]["contracts"], "FxERC20RootTunnel", log); | ||
|
||
// L2 contracts | ||
for (let i = 2; i < numChains; i++) { | ||
for (let i = 1; i < numChains; i++) { | ||
console.log("\n######## Verifying setup on CHAIN ID", configs[i]["chainId"]); | ||
|
||
const initLog = "ChainId: " + configs[i]["chainId"] + ", network: " + configs[i]["name"]; | ||
|
@@ -536,7 +522,7 @@ async function main() { | |
} else if (configs[i]["chainId"] == "100" || configs[i]["chainId"] == "10200") { | ||
let log = initLog + ", contract: " + "HomeMediator"; | ||
await checkHomeMediator(configs[i]["chainId"], providers[i], globals[i], configs[i]["contracts"], "HomeMediator", log); | ||
} else if (configs[i]["chainId"] == "10" || configs[i]["chainId"] == "11155420" || configs[i]["chainId"] == "8453" || configs[i]["chainId"] == "84532") { | ||
} else if (configs[i]["chainId"] == "10" || configs[i]["chainId"] == "11155420" || configs[i]["chainId"] == "8453" || configs[i]["chainId"] == "84532" || configs[i]["chainId"] == "34443") { | ||
let log = initLog + ", contract: " + "OptimismMessenger"; | ||
await checkOptimismMessenger(configs[i]["chainId"], providers[i], globals[i], configs[i]["contracts"], "OptimismMessenger", log); | ||
} else if (configs[i]["chainId"] == "42220" || configs[i]["chainId"] == "44787") { | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Time to get rid of test (and outdated) networks from the main configuration file.