Skip to content

Commit

Permalink
Merge pull request #325 from SocketDotTech/fix/opt-native-bridge
Browse files Browse the repository at this point in the history
Fix opt native bridge withdrawals
  • Loading branch information
ameeshaagrawal authored Nov 1, 2023
2 parents bc06f17 + 2c6cbb9 commit 8274345
Show file tree
Hide file tree
Showing 18 changed files with 222 additions and 360 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v2

- name: Install Foundry
uses: onbjerg/foundry-toolchain@v1
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

Expand Down
12 changes: 6 additions & 6 deletions deployments/dev_addresses.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"5": {
"SignatureVerifier": "0xB5E683CFe38Ea721CadE0eD9783E44C2D920B337",
"Hasher": "0x3c9dA57D7879182Cc51BA0c22d2382B55E56774c",
"CapacitorFactory": "0xd6901Aaf406792280C9Ff28E8482BF84254E54a4",
"Socket": "0xe37D028a77B4e6fCb05FC75EBa845752cD62A0AA",
"ExecutionManager": "0x9E8196C8BF4789C21Af9E2BFc54177FFfE28e005",
"TransmitManager": "0x3e66DC90D1f2914d58beab17a19D910d85112cA5",
"SignatureVerifier": "0x9c86a27B5943676c5c64709266e3b61e4245525b",
"Hasher": "0x79Dc67853cab8FB77f14A76116cAa7B4478B53Da",
"CapacitorFactory": "0x0e0CD33ed677a14CB134C9048a59Fc3799312404",
"Socket": "0xF0FB8faAf17EE870Fc9296E369F64F92E8eAc6D8",
"ExecutionManager": "0x718826B533DF29C30f2d3f30E585e405eeF22784",
"TransmitManager": "0x9834194474E979fB47eF6814Eb4C0BCF0Aea0c3A",
"integrations": {
"420": {
"NATIVE_BRIDGE": {
Expand Down
252 changes: 0 additions & 252 deletions deployments/dev_verification.json
Original file line number Diff line number Diff line change
@@ -1,252 +0,0 @@
{
"5": [
[
"0x1eaf2ee60D952ECc5D1397F8D94a950DA632B29c",
"SocketBatcher",
"contracts/socket/SocketBatcher.sol",
["0x752B38FA38F53dF7fa60e6113CFd9094b7e040Aa"]
],
[
"0xD2F16F574c7B4022192C53af9570b4b3C9B42f73",
"FastSwitchboard",
"contracts/switchboard/default-switchboards/FastSwitchboard.sol",
[
"0x752B38FA38F53dF7fa60e6113CFd9094b7e040Aa",
"0xe37D028a77B4e6fCb05FC75EBa845752cD62A0AA",
5,
7200,
"0xB5E683CFe38Ea721CadE0eD9783E44C2D920B337"
]
]
],
"420": [
[
"0xc07216D0e55044572d6E3C08d8a8a86BD3D909e3",
"SocketBatcher",
"contracts/socket/SocketBatcher.sol",
["0x752B38FA38F53dF7fa60e6113CFd9094b7e040Aa"]
]
],
"901": [
[
"0x6F1912DC9631E8aFC89e7D95Afd7e467845FF6F2",
"SocketBatcher",
"contracts/socket/SocketBatcher.sol",
["0x752B38FA38F53dF7fa60e6113CFd9094b7e040Aa"]
],
[
"0x501fCBa3e6F92b2D1d89038FeD56EdacaaF5f7c2",
"FastSwitchboard",
"contracts/switchboard/default-switchboards/FastSwitchboard.sol",
[
"0x752B38FA38F53dF7fa60e6113CFd9094b7e040Aa",
"0xa5b593aE839b3fe47983Fc28da602a6dEEfBBc9D",
901,
7200,
"0x47140353947Bc127c9cf36fabd61112C8Fb8db2A"
]
]
],
"80001": [
[
"0xB08C44cF4b4cD0Cb343e73f3A7f0be20cCF0517D",
"SocketBatcher",
"contracts/socket/SocketBatcher.sol",
["0x752B38FA38F53dF7fa60e6113CFd9094b7e040Aa"]
]
],
"421613": [
[
"0xcf1A2FD5428f6f48f9170fcb81E41B13ab67AF9d",
"SocketBatcher",
"contracts/socket/SocketBatcher.sol",
["0x752B38FA38F53dF7fa60e6113CFd9094b7e040Aa"]
]
],
"11155112": [
[
"0xd42DbD058bE3F4230E8b5d51e7548fb4E082acC5",
"SocketBatcher",
"contracts/socket/SocketBatcher.sol",
["0x752B38FA38F53dF7fa60e6113CFd9094b7e040Aa"]
]
],
"1399904803": [
[
"0xE593288228d17a6D057D9a61a35F32166A6B4191",
"Counter",
"contracts/examples/Counter.sol",
["0x6F1912DC9631E8aFC89e7D95Afd7e467845FF6F2"]
],
[
"0xBc3Ff3923b36F1590C16363b09c4759654d7B6d4",
"SocketBatcher",
"contracts/socket/SocketBatcher.sol",
["0x752B38FA38F53dF7fa60e6113CFd9094b7e040Aa"]
],
[
"0xd84fabe06806270Fb2dDFC2255102206e3B36865",
"OptimisticSwitchboard",
"contracts/switchboard/default-switchboards/OptimisticSwitchboard.sol",
[
"0x752B38FA38F53dF7fa60e6113CFd9094b7e040Aa",
"0x6F1912DC9631E8aFC89e7D95Afd7e467845FF6F2",
1399904803,
7200,
"0xF90462427f6fB8948483D06d90a0324E9A6eFF2E"
]
],
[
"0x05501406bCC171b543db0A2C547b7cB68D9D69E3",
"FastSwitchboard",
"contracts/switchboard/default-switchboards/FastSwitchboard.sol",
[
"0x752B38FA38F53dF7fa60e6113CFd9094b7e040Aa",
"0x6F1912DC9631E8aFC89e7D95Afd7e467845FF6F2",
1399904803,
7200,
"0xF90462427f6fB8948483D06d90a0324E9A6eFF2E"
]
],
[
"0xB42BBBd8f725186BBC74AFF6A5e0f15F1c786db2",
"TransmitManager",
"contracts/TransmitManager.sol",
[
"0x752B38FA38F53dF7fa60e6113CFd9094b7e040Aa",
1399904803,
"0x6F1912DC9631E8aFC89e7D95Afd7e467845FF6F2",
"0xF90462427f6fB8948483D06d90a0324E9A6eFF2E"
]
],
[
"0x818C8977Eed2Dd55A591672e18c9446090057881",
"ExecutionManager",
"contracts/ExecutionManager.sol",
[
"0x752B38FA38F53dF7fa60e6113CFd9094b7e040Aa",
1399904803,
"0x6F1912DC9631E8aFC89e7D95Afd7e467845FF6F2",
"0xF90462427f6fB8948483D06d90a0324E9A6eFF2E"
]
],
[
"0x6F1912DC9631E8aFC89e7D95Afd7e467845FF6F2",
"Socket",
"contracts/socket/Socket.sol",
[
1399904803,
"0x6E6BC965FA8897b7531322461A65f016E8Be1c30",
"0x501fCBa3e6F92b2D1d89038FeD56EdacaaF5f7c2",
"0x752B38FA38F53dF7fa60e6113CFd9094b7e040Aa",
"IMLI"
]
],
[
"0x501fCBa3e6F92b2D1d89038FeD56EdacaaF5f7c2",
"CapacitorFactory",
"contracts/CapacitorFactory.sol",
["0x752B38FA38F53dF7fa60e6113CFd9094b7e040Aa", 10]
],
[
"0x6E6BC965FA8897b7531322461A65f016E8Be1c30",
"Hasher",
"contracts/utils/Hasher.sol",
["0x752B38FA38F53dF7fa60e6113CFd9094b7e040Aa"]
],
[
"0xF90462427f6fB8948483D06d90a0324E9A6eFF2E",
"SignatureVerifier",
"contracts/utils/SignatureVerifier.sol",
["0x752B38FA38F53dF7fa60e6113CFd9094b7e040Aa"]
],
[
"0x30DaDbc1D9EdF62f5E7491439c78bD6502c6c22B",
"Counter",
"contracts/examples/Counter.sol",
["0xAE9bE0eA6DD7B53C88665Cb2EFf7d40dFD51cf91"]
],
[
"0x918ECe20236B9d8C2AA1742540246D6F9a9eB081",
"SocketBatcher",
"contracts/socket/SocketBatcher.sol",
["0x752B38FA38F53dF7fa60e6113CFd9094b7e040Aa"]
],
[
"0xA53185E856916228505372F1E3333BbbB4AC2063",
"OptimisticSwitchboard",
"contracts/switchboard/default-switchboards/OptimisticSwitchboard.sol",
[
"0x752B38FA38F53dF7fa60e6113CFd9094b7e040Aa",
"0xAE9bE0eA6DD7B53C88665Cb2EFf7d40dFD51cf91",
1399904803,
7200,
"0x85778A90ec60249f10d7AEe06484ffC290d5Efd8"
]
],
[
"0xaE51c633fb58df92FCcBb0694EA22E060d29F5F7",
"FastSwitchboard",
"contracts/switchboard/default-switchboards/FastSwitchboard.sol",
[
"0x752B38FA38F53dF7fa60e6113CFd9094b7e040Aa",
"0xAE9bE0eA6DD7B53C88665Cb2EFf7d40dFD51cf91",
1399904803,
7200,
"0x85778A90ec60249f10d7AEe06484ffC290d5Efd8"
]
],
[
"0xaDDaC77B80C990A87906C4273902be5EC7f25B42",
"TransmitManager",
"contracts/TransmitManager.sol",
[
"0x752B38FA38F53dF7fa60e6113CFd9094b7e040Aa",
1399904803,
"0xAE9bE0eA6DD7B53C88665Cb2EFf7d40dFD51cf91",
"0x85778A90ec60249f10d7AEe06484ffC290d5Efd8"
]
],
[
"0x0f8F4E665221528e6a444458dd098216E9ec7807",
"ExecutionManager",
"contracts/ExecutionManager.sol",
[
"0x752B38FA38F53dF7fa60e6113CFd9094b7e040Aa",
1399904803,
"0xAE9bE0eA6DD7B53C88665Cb2EFf7d40dFD51cf91",
"0x85778A90ec60249f10d7AEe06484ffC290d5Efd8"
]
],
[
"0xAE9bE0eA6DD7B53C88665Cb2EFf7d40dFD51cf91",
"Socket",
"contracts/socket/Socket.sol",
[
1399904803,
"0xB9EDe9aaEaA40e35033ABBC872D141950d08cc4d",
"0xEDF6dB2f3BC8deE014762e0141EE4CA19d685dBd",
"0x752B38FA38F53dF7fa60e6113CFd9094b7e040Aa",
"IMLI"
]
],
[
"0xEDF6dB2f3BC8deE014762e0141EE4CA19d685dBd",
"CapacitorFactory",
"contracts/CapacitorFactory.sol",
["0x752B38FA38F53dF7fa60e6113CFd9094b7e040Aa", 10]
],
[
"0xB9EDe9aaEaA40e35033ABBC872D141950d08cc4d",
"Hasher",
"contracts/utils/Hasher.sol",
["0x752B38FA38F53dF7fa60e6113CFd9094b7e040Aa"]
],
[
"0x85778A90ec60249f10d7AEe06484ffC290d5Efd8",
"SignatureVerifier",
"contracts/utils/SignatureVerifier.sol",
["0x752B38FA38F53dF7fa60e6113CFd9094b7e040Aa"]
]
]
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"devDependencies": {
"@arbitrum/sdk": "^3.0.0",
"@eth-optimism/sdk": "^1.6.11",
"@eth-optimism/sdk": "^3.1.4",
"@ethersproject/bytes": "^5.7.0",
"@fxportal/maticjs-fxportal": "^1.1.1",
"@maticnetwork/maticjs": "^3.5.0",
Expand Down
18 changes: 12 additions & 6 deletions scripts/deploy/connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,18 @@ export const main = async () => {
for (let index = 0; index < siblingSlugs.length; index++) {
const sibling = siblingSlugs[index];
const siblingCounter = addresses?.[sibling]?.["Counter"];
const switchboard = getSwitchboardAddress(
chain,
sibling,
siblingIntegrationtype[index],
mode
);
let switchboard;
try {
switchboard = getSwitchboardAddress(
chain,
sibling,
siblingIntegrationtype[index],
mode
);
} catch (error) {
console.log(error, " continuing");
}
if (!switchboard) continue;

const configs = await socket.getPlugConfig(counter.address, sibling);
if (
Expand Down
2 changes: 2 additions & 0 deletions scripts/deploy/scripts/allPathTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,3 +229,5 @@ main()
console.error(error);
process.exit(1);
});

// npx ts-node scripts/deploy/scripts/allPathTest.ts
Loading

0 comments on commit 8274345

Please sign in to comment.