Skip to content

Commit

Permalink
feat: sx network testnet deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
ameeshaagrawal committed Oct 25, 2023
1 parent 44c9fbb commit dd60aa0
Show file tree
Hide file tree
Showing 3 changed files with 238 additions and 3 deletions.
56 changes: 56 additions & 0 deletions deployments/dev_addresses.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@
"switchboard": "0xD2F16F574c7B4022192C53af9570b4b3C9B42f73"
}
},
"647": {
"FAST2": {
"capacitor": "0xDaB21eD920cCf2E7277430aFAb19Cb6Dce1AA912",
"decapacitor": "0xF9F8c72E7027B37b8f5a56c0b3331F7497032Aa9",
"switchboard": "0xD2F16F574c7B4022192C53af9570b4b3C9B42f73"
}
},
"901": {
"FAST": {
"capacitor": "0xE23Ed3328c2ab5AE41eCE04EB13472276c88E292",
Expand Down Expand Up @@ -267,6 +274,41 @@
"FastSwitchboard2": "0x7E7735e77574228C4F55d4B2F96Fe586dF10104e",
"SocketBatcher": "0xc07216D0e55044572d6E3C08d8a8a86BD3D909e3"
},
"647": {
"SignatureVerifier": "0xE19cC72ad60d0aE127E2c8d7C016cf67e15c5493",
"Hasher": "0x08f47Af4FB9Ab119e6Dd2C43994B9131E2AA91e2",
"CapacitorFactory": "0xF4E477308ab2f30330cD3233e9b71Dc5d636EEe0",
"Socket": "0x78E9EcA8889A6b6016CE5b56cD872bfB6F1Ba41f",
"ExecutionManager": "0xFAE13FC12a111CD31Ea02Ae554A59Fb18fD45127",
"TransmitManager": "0x255f9F9aB7eE46cb59a2Ed57a852304faD701C8d",
"FastSwitchboard2": "0xd7D1dc1B8aB82E14b896fF980a0fd3B035E0c9E3",
"OptimisticSwitchboard": "0xF6bc9bC110464f7544507B574bEC357403171156",
"SocketBatcher": "0xf47103263296eFebc7B8DD4d5410e15d7B59FceF",
"Counter": "0x2a754670Ed76F892568EE6Ff690fc56ee38a2DC9",
"integrations": {
"5": {
"FAST2": {
"capacitor": "0x08C4805744B45C708a26d762594d5481c9dde885",
"decapacitor": "0x6e873C240896Bd96C2061C9Bed5489FB248608FC",
"switchboard": "0xd7D1dc1B8aB82E14b896fF980a0fd3B035E0c9E3"
}
},
"80001": {
"FAST2": {
"capacitor": "0x024E195D5751Ae3D79e40F3aEdE742BF6E311BC1",
"decapacitor": "0xaE0EB47AFB854124EAe3cDe713592de90Dd56339",
"switchboard": "0xd7D1dc1B8aB82E14b896fF980a0fd3B035E0c9E3"
}
},
"421613": {
"FAST2": {
"capacitor": "0xc416F0D400dFCBE5dA672BFC2f88b7b9AB218C82",
"decapacitor": "0xd5175A72b98eE7C86bBa76F0095Da683dB7C190e",
"switchboard": "0xd7D1dc1B8aB82E14b896fF980a0fd3B035E0c9E3"
}
}
}
},
"901": {
"SignatureVerifier": "0x47140353947Bc127c9cf36fabd61112C8Fb8db2A",
"Hasher": "0x9814d1E6751ADAE2D60fF16f987ae02a25C87224",
Expand Down Expand Up @@ -438,6 +480,13 @@
"switchboard": "0x0dD648cdF51b7f7AdA68F84BB245D52172199F0d"
}
},
"647": {
"FAST2": {
"capacitor": "0xABbcD246a79129A9850ae6bA8E862FD9f550afc5",
"decapacitor": "0x9F9E77c4B94fC244Eb58a005DbFDE07Ff1007E3d",
"switchboard": "0x0dD648cdF51b7f7AdA68F84BB245D52172199F0d"
}
},
"901": {
"FAST": {
"capacitor": "0xe75e3AdAac425b69e6aA8Be1502b1e0FcD9Eb529",
Expand Down Expand Up @@ -567,6 +616,13 @@
"switchboard": "0xFD468fc7d23dA3e7466EE78327D4db5FcA232B2d"
}
},
"647": {
"FAST2": {
"capacitor": "0x6d84ee5B59125cB4b608f50747de4E31CC4Cd7d9",
"decapacitor": "0xE981C76FC7D6252A46f94aee7CA97d7617f82489",
"switchboard": "0xFD468fc7d23dA3e7466EE78327D4db5FcA232B2d"
}
},
"901": {
"FAST": {
"capacitor": "0xc9f5FcEbb5414b4065d8E74C203aCfcF166E1Cda",
Expand Down
178 changes: 178 additions & 0 deletions deployments/dev_verification.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,184 @@
["0x752B38FA38F53dF7fa60e6113CFd9094b7e040Aa"]
]
],
"647": [
[
"0x2a754670Ed76F892568EE6Ff690fc56ee38a2DC9",
"Counter",
"contracts/examples/Counter.sol",
["0x78E9EcA8889A6b6016CE5b56cD872bfB6F1Ba41f"]
],
[
"0xf47103263296eFebc7B8DD4d5410e15d7B59FceF",
"SocketBatcher",
"contracts/socket/SocketBatcher.sol",
["0xdE7f7a699F8504641eceF544B0fbc0740C37E69B"]
],
[
"0xF6bc9bC110464f7544507B574bEC357403171156",
"OptimisticSwitchboard",
"contracts/switchboard/default-switchboards/OptimisticSwitchboard.sol",
[
"0xdE7f7a699F8504641eceF544B0fbc0740C37E69B",
"0x78E9EcA8889A6b6016CE5b56cD872bfB6F1Ba41f",
647,
7200,
"0xE19cC72ad60d0aE127E2c8d7C016cf67e15c5493"
]
],
[
"0xd7D1dc1B8aB82E14b896fF980a0fd3B035E0c9E3",
"FastSwitchboard",
"contracts/switchboard/default-switchboards/FastSwitchboard.sol",
[
"0xdE7f7a699F8504641eceF544B0fbc0740C37E69B",
"0x78E9EcA8889A6b6016CE5b56cD872bfB6F1Ba41f",
647,
7200,
"0xE19cC72ad60d0aE127E2c8d7C016cf67e15c5493"
]
],
[
"0x255f9F9aB7eE46cb59a2Ed57a852304faD701C8d",
"TransmitManager",
"contracts/TransmitManager.sol",
[
"0xdE7f7a699F8504641eceF544B0fbc0740C37E69B",
647,
"0x78E9EcA8889A6b6016CE5b56cD872bfB6F1Ba41f",
"0xE19cC72ad60d0aE127E2c8d7C016cf67e15c5493"
]
],
[
"0xFAE13FC12a111CD31Ea02Ae554A59Fb18fD45127",
"ExecutionManager",
"contracts/ExecutionManager.sol",
[
"0xdE7f7a699F8504641eceF544B0fbc0740C37E69B",
647,
"0x78E9EcA8889A6b6016CE5b56cD872bfB6F1Ba41f",
"0xE19cC72ad60d0aE127E2c8d7C016cf67e15c5493"
]
],
[
"0x78E9EcA8889A6b6016CE5b56cD872bfB6F1Ba41f",
"Socket",
"contracts/socket/Socket.sol",
[
647,
"0x08f47Af4FB9Ab119e6Dd2C43994B9131E2AA91e2",
"0xF4E477308ab2f30330cD3233e9b71Dc5d636EEe0",
"0xdE7f7a699F8504641eceF544B0fbc0740C37E69B",
"IMLI"
]
],
[
"0xF4E477308ab2f30330cD3233e9b71Dc5d636EEe0",
"CapacitorFactory",
"contracts/CapacitorFactory.sol",
["0xdE7f7a699F8504641eceF544B0fbc0740C37E69B", 10]
],
[
"0x08f47Af4FB9Ab119e6Dd2C43994B9131E2AA91e2",
"Hasher",
"contracts/utils/Hasher.sol",
["0xdE7f7a699F8504641eceF544B0fbc0740C37E69B"]
],
[
"0xE19cC72ad60d0aE127E2c8d7C016cf67e15c5493",
"SignatureVerifier",
"contracts/utils/SignatureVerifier.sol",
["0xdE7f7a699F8504641eceF544B0fbc0740C37E69B"]
],
[
"0x9A4f5494d48581472619ec3f1aD8d323eA71b754",
"Counter",
"contracts/examples/Counter.sol",
["0x7539351956f3271CdaF1fb1a440CA9BE2BfbF2ED"]
],
[
"0x87E54C7AF2Ed4f9e12a358484C03B3667A417a80",
"SocketBatcher",
"contracts/socket/SocketBatcher.sol",
["0x752B38FA38F53dF7fa60e6113CFd9094b7e040Aa"]
],
[
"0xd0580065858313f0300eBb6e7970cD3699323985",
"OptimisticSwitchboard",
"contracts/switchboard/default-switchboards/OptimisticSwitchboard.sol",
[
"0xdE7f7a699F8504641eceF544B0fbc0740C37E69B",
"0x7539351956f3271CdaF1fb1a440CA9BE2BfbF2ED",
647,
7200,
"0x320Cd79c54927Fe130427bD4492b6c6068D075E3"
]
],
[
"0x337bD38dA8833ee5B7202e53315293A1776BB7e6",
"FastSwitchboard",
"contracts/switchboard/default-switchboards/FastSwitchboard.sol",
[
"0xdE7f7a699F8504641eceF544B0fbc0740C37E69B",
"0x7539351956f3271CdaF1fb1a440CA9BE2BfbF2ED",
647,
7200,
"0x320Cd79c54927Fe130427bD4492b6c6068D075E3"
]
],
[
"0x98bBfbdDA0f32c411b1cE821B495aAb1bD43C680",
"TransmitManager",
"contracts/TransmitManager.sol",
[
"0x752B38FA38F53dF7fa60e6113CFd9094b7e040Aa",
647,
"0x7539351956f3271CdaF1fb1a440CA9BE2BfbF2ED",
"0x320Cd79c54927Fe130427bD4492b6c6068D075E3"
]
],
[
"0x3cD9C9Aa2f262339Cc994466a12F9A4c7A267827",
"ExecutionManager",
"contracts/ExecutionManager.sol",
[
"0x752B38FA38F53dF7fa60e6113CFd9094b7e040Aa",
647,
"0x7539351956f3271CdaF1fb1a440CA9BE2BfbF2ED",
"0x320Cd79c54927Fe130427bD4492b6c6068D075E3"
]
],
[
"0x7539351956f3271CdaF1fb1a440CA9BE2BfbF2ED",
"Socket",
"contracts/socket/Socket.sol",
[
647,
"0xb515E9E6E6aBA44bBEC72FBF6B1a18DDB6bec68e",
"0x5bA62006442bC42e28E3E5147A5221Be723ca1DE",
"0x752B38FA38F53dF7fa60e6113CFd9094b7e040Aa",
"IMLI"
]
],
[
"0x5bA62006442bC42e28E3E5147A5221Be723ca1DE",
"CapacitorFactory",
"contracts/CapacitorFactory.sol",
["0x752B38FA38F53dF7fa60e6113CFd9094b7e040Aa", 10]
],
[
"0xb515E9E6E6aBA44bBEC72FBF6B1a18DDB6bec68e",
"Hasher",
"contracts/utils/Hasher.sol",
["0x752B38FA38F53dF7fa60e6113CFd9094b7e040Aa"]
],
[
"0x320Cd79c54927Fe130427bD4492b6c6068D075E3",
"SignatureVerifier",
"contracts/utils/SignatureVerifier.sol",
["0x752B38FA38F53dF7fa60e6113CFd9094b7e040Aa"]
]
],
"901": [
[
"0x6F1912DC9631E8aFC89e7D95Afd7e467845FF6F2",
Expand Down
7 changes: 4 additions & 3 deletions scripts/deploy/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dotenvConfig();

import { ChainSlug, DeploymentMode, CORE_CONTRACTS, version } from "../../src";
import { BigNumberish, utils } from "ethers";
import chainConfig from "../../chainConfig.json";
import { chainConfig } from "../../chainConfig";

export const mode = process.env.DEPLOYMENT_MODE as
| DeploymentMode
Expand Down Expand Up @@ -34,6 +34,7 @@ export const chains: Array<ChainSlug> = [
ChainSlug.ARBITRUM_GOERLI,
ChainSlug.OPTIMISM_GOERLI,
ChainSlug.POLYGON_MUMBAI,
ChainSlug.SX_NETWORK_TESTNET,
ChainSlug.BSC_TESTNET,
ChainSlug.AEVO_TESTNET,
ChainSlug.LYRA_TESTNET,
Expand Down Expand Up @@ -64,7 +65,7 @@ export const type = 0;
const MSG_VALUE_MAX_THRESHOLD = utils.parseEther("0.001");
export const msgValueMaxThreshold = (chain: ChainSlug): BigNumberish => {
if (chainConfig[chain] && chainConfig[chain].msgValueMaxThreshold)
return chainConfig[chain].msgValueMaxThreshold;
return chainConfig[chain].msgValueMaxThreshold!;
return MSG_VALUE_MAX_THRESHOLD;
};

Expand Down Expand Up @@ -95,7 +96,7 @@ export const overrides = (
gasPrice?: BigNumberish | undefined;
} => {
if (chainConfig[chain] && chainConfig[chain].overrides)
return chainConfig[chain].overrides;
return chainConfig[chain].overrides!;

return { type, gasLimit, gasPrice };
};

0 comments on commit dd60aa0

Please sign in to comment.