From 2e6bce6d081469172ba6215d0a419d50b15d9b14 Mon Sep 17 00:00:00 2001 From: ChiTimesChi <88190723+ChiTimesChi@users.noreply.github.com> Date: Fri, 6 Dec 2024 12:39:01 +0000 Subject: [PATCH] feat: update deploy script, deploy SIP --- .../arbitrum/SynapseIntentPreviewer.json | 114 ++++++++++++++++++ .../optimism/SynapseIntentPreviewer.json | 114 ++++++++++++++++++ packages/contracts-rfq/script/DeploySIR.s.sol | 2 + 3 files changed, 230 insertions(+) create mode 100644 packages/contracts-rfq/deployments/arbitrum/SynapseIntentPreviewer.json create mode 100644 packages/contracts-rfq/deployments/optimism/SynapseIntentPreviewer.json diff --git a/packages/contracts-rfq/deployments/arbitrum/SynapseIntentPreviewer.json b/packages/contracts-rfq/deployments/arbitrum/SynapseIntentPreviewer.json new file mode 100644 index 0000000000..fb6bdf01ec --- /dev/null +++ b/packages/contracts-rfq/deployments/arbitrum/SynapseIntentPreviewer.json @@ -0,0 +1,114 @@ +{ + "address": "0xE184826D4aBC2798134abE7e2Fd72156827Fc7EA", + "constructorArgs": "0x", + "receipt": { + "hash": "0xdee35d80aa7aa61e76d152e22676067769f2923c85ed5e96d55c807ac9418277", + "blockNumber": 281941808 + }, + "abi": [ + { + "type": "function", + "name": "NATIVE_GAS_TOKEN", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "previewIntent", + "inputs": [ + { + "name": "swapQuoter", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenIn", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + }, + { + "name": "amountIn", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "steps", + "type": "tuple[]", + "internalType": "struct ISynapseIntentRouter.StepParams[]", + "components": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "msgValue", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "zapData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "error", + "name": "SIP__PoolTokenMismatch", + "inputs": [] + }, + { + "type": "error", + "name": "SIP__PoolZeroAddress", + "inputs": [] + }, + { + "type": "error", + "name": "SIP__RawParamsEmpty", + "inputs": [] + }, + { + "type": "error", + "name": "SIP__TokenNotNative", + "inputs": [] + }, + { + "type": "error", + "name": "ZapDataV1__InvalidEncoding", + "inputs": [] + }, + { + "type": "error", + "name": "ZapDataV1__TargetZeroAddress", + "inputs": [] + } + ] +} \ No newline at end of file diff --git a/packages/contracts-rfq/deployments/optimism/SynapseIntentPreviewer.json b/packages/contracts-rfq/deployments/optimism/SynapseIntentPreviewer.json new file mode 100644 index 0000000000..e53f8622ad --- /dev/null +++ b/packages/contracts-rfq/deployments/optimism/SynapseIntentPreviewer.json @@ -0,0 +1,114 @@ +{ + "address": "0xE184826D4aBC2798134abE7e2Fd72156827Fc7EA", + "constructorArgs": "0x", + "receipt": { + "hash": "0x57d5d445810008804844d57d54ab99ab5229e87a206996f9cafc67494bf7fd77", + "blockNumber": 128944965 + }, + "abi": [ + { + "type": "function", + "name": "NATIVE_GAS_TOKEN", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "previewIntent", + "inputs": [ + { + "name": "swapQuoter", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenIn", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + }, + { + "name": "amountIn", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "steps", + "type": "tuple[]", + "internalType": "struct ISynapseIntentRouter.StepParams[]", + "components": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "msgValue", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "zapData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "error", + "name": "SIP__PoolTokenMismatch", + "inputs": [] + }, + { + "type": "error", + "name": "SIP__PoolZeroAddress", + "inputs": [] + }, + { + "type": "error", + "name": "SIP__RawParamsEmpty", + "inputs": [] + }, + { + "type": "error", + "name": "SIP__TokenNotNative", + "inputs": [] + }, + { + "type": "error", + "name": "ZapDataV1__InvalidEncoding", + "inputs": [] + }, + { + "type": "error", + "name": "ZapDataV1__TargetZeroAddress", + "inputs": [] + } + ] +} \ No newline at end of file diff --git a/packages/contracts-rfq/script/DeploySIR.s.sol b/packages/contracts-rfq/script/DeploySIR.s.sol index 0cd16705be..f15352037c 100644 --- a/packages/contracts-rfq/script/DeploySIR.s.sol +++ b/packages/contracts-rfq/script/DeploySIR.s.sol @@ -6,6 +6,7 @@ import {SynapseScript} from "@synapsecns/solidity-devops/src/SynapseScript.sol"; // solhint-disable no-empty-blocks contract DeploySIR is SynapseScript { string public constant LATEST_SIR = "SynapseIntentRouter"; + string public constant LATEST_SIP = "SynapseIntentPreviewer"; string public constant LATEST_ZAP = "TokenZapV1"; /// @notice We include an empty "test" function so that this contract does not appear in the coverage report. @@ -14,6 +15,7 @@ contract DeploySIR is SynapseScript { function run() external broadcastWithHooks { // TODO: create2 salts deployAndSave({contractName: LATEST_SIR, constructorArgs: "", deployCodeFunc: cbDeployCreate2}); + deployAndSave({contractName: LATEST_SIP, constructorArgs: "", deployCodeFunc: cbDeployCreate2}); deployAndSave({contractName: LATEST_ZAP, constructorArgs: "", deployCodeFunc: cbDeployCreate2}); } }