-
Notifications
You must be signed in to change notification settings - Fork 0
feat: across cctp verifiers #1
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
base: main
Are you sure you want to change the base?
Changes from all commits
3327589
40f99cc
4d30d72
b8d10a5
ca50a8e
526abf7
1aecd1b
c1fa9fa
2fda538
ce2d71f
8deb6ba
88a107d
958d93c
d24eae4
3a5eb7b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # Compiler files | ||
| cache/ | ||
| out/ | ||
|
|
||
| # Ignores development broadcast logs | ||
| !/broadcast | ||
| /broadcast/*/31337/ | ||
| /broadcast/**/dry-run/ | ||
|
|
||
| # Docs | ||
| docs/ | ||
|
|
||
| # Dotenv file | ||
| .env | ||
|
|
||
| # Node modules | ||
| node_modules/ | ||
|
|
||
| # Dist | ||
| dist/ | ||
|
|
||
| # Hardhat | ||
| artifacts/ | ||
| cache/ | ||
| cache_hardhat/ | ||
| typechain/ | ||
|
|
||
| # Etherscan | ||
| .etherscan/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| [submodule "lib/forge-std"] | ||
| path = lib/forge-std | ||
| url = https://github.com/foundry-rs/forge-std |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| lib | ||
| !src/lib | ||
| abi | ||
| out | ||
| typechain | ||
| .vscode | ||
| artifacts | ||
| cache | ||
| cache_hardhat |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| { | ||
| "plugins": ["prettier-plugin-solidity"], | ||
| "overrides": [ | ||
| { | ||
| "files": "*.sol", | ||
| "options": { | ||
| "parser": "solidity-parse", | ||
| "tabWidth": 4, | ||
| "printWidth": 120, | ||
| "useTabs": false, | ||
| "singleQuote": false, | ||
| "bracketSpacing": false, | ||
| "compiler": "0.8.19" | ||
| } | ||
| }, | ||
| { | ||
| "files": ["*.js", "*.md"], | ||
| "options": { | ||
| "tabWidth": 2, | ||
| "printWidth": 80, | ||
| "useTabs": false, | ||
| "semi": true, | ||
| "singleQuote": true, | ||
| "bracketSpacing": true, | ||
| "trailingComma": "all" | ||
| } | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,8 @@ | ||
| { | ||
| "SocketVerifier": "0x69D9f76e4cbE81044FE16C399387b12e4DBF27B1", | ||
| "SocketVerifier": "0xa27A3f5A96DF7D8Be26EE2790999860C00eb688D", | ||
| "HopL2Verifier": "0x96424DCBe8767a5DDd8e0e40291f6240Ef78AbdB", | ||
| "AnyswapV6Verification": "0xD8cead962b7D12139EE62D38fE9BCA8E04aE7fa6", | ||
| "AnyswapV4Verification": "0xa9B203773C68b4EDc17d4bD1151f6b2bbEB36Bc8" | ||
| "AnyswapV4Verification": "0xa9B203773C68b4EDc17d4bD1151f6b2bbEB36Bc8", | ||
| "CCTPVerification": "0x7779a8e52448984E575E3563D555802aa7D3f6D5", | ||
| "AcrossV3Verification": "0xfa6deD4a4D4A976e02586B2Ab5DA151CD7927e53" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "SocketVerifier": "0xa27A3f5A96DF7D8Be26EE2790999860C00eb688D", | ||
| "CCTPVerification": "0x8290CBb7049D3DA0692A4d43b246f7F43C7E532f", | ||
| "AcrossV3Verification": "0x8fEc265e8D9C1cA6295C6Ca7Afb80F8e1e63F9F0" | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "SocketVerifier": "0xa27A3f5A96DF7D8Be26EE2790999860C00eb688D", | ||
| "CCTPVerification": "0x2d829685aE4C44E24F0603CF44f10C0Db8Ff65f9", | ||
| "AcrossV3Verification": "0xe38C0088EA4816674b0C6873a86f989f95DF9Be5" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "SocketVerifier": "0xa27A3f5A96DF7D8Be26EE2790999860C00eb688D", | ||
| "CCTPVerification": "0x978aF9cAD9b1808895e71BDcF5Ea420a1CAAA9b0", | ||
| "AcrossV3Verification": "0xb4057271C61d3A8aAFb30AA59E7A0A136D33aA5E" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,7 @@ | ||
| { | ||
| "SocketVerifier": "0x69D9f76e4cbE81044FE16C399387b12e4DBF27B1", | ||
| "SocketVerifier": "0xa27A3f5A96DF7D8Be26EE2790999860C00eb688D", | ||
| "HopL2Verifier": "0x96424DCBe8767a5DDd8e0e40291f6240Ef78AbdB", | ||
| "AnyswapV6Verification": "0xD8cead962b7D12139EE62D38fE9BCA8E04aE7fa6" | ||
| "AnyswapV6Verification": "0xD8cead962b7D12139EE62D38fE9BCA8E04aE7fa6", | ||
| "CCTPVerification": "0x0Bc5133cC65DCF8E87d7978C5FBDc3d6fAe4dE8A", | ||
| "AcrossV3Verification": "0xf960AF18928b052A597ADde084d7c955074Bb29b" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,8 @@ | ||
| { | ||
| "SocketVerifier": "0x69D9f76e4cbE81044FE16C399387b12e4DBF27B1", | ||
| "SocketVerifier": "0xa27A3f5A96DF7D8Be26EE2790999860C00eb688D", | ||
| "AnyswapV6Verification": "0xC477E9A725F67C56Aa563a1e4820c79f4D666934", | ||
| "HopL2Verifier": "0x7d185d7C75305a73d2bf77BA8ac92c265cea98Db", | ||
| "AnyswapV4Verification": "0xd10dcE444c0deee08210f4781Ecc085eD6a7b6AA" | ||
| "AnyswapV4Verification": "0xd10dcE444c0deee08210f4781Ecc085eD6a7b6AA", | ||
| "CCTPVerification": "0x9E12f1A51C6f41Bdf2D8E982568E0E023b453183", | ||
| "AcrossV3Verification": "0xa7CA9C3454B2F9d1c1E19E490cfC8f0A983B6654" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "SocketVerifier": "0xa27A3f5A96DF7D8Be26EE2790999860C00eb688D", | ||
| "CCTPVerification": "0x3bA3A055F34feCb5e7D56D3E260b6303d4AF79a7" | ||
| } | ||
|
Comment on lines
1
to
4
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. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Check config.ts for xdai verifier support
find . -name "config.ts" -type f | head -20Repository: SocketDotTech/socket-gateway-verifier Length of output: 100 🏁 Script executed: #!/bin/bash
# Search for xdai configuration
rg -A 10 "xdai:" scripts/config.ts 2>/dev/null || rg -A 10 "xdai" . -t ts --max-count=50Repository: SocketDotTech/socket-gateway-verifier Length of output: 375 Remove unsupported verifier addresses from xdai.json deployment config. The config.ts explicitly marks both AcrossV3Verification and CCTPVerification as undefined for xdai with comments stating they're not supported on that network. Yet xdai.json contains deployment addresses for both verifiers. This inconsistency between config and deployment artifacts should be resolved by either removing these addresses from xdai.json or enabling support in config.ts. 🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,6 +41,8 @@ const getEtherscanKey = () => { | |
| return process.env.OPTIMISM_ETHERSCAN_KEY | ||
| case 'arbitrum': | ||
| return process.env.ARBITRUM_ETHERSCAN_KEY | ||
| case 'base': | ||
| return process.env.BASE_ETHERSCAN_KEY | ||
| case 'avalanche': | ||
| return process.env.AVALANCHE_ETHERSCAN_KEY | ||
| case 'bsc': | ||
|
|
@@ -96,8 +98,8 @@ const config: HardhatUserConfig = { | |
| }, | ||
| mainnet: { | ||
| url: `${ethereumRPC}`, | ||
| gasPrice: 30_000_000_000, // 30 gwei | ||
| gasMultiplier: 1.5, | ||
| // gasPrice: 30_000_000_000, // 30 gwei | ||
| // gasMultiplier: 1.5, | ||
| chainId: 1, | ||
| accounts: [ socketDeployerKey ], | ||
| }, | ||
|
|
@@ -150,6 +152,13 @@ const config: HardhatUserConfig = { | |
| chainId: 42161, | ||
| accounts: [ socketDeployerKey ], | ||
| }, | ||
| base: { | ||
| url: process.env.BASE_RPC, | ||
| // gasPrice: 5_000_000_000, // 5 gwei | ||
| gasMultiplier: 1.5, | ||
| chainId: 8453, | ||
| accounts: [ socketDeployerKey ], | ||
| }, | ||
|
Comment on lines
+155
to
+161
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. Missing environment variable validation for Other networks like Add validation before the config object: +const BASE_RPC = process.env.BASE_RPC;
+if (!BASE_RPC) {
+ throw new Error("Please set your BASE_RPC in a .env file");
+}Then update the network config to use the validated constant: base: {
- url: process.env.BASE_RPC,
+ url: BASE_RPC,
// gasPrice: 5_000_000_000, // 5 gwei
gasMultiplier: 1.5,
chainId: 8453,
accounts: [ socketDeployerKey ],
},
🤖 Prompt for AI Agents |
||
| aurora: { | ||
| url: "https://mainnet.aurora.dev", | ||
| chainId: 1313161554, | ||
|
|
@@ -168,6 +177,7 @@ const config: HardhatUserConfig = { | |
| polygon: process.env.POLYGON_ETHERSCAN_KEY, | ||
| gnosis: process.env.GNOSIS_ETHERSCAN_KEY, | ||
| optimisticEthereum: process.env.OPTIMISM_ETHERSCAN_KEY, | ||
| base: process.env.BASE_ETHERSCAN_KEY, | ||
| arbitrumOne: process.env.ARBITRUM_ETHERSCAN_KEY, | ||
| aurora: process.env.AURORA_ETHERSCAN_KEY, | ||
| bsc: process.env.BINANCE_ETHERSCAN_KEY, | ||
|
|
@@ -184,7 +194,15 @@ const config: HardhatUserConfig = { | |
| browserURL: 'https://zkevm.polygonscan.com', | ||
| apiURL: 'https://api-zkevm.polygonscan.com/api', | ||
| } | ||
| } | ||
| }, | ||
| { | ||
| network: "base", | ||
| chainId: 8453, | ||
| urls: { | ||
| browserURL: 'https://basescan.org', | ||
| apiURL: 'https://api.basescan.org/api', | ||
| } | ||
| }, | ||
| ] | ||
| }, | ||
| paths: { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,86 +1,84 @@ | ||
| { | ||
| "name": "socket-gateway-verifier", | ||
| "version": "0.0.1", | ||
| "description": "", | ||
| "files": [ | ||
| "artifacts", | ||
| "contracts" | ||
| ], | ||
| "scripts": { | ||
| "hardhat:test": "hardhat test", | ||
| "hardhat:compile": "hardhat compile", | ||
| "hardhat:coverage": "hardhat coverage", | ||
| "build": "rm -rf dist && tsc --declaration && hardhat compile && cp -r ./{package.json,yarn.lock,artifacts,networks,contracts,deployments,copy_contracts.sh} dist/", | ||
| "publish:dist": "yarn build && yarn publish dist -f --access public", | ||
| "docgen": "hardhat docgen", | ||
| "lint": "prettier --write **.sol" | ||
| }, | ||
| "pre-commit": [ | ||
| "lint" | ||
| ], | ||
| "keywords": [], | ||
| "author": "", | ||
| "license": "ISC", | ||
| "engines": { | ||
| "node": "16.x" | ||
| }, | ||
| "devDependencies": { | ||
| "@defi-wonderland/smock": "^2.2.0", | ||
| "@nomicfoundation/hardhat-chai-matchers": "^1.0.3", | ||
| "@nomicfoundation/hardhat-network-helpers": "^1.0.4", | ||
| "@nomicfoundation/hardhat-toolbox": "^2.0.0", | ||
| "@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers", | ||
| "@nomiclabs/hardhat-etherscan": "^3.0.3", | ||
| "@nomiclabs/hardhat-waffle": "^2.0.1", | ||
| "@socket.tech/ll-core": "^0.1.33", | ||
| "@trivago/prettier-plugin-sort-imports": "^3.4.0", | ||
| "@typechain/ethers-v5": "^7.2.0", | ||
| "@typechain/hardhat": "^2.3.1", | ||
| "@types/chai": "^4.3.1", | ||
| "@types/mocha": "^9.1.1", | ||
| "@types/node": "^12.20.50", | ||
| "@typescript-eslint/eslint-plugin": "^5.27.1", | ||
| "@typescript-eslint/parser": "^5.27.1", | ||
| "bignumber.js": "9.0.0", | ||
| "chai": "^4.3.6", | ||
| "dotenv": "^10.0.0", | ||
| "eslint": "^7.32.0", | ||
| "eslint-config-prettier": "^8.5.0", | ||
| "eslint-plugin-import": "^2.26.0", | ||
| "eslint-plugin-node": "^11.1.0", | ||
| "eslint-plugin-prettier": "^3.4.1", | ||
| "eslint-plugin-promise": "^5.2.0", | ||
| "ethereum-waffle": "^3.3.0", | ||
| "fs-extra": "^11.1.0", | ||
| "hardhat": "^2.9.5", | ||
| "hardhat-deploy": "^0.11.0", | ||
| "hardhat-gas-reporter": "^1.0.8", | ||
| "hardhat-preprocessor": "^0.1.4", | ||
| "prettier": "^2.6.2", | ||
| "prettier-plugin-solidity": "^1.0.0-beta.13", | ||
| "solhint": "^3.3.7", | ||
| "solidity-coverage": "^0.7.21", | ||
| "solidity-docgen": "^0.6.0-beta.29", | ||
| "solparse": "^2.2.8", | ||
| "ts-node": "^10.7.0", | ||
| "typechain": "^5.2.0", | ||
| "typescript": "^4.6.3" | ||
| }, | ||
| "dependencies": { | ||
| "@openzeppelin/contracts": "^4.6.0", | ||
| "@openzeppelin/contracts-upgradeable": "^4.6.0", | ||
| "@solidity-parser/parser": "^0.13.2", | ||
| "@types/fs-extra": "^9.0.13", | ||
| "eth-revert-reason": "^1.0.3", | ||
| "ethers": "^5.7.1", | ||
| "fs-extra": "^11.1.0", | ||
| "hardhat-abi-exporter": "^2.2.1", | ||
| "hardhat-deploy": "^0.11.14", | ||
| "moment": "^2.29.4", | ||
| "perf_hooks": "^0.0.1", | ||
| "pre-commit": "^1.2.2", | ||
| "sleep-promise": "^9.1.0", | ||
| "solmate": "^6.6.1" | ||
| } | ||
| "name": "socket-gateway-verifier", | ||
| "version": "0.0.1", | ||
| "description": "", | ||
| "files": [ | ||
| "artifacts", | ||
| "contracts" | ||
| ], | ||
| "scripts": { | ||
| "hardhat:test": "hardhat test", | ||
| "hardhat:compile": "hardhat compile", | ||
| "hardhat:coverage": "hardhat coverage", | ||
| "build": "rm -rf dist && tsc --declaration && hardhat compile && cp -r ./{package.json,yarn.lock,artifacts,networks,contracts,deployments,copy_contracts.sh} dist/", | ||
| "publish:dist": "yarn build && yarn publish dist -f --access public", | ||
| "docgen": "hardhat docgen", | ||
| "lint": "prettier --write \"./**/*.sol\"" | ||
| }, | ||
| "pre-commit": [ | ||
| "lint" | ||
| ], | ||
| "keywords": [], | ||
| "author": "", | ||
| "license": "ISC", | ||
| "engines": { | ||
| "node": "18.x" | ||
| }, | ||
| "devDependencies": { | ||
| "@defi-wonderland/smock": "^2.2.0", | ||
| "@nomiclabs/hardhat-ethers": "^2.0.0", | ||
| "@nomiclabs/hardhat-etherscan": "^3.0.3", | ||
| "@nomiclabs/hardhat-waffle": "^2.0.1", | ||
| "@socket.tech/ll-core": "^0.1.33", | ||
| "@trivago/prettier-plugin-sort-imports": "^3.4.0", | ||
| "@typechain/ethers-v5": "^7.2.0", | ||
| "@typechain/hardhat": "^2.3.1", | ||
| "@types/chai": "^4.3.1", | ||
| "@types/mocha": "^9.1.1", | ||
| "@types/node": "^18.11.18", | ||
| "@types/sinon-chai": "^3.2.3", | ||
| "@typescript-eslint/eslint-plugin": "^5.27.1", | ||
| "@typescript-eslint/parser": "^5.27.1", | ||
| "bignumber.js": "9.0.0", | ||
| "chai": "^4.3.6", | ||
| "dotenv": "^10.0.0", | ||
| "eslint": "^7.32.0", | ||
| "eslint-config-prettier": "^8.5.0", | ||
| "eslint-plugin-import": "^2.26.0", | ||
| "eslint-plugin-node": "^11.1.0", | ||
| "eslint-plugin-prettier": "^3.4.1", | ||
| "eslint-plugin-promise": "^5.2.0", | ||
| "ethereum-waffle": "^3.3.0", | ||
| "fs-extra": "^11.1.0", | ||
| "hardhat": "^2.9.5", | ||
| "hardhat-deploy": "^0.11.0", | ||
| "hardhat-gas-reporter": "^1.0.8", | ||
| "hardhat-preprocessor": "^0.1.4", | ||
| "prettier": "^2.6.2", | ||
| "prettier-plugin-solidity": "1.3.0", | ||
| "solhint": "^3.3.7", | ||
| "solidity-coverage": "^0.7.21", | ||
| "solidity-docgen": "^0.6.0-beta.29", | ||
| "solparse": "^2.2.8", | ||
| "ts-node": "^10.7.0", | ||
| "typechain": "^5.2.0", | ||
| "typescript": "^4.6.3" | ||
| }, | ||
| "dependencies": { | ||
| "@openzeppelin/contracts": "^4.6.0", | ||
| "@openzeppelin/contracts-upgradeable": "^4.6.0", | ||
| "@socket.tech/ll-core-v2": "^0.0.81", | ||
| "@solidity-parser/parser": "^0.13.2", | ||
| "@types/fs-extra": "^9.0.13", | ||
| "eth-revert-reason": "^1.0.3", | ||
| "ethers": "5.7.1", | ||
| "fs-extra": "^11.1.0", | ||
| "hardhat-abi-exporter": "^2.2.1", | ||
| "moment": "^2.29.4", | ||
| "perf_hooks": "^0.0.1", | ||
| "pre-commit": "^1.2.2", | ||
| "sleep-promise": "^9.1.0", | ||
| "solidity-bytes-utils": "^0.8.2", | ||
| "solmate": "^6.6.1" | ||
| } | ||
| } |
This file was deleted.
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.
🧩 Analysis chain
🏁 Script executed:
Repository: SocketDotTech/socket-gateway-verifier
Length of output: 100
🏁 Script executed:
Repository: SocketDotTech/socket-gateway-verifier
Length of output: 324
🏁 Script executed:
Repository: SocketDotTech/socket-gateway-verifier
Length of output: 491
Remove AcrossV3Verification address from avalanche deployment or update config.ts.
config.ts marks AcrossV3Verification as undefined on avalanche (line 11: "across not supported on avalanche"), but avalanche.json contains a deployment address for it (line 4). This inconsistency should not exist—either remove the address from the deployment or enable support in config.ts.
🤖 Prompt for AI Agents