From 519502e46ecfaacf8e1ab627174bd41472d6540b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CF=87=C2=B2?= <88190723+ChiTimesChi@users.noreply.github.com> Date: Fri, 9 Feb 2024 15:08:14 +0300 Subject: [PATCH] Deploy: global cctp (#312) * Install OZ 4.9.5 * Tool for saving proxy deployment * Isolate wallet script, script for cctp chains * Save preliminary config for Polygon * Add new deployment scripts * Deploy new SynapseCCTP on 6 chains * Add script for checking CCTP deployments * Prepare the initial setup of new contracts * Whitelist new LinkedPool on Polygon * Deploy SwapQuoterV2 on Polygon * Deploy SynapseCCTP Router * Script for CCTP verification --- .../arbitrum/ProxyAdmin.SynapseCCTP.json | 155 ++ .../arbitrum/SynapseCCTP.Implementation.json | 1155 +++++++++++++ deployments/arbitrum/SynapseCCTP.json | 1466 ++++++++-------- deployments/arbitrum/SynapseCCTPRouter.json | 393 ++--- ...ansparentUpgradeableProxy.SynapseCCTP.json | 80 + .../avalanche/ProxyAdmin.SynapseCCTP.json | 155 ++ .../avalanche/SynapseCCTP.Implementation.json | 1155 +++++++++++++ deployments/avalanche/SynapseCCTP.json | 1466 ++++++++-------- deployments/avalanche/SynapseCCTPRouter.json | 393 ++--- ...ansparentUpgradeableProxy.SynapseCCTP.json | 80 + deployments/base/ProxyAdmin.SynapseCCTP.json | 155 ++ .../base/SynapseCCTP.Implementation.json | 1155 +++++++++++++ deployments/base/SynapseCCTP.json | 1467 +++++++++-------- deployments/base/SynapseCCTPRouter.json | 394 ++--- ...ansparentUpgradeableProxy.SynapseCCTP.json | 80 + .../mainnet/ProxyAdmin.SynapseCCTP.json | 155 ++ .../mainnet/SynapseCCTP.Implementation.json | 1155 +++++++++++++ deployments/mainnet/SynapseCCTP.json | 1466 ++++++++-------- deployments/mainnet/SynapseCCTPRouter.json | 393 ++--- ...ansparentUpgradeableProxy.SynapseCCTP.json | 80 + .../optimism/ProxyAdmin.SynapseCCTP.json | 155 ++ .../optimism/SynapseCCTP.Implementation.json | 1155 +++++++++++++ deployments/optimism/SynapseCCTP.json | 1467 +++++++++-------- deployments/optimism/SynapseCCTPRouter.json | 394 ++--- ...ansparentUpgradeableProxy.SynapseCCTP.json | 80 + deployments/polygon/DefaultPoolCalc.json | 30 + .../polygon/ProxyAdmin.SynapseCCTP.json | 155 ++ deployments/polygon/SwapQuoterV2.json | 703 ++++++++ .../polygon/SynapseCCTP.Implementation.json | 1155 +++++++++++++ deployments/polygon/SynapseCCTP.json | 1155 +++++++++++++ deployments/polygon/SynapseCCTPRouter.json | 423 +++++ ...ansparentUpgradeableProxy.SynapseCCTP.json | 80 + package-lock.json | 13 + package.json | 1 + script/cctp-chains.sh | 42 + .../DeploySynapseCCTP.Implementation.s.sol | 114 ++ script/cctp/DeploySynapseCCTP.Proxy.sol | 115 ++ script/cctp/SetupSynapseCCTP.s.sol | 2 +- script/cctp/check-chain.sh | 50 + script/cctp/verify-chain.sh | 19 + script/configs/SynapseCCTP.chains.json | 12 +- script/configs/arbitrum/SynapseCCTP.dc.json | 2 +- script/configs/avalanche/SynapseCCTP.dc.json | 6 +- script/configs/base/SynapseCCTP.dc.json | 4 +- script/configs/mainnet/SynapseCCTP.dc.json | 6 +- script/configs/optimism/SynapseCCTP.dc.json | 4 +- script/configs/polygon/SwapQuoterV2.dc.json | 16 + script/configs/polygon/SynapseCCTP.dc.json | 13 + script/networks.json | 3 +- script/run.sh | 16 +- script/sh/wallet.sh | 38 + script/templates/BasicSynapse.s.sol | 19 + script/templates/BasicUtils.sol | 24 +- 53 files changed, 16178 insertions(+), 4291 deletions(-) create mode 100644 deployments/arbitrum/ProxyAdmin.SynapseCCTP.json create mode 100644 deployments/arbitrum/SynapseCCTP.Implementation.json create mode 100644 deployments/arbitrum/TransparentUpgradeableProxy.SynapseCCTP.json create mode 100644 deployments/avalanche/ProxyAdmin.SynapseCCTP.json create mode 100644 deployments/avalanche/SynapseCCTP.Implementation.json create mode 100644 deployments/avalanche/TransparentUpgradeableProxy.SynapseCCTP.json create mode 100644 deployments/base/ProxyAdmin.SynapseCCTP.json create mode 100644 deployments/base/SynapseCCTP.Implementation.json create mode 100644 deployments/base/TransparentUpgradeableProxy.SynapseCCTP.json create mode 100644 deployments/mainnet/ProxyAdmin.SynapseCCTP.json create mode 100644 deployments/mainnet/SynapseCCTP.Implementation.json create mode 100644 deployments/mainnet/TransparentUpgradeableProxy.SynapseCCTP.json create mode 100644 deployments/optimism/ProxyAdmin.SynapseCCTP.json create mode 100644 deployments/optimism/SynapseCCTP.Implementation.json create mode 100644 deployments/optimism/TransparentUpgradeableProxy.SynapseCCTP.json create mode 100644 deployments/polygon/DefaultPoolCalc.json create mode 100644 deployments/polygon/ProxyAdmin.SynapseCCTP.json create mode 100644 deployments/polygon/SwapQuoterV2.json create mode 100644 deployments/polygon/SynapseCCTP.Implementation.json create mode 100644 deployments/polygon/SynapseCCTP.json create mode 100644 deployments/polygon/SynapseCCTPRouter.json create mode 100644 deployments/polygon/TransparentUpgradeableProxy.SynapseCCTP.json create mode 100755 script/cctp-chains.sh create mode 100644 script/cctp/DeploySynapseCCTP.Implementation.s.sol create mode 100644 script/cctp/DeploySynapseCCTP.Proxy.sol create mode 100755 script/cctp/check-chain.sh create mode 100755 script/cctp/verify-chain.sh create mode 100644 script/configs/polygon/SwapQuoterV2.dc.json create mode 100644 script/configs/polygon/SynapseCCTP.dc.json create mode 100755 script/sh/wallet.sh diff --git a/deployments/arbitrum/ProxyAdmin.SynapseCCTP.json b/deployments/arbitrum/ProxyAdmin.SynapseCCTP.json new file mode 100644 index 000000000..f0de3eb81 --- /dev/null +++ b/deployments/arbitrum/ProxyAdmin.SynapseCCTP.json @@ -0,0 +1,155 @@ +{ + "address": "0x444feF20C748daD51E6146881775D031Cd03eBdE", + "constructorArgs": "0x", + "abi": [ + { + "type": "function", + "name": "changeProxyAdmin", + "inputs": [ + { + "name": "proxy", + "type": "address", + "internalType": "contract ITransparentUpgradeableProxy" + }, + { + "name": "newAdmin", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getProxyAdmin", + "inputs": [ + { + "name": "proxy", + "type": "address", + "internalType": "contract ITransparentUpgradeableProxy" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getProxyImplementation", + "inputs": [ + { + "name": "proxy", + "type": "address", + "internalType": "contract ITransparentUpgradeableProxy" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { + "name": "newOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "upgrade", + "inputs": [ + { + "name": "proxy", + "type": "address", + "internalType": "contract ITransparentUpgradeableProxy" + }, + { + "name": "implementation", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "upgradeAndCall", + "inputs": [ + { + "name": "proxy", + "type": "address", + "internalType": "contract ITransparentUpgradeableProxy" + }, + { + "name": "implementation", + "type": "address", + "internalType": "address" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/deployments/arbitrum/SynapseCCTP.Implementation.json b/deployments/arbitrum/SynapseCCTP.Implementation.json new file mode 100644 index 000000000..c831781cd --- /dev/null +++ b/deployments/arbitrum/SynapseCCTP.Implementation.json @@ -0,0 +1,1155 @@ +{ + "address": "0x8721e488c0cf6206A9eDAdFCafdd24367c5d432a", + "constructorArgs": "0x00000000000000000000000019330d10d9cc8751218eaf51e8885d058642e08a", + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "tokenMessenger_", + "type": "address", + "internalType": "contract ITokenMessenger" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "accumulatedFees", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "addToken", + "inputs": [ + { + "name": "symbol", + "type": "string", + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "relayerFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minBaseFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minSwapFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxFee", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "calculateFeeAmount", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "isSwap", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [ + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "chainGasAmount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "circleTokenPool", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "feeStructures", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "relayerFee", + "type": "uint40", + "internalType": "uint40" + }, + { + "name": "minBaseFee", + "type": "uint72", + "internalType": "uint72" + }, + { + "name": "minSwapFee", + "type": "uint72", + "internalType": "uint72" + }, + { + "name": "maxFee", + "type": "uint72", + "internalType": "uint72" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getBridgeTokens", + "inputs": [], + "outputs": [ + { + "name": "bridgeTokens", + "type": "tuple[]", + "internalType": "struct BridgeToken[]", + "components": [ + { + "name": "symbol", + "type": "string", + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getLocalToken", + "inputs": [ + { + "name": "remoteDomain", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "remoteToken", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "owner_", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isRequestFulfilled", + "inputs": [ + { + "name": "requestID", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "localDomain", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint32", + "internalType": "uint32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "messageTransmitter", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IMessageTransmitter" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pauseSending", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "protocolFee", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "receiveCircleToken", + "inputs": [ + { + "name": "message", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "signature", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "requestVersion", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "formattedRequest", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "relayerFeeCollectors", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "remoteDomainConfig", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "domain", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "synapseCCTP", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "removeToken", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "rescueGas", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "sendCircleToken", + "inputs": [ + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "burnToken", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "requestVersion", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "swapParams", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setChainGasAmount", + "inputs": [ + { + "name": "newChainGasAmount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setCircleTokenPool", + "inputs": [ + { + "name": "circleToken", + "type": "address", + "internalType": "address" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setFeeCollector", + "inputs": [ + { + "name": "feeCollector", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setProtocolFee", + "inputs": [ + { + "name": "newProtocolFee", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setRemoteDomainConfig", + "inputs": [ + { + "name": "remoteChainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "remoteDomain", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "remoteSynapseCCTP", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setTokenFee", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "relayerFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minBaseFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minSwapFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxFee", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "symbolToToken", + "inputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "tokenMessenger", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract ITokenMessenger" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "tokenToSymbol", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { + "name": "newOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "unpauseSending", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawProtocolFees", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawRelayerFees", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "ChainGasAirdropped", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ChainGasAmountUpdated", + "inputs": [ + { + "name": "chainGasAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "CircleRequestFulfilled", + "inputs": [ + { + "name": "originDomain", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + }, + { + "name": "recipient", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "mintToken", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "requestID", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "CircleRequestSent", + "inputs": [ + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "nonce", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "requestVersion", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + }, + { + "name": "formattedRequest", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + }, + { + "name": "requestID", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "CircleTokenPoolSet", + "inputs": [ + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "FeeCollected", + "inputs": [ + { + "name": "feeCollector", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "relayerFeeAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "protocolFeeAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "FeeCollectorUpdated", + "inputs": [ + { + "name": "relayer", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "oldFeeCollector", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "newFeeCollector", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "FeesWithdrawn", + "inputs": [ + { + "name": "recipient", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProtocolFeeUpdated", + "inputs": [ + { + "name": "newProtocolFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RemoteDomainConfigSet", + "inputs": [ + { + "name": "remoteChainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "remoteDomain", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + }, + { + "name": "remoteSynapseCCTP", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenAdded", + "inputs": [ + { + "name": "symbol", + "type": "string", + "indexed": false, + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenFeeSet", + "inputs": [ + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "relayerFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "minBaseFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "minSwapFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "maxFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRemoved", + "inputs": [ + { + "name": "symbol", + "type": "string", + "indexed": false, + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "CCTPGasRescueFailed", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectChainId", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectConfig", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectDomain", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectGasAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectProtocolFee", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectTokenAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPInsufficientAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPMessageNotReceived", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPSymbolAlreadyAdded", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPSymbolIncorrect", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPTokenAlreadyAdded", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPTokenNotFound", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPZeroAddress", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPZeroAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CastOverflow", + "inputs": [] + }, + { + "type": "error", + "name": "ForwarderDeploymentFailed", + "inputs": [] + }, + { + "type": "error", + "name": "IncorrectRequestLength", + "inputs": [] + }, + { + "type": "error", + "name": "RemoteCCTPDeploymentNotSet", + "inputs": [] + }, + { + "type": "error", + "name": "UnknownRequestVersion", + "inputs": [] + } + ] +} \ No newline at end of file diff --git a/deployments/arbitrum/SynapseCCTP.json b/deployments/arbitrum/SynapseCCTP.json index 19e34c756..cc915147e 100644 --- a/deployments/arbitrum/SynapseCCTP.json +++ b/deployments/arbitrum/SynapseCCTP.json @@ -1,997 +1,1155 @@ { - "address": "0xfB2Bfc368a7edfD51aa2cbEC513ad50edEa74E84", + "address": "0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E", + "constructorArgs": "0x00000000000000000000000019330d10d9cc8751218eaf51e8885d058642e08a", "abi": [ { + "type": "constructor", "inputs": [ { - "internalType": "contract ITokenMessenger", "name": "tokenMessenger_", - "type": "address" - }, - { - "internalType": "address", - "name": "owner_", - "type": "address" + "type": "address", + "internalType": "contract ITokenMessenger" } ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "CCTPGasRescueFailed", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPIncorrectChainId", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPIncorrectConfig", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPIncorrectDomain", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPIncorrectGasAmount", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPIncorrectProtocolFee", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPInsufficientAmount", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPMessageNotReceived", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPSymbolAlreadyAdded", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPSymbolIncorrect", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPTokenAlreadyAdded", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPTokenNotFound", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPZeroAddress", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPZeroAmount", - "type": "error" - }, - { - "inputs": [], - "name": "CastOverflow", - "type": "error" + "stateMutability": "nonpayable" }, { - "inputs": [], - "name": "ForwarderDeploymentFailed", - "type": "error" - }, - { - "inputs": [], - "name": "IncorrectRequestLength", - "type": "error" - }, - { - "inputs": [], - "name": "RemoteCCTPDeploymentNotSet", - "type": "error" - }, - { - "inputs": [], - "name": "UnknownRequestVersion", - "type": "error" - }, - { - "anonymous": false, + "type": "function", + "name": "accumulatedFees", "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "address", + "internalType": "address" } ], - "name": "ChainGasAirdropped", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "outputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "chainGasAmount", - "type": "uint256" + "name": "", + "type": "uint256", + "internalType": "uint256" } ], - "name": "ChainGasAmountUpdated", - "type": "event" + "stateMutability": "view" }, { - "anonymous": false, + "type": "function", + "name": "addToken", "inputs": [ { - "indexed": false, - "internalType": "uint32", - "name": "originDomain", - "type": "uint32" - }, - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" + "name": "symbol", + "type": "string", + "internalType": "string" }, { - "indexed": false, - "internalType": "address", - "name": "mintToken", - "type": "address" + "name": "token", + "type": "address", + "internalType": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" + "name": "relayerFee", + "type": "uint256", + "internalType": "uint256" }, { - "indexed": false, - "internalType": "address", - "name": "token", - "type": "address" + "name": "minBaseFee", + "type": "uint256", + "internalType": "uint256" }, { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" + "name": "minSwapFee", + "type": "uint256", + "internalType": "uint256" }, { - "indexed": false, - "internalType": "bytes32", - "name": "requestID", - "type": "bytes32" + "name": "maxFee", + "type": "uint256", + "internalType": "uint256" } ], - "name": "CircleRequestFulfilled", - "type": "event" + "outputs": [], + "stateMutability": "nonpayable" }, { - "anonymous": false, + "type": "function", + "name": "calculateFeeAmount", "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "nonce", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "address", "name": "token", - "type": "address" + "type": "address", + "internalType": "address" }, { - "indexed": false, - "internalType": "uint256", "name": "amount", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "indexed": false, - "internalType": "uint32", - "name": "requestVersion", - "type": "uint32" - }, + "name": "isSwap", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [ { - "indexed": false, - "internalType": "bytes", - "name": "formattedRequest", - "type": "bytes" - }, + "name": "fee", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "chainGasAmount", + "inputs": [], + "outputs": [ { - "indexed": false, - "internalType": "bytes32", - "name": "requestID", - "type": "bytes32" + "name": "", + "type": "uint256", + "internalType": "uint256" } ], - "name": "CircleRequestSent", - "type": "event" + "stateMutability": "view" }, { - "anonymous": false, + "type": "function", + "name": "circleTokenPool", "inputs": [ { - "indexed": false, - "internalType": "address", - "name": "feeCollector", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "relayerFeeAmount", - "type": "uint256" - }, + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "protocolFeeAmount", - "type": "uint256" + "name": "", + "type": "address", + "internalType": "address" } ], - "name": "FeeCollected", - "type": "event" + "stateMutability": "view" }, { - "anonymous": false, + "type": "function", + "name": "feeStructures", "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "relayer", - "type": "address" + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "relayerFee", + "type": "uint40", + "internalType": "uint40" }, { - "indexed": false, - "internalType": "address", - "name": "oldFeeCollector", - "type": "address" + "name": "minBaseFee", + "type": "uint72", + "internalType": "uint72" }, { - "indexed": false, - "internalType": "address", - "name": "newFeeCollector", - "type": "address" + "name": "minSwapFee", + "type": "uint72", + "internalType": "uint72" + }, + { + "name": "maxFee", + "type": "uint72", + "internalType": "uint72" } ], - "name": "FeeCollectorUpdated", - "type": "event" + "stateMutability": "view" + }, + { + "type": "function", + "name": "getBridgeTokens", + "inputs": [], + "outputs": [ + { + "name": "bridgeTokens", + "type": "tuple[]", + "internalType": "struct BridgeToken[]", + "components": [ + { + "name": "symbol", + "type": "string", + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + } + ], + "stateMutability": "view" }, { - "anonymous": false, + "type": "function", + "name": "getLocalToken", "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" + "name": "remoteDomain", + "type": "uint32", + "internalType": "uint32" }, { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" + "name": "remoteToken", + "type": "address", + "internalType": "address" } ], - "name": "OwnershipTransferred", - "type": "event" + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" }, { - "anonymous": false, + "type": "function", + "name": "initialize", "inputs": [ { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" + "name": "owner_", + "type": "address", + "internalType": "address" } ], - "name": "Paused", - "type": "event" + "outputs": [], + "stateMutability": "nonpayable" }, { - "anonymous": false, + "type": "function", + "name": "isRequestFulfilled", "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "newProtocolFee", - "type": "uint256" + "name": "requestID", + "type": "bytes32", + "internalType": "bytes32" } ], - "name": "ProtocolFeeUpdated", - "type": "event" + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" }, { - "anonymous": false, - "inputs": [ + "type": "function", + "name": "localDomain", + "inputs": [], + "outputs": [ { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" + "name": "", + "type": "uint32", + "internalType": "uint32" } ], - "name": "Unpaused", - "type": "event" + "stateMutability": "view" }, { - "inputs": [ + "type": "function", + "name": "messageTransmitter", + "inputs": [], + "outputs": [ { - "internalType": "address", "name": "", - "type": "address" - }, + "type": "address", + "internalType": "contract IMessageTransmitter" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ { - "internalType": "address", "name": "", - "type": "address" + "type": "address", + "internalType": "address" } ], - "name": "accumulatedFees", + "stateMutability": "view" + }, + { + "type": "function", + "name": "pauseSending", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "protocolFee", + "inputs": [], "outputs": [ { - "internalType": "uint256", "name": "", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "receiveCircleToken", "inputs": [ { - "internalType": "string", - "name": "symbol", - "type": "string" + "name": "message", + "type": "bytes", + "internalType": "bytes" }, { - "internalType": "address", - "name": "token", - "type": "address" + "name": "signature", + "type": "bytes", + "internalType": "bytes" }, { - "internalType": "uint256", - "name": "relayerFee", - "type": "uint256" + "name": "requestVersion", + "type": "uint32", + "internalType": "uint32" }, { - "internalType": "uint256", - "name": "minBaseFee", - "type": "uint256" - }, + "name": "formattedRequest", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "relayerFeeCollectors", + "inputs": [ { - "internalType": "uint256", - "name": "minSwapFee", - "type": "uint256" + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "remoteDomainConfig", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "domain", + "type": "uint32", + "internalType": "uint32" }, { - "internalType": "uint256", - "name": "maxFee", - "type": "uint256" + "name": "synapseCCTP", + "type": "address", + "internalType": "address" } ], - "name": "addToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "removeToken", "inputs": [ { - "internalType": "address", "name": "token", - "type": "address" + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "rescueGas", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "sendCircleToken", + "inputs": [ + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "burnToken", + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "amount", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "bool", - "name": "isSwap", - "type": "bool" + "name": "requestVersion", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "swapParams", + "type": "bytes", + "internalType": "bytes" } ], - "name": "calculateFeeAmount", - "outputs": [ + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setChainGasAmount", + "inputs": [ { - "internalType": "uint256", - "name": "fee", - "type": "uint256" + "name": "newChainGasAmount", + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { - "inputs": [], - "name": "chainGasAmount", - "outputs": [ + "type": "function", + "name": "setCircleTokenPool", + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "name": "circleToken", + "type": "address", + "internalType": "address" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "setFeeCollector", "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" + "name": "feeCollector", + "type": "address", + "internalType": "address" } ], - "name": "circleTokenPool", - "outputs": [ + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setProtocolFee", + "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" + "name": "newProtocolFee", + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "setRemoteDomainConfig", "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" + "name": "remoteChainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "remoteDomain", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "remoteSynapseCCTP", + "type": "address", + "internalType": "address" } ], - "name": "feeStructures", - "outputs": [ + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setTokenFee", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, { - "internalType": "uint40", "name": "relayerFee", - "type": "uint40" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint72", "name": "minBaseFee", - "type": "uint72" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint72", "name": "minSwapFee", - "type": "uint72" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint72", "name": "maxFee", - "type": "uint72" + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { - "inputs": [], - "name": "getBridgeTokens", - "outputs": [ + "type": "function", + "name": "symbolToToken", + "inputs": [ { - "components": [ - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "internalType": "struct BridgeToken[]", - "name": "bridgeTokens", - "type": "tuple[]" + "name": "", + "type": "string", + "internalType": "string" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "remoteDomain", - "type": "uint32" - }, + "outputs": [ { - "internalType": "address", - "name": "remoteToken", - "type": "address" + "name": "", + "type": "address", + "internalType": "address" } ], - "name": "getLocalToken", + "stateMutability": "view" + }, + { + "type": "function", + "name": "tokenMessenger", + "inputs": [], "outputs": [ { - "internalType": "address", "name": "", - "type": "address" + "type": "address", + "internalType": "contract ITokenMessenger" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "tokenToSymbol", "inputs": [ { - "internalType": "bytes32", - "name": "requestID", - "type": "bytes32" + "name": "", + "type": "address", + "internalType": "address" } ], - "name": "isRequestFulfilled", "outputs": [ { - "internalType": "bool", "name": "", - "type": "bool" + "type": "string", + "internalType": "string" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { - "inputs": [], - "name": "localDomain", - "outputs": [ + "type": "function", + "name": "transferOwnership", + "inputs": [ { - "internalType": "uint32", - "name": "", - "type": "uint32" + "name": "newOwner", + "type": "address", + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "unpauseSending", "inputs": [], - "name": "messageTransmitter", - "outputs": [ + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawProtocolFees", + "inputs": [ { - "internalType": "contract IMessageTransmitter", - "name": "", - "type": "address" + "name": "token", + "type": "address", + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { - "inputs": [], - "name": "owner", - "outputs": [ + "type": "function", + "name": "withdrawRelayerFees", + "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" + "name": "token", + "type": "address", + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { - "inputs": [], - "name": "pauseSending", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "type": "event", + "name": "ChainGasAirdropped", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false }, { - "inputs": [], - "name": "paused", - "outputs": [ + "type": "event", + "name": "ChainGasAmountUpdated", + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "name": "chainGasAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "anonymous": false }, { - "inputs": [], - "name": "protocolFee", - "outputs": [ + "type": "event", + "name": "CircleRequestFulfilled", + "inputs": [ + { + "name": "originDomain", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + }, + { + "name": "recipient", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "mintToken", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "requestID", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" } ], - "stateMutability": "view", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "CircleRequestSent", "inputs": [ { - "internalType": "bytes", - "name": "message", - "type": "bytes" + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "internalType": "bytes", - "name": "signature", - "type": "bytes" + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "nonce", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "internalType": "uint32", "name": "requestVersion", - "type": "uint32" + "type": "uint32", + "indexed": false, + "internalType": "uint32" }, { - "internalType": "bytes", "name": "formattedRequest", - "type": "bytes" + "type": "bytes", + "indexed": false, + "internalType": "bytes" + }, + { + "name": "requestID", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" } ], - "name": "receiveCircleToken", - "outputs": [], - "stateMutability": "payable", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "CircleTokenPoolSet", "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "relayerFeeCollectors", - "outputs": [ + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, { - "internalType": "address", - "name": "", - "type": "address" + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "FeeCollected", "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "remoteDomainConfig", - "outputs": [ + "name": "feeCollector", + "type": "address", + "indexed": false, + "internalType": "address" + }, { - "internalType": "uint32", - "name": "domain", - "type": "uint32" + "name": "relayerFeeAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "internalType": "address", - "name": "synapseCCTP", - "type": "address" + "name": "protocolFeeAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "FeeCollectorUpdated", "inputs": [ { - "internalType": "address", - "name": "token", - "type": "address" + "name": "relayer", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "oldFeeCollector", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "newFeeCollector", + "type": "address", + "indexed": false, + "internalType": "address" } ], - "name": "removeToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "rescueGas", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "FeesWithdrawn", "inputs": [ { - "internalType": "address", "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" + "type": "address", + "indexed": false, + "internalType": "address" }, { - "internalType": "address", - "name": "burnToken", - "type": "address" + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" }, { - "internalType": "uint256", "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint32", - "name": "requestVersion", - "type": "uint32" - }, - { - "internalType": "bytes", - "name": "swapParams", - "type": "bytes" - } - ], - "name": "sendCircleToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newChainGasAmount", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], - "name": "setChainGasAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "OwnershipTransferred", "inputs": [ { - "internalType": "address", - "name": "circleToken", - "type": "address" + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" }, { - "internalType": "address", - "name": "pool", - "type": "address" + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" } ], - "name": "setCircleTokenPool", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "Paused", "inputs": [ { - "internalType": "address", - "name": "feeCollector", - "type": "address" + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" } ], - "name": "setFeeCollector", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "ProtocolFeeUpdated", "inputs": [ { - "internalType": "uint256", "name": "newProtocolFee", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], - "name": "setProtocolFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "RemoteDomainConfigSet", "inputs": [ { - "internalType": "uint256", "name": "remoteChainId", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "internalType": "uint32", "name": "remoteDomain", - "type": "uint32" + "type": "uint32", + "indexed": false, + "internalType": "uint32" }, { - "internalType": "address", "name": "remoteSynapseCCTP", - "type": "address" + "type": "address", + "indexed": false, + "internalType": "address" } ], - "name": "setRemoteDomainConfig", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false + }, + { + "type": "event", + "name": "TokenAdded", + "inputs": [ + { + "name": "symbol", + "type": "string", + "indexed": false, + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false }, { + "type": "event", + "name": "TokenFeeSet", "inputs": [ { - "internalType": "address", "name": "token", - "type": "address" + "type": "address", + "indexed": false, + "internalType": "address" }, { - "internalType": "uint256", "name": "relayerFee", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "internalType": "uint256", "name": "minBaseFee", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "internalType": "uint256", "name": "minSwapFee", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "internalType": "uint256", "name": "maxFee", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], - "name": "setTokenFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "TokenRemoved", "inputs": [ { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "name": "symbolToToken", - "outputs": [ + "name": "symbol", + "type": "string", + "indexed": false, + "internalType": "string" + }, { - "internalType": "address", - "name": "", - "type": "address" + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "anonymous": false }, { - "inputs": [], - "name": "tokenMessenger", - "outputs": [ + "type": "event", + "name": "Unpaused", + "inputs": [ { - "internalType": "contract ITokenMessenger", - "name": "", - "type": "address" + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "anonymous": false }, { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "tokenToSymbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" + "type": "error", + "name": "CCTPGasRescueFailed", + "inputs": [] }, { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "type": "error", + "name": "CCTPIncorrectChainId", + "inputs": [] }, { - "inputs": [], - "name": "unpauseSending", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "type": "error", + "name": "CCTPIncorrectConfig", + "inputs": [] }, { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "withdrawProtocolFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "type": "error", + "name": "CCTPIncorrectDomain", + "inputs": [] }, { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "withdrawRelayerFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "type": "error", + "name": "CCTPIncorrectGasAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectProtocolFee", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectTokenAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPInsufficientAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPMessageNotReceived", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPSymbolAlreadyAdded", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPSymbolIncorrect", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPTokenAlreadyAdded", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPTokenNotFound", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPZeroAddress", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPZeroAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CastOverflow", + "inputs": [] + }, + { + "type": "error", + "name": "ForwarderDeploymentFailed", + "inputs": [] + }, + { + "type": "error", + "name": "IncorrectRequestLength", + "inputs": [] + }, + { + "type": "error", + "name": "RemoteCCTPDeploymentNotSet", + "inputs": [] + }, + { + "type": "error", + "name": "UnknownRequestVersion", + "inputs": [] } ] } \ No newline at end of file diff --git a/deployments/arbitrum/SynapseCCTPRouter.json b/deployments/arbitrum/SynapseCCTPRouter.json index 16dbbcb6e..f2e719289 100644 --- a/deployments/arbitrum/SynapseCCTPRouter.json +++ b/deployments/arbitrum/SynapseCCTPRouter.json @@ -1,422 +1,423 @@ { - "address": "0xD359bc471554504f683fbd4f6e36848612349DDF", + "address": "0xd5a597d6e7ddf373a92C8f477DAAA673b0902F48", + "constructorArgs": "0x00000000000000000000000012715a66773bd9c54534a01abf01d05f6b4bd35e", "abi": [ { + "type": "constructor", "inputs": [ { - "internalType": "address", "name": "_synapseCCTP", - "type": "address" + "type": "address", + "internalType": "address" } ], - "stateMutability": "nonpayable", - "type": "constructor" + "stateMutability": "nonpayable" }, { - "inputs": [], - "name": "DeadlineExceeded", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientOutputAmount", - "type": "error" - }, - { - "inputs": [], - "name": "MsgValueIncorrect", - "type": "error" - }, - { - "inputs": [], - "name": "PoolNotFound", - "type": "error" - }, - { - "inputs": [], - "name": "TokenAddressMismatch", - "type": "error" - }, - { - "inputs": [], - "name": "TokenNotContract", - "type": "error" - }, - { - "inputs": [], - "name": "TokenNotETH", - "type": "error" - }, - { - "inputs": [], - "name": "TokensIdentical", - "type": "error" - }, - { - "inputs": [], - "name": "UnknownRequestAction", - "type": "error" + "type": "receive", + "stateMutability": "payable" }, { + "type": "function", + "name": "adapterSwap", "inputs": [ { - "internalType": "address", "name": "recipient", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "address", "name": "tokenIn", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "amountIn", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "address", "name": "tokenOut", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "bytes", "name": "rawParams", - "type": "bytes" + "type": "bytes", + "internalType": "bytes" } ], - "name": "adapterSwap", "outputs": [ { - "internalType": "uint256", "name": "amountOut", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "payable", - "type": "function" + "stateMutability": "payable" }, { + "type": "function", + "name": "bridge", "inputs": [ { - "internalType": "address", "name": "recipient", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "chainId", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "address", "name": "token", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "amount", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { + "name": "originQuery", + "type": "tuple", + "internalType": "struct SwapQuery", "components": [ { - "internalType": "address", "name": "routerAdapter", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "address", "name": "tokenOut", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "minAmountOut", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint256", "name": "deadline", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "bytes", "name": "rawParams", - "type": "bytes" + "type": "bytes", + "internalType": "bytes" } - ], - "internalType": "struct SwapQuery", - "name": "originQuery", - "type": "tuple" + ] }, { + "name": "destQuery", + "type": "tuple", + "internalType": "struct SwapQuery", "components": [ { - "internalType": "address", "name": "routerAdapter", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "address", "name": "tokenOut", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "minAmountOut", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint256", "name": "deadline", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "bytes", "name": "rawParams", - "type": "bytes" + "type": "bytes", + "internalType": "bytes" } - ], - "internalType": "struct SwapQuery", - "name": "destQuery", - "type": "tuple" + ] } ], - "name": "bridge", "outputs": [], - "stateMutability": "payable", - "type": "function" + "stateMutability": "payable" }, { + "type": "function", + "name": "calculateFeeAmount", "inputs": [ { - "internalType": "address", "name": "token", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "amount", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "bool", "name": "isSwap", - "type": "bool" + "type": "bool", + "internalType": "bool" } ], - "name": "calculateFeeAmount", "outputs": [ { - "internalType": "uint256", "name": "fee", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "feeStructures", "inputs": [ { - "internalType": "address", "name": "token", - "type": "address" + "type": "address", + "internalType": "address" } ], - "name": "feeStructures", "outputs": [ { - "internalType": "uint40", "name": "relayerFee", - "type": "uint40" + "type": "uint40", + "internalType": "uint40" }, { - "internalType": "uint72", "name": "minBaseFee", - "type": "uint72" + "type": "uint72", + "internalType": "uint72" }, { - "internalType": "uint72", "name": "minSwapFee", - "type": "uint72" + "type": "uint72", + "internalType": "uint72" }, { - "internalType": "uint72", "name": "maxFee", - "type": "uint72" + "type": "uint72", + "internalType": "uint72" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "getConnectedBridgeTokens", "inputs": [ { - "internalType": "address", "name": "tokenOut", - "type": "address" + "type": "address", + "internalType": "address" } ], - "name": "getConnectedBridgeTokens", "outputs": [ { + "name": "tokens", + "type": "tuple[]", + "internalType": "struct BridgeToken[]", "components": [ { - "internalType": "string", "name": "symbol", - "type": "string" + "type": "string", + "internalType": "string" }, { - "internalType": "address", "name": "token", - "type": "address" + "type": "address", + "internalType": "address" } - ], - "internalType": "struct BridgeToken[]", - "name": "tokens", - "type": "tuple[]" + ] } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "getDestinationAmountOut", "inputs": [ { + "name": "requests", + "type": "tuple[]", + "internalType": "struct DestRequest[]", "components": [ { - "internalType": "string", "name": "symbol", - "type": "string" + "type": "string", + "internalType": "string" }, { - "internalType": "uint256", "name": "amountIn", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } - ], - "internalType": "struct DestRequest[]", - "name": "requests", - "type": "tuple[]" + ] }, { - "internalType": "address", "name": "tokenOut", - "type": "address" + "type": "address", + "internalType": "address" } ], - "name": "getDestinationAmountOut", "outputs": [ { + "name": "destQueries", + "type": "tuple[]", + "internalType": "struct SwapQuery[]", "components": [ { - "internalType": "address", "name": "routerAdapter", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "address", "name": "tokenOut", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "minAmountOut", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint256", "name": "deadline", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "bytes", "name": "rawParams", - "type": "bytes" + "type": "bytes", + "internalType": "bytes" } - ], - "internalType": "struct SwapQuery[]", - "name": "destQueries", - "type": "tuple[]" + ] } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "getOriginAmountOut", "inputs": [ { - "internalType": "address", "name": "tokenIn", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "string[]", "name": "tokenSymbols", - "type": "string[]" + "type": "string[]", + "internalType": "string[]" }, { - "internalType": "uint256", "name": "amountIn", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } ], - "name": "getOriginAmountOut", "outputs": [ { + "name": "originQueries", + "type": "tuple[]", + "internalType": "struct SwapQuery[]", "components": [ { - "internalType": "address", "name": "routerAdapter", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "address", "name": "tokenOut", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "minAmountOut", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint256", "name": "deadline", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "bytes", "name": "rawParams", - "type": "bytes" + "type": "bytes", + "internalType": "bytes" } - ], - "internalType": "struct SwapQuery[]", - "name": "originQueries", - "type": "tuple[]" + ] } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { - "inputs": [], + "type": "function", "name": "synapseCCTP", + "inputs": [], "outputs": [ { - "internalType": "address", "name": "", - "type": "address" + "type": "address", + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { - "stateMutability": "payable", - "type": "receive" + "type": "error", + "name": "DeadlineExceeded", + "inputs": [] + }, + { + "type": "error", + "name": "InsufficientOutputAmount", + "inputs": [] + }, + { + "type": "error", + "name": "MsgValueIncorrect", + "inputs": [] + }, + { + "type": "error", + "name": "PoolNotFound", + "inputs": [] + }, + { + "type": "error", + "name": "TokenAddressMismatch", + "inputs": [] + }, + { + "type": "error", + "name": "TokenNotContract", + "inputs": [] + }, + { + "type": "error", + "name": "TokenNotETH", + "inputs": [] + }, + { + "type": "error", + "name": "TokensIdentical", + "inputs": [] + }, + { + "type": "error", + "name": "UnknownRequestAction", + "inputs": [] } ] } \ No newline at end of file diff --git a/deployments/arbitrum/TransparentUpgradeableProxy.SynapseCCTP.json b/deployments/arbitrum/TransparentUpgradeableProxy.SynapseCCTP.json new file mode 100644 index 000000000..e5be23680 --- /dev/null +++ b/deployments/arbitrum/TransparentUpgradeableProxy.SynapseCCTP.json @@ -0,0 +1,80 @@ +{ + "address": "0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E", + "constructorArgs": "0x0000000000000000000000008721e488c0cf6206a9edadfcafdd24367c5d432a000000000000000000000000444fef20c748dad51e6146881775d031cd03ebde00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000024c4d66de80000000000000000000000000fea3e5840334fc758a3decf14546bfdfbef5cd300000000000000000000000000000000000000000000000000000000", + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "_logic", + "type": "address", + "internalType": "address" + }, + { + "name": "admin_", + "type": "address", + "internalType": "address" + }, + { + "name": "_data", + "type": "bytes", + "internalType": "bytes" + } + ], + "stateMutability": "payable" + }, + { + "type": "fallback", + "stateMutability": "payable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "event", + "name": "AdminChanged", + "inputs": [ + { + "name": "previousAdmin", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "newAdmin", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "BeaconUpgraded", + "inputs": [ + { + "name": "beacon", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Upgraded", + "inputs": [ + { + "name": "implementation", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/deployments/avalanche/ProxyAdmin.SynapseCCTP.json b/deployments/avalanche/ProxyAdmin.SynapseCCTP.json new file mode 100644 index 000000000..7402dae96 --- /dev/null +++ b/deployments/avalanche/ProxyAdmin.SynapseCCTP.json @@ -0,0 +1,155 @@ +{ + "address": "0xDA6fe8a7b991F8469bF370883B16F572a98963f4", + "constructorArgs": "0x", + "abi": [ + { + "type": "function", + "name": "changeProxyAdmin", + "inputs": [ + { + "name": "proxy", + "type": "address", + "internalType": "contract ITransparentUpgradeableProxy" + }, + { + "name": "newAdmin", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getProxyAdmin", + "inputs": [ + { + "name": "proxy", + "type": "address", + "internalType": "contract ITransparentUpgradeableProxy" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getProxyImplementation", + "inputs": [ + { + "name": "proxy", + "type": "address", + "internalType": "contract ITransparentUpgradeableProxy" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { + "name": "newOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "upgrade", + "inputs": [ + { + "name": "proxy", + "type": "address", + "internalType": "contract ITransparentUpgradeableProxy" + }, + { + "name": "implementation", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "upgradeAndCall", + "inputs": [ + { + "name": "proxy", + "type": "address", + "internalType": "contract ITransparentUpgradeableProxy" + }, + { + "name": "implementation", + "type": "address", + "internalType": "address" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/deployments/avalanche/SynapseCCTP.Implementation.json b/deployments/avalanche/SynapseCCTP.Implementation.json new file mode 100644 index 000000000..a41b7e049 --- /dev/null +++ b/deployments/avalanche/SynapseCCTP.Implementation.json @@ -0,0 +1,1155 @@ +{ + "address": "0xe7794fEfeec6408b695376C46A53e6621f99ccdc", + "constructorArgs": "0x0000000000000000000000006b25532e1060ce10cc3b0a99e5683b91bfde6982", + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "tokenMessenger_", + "type": "address", + "internalType": "contract ITokenMessenger" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "accumulatedFees", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "addToken", + "inputs": [ + { + "name": "symbol", + "type": "string", + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "relayerFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minBaseFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minSwapFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxFee", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "calculateFeeAmount", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "isSwap", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [ + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "chainGasAmount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "circleTokenPool", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "feeStructures", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "relayerFee", + "type": "uint40", + "internalType": "uint40" + }, + { + "name": "minBaseFee", + "type": "uint72", + "internalType": "uint72" + }, + { + "name": "minSwapFee", + "type": "uint72", + "internalType": "uint72" + }, + { + "name": "maxFee", + "type": "uint72", + "internalType": "uint72" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getBridgeTokens", + "inputs": [], + "outputs": [ + { + "name": "bridgeTokens", + "type": "tuple[]", + "internalType": "struct BridgeToken[]", + "components": [ + { + "name": "symbol", + "type": "string", + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getLocalToken", + "inputs": [ + { + "name": "remoteDomain", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "remoteToken", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "owner_", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isRequestFulfilled", + "inputs": [ + { + "name": "requestID", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "localDomain", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint32", + "internalType": "uint32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "messageTransmitter", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IMessageTransmitter" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pauseSending", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "protocolFee", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "receiveCircleToken", + "inputs": [ + { + "name": "message", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "signature", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "requestVersion", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "formattedRequest", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "relayerFeeCollectors", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "remoteDomainConfig", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "domain", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "synapseCCTP", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "removeToken", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "rescueGas", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "sendCircleToken", + "inputs": [ + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "burnToken", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "requestVersion", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "swapParams", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setChainGasAmount", + "inputs": [ + { + "name": "newChainGasAmount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setCircleTokenPool", + "inputs": [ + { + "name": "circleToken", + "type": "address", + "internalType": "address" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setFeeCollector", + "inputs": [ + { + "name": "feeCollector", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setProtocolFee", + "inputs": [ + { + "name": "newProtocolFee", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setRemoteDomainConfig", + "inputs": [ + { + "name": "remoteChainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "remoteDomain", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "remoteSynapseCCTP", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setTokenFee", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "relayerFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minBaseFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minSwapFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxFee", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "symbolToToken", + "inputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "tokenMessenger", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract ITokenMessenger" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "tokenToSymbol", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { + "name": "newOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "unpauseSending", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawProtocolFees", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawRelayerFees", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "ChainGasAirdropped", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ChainGasAmountUpdated", + "inputs": [ + { + "name": "chainGasAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "CircleRequestFulfilled", + "inputs": [ + { + "name": "originDomain", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + }, + { + "name": "recipient", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "mintToken", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "requestID", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "CircleRequestSent", + "inputs": [ + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "nonce", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "requestVersion", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + }, + { + "name": "formattedRequest", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + }, + { + "name": "requestID", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "CircleTokenPoolSet", + "inputs": [ + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "FeeCollected", + "inputs": [ + { + "name": "feeCollector", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "relayerFeeAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "protocolFeeAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "FeeCollectorUpdated", + "inputs": [ + { + "name": "relayer", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "oldFeeCollector", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "newFeeCollector", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "FeesWithdrawn", + "inputs": [ + { + "name": "recipient", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProtocolFeeUpdated", + "inputs": [ + { + "name": "newProtocolFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RemoteDomainConfigSet", + "inputs": [ + { + "name": "remoteChainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "remoteDomain", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + }, + { + "name": "remoteSynapseCCTP", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenAdded", + "inputs": [ + { + "name": "symbol", + "type": "string", + "indexed": false, + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenFeeSet", + "inputs": [ + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "relayerFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "minBaseFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "minSwapFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "maxFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRemoved", + "inputs": [ + { + "name": "symbol", + "type": "string", + "indexed": false, + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "CCTPGasRescueFailed", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectChainId", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectConfig", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectDomain", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectGasAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectProtocolFee", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectTokenAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPInsufficientAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPMessageNotReceived", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPSymbolAlreadyAdded", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPSymbolIncorrect", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPTokenAlreadyAdded", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPTokenNotFound", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPZeroAddress", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPZeroAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CastOverflow", + "inputs": [] + }, + { + "type": "error", + "name": "ForwarderDeploymentFailed", + "inputs": [] + }, + { + "type": "error", + "name": "IncorrectRequestLength", + "inputs": [] + }, + { + "type": "error", + "name": "RemoteCCTPDeploymentNotSet", + "inputs": [] + }, + { + "type": "error", + "name": "UnknownRequestVersion", + "inputs": [] + } + ] +} \ No newline at end of file diff --git a/deployments/avalanche/SynapseCCTP.json b/deployments/avalanche/SynapseCCTP.json index 19e34c756..36aed478d 100644 --- a/deployments/avalanche/SynapseCCTP.json +++ b/deployments/avalanche/SynapseCCTP.json @@ -1,997 +1,1155 @@ { - "address": "0xfB2Bfc368a7edfD51aa2cbEC513ad50edEa74E84", + "address": "0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E", + "constructorArgs": "0x0000000000000000000000006b25532e1060ce10cc3b0a99e5683b91bfde6982", "abi": [ { + "type": "constructor", "inputs": [ { - "internalType": "contract ITokenMessenger", "name": "tokenMessenger_", - "type": "address" - }, - { - "internalType": "address", - "name": "owner_", - "type": "address" + "type": "address", + "internalType": "contract ITokenMessenger" } ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "CCTPGasRescueFailed", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPIncorrectChainId", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPIncorrectConfig", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPIncorrectDomain", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPIncorrectGasAmount", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPIncorrectProtocolFee", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPInsufficientAmount", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPMessageNotReceived", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPSymbolAlreadyAdded", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPSymbolIncorrect", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPTokenAlreadyAdded", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPTokenNotFound", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPZeroAddress", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPZeroAmount", - "type": "error" - }, - { - "inputs": [], - "name": "CastOverflow", - "type": "error" + "stateMutability": "nonpayable" }, { - "inputs": [], - "name": "ForwarderDeploymentFailed", - "type": "error" - }, - { - "inputs": [], - "name": "IncorrectRequestLength", - "type": "error" - }, - { - "inputs": [], - "name": "RemoteCCTPDeploymentNotSet", - "type": "error" - }, - { - "inputs": [], - "name": "UnknownRequestVersion", - "type": "error" - }, - { - "anonymous": false, + "type": "function", + "name": "accumulatedFees", "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "address", + "internalType": "address" } ], - "name": "ChainGasAirdropped", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "outputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "chainGasAmount", - "type": "uint256" + "name": "", + "type": "uint256", + "internalType": "uint256" } ], - "name": "ChainGasAmountUpdated", - "type": "event" + "stateMutability": "view" }, { - "anonymous": false, + "type": "function", + "name": "addToken", "inputs": [ { - "indexed": false, - "internalType": "uint32", - "name": "originDomain", - "type": "uint32" - }, - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" + "name": "symbol", + "type": "string", + "internalType": "string" }, { - "indexed": false, - "internalType": "address", - "name": "mintToken", - "type": "address" + "name": "token", + "type": "address", + "internalType": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" + "name": "relayerFee", + "type": "uint256", + "internalType": "uint256" }, { - "indexed": false, - "internalType": "address", - "name": "token", - "type": "address" + "name": "minBaseFee", + "type": "uint256", + "internalType": "uint256" }, { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" + "name": "minSwapFee", + "type": "uint256", + "internalType": "uint256" }, { - "indexed": false, - "internalType": "bytes32", - "name": "requestID", - "type": "bytes32" + "name": "maxFee", + "type": "uint256", + "internalType": "uint256" } ], - "name": "CircleRequestFulfilled", - "type": "event" + "outputs": [], + "stateMutability": "nonpayable" }, { - "anonymous": false, + "type": "function", + "name": "calculateFeeAmount", "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "nonce", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "address", "name": "token", - "type": "address" + "type": "address", + "internalType": "address" }, { - "indexed": false, - "internalType": "uint256", "name": "amount", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "indexed": false, - "internalType": "uint32", - "name": "requestVersion", - "type": "uint32" - }, + "name": "isSwap", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [ { - "indexed": false, - "internalType": "bytes", - "name": "formattedRequest", - "type": "bytes" - }, + "name": "fee", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "chainGasAmount", + "inputs": [], + "outputs": [ { - "indexed": false, - "internalType": "bytes32", - "name": "requestID", - "type": "bytes32" + "name": "", + "type": "uint256", + "internalType": "uint256" } ], - "name": "CircleRequestSent", - "type": "event" + "stateMutability": "view" }, { - "anonymous": false, + "type": "function", + "name": "circleTokenPool", "inputs": [ { - "indexed": false, - "internalType": "address", - "name": "feeCollector", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "relayerFeeAmount", - "type": "uint256" - }, + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "protocolFeeAmount", - "type": "uint256" + "name": "", + "type": "address", + "internalType": "address" } ], - "name": "FeeCollected", - "type": "event" + "stateMutability": "view" }, { - "anonymous": false, + "type": "function", + "name": "feeStructures", "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "relayer", - "type": "address" + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "relayerFee", + "type": "uint40", + "internalType": "uint40" }, { - "indexed": false, - "internalType": "address", - "name": "oldFeeCollector", - "type": "address" + "name": "minBaseFee", + "type": "uint72", + "internalType": "uint72" }, { - "indexed": false, - "internalType": "address", - "name": "newFeeCollector", - "type": "address" + "name": "minSwapFee", + "type": "uint72", + "internalType": "uint72" + }, + { + "name": "maxFee", + "type": "uint72", + "internalType": "uint72" } ], - "name": "FeeCollectorUpdated", - "type": "event" + "stateMutability": "view" + }, + { + "type": "function", + "name": "getBridgeTokens", + "inputs": [], + "outputs": [ + { + "name": "bridgeTokens", + "type": "tuple[]", + "internalType": "struct BridgeToken[]", + "components": [ + { + "name": "symbol", + "type": "string", + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + } + ], + "stateMutability": "view" }, { - "anonymous": false, + "type": "function", + "name": "getLocalToken", "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" + "name": "remoteDomain", + "type": "uint32", + "internalType": "uint32" }, { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" + "name": "remoteToken", + "type": "address", + "internalType": "address" } ], - "name": "OwnershipTransferred", - "type": "event" + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" }, { - "anonymous": false, + "type": "function", + "name": "initialize", "inputs": [ { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" + "name": "owner_", + "type": "address", + "internalType": "address" } ], - "name": "Paused", - "type": "event" + "outputs": [], + "stateMutability": "nonpayable" }, { - "anonymous": false, + "type": "function", + "name": "isRequestFulfilled", "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "newProtocolFee", - "type": "uint256" + "name": "requestID", + "type": "bytes32", + "internalType": "bytes32" } ], - "name": "ProtocolFeeUpdated", - "type": "event" + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" }, { - "anonymous": false, - "inputs": [ + "type": "function", + "name": "localDomain", + "inputs": [], + "outputs": [ { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" + "name": "", + "type": "uint32", + "internalType": "uint32" } ], - "name": "Unpaused", - "type": "event" + "stateMutability": "view" }, { - "inputs": [ + "type": "function", + "name": "messageTransmitter", + "inputs": [], + "outputs": [ { - "internalType": "address", "name": "", - "type": "address" - }, + "type": "address", + "internalType": "contract IMessageTransmitter" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ { - "internalType": "address", "name": "", - "type": "address" + "type": "address", + "internalType": "address" } ], - "name": "accumulatedFees", + "stateMutability": "view" + }, + { + "type": "function", + "name": "pauseSending", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "protocolFee", + "inputs": [], "outputs": [ { - "internalType": "uint256", "name": "", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "receiveCircleToken", "inputs": [ { - "internalType": "string", - "name": "symbol", - "type": "string" + "name": "message", + "type": "bytes", + "internalType": "bytes" }, { - "internalType": "address", - "name": "token", - "type": "address" + "name": "signature", + "type": "bytes", + "internalType": "bytes" }, { - "internalType": "uint256", - "name": "relayerFee", - "type": "uint256" + "name": "requestVersion", + "type": "uint32", + "internalType": "uint32" }, { - "internalType": "uint256", - "name": "minBaseFee", - "type": "uint256" - }, + "name": "formattedRequest", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "relayerFeeCollectors", + "inputs": [ { - "internalType": "uint256", - "name": "minSwapFee", - "type": "uint256" + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "remoteDomainConfig", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "domain", + "type": "uint32", + "internalType": "uint32" }, { - "internalType": "uint256", - "name": "maxFee", - "type": "uint256" + "name": "synapseCCTP", + "type": "address", + "internalType": "address" } ], - "name": "addToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "removeToken", "inputs": [ { - "internalType": "address", "name": "token", - "type": "address" + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "rescueGas", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "sendCircleToken", + "inputs": [ + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "burnToken", + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "amount", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "bool", - "name": "isSwap", - "type": "bool" + "name": "requestVersion", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "swapParams", + "type": "bytes", + "internalType": "bytes" } ], - "name": "calculateFeeAmount", - "outputs": [ + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setChainGasAmount", + "inputs": [ { - "internalType": "uint256", - "name": "fee", - "type": "uint256" + "name": "newChainGasAmount", + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { - "inputs": [], - "name": "chainGasAmount", - "outputs": [ + "type": "function", + "name": "setCircleTokenPool", + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "name": "circleToken", + "type": "address", + "internalType": "address" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "setFeeCollector", "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" + "name": "feeCollector", + "type": "address", + "internalType": "address" } ], - "name": "circleTokenPool", - "outputs": [ + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setProtocolFee", + "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" + "name": "newProtocolFee", + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "setRemoteDomainConfig", "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" + "name": "remoteChainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "remoteDomain", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "remoteSynapseCCTP", + "type": "address", + "internalType": "address" } ], - "name": "feeStructures", - "outputs": [ + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setTokenFee", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, { - "internalType": "uint40", "name": "relayerFee", - "type": "uint40" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint72", "name": "minBaseFee", - "type": "uint72" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint72", "name": "minSwapFee", - "type": "uint72" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint72", "name": "maxFee", - "type": "uint72" + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { - "inputs": [], - "name": "getBridgeTokens", - "outputs": [ + "type": "function", + "name": "symbolToToken", + "inputs": [ { - "components": [ - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "internalType": "struct BridgeToken[]", - "name": "bridgeTokens", - "type": "tuple[]" + "name": "", + "type": "string", + "internalType": "string" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "remoteDomain", - "type": "uint32" - }, + "outputs": [ { - "internalType": "address", - "name": "remoteToken", - "type": "address" + "name": "", + "type": "address", + "internalType": "address" } ], - "name": "getLocalToken", + "stateMutability": "view" + }, + { + "type": "function", + "name": "tokenMessenger", + "inputs": [], "outputs": [ { - "internalType": "address", "name": "", - "type": "address" + "type": "address", + "internalType": "contract ITokenMessenger" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "tokenToSymbol", "inputs": [ { - "internalType": "bytes32", - "name": "requestID", - "type": "bytes32" + "name": "", + "type": "address", + "internalType": "address" } ], - "name": "isRequestFulfilled", "outputs": [ { - "internalType": "bool", "name": "", - "type": "bool" + "type": "string", + "internalType": "string" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { - "inputs": [], - "name": "localDomain", - "outputs": [ + "type": "function", + "name": "transferOwnership", + "inputs": [ { - "internalType": "uint32", - "name": "", - "type": "uint32" + "name": "newOwner", + "type": "address", + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "unpauseSending", "inputs": [], - "name": "messageTransmitter", - "outputs": [ + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawProtocolFees", + "inputs": [ { - "internalType": "contract IMessageTransmitter", - "name": "", - "type": "address" + "name": "token", + "type": "address", + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { - "inputs": [], - "name": "owner", - "outputs": [ + "type": "function", + "name": "withdrawRelayerFees", + "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" + "name": "token", + "type": "address", + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { - "inputs": [], - "name": "pauseSending", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "type": "event", + "name": "ChainGasAirdropped", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false }, { - "inputs": [], - "name": "paused", - "outputs": [ + "type": "event", + "name": "ChainGasAmountUpdated", + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "name": "chainGasAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "anonymous": false }, { - "inputs": [], - "name": "protocolFee", - "outputs": [ + "type": "event", + "name": "CircleRequestFulfilled", + "inputs": [ + { + "name": "originDomain", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + }, + { + "name": "recipient", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "mintToken", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "requestID", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" } ], - "stateMutability": "view", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "CircleRequestSent", "inputs": [ { - "internalType": "bytes", - "name": "message", - "type": "bytes" + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "internalType": "bytes", - "name": "signature", - "type": "bytes" + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "nonce", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "internalType": "uint32", "name": "requestVersion", - "type": "uint32" + "type": "uint32", + "indexed": false, + "internalType": "uint32" }, { - "internalType": "bytes", "name": "formattedRequest", - "type": "bytes" + "type": "bytes", + "indexed": false, + "internalType": "bytes" + }, + { + "name": "requestID", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" } ], - "name": "receiveCircleToken", - "outputs": [], - "stateMutability": "payable", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "CircleTokenPoolSet", "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "relayerFeeCollectors", - "outputs": [ + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, { - "internalType": "address", - "name": "", - "type": "address" + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "FeeCollected", "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "remoteDomainConfig", - "outputs": [ + "name": "feeCollector", + "type": "address", + "indexed": false, + "internalType": "address" + }, { - "internalType": "uint32", - "name": "domain", - "type": "uint32" + "name": "relayerFeeAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "internalType": "address", - "name": "synapseCCTP", - "type": "address" + "name": "protocolFeeAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "FeeCollectorUpdated", "inputs": [ { - "internalType": "address", - "name": "token", - "type": "address" + "name": "relayer", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "oldFeeCollector", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "newFeeCollector", + "type": "address", + "indexed": false, + "internalType": "address" } ], - "name": "removeToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "rescueGas", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "FeesWithdrawn", "inputs": [ { - "internalType": "address", "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" + "type": "address", + "indexed": false, + "internalType": "address" }, { - "internalType": "address", - "name": "burnToken", - "type": "address" + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" }, { - "internalType": "uint256", "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint32", - "name": "requestVersion", - "type": "uint32" - }, - { - "internalType": "bytes", - "name": "swapParams", - "type": "bytes" - } - ], - "name": "sendCircleToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newChainGasAmount", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], - "name": "setChainGasAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "OwnershipTransferred", "inputs": [ { - "internalType": "address", - "name": "circleToken", - "type": "address" + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" }, { - "internalType": "address", - "name": "pool", - "type": "address" + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" } ], - "name": "setCircleTokenPool", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "Paused", "inputs": [ { - "internalType": "address", - "name": "feeCollector", - "type": "address" + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" } ], - "name": "setFeeCollector", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "ProtocolFeeUpdated", "inputs": [ { - "internalType": "uint256", "name": "newProtocolFee", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], - "name": "setProtocolFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "RemoteDomainConfigSet", "inputs": [ { - "internalType": "uint256", "name": "remoteChainId", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "internalType": "uint32", "name": "remoteDomain", - "type": "uint32" + "type": "uint32", + "indexed": false, + "internalType": "uint32" }, { - "internalType": "address", "name": "remoteSynapseCCTP", - "type": "address" + "type": "address", + "indexed": false, + "internalType": "address" } ], - "name": "setRemoteDomainConfig", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false + }, + { + "type": "event", + "name": "TokenAdded", + "inputs": [ + { + "name": "symbol", + "type": "string", + "indexed": false, + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false }, { + "type": "event", + "name": "TokenFeeSet", "inputs": [ { - "internalType": "address", "name": "token", - "type": "address" + "type": "address", + "indexed": false, + "internalType": "address" }, { - "internalType": "uint256", "name": "relayerFee", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "internalType": "uint256", "name": "minBaseFee", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "internalType": "uint256", "name": "minSwapFee", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "internalType": "uint256", "name": "maxFee", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], - "name": "setTokenFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "TokenRemoved", "inputs": [ { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "name": "symbolToToken", - "outputs": [ + "name": "symbol", + "type": "string", + "indexed": false, + "internalType": "string" + }, { - "internalType": "address", - "name": "", - "type": "address" + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "anonymous": false }, { - "inputs": [], - "name": "tokenMessenger", - "outputs": [ + "type": "event", + "name": "Unpaused", + "inputs": [ { - "internalType": "contract ITokenMessenger", - "name": "", - "type": "address" + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "anonymous": false }, { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "tokenToSymbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" + "type": "error", + "name": "CCTPGasRescueFailed", + "inputs": [] }, { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "type": "error", + "name": "CCTPIncorrectChainId", + "inputs": [] }, { - "inputs": [], - "name": "unpauseSending", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "type": "error", + "name": "CCTPIncorrectConfig", + "inputs": [] }, { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "withdrawProtocolFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "type": "error", + "name": "CCTPIncorrectDomain", + "inputs": [] }, { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "withdrawRelayerFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "type": "error", + "name": "CCTPIncorrectGasAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectProtocolFee", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectTokenAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPInsufficientAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPMessageNotReceived", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPSymbolAlreadyAdded", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPSymbolIncorrect", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPTokenAlreadyAdded", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPTokenNotFound", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPZeroAddress", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPZeroAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CastOverflow", + "inputs": [] + }, + { + "type": "error", + "name": "ForwarderDeploymentFailed", + "inputs": [] + }, + { + "type": "error", + "name": "IncorrectRequestLength", + "inputs": [] + }, + { + "type": "error", + "name": "RemoteCCTPDeploymentNotSet", + "inputs": [] + }, + { + "type": "error", + "name": "UnknownRequestVersion", + "inputs": [] } ] } \ No newline at end of file diff --git a/deployments/avalanche/SynapseCCTPRouter.json b/deployments/avalanche/SynapseCCTPRouter.json index 16dbbcb6e..f2e719289 100644 --- a/deployments/avalanche/SynapseCCTPRouter.json +++ b/deployments/avalanche/SynapseCCTPRouter.json @@ -1,422 +1,423 @@ { - "address": "0xD359bc471554504f683fbd4f6e36848612349DDF", + "address": "0xd5a597d6e7ddf373a92C8f477DAAA673b0902F48", + "constructorArgs": "0x00000000000000000000000012715a66773bd9c54534a01abf01d05f6b4bd35e", "abi": [ { + "type": "constructor", "inputs": [ { - "internalType": "address", "name": "_synapseCCTP", - "type": "address" + "type": "address", + "internalType": "address" } ], - "stateMutability": "nonpayable", - "type": "constructor" + "stateMutability": "nonpayable" }, { - "inputs": [], - "name": "DeadlineExceeded", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientOutputAmount", - "type": "error" - }, - { - "inputs": [], - "name": "MsgValueIncorrect", - "type": "error" - }, - { - "inputs": [], - "name": "PoolNotFound", - "type": "error" - }, - { - "inputs": [], - "name": "TokenAddressMismatch", - "type": "error" - }, - { - "inputs": [], - "name": "TokenNotContract", - "type": "error" - }, - { - "inputs": [], - "name": "TokenNotETH", - "type": "error" - }, - { - "inputs": [], - "name": "TokensIdentical", - "type": "error" - }, - { - "inputs": [], - "name": "UnknownRequestAction", - "type": "error" + "type": "receive", + "stateMutability": "payable" }, { + "type": "function", + "name": "adapterSwap", "inputs": [ { - "internalType": "address", "name": "recipient", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "address", "name": "tokenIn", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "amountIn", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "address", "name": "tokenOut", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "bytes", "name": "rawParams", - "type": "bytes" + "type": "bytes", + "internalType": "bytes" } ], - "name": "adapterSwap", "outputs": [ { - "internalType": "uint256", "name": "amountOut", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "payable", - "type": "function" + "stateMutability": "payable" }, { + "type": "function", + "name": "bridge", "inputs": [ { - "internalType": "address", "name": "recipient", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "chainId", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "address", "name": "token", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "amount", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { + "name": "originQuery", + "type": "tuple", + "internalType": "struct SwapQuery", "components": [ { - "internalType": "address", "name": "routerAdapter", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "address", "name": "tokenOut", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "minAmountOut", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint256", "name": "deadline", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "bytes", "name": "rawParams", - "type": "bytes" + "type": "bytes", + "internalType": "bytes" } - ], - "internalType": "struct SwapQuery", - "name": "originQuery", - "type": "tuple" + ] }, { + "name": "destQuery", + "type": "tuple", + "internalType": "struct SwapQuery", "components": [ { - "internalType": "address", "name": "routerAdapter", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "address", "name": "tokenOut", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "minAmountOut", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint256", "name": "deadline", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "bytes", "name": "rawParams", - "type": "bytes" + "type": "bytes", + "internalType": "bytes" } - ], - "internalType": "struct SwapQuery", - "name": "destQuery", - "type": "tuple" + ] } ], - "name": "bridge", "outputs": [], - "stateMutability": "payable", - "type": "function" + "stateMutability": "payable" }, { + "type": "function", + "name": "calculateFeeAmount", "inputs": [ { - "internalType": "address", "name": "token", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "amount", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "bool", "name": "isSwap", - "type": "bool" + "type": "bool", + "internalType": "bool" } ], - "name": "calculateFeeAmount", "outputs": [ { - "internalType": "uint256", "name": "fee", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "feeStructures", "inputs": [ { - "internalType": "address", "name": "token", - "type": "address" + "type": "address", + "internalType": "address" } ], - "name": "feeStructures", "outputs": [ { - "internalType": "uint40", "name": "relayerFee", - "type": "uint40" + "type": "uint40", + "internalType": "uint40" }, { - "internalType": "uint72", "name": "minBaseFee", - "type": "uint72" + "type": "uint72", + "internalType": "uint72" }, { - "internalType": "uint72", "name": "minSwapFee", - "type": "uint72" + "type": "uint72", + "internalType": "uint72" }, { - "internalType": "uint72", "name": "maxFee", - "type": "uint72" + "type": "uint72", + "internalType": "uint72" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "getConnectedBridgeTokens", "inputs": [ { - "internalType": "address", "name": "tokenOut", - "type": "address" + "type": "address", + "internalType": "address" } ], - "name": "getConnectedBridgeTokens", "outputs": [ { + "name": "tokens", + "type": "tuple[]", + "internalType": "struct BridgeToken[]", "components": [ { - "internalType": "string", "name": "symbol", - "type": "string" + "type": "string", + "internalType": "string" }, { - "internalType": "address", "name": "token", - "type": "address" + "type": "address", + "internalType": "address" } - ], - "internalType": "struct BridgeToken[]", - "name": "tokens", - "type": "tuple[]" + ] } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "getDestinationAmountOut", "inputs": [ { + "name": "requests", + "type": "tuple[]", + "internalType": "struct DestRequest[]", "components": [ { - "internalType": "string", "name": "symbol", - "type": "string" + "type": "string", + "internalType": "string" }, { - "internalType": "uint256", "name": "amountIn", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } - ], - "internalType": "struct DestRequest[]", - "name": "requests", - "type": "tuple[]" + ] }, { - "internalType": "address", "name": "tokenOut", - "type": "address" + "type": "address", + "internalType": "address" } ], - "name": "getDestinationAmountOut", "outputs": [ { + "name": "destQueries", + "type": "tuple[]", + "internalType": "struct SwapQuery[]", "components": [ { - "internalType": "address", "name": "routerAdapter", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "address", "name": "tokenOut", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "minAmountOut", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint256", "name": "deadline", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "bytes", "name": "rawParams", - "type": "bytes" + "type": "bytes", + "internalType": "bytes" } - ], - "internalType": "struct SwapQuery[]", - "name": "destQueries", - "type": "tuple[]" + ] } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "getOriginAmountOut", "inputs": [ { - "internalType": "address", "name": "tokenIn", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "string[]", "name": "tokenSymbols", - "type": "string[]" + "type": "string[]", + "internalType": "string[]" }, { - "internalType": "uint256", "name": "amountIn", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } ], - "name": "getOriginAmountOut", "outputs": [ { + "name": "originQueries", + "type": "tuple[]", + "internalType": "struct SwapQuery[]", "components": [ { - "internalType": "address", "name": "routerAdapter", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "address", "name": "tokenOut", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "minAmountOut", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint256", "name": "deadline", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "bytes", "name": "rawParams", - "type": "bytes" + "type": "bytes", + "internalType": "bytes" } - ], - "internalType": "struct SwapQuery[]", - "name": "originQueries", - "type": "tuple[]" + ] } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { - "inputs": [], + "type": "function", "name": "synapseCCTP", + "inputs": [], "outputs": [ { - "internalType": "address", "name": "", - "type": "address" + "type": "address", + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { - "stateMutability": "payable", - "type": "receive" + "type": "error", + "name": "DeadlineExceeded", + "inputs": [] + }, + { + "type": "error", + "name": "InsufficientOutputAmount", + "inputs": [] + }, + { + "type": "error", + "name": "MsgValueIncorrect", + "inputs": [] + }, + { + "type": "error", + "name": "PoolNotFound", + "inputs": [] + }, + { + "type": "error", + "name": "TokenAddressMismatch", + "inputs": [] + }, + { + "type": "error", + "name": "TokenNotContract", + "inputs": [] + }, + { + "type": "error", + "name": "TokenNotETH", + "inputs": [] + }, + { + "type": "error", + "name": "TokensIdentical", + "inputs": [] + }, + { + "type": "error", + "name": "UnknownRequestAction", + "inputs": [] } ] } \ No newline at end of file diff --git a/deployments/avalanche/TransparentUpgradeableProxy.SynapseCCTP.json b/deployments/avalanche/TransparentUpgradeableProxy.SynapseCCTP.json new file mode 100644 index 000000000..eb8c41411 --- /dev/null +++ b/deployments/avalanche/TransparentUpgradeableProxy.SynapseCCTP.json @@ -0,0 +1,80 @@ +{ + "address": "0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E", + "constructorArgs": "0x000000000000000000000000e7794fefeec6408b695376c46a53e6621f99ccdc000000000000000000000000da6fe8a7b991f8469bf370883b16f572a98963f400000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000024c4d66de80000000000000000000000000fea3e5840334fc758a3decf14546bfdfbef5cd300000000000000000000000000000000000000000000000000000000", + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "_logic", + "type": "address", + "internalType": "address" + }, + { + "name": "admin_", + "type": "address", + "internalType": "address" + }, + { + "name": "_data", + "type": "bytes", + "internalType": "bytes" + } + ], + "stateMutability": "payable" + }, + { + "type": "fallback", + "stateMutability": "payable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "event", + "name": "AdminChanged", + "inputs": [ + { + "name": "previousAdmin", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "newAdmin", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "BeaconUpgraded", + "inputs": [ + { + "name": "beacon", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Upgraded", + "inputs": [ + { + "name": "implementation", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/deployments/base/ProxyAdmin.SynapseCCTP.json b/deployments/base/ProxyAdmin.SynapseCCTP.json new file mode 100644 index 000000000..0141c2611 --- /dev/null +++ b/deployments/base/ProxyAdmin.SynapseCCTP.json @@ -0,0 +1,155 @@ +{ + "address": "0xe7794fEfeec6408b695376C46A53e6621f99ccdc", + "constructorArgs": "0x", + "abi": [ + { + "type": "function", + "name": "changeProxyAdmin", + "inputs": [ + { + "name": "proxy", + "type": "address", + "internalType": "contract ITransparentUpgradeableProxy" + }, + { + "name": "newAdmin", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getProxyAdmin", + "inputs": [ + { + "name": "proxy", + "type": "address", + "internalType": "contract ITransparentUpgradeableProxy" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getProxyImplementation", + "inputs": [ + { + "name": "proxy", + "type": "address", + "internalType": "contract ITransparentUpgradeableProxy" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { + "name": "newOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "upgrade", + "inputs": [ + { + "name": "proxy", + "type": "address", + "internalType": "contract ITransparentUpgradeableProxy" + }, + { + "name": "implementation", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "upgradeAndCall", + "inputs": [ + { + "name": "proxy", + "type": "address", + "internalType": "contract ITransparentUpgradeableProxy" + }, + { + "name": "implementation", + "type": "address", + "internalType": "address" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/deployments/base/SynapseCCTP.Implementation.json b/deployments/base/SynapseCCTP.Implementation.json new file mode 100644 index 000000000..84f62f360 --- /dev/null +++ b/deployments/base/SynapseCCTP.Implementation.json @@ -0,0 +1,1155 @@ +{ + "address": "0x1381932Af0C50D59A9088D9667e154b1582A29dE", + "constructorArgs": "0x0000000000000000000000001682ae6375c4e4a97e4b583bc394c861a46d8962", + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "tokenMessenger_", + "type": "address", + "internalType": "contract ITokenMessenger" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "accumulatedFees", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "addToken", + "inputs": [ + { + "name": "symbol", + "type": "string", + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "relayerFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minBaseFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minSwapFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxFee", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "calculateFeeAmount", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "isSwap", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [ + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "chainGasAmount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "circleTokenPool", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "feeStructures", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "relayerFee", + "type": "uint40", + "internalType": "uint40" + }, + { + "name": "minBaseFee", + "type": "uint72", + "internalType": "uint72" + }, + { + "name": "minSwapFee", + "type": "uint72", + "internalType": "uint72" + }, + { + "name": "maxFee", + "type": "uint72", + "internalType": "uint72" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getBridgeTokens", + "inputs": [], + "outputs": [ + { + "name": "bridgeTokens", + "type": "tuple[]", + "internalType": "struct BridgeToken[]", + "components": [ + { + "name": "symbol", + "type": "string", + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getLocalToken", + "inputs": [ + { + "name": "remoteDomain", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "remoteToken", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "owner_", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isRequestFulfilled", + "inputs": [ + { + "name": "requestID", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "localDomain", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint32", + "internalType": "uint32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "messageTransmitter", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IMessageTransmitter" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pauseSending", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "protocolFee", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "receiveCircleToken", + "inputs": [ + { + "name": "message", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "signature", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "requestVersion", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "formattedRequest", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "relayerFeeCollectors", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "remoteDomainConfig", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "domain", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "synapseCCTP", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "removeToken", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "rescueGas", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "sendCircleToken", + "inputs": [ + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "burnToken", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "requestVersion", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "swapParams", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setChainGasAmount", + "inputs": [ + { + "name": "newChainGasAmount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setCircleTokenPool", + "inputs": [ + { + "name": "circleToken", + "type": "address", + "internalType": "address" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setFeeCollector", + "inputs": [ + { + "name": "feeCollector", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setProtocolFee", + "inputs": [ + { + "name": "newProtocolFee", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setRemoteDomainConfig", + "inputs": [ + { + "name": "remoteChainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "remoteDomain", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "remoteSynapseCCTP", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setTokenFee", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "relayerFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minBaseFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minSwapFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxFee", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "symbolToToken", + "inputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "tokenMessenger", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract ITokenMessenger" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "tokenToSymbol", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { + "name": "newOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "unpauseSending", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawProtocolFees", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawRelayerFees", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "ChainGasAirdropped", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ChainGasAmountUpdated", + "inputs": [ + { + "name": "chainGasAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "CircleRequestFulfilled", + "inputs": [ + { + "name": "originDomain", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + }, + { + "name": "recipient", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "mintToken", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "requestID", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "CircleRequestSent", + "inputs": [ + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "nonce", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "requestVersion", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + }, + { + "name": "formattedRequest", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + }, + { + "name": "requestID", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "CircleTokenPoolSet", + "inputs": [ + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "FeeCollected", + "inputs": [ + { + "name": "feeCollector", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "relayerFeeAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "protocolFeeAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "FeeCollectorUpdated", + "inputs": [ + { + "name": "relayer", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "oldFeeCollector", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "newFeeCollector", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "FeesWithdrawn", + "inputs": [ + { + "name": "recipient", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProtocolFeeUpdated", + "inputs": [ + { + "name": "newProtocolFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RemoteDomainConfigSet", + "inputs": [ + { + "name": "remoteChainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "remoteDomain", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + }, + { + "name": "remoteSynapseCCTP", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenAdded", + "inputs": [ + { + "name": "symbol", + "type": "string", + "indexed": false, + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenFeeSet", + "inputs": [ + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "relayerFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "minBaseFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "minSwapFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "maxFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRemoved", + "inputs": [ + { + "name": "symbol", + "type": "string", + "indexed": false, + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "CCTPGasRescueFailed", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectChainId", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectConfig", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectDomain", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectGasAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectProtocolFee", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectTokenAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPInsufficientAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPMessageNotReceived", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPSymbolAlreadyAdded", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPSymbolIncorrect", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPTokenAlreadyAdded", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPTokenNotFound", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPZeroAddress", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPZeroAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CastOverflow", + "inputs": [] + }, + { + "type": "error", + "name": "ForwarderDeploymentFailed", + "inputs": [] + }, + { + "type": "error", + "name": "IncorrectRequestLength", + "inputs": [] + }, + { + "type": "error", + "name": "RemoteCCTPDeploymentNotSet", + "inputs": [] + }, + { + "type": "error", + "name": "UnknownRequestVersion", + "inputs": [] + } + ] +} \ No newline at end of file diff --git a/deployments/base/SynapseCCTP.json b/deployments/base/SynapseCCTP.json index dbe4faf41..c3340d3df 100644 --- a/deployments/base/SynapseCCTP.json +++ b/deployments/base/SynapseCCTP.json @@ -1,998 +1,1155 @@ { - "address": "0xfB2Bfc368a7edfD51aa2cbEC513ad50edEa74E84", - "constructorArgs": "0x0000000000000000000000001682ae6375c4e4a97e4b583bc394c861a46d89620000000000000000000000000fea3e5840334fc758a3decf14546bfdfbef5cd3", + "address": "0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E", + "constructorArgs": "0x0000000000000000000000001682ae6375c4e4a97e4b583bc394c861a46d8962", "abi": [ { + "type": "constructor", "inputs": [ { - "internalType": "contract ITokenMessenger", "name": "tokenMessenger_", - "type": "address" - }, - { - "internalType": "address", - "name": "owner_", - "type": "address" + "type": "address", + "internalType": "contract ITokenMessenger" } ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "CCTPGasRescueFailed", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPIncorrectChainId", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPIncorrectConfig", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPIncorrectDomain", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPIncorrectGasAmount", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPIncorrectProtocolFee", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPInsufficientAmount", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPMessageNotReceived", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPSymbolAlreadyAdded", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPSymbolIncorrect", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPTokenAlreadyAdded", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPTokenNotFound", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPZeroAddress", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPZeroAmount", - "type": "error" - }, - { - "inputs": [], - "name": "CastOverflow", - "type": "error" + "stateMutability": "nonpayable" }, { - "inputs": [], - "name": "ForwarderDeploymentFailed", - "type": "error" - }, - { - "inputs": [], - "name": "IncorrectRequestLength", - "type": "error" - }, - { - "inputs": [], - "name": "RemoteCCTPDeploymentNotSet", - "type": "error" - }, - { - "inputs": [], - "name": "UnknownRequestVersion", - "type": "error" - }, - { - "anonymous": false, + "type": "function", + "name": "accumulatedFees", "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "address", + "internalType": "address" } ], - "name": "ChainGasAirdropped", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "outputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "chainGasAmount", - "type": "uint256" + "name": "", + "type": "uint256", + "internalType": "uint256" } ], - "name": "ChainGasAmountUpdated", - "type": "event" + "stateMutability": "view" }, { - "anonymous": false, + "type": "function", + "name": "addToken", "inputs": [ { - "indexed": false, - "internalType": "uint32", - "name": "originDomain", - "type": "uint32" - }, - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" + "name": "symbol", + "type": "string", + "internalType": "string" }, { - "indexed": false, - "internalType": "address", - "name": "mintToken", - "type": "address" + "name": "token", + "type": "address", + "internalType": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" + "name": "relayerFee", + "type": "uint256", + "internalType": "uint256" }, { - "indexed": false, - "internalType": "address", - "name": "token", - "type": "address" + "name": "minBaseFee", + "type": "uint256", + "internalType": "uint256" }, { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" + "name": "minSwapFee", + "type": "uint256", + "internalType": "uint256" }, { - "indexed": false, - "internalType": "bytes32", - "name": "requestID", - "type": "bytes32" + "name": "maxFee", + "type": "uint256", + "internalType": "uint256" } ], - "name": "CircleRequestFulfilled", - "type": "event" + "outputs": [], + "stateMutability": "nonpayable" }, { - "anonymous": false, + "type": "function", + "name": "calculateFeeAmount", "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "nonce", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "address", "name": "token", - "type": "address" + "type": "address", + "internalType": "address" }, { - "indexed": false, - "internalType": "uint256", "name": "amount", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "indexed": false, - "internalType": "uint32", - "name": "requestVersion", - "type": "uint32" - }, + "name": "isSwap", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [ { - "indexed": false, - "internalType": "bytes", - "name": "formattedRequest", - "type": "bytes" - }, + "name": "fee", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "chainGasAmount", + "inputs": [], + "outputs": [ { - "indexed": false, - "internalType": "bytes32", - "name": "requestID", - "type": "bytes32" + "name": "", + "type": "uint256", + "internalType": "uint256" } ], - "name": "CircleRequestSent", - "type": "event" + "stateMutability": "view" }, { - "anonymous": false, + "type": "function", + "name": "circleTokenPool", "inputs": [ { - "indexed": false, - "internalType": "address", - "name": "feeCollector", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "relayerFeeAmount", - "type": "uint256" - }, + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "protocolFeeAmount", - "type": "uint256" + "name": "", + "type": "address", + "internalType": "address" } ], - "name": "FeeCollected", - "type": "event" + "stateMutability": "view" }, { - "anonymous": false, + "type": "function", + "name": "feeStructures", "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "relayer", - "type": "address" + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "relayerFee", + "type": "uint40", + "internalType": "uint40" }, { - "indexed": false, - "internalType": "address", - "name": "oldFeeCollector", - "type": "address" + "name": "minBaseFee", + "type": "uint72", + "internalType": "uint72" }, { - "indexed": false, - "internalType": "address", - "name": "newFeeCollector", - "type": "address" + "name": "minSwapFee", + "type": "uint72", + "internalType": "uint72" + }, + { + "name": "maxFee", + "type": "uint72", + "internalType": "uint72" } ], - "name": "FeeCollectorUpdated", - "type": "event" + "stateMutability": "view" + }, + { + "type": "function", + "name": "getBridgeTokens", + "inputs": [], + "outputs": [ + { + "name": "bridgeTokens", + "type": "tuple[]", + "internalType": "struct BridgeToken[]", + "components": [ + { + "name": "symbol", + "type": "string", + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + } + ], + "stateMutability": "view" }, { - "anonymous": false, + "type": "function", + "name": "getLocalToken", "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" + "name": "remoteDomain", + "type": "uint32", + "internalType": "uint32" }, { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" + "name": "remoteToken", + "type": "address", + "internalType": "address" } ], - "name": "OwnershipTransferred", - "type": "event" + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" }, { - "anonymous": false, + "type": "function", + "name": "initialize", "inputs": [ { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" + "name": "owner_", + "type": "address", + "internalType": "address" } ], - "name": "Paused", - "type": "event" + "outputs": [], + "stateMutability": "nonpayable" }, { - "anonymous": false, + "type": "function", + "name": "isRequestFulfilled", "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "newProtocolFee", - "type": "uint256" + "name": "requestID", + "type": "bytes32", + "internalType": "bytes32" } ], - "name": "ProtocolFeeUpdated", - "type": "event" + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" }, { - "anonymous": false, - "inputs": [ + "type": "function", + "name": "localDomain", + "inputs": [], + "outputs": [ { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" + "name": "", + "type": "uint32", + "internalType": "uint32" } ], - "name": "Unpaused", - "type": "event" + "stateMutability": "view" }, { - "inputs": [ + "type": "function", + "name": "messageTransmitter", + "inputs": [], + "outputs": [ { - "internalType": "address", "name": "", - "type": "address" - }, + "type": "address", + "internalType": "contract IMessageTransmitter" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ { - "internalType": "address", "name": "", - "type": "address" + "type": "address", + "internalType": "address" } ], - "name": "accumulatedFees", + "stateMutability": "view" + }, + { + "type": "function", + "name": "pauseSending", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "protocolFee", + "inputs": [], "outputs": [ { - "internalType": "uint256", "name": "", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "receiveCircleToken", "inputs": [ { - "internalType": "string", - "name": "symbol", - "type": "string" + "name": "message", + "type": "bytes", + "internalType": "bytes" }, { - "internalType": "address", - "name": "token", - "type": "address" + "name": "signature", + "type": "bytes", + "internalType": "bytes" }, { - "internalType": "uint256", - "name": "relayerFee", - "type": "uint256" + "name": "requestVersion", + "type": "uint32", + "internalType": "uint32" }, { - "internalType": "uint256", - "name": "minBaseFee", - "type": "uint256" - }, + "name": "formattedRequest", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "relayerFeeCollectors", + "inputs": [ { - "internalType": "uint256", - "name": "minSwapFee", - "type": "uint256" + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "remoteDomainConfig", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "domain", + "type": "uint32", + "internalType": "uint32" }, { - "internalType": "uint256", - "name": "maxFee", - "type": "uint256" + "name": "synapseCCTP", + "type": "address", + "internalType": "address" } ], - "name": "addToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "removeToken", "inputs": [ { - "internalType": "address", "name": "token", - "type": "address" + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "rescueGas", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "sendCircleToken", + "inputs": [ + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "burnToken", + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "amount", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "bool", - "name": "isSwap", - "type": "bool" + "name": "requestVersion", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "swapParams", + "type": "bytes", + "internalType": "bytes" } ], - "name": "calculateFeeAmount", - "outputs": [ + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setChainGasAmount", + "inputs": [ { - "internalType": "uint256", - "name": "fee", - "type": "uint256" + "name": "newChainGasAmount", + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { - "inputs": [], - "name": "chainGasAmount", - "outputs": [ + "type": "function", + "name": "setCircleTokenPool", + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "name": "circleToken", + "type": "address", + "internalType": "address" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "setFeeCollector", "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" + "name": "feeCollector", + "type": "address", + "internalType": "address" } ], - "name": "circleTokenPool", - "outputs": [ + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setProtocolFee", + "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" + "name": "newProtocolFee", + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "setRemoteDomainConfig", "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" + "name": "remoteChainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "remoteDomain", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "remoteSynapseCCTP", + "type": "address", + "internalType": "address" } ], - "name": "feeStructures", - "outputs": [ + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setTokenFee", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, { - "internalType": "uint40", "name": "relayerFee", - "type": "uint40" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint72", "name": "minBaseFee", - "type": "uint72" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint72", "name": "minSwapFee", - "type": "uint72" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint72", "name": "maxFee", - "type": "uint72" + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { - "inputs": [], - "name": "getBridgeTokens", - "outputs": [ + "type": "function", + "name": "symbolToToken", + "inputs": [ { - "components": [ - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "internalType": "struct BridgeToken[]", - "name": "bridgeTokens", - "type": "tuple[]" + "name": "", + "type": "string", + "internalType": "string" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "remoteDomain", - "type": "uint32" - }, + "outputs": [ { - "internalType": "address", - "name": "remoteToken", - "type": "address" + "name": "", + "type": "address", + "internalType": "address" } ], - "name": "getLocalToken", + "stateMutability": "view" + }, + { + "type": "function", + "name": "tokenMessenger", + "inputs": [], "outputs": [ { - "internalType": "address", "name": "", - "type": "address" + "type": "address", + "internalType": "contract ITokenMessenger" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "tokenToSymbol", "inputs": [ { - "internalType": "bytes32", - "name": "requestID", - "type": "bytes32" + "name": "", + "type": "address", + "internalType": "address" } ], - "name": "isRequestFulfilled", "outputs": [ { - "internalType": "bool", "name": "", - "type": "bool" + "type": "string", + "internalType": "string" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { - "inputs": [], - "name": "localDomain", - "outputs": [ + "type": "function", + "name": "transferOwnership", + "inputs": [ { - "internalType": "uint32", - "name": "", - "type": "uint32" + "name": "newOwner", + "type": "address", + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "unpauseSending", "inputs": [], - "name": "messageTransmitter", - "outputs": [ + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawProtocolFees", + "inputs": [ { - "internalType": "contract IMessageTransmitter", - "name": "", - "type": "address" + "name": "token", + "type": "address", + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { - "inputs": [], - "name": "owner", - "outputs": [ + "type": "function", + "name": "withdrawRelayerFees", + "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" + "name": "token", + "type": "address", + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { - "inputs": [], - "name": "pauseSending", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "type": "event", + "name": "ChainGasAirdropped", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false }, { - "inputs": [], - "name": "paused", - "outputs": [ + "type": "event", + "name": "ChainGasAmountUpdated", + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "name": "chainGasAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "anonymous": false }, { - "inputs": [], - "name": "protocolFee", - "outputs": [ + "type": "event", + "name": "CircleRequestFulfilled", + "inputs": [ + { + "name": "originDomain", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + }, + { + "name": "recipient", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "mintToken", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "requestID", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" } ], - "stateMutability": "view", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "CircleRequestSent", "inputs": [ { - "internalType": "bytes", - "name": "message", - "type": "bytes" + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "internalType": "bytes", - "name": "signature", - "type": "bytes" + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "nonce", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "internalType": "uint32", "name": "requestVersion", - "type": "uint32" + "type": "uint32", + "indexed": false, + "internalType": "uint32" }, { - "internalType": "bytes", "name": "formattedRequest", - "type": "bytes" + "type": "bytes", + "indexed": false, + "internalType": "bytes" + }, + { + "name": "requestID", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" } ], - "name": "receiveCircleToken", - "outputs": [], - "stateMutability": "payable", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "CircleTokenPoolSet", "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "relayerFeeCollectors", - "outputs": [ + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, { - "internalType": "address", - "name": "", - "type": "address" + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "FeeCollected", "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "remoteDomainConfig", - "outputs": [ + "name": "feeCollector", + "type": "address", + "indexed": false, + "internalType": "address" + }, { - "internalType": "uint32", - "name": "domain", - "type": "uint32" + "name": "relayerFeeAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "internalType": "address", - "name": "synapseCCTP", - "type": "address" + "name": "protocolFeeAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "FeeCollectorUpdated", "inputs": [ { - "internalType": "address", - "name": "token", - "type": "address" + "name": "relayer", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "oldFeeCollector", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "newFeeCollector", + "type": "address", + "indexed": false, + "internalType": "address" } ], - "name": "removeToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "rescueGas", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "FeesWithdrawn", "inputs": [ { - "internalType": "address", "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" + "type": "address", + "indexed": false, + "internalType": "address" }, { - "internalType": "address", - "name": "burnToken", - "type": "address" + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" }, { - "internalType": "uint256", "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint32", - "name": "requestVersion", - "type": "uint32" - }, - { - "internalType": "bytes", - "name": "swapParams", - "type": "bytes" - } - ], - "name": "sendCircleToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newChainGasAmount", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], - "name": "setChainGasAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "OwnershipTransferred", "inputs": [ { - "internalType": "address", - "name": "circleToken", - "type": "address" + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" }, { - "internalType": "address", - "name": "pool", - "type": "address" + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" } ], - "name": "setCircleTokenPool", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "Paused", "inputs": [ { - "internalType": "address", - "name": "feeCollector", - "type": "address" + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" } ], - "name": "setFeeCollector", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "ProtocolFeeUpdated", "inputs": [ { - "internalType": "uint256", "name": "newProtocolFee", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], - "name": "setProtocolFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "RemoteDomainConfigSet", "inputs": [ { - "internalType": "uint256", "name": "remoteChainId", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "internalType": "uint32", "name": "remoteDomain", - "type": "uint32" + "type": "uint32", + "indexed": false, + "internalType": "uint32" }, { - "internalType": "address", "name": "remoteSynapseCCTP", - "type": "address" + "type": "address", + "indexed": false, + "internalType": "address" } ], - "name": "setRemoteDomainConfig", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false + }, + { + "type": "event", + "name": "TokenAdded", + "inputs": [ + { + "name": "symbol", + "type": "string", + "indexed": false, + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false }, { + "type": "event", + "name": "TokenFeeSet", "inputs": [ { - "internalType": "address", "name": "token", - "type": "address" + "type": "address", + "indexed": false, + "internalType": "address" }, { - "internalType": "uint256", "name": "relayerFee", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "internalType": "uint256", "name": "minBaseFee", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "internalType": "uint256", "name": "minSwapFee", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "internalType": "uint256", "name": "maxFee", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], - "name": "setTokenFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "TokenRemoved", "inputs": [ { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "name": "symbolToToken", - "outputs": [ + "name": "symbol", + "type": "string", + "indexed": false, + "internalType": "string" + }, { - "internalType": "address", - "name": "", - "type": "address" + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "anonymous": false }, { - "inputs": [], - "name": "tokenMessenger", - "outputs": [ + "type": "event", + "name": "Unpaused", + "inputs": [ { - "internalType": "contract ITokenMessenger", - "name": "", - "type": "address" + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "anonymous": false }, { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "tokenToSymbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" + "type": "error", + "name": "CCTPGasRescueFailed", + "inputs": [] }, { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "type": "error", + "name": "CCTPIncorrectChainId", + "inputs": [] }, { - "inputs": [], - "name": "unpauseSending", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "type": "error", + "name": "CCTPIncorrectConfig", + "inputs": [] }, { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "withdrawProtocolFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "type": "error", + "name": "CCTPIncorrectDomain", + "inputs": [] }, { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "withdrawRelayerFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "type": "error", + "name": "CCTPIncorrectGasAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectProtocolFee", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectTokenAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPInsufficientAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPMessageNotReceived", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPSymbolAlreadyAdded", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPSymbolIncorrect", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPTokenAlreadyAdded", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPTokenNotFound", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPZeroAddress", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPZeroAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CastOverflow", + "inputs": [] + }, + { + "type": "error", + "name": "ForwarderDeploymentFailed", + "inputs": [] + }, + { + "type": "error", + "name": "IncorrectRequestLength", + "inputs": [] + }, + { + "type": "error", + "name": "RemoteCCTPDeploymentNotSet", + "inputs": [] + }, + { + "type": "error", + "name": "UnknownRequestVersion", + "inputs": [] } ] } \ No newline at end of file diff --git a/deployments/base/SynapseCCTPRouter.json b/deployments/base/SynapseCCTPRouter.json index 569e8f3d5..f2e719289 100644 --- a/deployments/base/SynapseCCTPRouter.json +++ b/deployments/base/SynapseCCTPRouter.json @@ -1,423 +1,423 @@ { - "address": "0xD359bc471554504f683fbd4f6e36848612349DDF", - "constructorArgs": "0x000000000000000000000000fb2bfc368a7edfd51aa2cbec513ad50edea74e84", + "address": "0xd5a597d6e7ddf373a92C8f477DAAA673b0902F48", + "constructorArgs": "0x00000000000000000000000012715a66773bd9c54534a01abf01d05f6b4bd35e", "abi": [ { + "type": "constructor", "inputs": [ { - "internalType": "address", "name": "_synapseCCTP", - "type": "address" + "type": "address", + "internalType": "address" } ], - "stateMutability": "nonpayable", - "type": "constructor" + "stateMutability": "nonpayable" }, { - "inputs": [], - "name": "DeadlineExceeded", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientOutputAmount", - "type": "error" - }, - { - "inputs": [], - "name": "MsgValueIncorrect", - "type": "error" - }, - { - "inputs": [], - "name": "PoolNotFound", - "type": "error" - }, - { - "inputs": [], - "name": "TokenAddressMismatch", - "type": "error" - }, - { - "inputs": [], - "name": "TokenNotContract", - "type": "error" - }, - { - "inputs": [], - "name": "TokenNotETH", - "type": "error" - }, - { - "inputs": [], - "name": "TokensIdentical", - "type": "error" - }, - { - "inputs": [], - "name": "UnknownRequestAction", - "type": "error" + "type": "receive", + "stateMutability": "payable" }, { + "type": "function", + "name": "adapterSwap", "inputs": [ { - "internalType": "address", "name": "recipient", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "address", "name": "tokenIn", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "amountIn", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "address", "name": "tokenOut", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "bytes", "name": "rawParams", - "type": "bytes" + "type": "bytes", + "internalType": "bytes" } ], - "name": "adapterSwap", "outputs": [ { - "internalType": "uint256", "name": "amountOut", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "payable", - "type": "function" + "stateMutability": "payable" }, { + "type": "function", + "name": "bridge", "inputs": [ { - "internalType": "address", "name": "recipient", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "chainId", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "address", "name": "token", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "amount", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { + "name": "originQuery", + "type": "tuple", + "internalType": "struct SwapQuery", "components": [ { - "internalType": "address", "name": "routerAdapter", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "address", "name": "tokenOut", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "minAmountOut", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint256", "name": "deadline", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "bytes", "name": "rawParams", - "type": "bytes" + "type": "bytes", + "internalType": "bytes" } - ], - "internalType": "struct SwapQuery", - "name": "originQuery", - "type": "tuple" + ] }, { + "name": "destQuery", + "type": "tuple", + "internalType": "struct SwapQuery", "components": [ { - "internalType": "address", "name": "routerAdapter", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "address", "name": "tokenOut", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "minAmountOut", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint256", "name": "deadline", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "bytes", "name": "rawParams", - "type": "bytes" + "type": "bytes", + "internalType": "bytes" } - ], - "internalType": "struct SwapQuery", - "name": "destQuery", - "type": "tuple" + ] } ], - "name": "bridge", "outputs": [], - "stateMutability": "payable", - "type": "function" + "stateMutability": "payable" }, { + "type": "function", + "name": "calculateFeeAmount", "inputs": [ { - "internalType": "address", "name": "token", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "amount", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "bool", "name": "isSwap", - "type": "bool" + "type": "bool", + "internalType": "bool" } ], - "name": "calculateFeeAmount", "outputs": [ { - "internalType": "uint256", "name": "fee", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "feeStructures", "inputs": [ { - "internalType": "address", "name": "token", - "type": "address" + "type": "address", + "internalType": "address" } ], - "name": "feeStructures", "outputs": [ { - "internalType": "uint40", "name": "relayerFee", - "type": "uint40" + "type": "uint40", + "internalType": "uint40" }, { - "internalType": "uint72", "name": "minBaseFee", - "type": "uint72" + "type": "uint72", + "internalType": "uint72" }, { - "internalType": "uint72", "name": "minSwapFee", - "type": "uint72" + "type": "uint72", + "internalType": "uint72" }, { - "internalType": "uint72", "name": "maxFee", - "type": "uint72" + "type": "uint72", + "internalType": "uint72" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "getConnectedBridgeTokens", "inputs": [ { - "internalType": "address", "name": "tokenOut", - "type": "address" + "type": "address", + "internalType": "address" } ], - "name": "getConnectedBridgeTokens", "outputs": [ { + "name": "tokens", + "type": "tuple[]", + "internalType": "struct BridgeToken[]", "components": [ { - "internalType": "string", "name": "symbol", - "type": "string" + "type": "string", + "internalType": "string" }, { - "internalType": "address", "name": "token", - "type": "address" + "type": "address", + "internalType": "address" } - ], - "internalType": "struct BridgeToken[]", - "name": "tokens", - "type": "tuple[]" + ] } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "getDestinationAmountOut", "inputs": [ { + "name": "requests", + "type": "tuple[]", + "internalType": "struct DestRequest[]", "components": [ { - "internalType": "string", "name": "symbol", - "type": "string" + "type": "string", + "internalType": "string" }, { - "internalType": "uint256", "name": "amountIn", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } - ], - "internalType": "struct DestRequest[]", - "name": "requests", - "type": "tuple[]" + ] }, { - "internalType": "address", "name": "tokenOut", - "type": "address" + "type": "address", + "internalType": "address" } ], - "name": "getDestinationAmountOut", "outputs": [ { + "name": "destQueries", + "type": "tuple[]", + "internalType": "struct SwapQuery[]", "components": [ { - "internalType": "address", "name": "routerAdapter", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "address", "name": "tokenOut", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "minAmountOut", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint256", "name": "deadline", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "bytes", "name": "rawParams", - "type": "bytes" + "type": "bytes", + "internalType": "bytes" } - ], - "internalType": "struct SwapQuery[]", - "name": "destQueries", - "type": "tuple[]" + ] } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "getOriginAmountOut", "inputs": [ { - "internalType": "address", "name": "tokenIn", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "string[]", "name": "tokenSymbols", - "type": "string[]" + "type": "string[]", + "internalType": "string[]" }, { - "internalType": "uint256", "name": "amountIn", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } ], - "name": "getOriginAmountOut", "outputs": [ { + "name": "originQueries", + "type": "tuple[]", + "internalType": "struct SwapQuery[]", "components": [ { - "internalType": "address", "name": "routerAdapter", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "address", "name": "tokenOut", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "minAmountOut", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint256", "name": "deadline", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "bytes", "name": "rawParams", - "type": "bytes" + "type": "bytes", + "internalType": "bytes" } - ], - "internalType": "struct SwapQuery[]", - "name": "originQueries", - "type": "tuple[]" + ] } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { - "inputs": [], + "type": "function", "name": "synapseCCTP", + "inputs": [], "outputs": [ { - "internalType": "address", "name": "", - "type": "address" + "type": "address", + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { - "stateMutability": "payable", - "type": "receive" + "type": "error", + "name": "DeadlineExceeded", + "inputs": [] + }, + { + "type": "error", + "name": "InsufficientOutputAmount", + "inputs": [] + }, + { + "type": "error", + "name": "MsgValueIncorrect", + "inputs": [] + }, + { + "type": "error", + "name": "PoolNotFound", + "inputs": [] + }, + { + "type": "error", + "name": "TokenAddressMismatch", + "inputs": [] + }, + { + "type": "error", + "name": "TokenNotContract", + "inputs": [] + }, + { + "type": "error", + "name": "TokenNotETH", + "inputs": [] + }, + { + "type": "error", + "name": "TokensIdentical", + "inputs": [] + }, + { + "type": "error", + "name": "UnknownRequestAction", + "inputs": [] } ] } \ No newline at end of file diff --git a/deployments/base/TransparentUpgradeableProxy.SynapseCCTP.json b/deployments/base/TransparentUpgradeableProxy.SynapseCCTP.json new file mode 100644 index 000000000..c27767561 --- /dev/null +++ b/deployments/base/TransparentUpgradeableProxy.SynapseCCTP.json @@ -0,0 +1,80 @@ +{ + "address": "0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E", + "constructorArgs": "0x0000000000000000000000001381932af0c50d59a9088d9667e154b1582a29de000000000000000000000000e7794fefeec6408b695376c46a53e6621f99ccdc00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000024c4d66de80000000000000000000000000fea3e5840334fc758a3decf14546bfdfbef5cd300000000000000000000000000000000000000000000000000000000", + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "_logic", + "type": "address", + "internalType": "address" + }, + { + "name": "admin_", + "type": "address", + "internalType": "address" + }, + { + "name": "_data", + "type": "bytes", + "internalType": "bytes" + } + ], + "stateMutability": "payable" + }, + { + "type": "fallback", + "stateMutability": "payable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "event", + "name": "AdminChanged", + "inputs": [ + { + "name": "previousAdmin", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "newAdmin", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "BeaconUpgraded", + "inputs": [ + { + "name": "beacon", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Upgraded", + "inputs": [ + { + "name": "implementation", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/deployments/mainnet/ProxyAdmin.SynapseCCTP.json b/deployments/mainnet/ProxyAdmin.SynapseCCTP.json new file mode 100644 index 000000000..1b4004c40 --- /dev/null +++ b/deployments/mainnet/ProxyAdmin.SynapseCCTP.json @@ -0,0 +1,155 @@ +{ + "address": "0x6Cd6C5fDE1621053eD4BC7C09ADc76612D8C663f", + "constructorArgs": "0x", + "abi": [ + { + "type": "function", + "name": "changeProxyAdmin", + "inputs": [ + { + "name": "proxy", + "type": "address", + "internalType": "contract ITransparentUpgradeableProxy" + }, + { + "name": "newAdmin", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getProxyAdmin", + "inputs": [ + { + "name": "proxy", + "type": "address", + "internalType": "contract ITransparentUpgradeableProxy" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getProxyImplementation", + "inputs": [ + { + "name": "proxy", + "type": "address", + "internalType": "contract ITransparentUpgradeableProxy" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { + "name": "newOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "upgrade", + "inputs": [ + { + "name": "proxy", + "type": "address", + "internalType": "contract ITransparentUpgradeableProxy" + }, + { + "name": "implementation", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "upgradeAndCall", + "inputs": [ + { + "name": "proxy", + "type": "address", + "internalType": "contract ITransparentUpgradeableProxy" + }, + { + "name": "implementation", + "type": "address", + "internalType": "address" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/deployments/mainnet/SynapseCCTP.Implementation.json b/deployments/mainnet/SynapseCCTP.Implementation.json new file mode 100644 index 000000000..83570b6d7 --- /dev/null +++ b/deployments/mainnet/SynapseCCTP.Implementation.json @@ -0,0 +1,1155 @@ +{ + "address": "0x60Efd4462b3c79dA42167C1b01126e5089D4D0d2", + "constructorArgs": "0x000000000000000000000000bd3fa81b58ba92a82136038b25adec7066af3155", + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "tokenMessenger_", + "type": "address", + "internalType": "contract ITokenMessenger" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "accumulatedFees", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "addToken", + "inputs": [ + { + "name": "symbol", + "type": "string", + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "relayerFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minBaseFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minSwapFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxFee", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "calculateFeeAmount", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "isSwap", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [ + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "chainGasAmount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "circleTokenPool", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "feeStructures", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "relayerFee", + "type": "uint40", + "internalType": "uint40" + }, + { + "name": "minBaseFee", + "type": "uint72", + "internalType": "uint72" + }, + { + "name": "minSwapFee", + "type": "uint72", + "internalType": "uint72" + }, + { + "name": "maxFee", + "type": "uint72", + "internalType": "uint72" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getBridgeTokens", + "inputs": [], + "outputs": [ + { + "name": "bridgeTokens", + "type": "tuple[]", + "internalType": "struct BridgeToken[]", + "components": [ + { + "name": "symbol", + "type": "string", + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getLocalToken", + "inputs": [ + { + "name": "remoteDomain", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "remoteToken", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "owner_", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isRequestFulfilled", + "inputs": [ + { + "name": "requestID", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "localDomain", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint32", + "internalType": "uint32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "messageTransmitter", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IMessageTransmitter" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pauseSending", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "protocolFee", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "receiveCircleToken", + "inputs": [ + { + "name": "message", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "signature", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "requestVersion", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "formattedRequest", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "relayerFeeCollectors", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "remoteDomainConfig", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "domain", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "synapseCCTP", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "removeToken", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "rescueGas", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "sendCircleToken", + "inputs": [ + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "burnToken", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "requestVersion", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "swapParams", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setChainGasAmount", + "inputs": [ + { + "name": "newChainGasAmount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setCircleTokenPool", + "inputs": [ + { + "name": "circleToken", + "type": "address", + "internalType": "address" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setFeeCollector", + "inputs": [ + { + "name": "feeCollector", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setProtocolFee", + "inputs": [ + { + "name": "newProtocolFee", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setRemoteDomainConfig", + "inputs": [ + { + "name": "remoteChainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "remoteDomain", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "remoteSynapseCCTP", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setTokenFee", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "relayerFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minBaseFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minSwapFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxFee", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "symbolToToken", + "inputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "tokenMessenger", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract ITokenMessenger" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "tokenToSymbol", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { + "name": "newOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "unpauseSending", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawProtocolFees", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawRelayerFees", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "ChainGasAirdropped", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ChainGasAmountUpdated", + "inputs": [ + { + "name": "chainGasAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "CircleRequestFulfilled", + "inputs": [ + { + "name": "originDomain", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + }, + { + "name": "recipient", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "mintToken", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "requestID", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "CircleRequestSent", + "inputs": [ + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "nonce", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "requestVersion", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + }, + { + "name": "formattedRequest", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + }, + { + "name": "requestID", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "CircleTokenPoolSet", + "inputs": [ + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "FeeCollected", + "inputs": [ + { + "name": "feeCollector", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "relayerFeeAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "protocolFeeAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "FeeCollectorUpdated", + "inputs": [ + { + "name": "relayer", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "oldFeeCollector", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "newFeeCollector", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "FeesWithdrawn", + "inputs": [ + { + "name": "recipient", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProtocolFeeUpdated", + "inputs": [ + { + "name": "newProtocolFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RemoteDomainConfigSet", + "inputs": [ + { + "name": "remoteChainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "remoteDomain", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + }, + { + "name": "remoteSynapseCCTP", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenAdded", + "inputs": [ + { + "name": "symbol", + "type": "string", + "indexed": false, + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenFeeSet", + "inputs": [ + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "relayerFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "minBaseFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "minSwapFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "maxFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRemoved", + "inputs": [ + { + "name": "symbol", + "type": "string", + "indexed": false, + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "CCTPGasRescueFailed", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectChainId", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectConfig", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectDomain", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectGasAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectProtocolFee", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectTokenAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPInsufficientAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPMessageNotReceived", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPSymbolAlreadyAdded", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPSymbolIncorrect", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPTokenAlreadyAdded", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPTokenNotFound", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPZeroAddress", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPZeroAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CastOverflow", + "inputs": [] + }, + { + "type": "error", + "name": "ForwarderDeploymentFailed", + "inputs": [] + }, + { + "type": "error", + "name": "IncorrectRequestLength", + "inputs": [] + }, + { + "type": "error", + "name": "RemoteCCTPDeploymentNotSet", + "inputs": [] + }, + { + "type": "error", + "name": "UnknownRequestVersion", + "inputs": [] + } + ] +} \ No newline at end of file diff --git a/deployments/mainnet/SynapseCCTP.json b/deployments/mainnet/SynapseCCTP.json index 19e34c756..3006530fe 100644 --- a/deployments/mainnet/SynapseCCTP.json +++ b/deployments/mainnet/SynapseCCTP.json @@ -1,997 +1,1155 @@ { - "address": "0xfB2Bfc368a7edfD51aa2cbEC513ad50edEa74E84", + "address": "0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E", + "constructorArgs": "0x000000000000000000000000bd3fa81b58ba92a82136038b25adec7066af3155", "abi": [ { + "type": "constructor", "inputs": [ { - "internalType": "contract ITokenMessenger", "name": "tokenMessenger_", - "type": "address" - }, - { - "internalType": "address", - "name": "owner_", - "type": "address" + "type": "address", + "internalType": "contract ITokenMessenger" } ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "CCTPGasRescueFailed", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPIncorrectChainId", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPIncorrectConfig", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPIncorrectDomain", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPIncorrectGasAmount", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPIncorrectProtocolFee", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPInsufficientAmount", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPMessageNotReceived", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPSymbolAlreadyAdded", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPSymbolIncorrect", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPTokenAlreadyAdded", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPTokenNotFound", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPZeroAddress", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPZeroAmount", - "type": "error" - }, - { - "inputs": [], - "name": "CastOverflow", - "type": "error" + "stateMutability": "nonpayable" }, { - "inputs": [], - "name": "ForwarderDeploymentFailed", - "type": "error" - }, - { - "inputs": [], - "name": "IncorrectRequestLength", - "type": "error" - }, - { - "inputs": [], - "name": "RemoteCCTPDeploymentNotSet", - "type": "error" - }, - { - "inputs": [], - "name": "UnknownRequestVersion", - "type": "error" - }, - { - "anonymous": false, + "type": "function", + "name": "accumulatedFees", "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "address", + "internalType": "address" } ], - "name": "ChainGasAirdropped", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "outputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "chainGasAmount", - "type": "uint256" + "name": "", + "type": "uint256", + "internalType": "uint256" } ], - "name": "ChainGasAmountUpdated", - "type": "event" + "stateMutability": "view" }, { - "anonymous": false, + "type": "function", + "name": "addToken", "inputs": [ { - "indexed": false, - "internalType": "uint32", - "name": "originDomain", - "type": "uint32" - }, - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" + "name": "symbol", + "type": "string", + "internalType": "string" }, { - "indexed": false, - "internalType": "address", - "name": "mintToken", - "type": "address" + "name": "token", + "type": "address", + "internalType": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" + "name": "relayerFee", + "type": "uint256", + "internalType": "uint256" }, { - "indexed": false, - "internalType": "address", - "name": "token", - "type": "address" + "name": "minBaseFee", + "type": "uint256", + "internalType": "uint256" }, { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" + "name": "minSwapFee", + "type": "uint256", + "internalType": "uint256" }, { - "indexed": false, - "internalType": "bytes32", - "name": "requestID", - "type": "bytes32" + "name": "maxFee", + "type": "uint256", + "internalType": "uint256" } ], - "name": "CircleRequestFulfilled", - "type": "event" + "outputs": [], + "stateMutability": "nonpayable" }, { - "anonymous": false, + "type": "function", + "name": "calculateFeeAmount", "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "nonce", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "address", "name": "token", - "type": "address" + "type": "address", + "internalType": "address" }, { - "indexed": false, - "internalType": "uint256", "name": "amount", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "indexed": false, - "internalType": "uint32", - "name": "requestVersion", - "type": "uint32" - }, + "name": "isSwap", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [ { - "indexed": false, - "internalType": "bytes", - "name": "formattedRequest", - "type": "bytes" - }, + "name": "fee", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "chainGasAmount", + "inputs": [], + "outputs": [ { - "indexed": false, - "internalType": "bytes32", - "name": "requestID", - "type": "bytes32" + "name": "", + "type": "uint256", + "internalType": "uint256" } ], - "name": "CircleRequestSent", - "type": "event" + "stateMutability": "view" }, { - "anonymous": false, + "type": "function", + "name": "circleTokenPool", "inputs": [ { - "indexed": false, - "internalType": "address", - "name": "feeCollector", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "relayerFeeAmount", - "type": "uint256" - }, + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "protocolFeeAmount", - "type": "uint256" + "name": "", + "type": "address", + "internalType": "address" } ], - "name": "FeeCollected", - "type": "event" + "stateMutability": "view" }, { - "anonymous": false, + "type": "function", + "name": "feeStructures", "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "relayer", - "type": "address" + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "relayerFee", + "type": "uint40", + "internalType": "uint40" }, { - "indexed": false, - "internalType": "address", - "name": "oldFeeCollector", - "type": "address" + "name": "minBaseFee", + "type": "uint72", + "internalType": "uint72" }, { - "indexed": false, - "internalType": "address", - "name": "newFeeCollector", - "type": "address" + "name": "minSwapFee", + "type": "uint72", + "internalType": "uint72" + }, + { + "name": "maxFee", + "type": "uint72", + "internalType": "uint72" } ], - "name": "FeeCollectorUpdated", - "type": "event" + "stateMutability": "view" + }, + { + "type": "function", + "name": "getBridgeTokens", + "inputs": [], + "outputs": [ + { + "name": "bridgeTokens", + "type": "tuple[]", + "internalType": "struct BridgeToken[]", + "components": [ + { + "name": "symbol", + "type": "string", + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + } + ], + "stateMutability": "view" }, { - "anonymous": false, + "type": "function", + "name": "getLocalToken", "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" + "name": "remoteDomain", + "type": "uint32", + "internalType": "uint32" }, { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" + "name": "remoteToken", + "type": "address", + "internalType": "address" } ], - "name": "OwnershipTransferred", - "type": "event" + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" }, { - "anonymous": false, + "type": "function", + "name": "initialize", "inputs": [ { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" + "name": "owner_", + "type": "address", + "internalType": "address" } ], - "name": "Paused", - "type": "event" + "outputs": [], + "stateMutability": "nonpayable" }, { - "anonymous": false, + "type": "function", + "name": "isRequestFulfilled", "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "newProtocolFee", - "type": "uint256" + "name": "requestID", + "type": "bytes32", + "internalType": "bytes32" } ], - "name": "ProtocolFeeUpdated", - "type": "event" + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" }, { - "anonymous": false, - "inputs": [ + "type": "function", + "name": "localDomain", + "inputs": [], + "outputs": [ { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" + "name": "", + "type": "uint32", + "internalType": "uint32" } ], - "name": "Unpaused", - "type": "event" + "stateMutability": "view" }, { - "inputs": [ + "type": "function", + "name": "messageTransmitter", + "inputs": [], + "outputs": [ { - "internalType": "address", "name": "", - "type": "address" - }, + "type": "address", + "internalType": "contract IMessageTransmitter" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ { - "internalType": "address", "name": "", - "type": "address" + "type": "address", + "internalType": "address" } ], - "name": "accumulatedFees", + "stateMutability": "view" + }, + { + "type": "function", + "name": "pauseSending", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "protocolFee", + "inputs": [], "outputs": [ { - "internalType": "uint256", "name": "", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "receiveCircleToken", "inputs": [ { - "internalType": "string", - "name": "symbol", - "type": "string" + "name": "message", + "type": "bytes", + "internalType": "bytes" }, { - "internalType": "address", - "name": "token", - "type": "address" + "name": "signature", + "type": "bytes", + "internalType": "bytes" }, { - "internalType": "uint256", - "name": "relayerFee", - "type": "uint256" + "name": "requestVersion", + "type": "uint32", + "internalType": "uint32" }, { - "internalType": "uint256", - "name": "minBaseFee", - "type": "uint256" - }, + "name": "formattedRequest", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "relayerFeeCollectors", + "inputs": [ { - "internalType": "uint256", - "name": "minSwapFee", - "type": "uint256" + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "remoteDomainConfig", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "domain", + "type": "uint32", + "internalType": "uint32" }, { - "internalType": "uint256", - "name": "maxFee", - "type": "uint256" + "name": "synapseCCTP", + "type": "address", + "internalType": "address" } ], - "name": "addToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "removeToken", "inputs": [ { - "internalType": "address", "name": "token", - "type": "address" + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "rescueGas", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "sendCircleToken", + "inputs": [ + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "burnToken", + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "amount", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "bool", - "name": "isSwap", - "type": "bool" + "name": "requestVersion", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "swapParams", + "type": "bytes", + "internalType": "bytes" } ], - "name": "calculateFeeAmount", - "outputs": [ + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setChainGasAmount", + "inputs": [ { - "internalType": "uint256", - "name": "fee", - "type": "uint256" + "name": "newChainGasAmount", + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { - "inputs": [], - "name": "chainGasAmount", - "outputs": [ + "type": "function", + "name": "setCircleTokenPool", + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "name": "circleToken", + "type": "address", + "internalType": "address" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "setFeeCollector", "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" + "name": "feeCollector", + "type": "address", + "internalType": "address" } ], - "name": "circleTokenPool", - "outputs": [ + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setProtocolFee", + "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" + "name": "newProtocolFee", + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "setRemoteDomainConfig", "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" + "name": "remoteChainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "remoteDomain", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "remoteSynapseCCTP", + "type": "address", + "internalType": "address" } ], - "name": "feeStructures", - "outputs": [ + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setTokenFee", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, { - "internalType": "uint40", "name": "relayerFee", - "type": "uint40" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint72", "name": "minBaseFee", - "type": "uint72" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint72", "name": "minSwapFee", - "type": "uint72" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint72", "name": "maxFee", - "type": "uint72" + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { - "inputs": [], - "name": "getBridgeTokens", - "outputs": [ + "type": "function", + "name": "symbolToToken", + "inputs": [ { - "components": [ - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "internalType": "struct BridgeToken[]", - "name": "bridgeTokens", - "type": "tuple[]" + "name": "", + "type": "string", + "internalType": "string" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "remoteDomain", - "type": "uint32" - }, + "outputs": [ { - "internalType": "address", - "name": "remoteToken", - "type": "address" + "name": "", + "type": "address", + "internalType": "address" } ], - "name": "getLocalToken", + "stateMutability": "view" + }, + { + "type": "function", + "name": "tokenMessenger", + "inputs": [], "outputs": [ { - "internalType": "address", "name": "", - "type": "address" + "type": "address", + "internalType": "contract ITokenMessenger" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "tokenToSymbol", "inputs": [ { - "internalType": "bytes32", - "name": "requestID", - "type": "bytes32" + "name": "", + "type": "address", + "internalType": "address" } ], - "name": "isRequestFulfilled", "outputs": [ { - "internalType": "bool", "name": "", - "type": "bool" + "type": "string", + "internalType": "string" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { - "inputs": [], - "name": "localDomain", - "outputs": [ + "type": "function", + "name": "transferOwnership", + "inputs": [ { - "internalType": "uint32", - "name": "", - "type": "uint32" + "name": "newOwner", + "type": "address", + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "unpauseSending", "inputs": [], - "name": "messageTransmitter", - "outputs": [ + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawProtocolFees", + "inputs": [ { - "internalType": "contract IMessageTransmitter", - "name": "", - "type": "address" + "name": "token", + "type": "address", + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { - "inputs": [], - "name": "owner", - "outputs": [ + "type": "function", + "name": "withdrawRelayerFees", + "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" + "name": "token", + "type": "address", + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { - "inputs": [], - "name": "pauseSending", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "type": "event", + "name": "ChainGasAirdropped", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false }, { - "inputs": [], - "name": "paused", - "outputs": [ + "type": "event", + "name": "ChainGasAmountUpdated", + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "name": "chainGasAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "anonymous": false }, { - "inputs": [], - "name": "protocolFee", - "outputs": [ + "type": "event", + "name": "CircleRequestFulfilled", + "inputs": [ + { + "name": "originDomain", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + }, + { + "name": "recipient", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "mintToken", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "requestID", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" } ], - "stateMutability": "view", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "CircleRequestSent", "inputs": [ { - "internalType": "bytes", - "name": "message", - "type": "bytes" + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "internalType": "bytes", - "name": "signature", - "type": "bytes" + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "nonce", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "internalType": "uint32", "name": "requestVersion", - "type": "uint32" + "type": "uint32", + "indexed": false, + "internalType": "uint32" }, { - "internalType": "bytes", "name": "formattedRequest", - "type": "bytes" + "type": "bytes", + "indexed": false, + "internalType": "bytes" + }, + { + "name": "requestID", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" } ], - "name": "receiveCircleToken", - "outputs": [], - "stateMutability": "payable", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "CircleTokenPoolSet", "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "relayerFeeCollectors", - "outputs": [ + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, { - "internalType": "address", - "name": "", - "type": "address" + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "FeeCollected", "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "remoteDomainConfig", - "outputs": [ + "name": "feeCollector", + "type": "address", + "indexed": false, + "internalType": "address" + }, { - "internalType": "uint32", - "name": "domain", - "type": "uint32" + "name": "relayerFeeAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "internalType": "address", - "name": "synapseCCTP", - "type": "address" + "name": "protocolFeeAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "FeeCollectorUpdated", "inputs": [ { - "internalType": "address", - "name": "token", - "type": "address" + "name": "relayer", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "oldFeeCollector", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "newFeeCollector", + "type": "address", + "indexed": false, + "internalType": "address" } ], - "name": "removeToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "rescueGas", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "FeesWithdrawn", "inputs": [ { - "internalType": "address", "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" + "type": "address", + "indexed": false, + "internalType": "address" }, { - "internalType": "address", - "name": "burnToken", - "type": "address" + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" }, { - "internalType": "uint256", "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint32", - "name": "requestVersion", - "type": "uint32" - }, - { - "internalType": "bytes", - "name": "swapParams", - "type": "bytes" - } - ], - "name": "sendCircleToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newChainGasAmount", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], - "name": "setChainGasAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "OwnershipTransferred", "inputs": [ { - "internalType": "address", - "name": "circleToken", - "type": "address" + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" }, { - "internalType": "address", - "name": "pool", - "type": "address" + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" } ], - "name": "setCircleTokenPool", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "Paused", "inputs": [ { - "internalType": "address", - "name": "feeCollector", - "type": "address" + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" } ], - "name": "setFeeCollector", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "ProtocolFeeUpdated", "inputs": [ { - "internalType": "uint256", "name": "newProtocolFee", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], - "name": "setProtocolFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "RemoteDomainConfigSet", "inputs": [ { - "internalType": "uint256", "name": "remoteChainId", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "internalType": "uint32", "name": "remoteDomain", - "type": "uint32" + "type": "uint32", + "indexed": false, + "internalType": "uint32" }, { - "internalType": "address", "name": "remoteSynapseCCTP", - "type": "address" + "type": "address", + "indexed": false, + "internalType": "address" } ], - "name": "setRemoteDomainConfig", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false + }, + { + "type": "event", + "name": "TokenAdded", + "inputs": [ + { + "name": "symbol", + "type": "string", + "indexed": false, + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false }, { + "type": "event", + "name": "TokenFeeSet", "inputs": [ { - "internalType": "address", "name": "token", - "type": "address" + "type": "address", + "indexed": false, + "internalType": "address" }, { - "internalType": "uint256", "name": "relayerFee", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "internalType": "uint256", "name": "minBaseFee", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "internalType": "uint256", "name": "minSwapFee", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "internalType": "uint256", "name": "maxFee", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], - "name": "setTokenFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "TokenRemoved", "inputs": [ { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "name": "symbolToToken", - "outputs": [ + "name": "symbol", + "type": "string", + "indexed": false, + "internalType": "string" + }, { - "internalType": "address", - "name": "", - "type": "address" + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "anonymous": false }, { - "inputs": [], - "name": "tokenMessenger", - "outputs": [ + "type": "event", + "name": "Unpaused", + "inputs": [ { - "internalType": "contract ITokenMessenger", - "name": "", - "type": "address" + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "anonymous": false }, { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "tokenToSymbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" + "type": "error", + "name": "CCTPGasRescueFailed", + "inputs": [] }, { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "type": "error", + "name": "CCTPIncorrectChainId", + "inputs": [] }, { - "inputs": [], - "name": "unpauseSending", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "type": "error", + "name": "CCTPIncorrectConfig", + "inputs": [] }, { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "withdrawProtocolFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "type": "error", + "name": "CCTPIncorrectDomain", + "inputs": [] }, { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "withdrawRelayerFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "type": "error", + "name": "CCTPIncorrectGasAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectProtocolFee", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectTokenAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPInsufficientAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPMessageNotReceived", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPSymbolAlreadyAdded", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPSymbolIncorrect", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPTokenAlreadyAdded", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPTokenNotFound", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPZeroAddress", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPZeroAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CastOverflow", + "inputs": [] + }, + { + "type": "error", + "name": "ForwarderDeploymentFailed", + "inputs": [] + }, + { + "type": "error", + "name": "IncorrectRequestLength", + "inputs": [] + }, + { + "type": "error", + "name": "RemoteCCTPDeploymentNotSet", + "inputs": [] + }, + { + "type": "error", + "name": "UnknownRequestVersion", + "inputs": [] } ] } \ No newline at end of file diff --git a/deployments/mainnet/SynapseCCTPRouter.json b/deployments/mainnet/SynapseCCTPRouter.json index 16dbbcb6e..f2e719289 100644 --- a/deployments/mainnet/SynapseCCTPRouter.json +++ b/deployments/mainnet/SynapseCCTPRouter.json @@ -1,422 +1,423 @@ { - "address": "0xD359bc471554504f683fbd4f6e36848612349DDF", + "address": "0xd5a597d6e7ddf373a92C8f477DAAA673b0902F48", + "constructorArgs": "0x00000000000000000000000012715a66773bd9c54534a01abf01d05f6b4bd35e", "abi": [ { + "type": "constructor", "inputs": [ { - "internalType": "address", "name": "_synapseCCTP", - "type": "address" + "type": "address", + "internalType": "address" } ], - "stateMutability": "nonpayable", - "type": "constructor" + "stateMutability": "nonpayable" }, { - "inputs": [], - "name": "DeadlineExceeded", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientOutputAmount", - "type": "error" - }, - { - "inputs": [], - "name": "MsgValueIncorrect", - "type": "error" - }, - { - "inputs": [], - "name": "PoolNotFound", - "type": "error" - }, - { - "inputs": [], - "name": "TokenAddressMismatch", - "type": "error" - }, - { - "inputs": [], - "name": "TokenNotContract", - "type": "error" - }, - { - "inputs": [], - "name": "TokenNotETH", - "type": "error" - }, - { - "inputs": [], - "name": "TokensIdentical", - "type": "error" - }, - { - "inputs": [], - "name": "UnknownRequestAction", - "type": "error" + "type": "receive", + "stateMutability": "payable" }, { + "type": "function", + "name": "adapterSwap", "inputs": [ { - "internalType": "address", "name": "recipient", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "address", "name": "tokenIn", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "amountIn", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "address", "name": "tokenOut", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "bytes", "name": "rawParams", - "type": "bytes" + "type": "bytes", + "internalType": "bytes" } ], - "name": "adapterSwap", "outputs": [ { - "internalType": "uint256", "name": "amountOut", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "payable", - "type": "function" + "stateMutability": "payable" }, { + "type": "function", + "name": "bridge", "inputs": [ { - "internalType": "address", "name": "recipient", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "chainId", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "address", "name": "token", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "amount", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { + "name": "originQuery", + "type": "tuple", + "internalType": "struct SwapQuery", "components": [ { - "internalType": "address", "name": "routerAdapter", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "address", "name": "tokenOut", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "minAmountOut", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint256", "name": "deadline", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "bytes", "name": "rawParams", - "type": "bytes" + "type": "bytes", + "internalType": "bytes" } - ], - "internalType": "struct SwapQuery", - "name": "originQuery", - "type": "tuple" + ] }, { + "name": "destQuery", + "type": "tuple", + "internalType": "struct SwapQuery", "components": [ { - "internalType": "address", "name": "routerAdapter", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "address", "name": "tokenOut", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "minAmountOut", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint256", "name": "deadline", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "bytes", "name": "rawParams", - "type": "bytes" + "type": "bytes", + "internalType": "bytes" } - ], - "internalType": "struct SwapQuery", - "name": "destQuery", - "type": "tuple" + ] } ], - "name": "bridge", "outputs": [], - "stateMutability": "payable", - "type": "function" + "stateMutability": "payable" }, { + "type": "function", + "name": "calculateFeeAmount", "inputs": [ { - "internalType": "address", "name": "token", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "amount", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "bool", "name": "isSwap", - "type": "bool" + "type": "bool", + "internalType": "bool" } ], - "name": "calculateFeeAmount", "outputs": [ { - "internalType": "uint256", "name": "fee", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "feeStructures", "inputs": [ { - "internalType": "address", "name": "token", - "type": "address" + "type": "address", + "internalType": "address" } ], - "name": "feeStructures", "outputs": [ { - "internalType": "uint40", "name": "relayerFee", - "type": "uint40" + "type": "uint40", + "internalType": "uint40" }, { - "internalType": "uint72", "name": "minBaseFee", - "type": "uint72" + "type": "uint72", + "internalType": "uint72" }, { - "internalType": "uint72", "name": "minSwapFee", - "type": "uint72" + "type": "uint72", + "internalType": "uint72" }, { - "internalType": "uint72", "name": "maxFee", - "type": "uint72" + "type": "uint72", + "internalType": "uint72" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "getConnectedBridgeTokens", "inputs": [ { - "internalType": "address", "name": "tokenOut", - "type": "address" + "type": "address", + "internalType": "address" } ], - "name": "getConnectedBridgeTokens", "outputs": [ { + "name": "tokens", + "type": "tuple[]", + "internalType": "struct BridgeToken[]", "components": [ { - "internalType": "string", "name": "symbol", - "type": "string" + "type": "string", + "internalType": "string" }, { - "internalType": "address", "name": "token", - "type": "address" + "type": "address", + "internalType": "address" } - ], - "internalType": "struct BridgeToken[]", - "name": "tokens", - "type": "tuple[]" + ] } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "getDestinationAmountOut", "inputs": [ { + "name": "requests", + "type": "tuple[]", + "internalType": "struct DestRequest[]", "components": [ { - "internalType": "string", "name": "symbol", - "type": "string" + "type": "string", + "internalType": "string" }, { - "internalType": "uint256", "name": "amountIn", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } - ], - "internalType": "struct DestRequest[]", - "name": "requests", - "type": "tuple[]" + ] }, { - "internalType": "address", "name": "tokenOut", - "type": "address" + "type": "address", + "internalType": "address" } ], - "name": "getDestinationAmountOut", "outputs": [ { + "name": "destQueries", + "type": "tuple[]", + "internalType": "struct SwapQuery[]", "components": [ { - "internalType": "address", "name": "routerAdapter", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "address", "name": "tokenOut", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "minAmountOut", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint256", "name": "deadline", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "bytes", "name": "rawParams", - "type": "bytes" + "type": "bytes", + "internalType": "bytes" } - ], - "internalType": "struct SwapQuery[]", - "name": "destQueries", - "type": "tuple[]" + ] } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "getOriginAmountOut", "inputs": [ { - "internalType": "address", "name": "tokenIn", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "string[]", "name": "tokenSymbols", - "type": "string[]" + "type": "string[]", + "internalType": "string[]" }, { - "internalType": "uint256", "name": "amountIn", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } ], - "name": "getOriginAmountOut", "outputs": [ { + "name": "originQueries", + "type": "tuple[]", + "internalType": "struct SwapQuery[]", "components": [ { - "internalType": "address", "name": "routerAdapter", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "address", "name": "tokenOut", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "minAmountOut", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint256", "name": "deadline", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "bytes", "name": "rawParams", - "type": "bytes" + "type": "bytes", + "internalType": "bytes" } - ], - "internalType": "struct SwapQuery[]", - "name": "originQueries", - "type": "tuple[]" + ] } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { - "inputs": [], + "type": "function", "name": "synapseCCTP", + "inputs": [], "outputs": [ { - "internalType": "address", "name": "", - "type": "address" + "type": "address", + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { - "stateMutability": "payable", - "type": "receive" + "type": "error", + "name": "DeadlineExceeded", + "inputs": [] + }, + { + "type": "error", + "name": "InsufficientOutputAmount", + "inputs": [] + }, + { + "type": "error", + "name": "MsgValueIncorrect", + "inputs": [] + }, + { + "type": "error", + "name": "PoolNotFound", + "inputs": [] + }, + { + "type": "error", + "name": "TokenAddressMismatch", + "inputs": [] + }, + { + "type": "error", + "name": "TokenNotContract", + "inputs": [] + }, + { + "type": "error", + "name": "TokenNotETH", + "inputs": [] + }, + { + "type": "error", + "name": "TokensIdentical", + "inputs": [] + }, + { + "type": "error", + "name": "UnknownRequestAction", + "inputs": [] } ] } \ No newline at end of file diff --git a/deployments/mainnet/TransparentUpgradeableProxy.SynapseCCTP.json b/deployments/mainnet/TransparentUpgradeableProxy.SynapseCCTP.json new file mode 100644 index 000000000..61ab3a5de --- /dev/null +++ b/deployments/mainnet/TransparentUpgradeableProxy.SynapseCCTP.json @@ -0,0 +1,80 @@ +{ + "address": "0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E", + "constructorArgs": "0x00000000000000000000000060efd4462b3c79da42167c1b01126e5089d4d0d20000000000000000000000006cd6c5fde1621053ed4bc7c09adc76612d8c663f00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000024c4d66de80000000000000000000000000fea3e5840334fc758a3decf14546bfdfbef5cd300000000000000000000000000000000000000000000000000000000", + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "_logic", + "type": "address", + "internalType": "address" + }, + { + "name": "admin_", + "type": "address", + "internalType": "address" + }, + { + "name": "_data", + "type": "bytes", + "internalType": "bytes" + } + ], + "stateMutability": "payable" + }, + { + "type": "fallback", + "stateMutability": "payable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "event", + "name": "AdminChanged", + "inputs": [ + { + "name": "previousAdmin", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "newAdmin", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "BeaconUpgraded", + "inputs": [ + { + "name": "beacon", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Upgraded", + "inputs": [ + { + "name": "implementation", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/deployments/optimism/ProxyAdmin.SynapseCCTP.json b/deployments/optimism/ProxyAdmin.SynapseCCTP.json new file mode 100644 index 000000000..90153212d --- /dev/null +++ b/deployments/optimism/ProxyAdmin.SynapseCCTP.json @@ -0,0 +1,155 @@ +{ + "address": "0x1D8F3f3ee9a973A54620e467755b157BaBB2958b", + "constructorArgs": "0x", + "abi": [ + { + "type": "function", + "name": "changeProxyAdmin", + "inputs": [ + { + "name": "proxy", + "type": "address", + "internalType": "contract ITransparentUpgradeableProxy" + }, + { + "name": "newAdmin", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getProxyAdmin", + "inputs": [ + { + "name": "proxy", + "type": "address", + "internalType": "contract ITransparentUpgradeableProxy" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getProxyImplementation", + "inputs": [ + { + "name": "proxy", + "type": "address", + "internalType": "contract ITransparentUpgradeableProxy" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { + "name": "newOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "upgrade", + "inputs": [ + { + "name": "proxy", + "type": "address", + "internalType": "contract ITransparentUpgradeableProxy" + }, + { + "name": "implementation", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "upgradeAndCall", + "inputs": [ + { + "name": "proxy", + "type": "address", + "internalType": "contract ITransparentUpgradeableProxy" + }, + { + "name": "implementation", + "type": "address", + "internalType": "address" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/deployments/optimism/SynapseCCTP.Implementation.json b/deployments/optimism/SynapseCCTP.Implementation.json new file mode 100644 index 000000000..70e0be241 --- /dev/null +++ b/deployments/optimism/SynapseCCTP.Implementation.json @@ -0,0 +1,1155 @@ +{ + "address": "0x00b0b14bAB0Ac46653A40BB00C137D2BB62802b6", + "constructorArgs": "0x0000000000000000000000002b4069517957735be00cee0fadae88a26365528f", + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "tokenMessenger_", + "type": "address", + "internalType": "contract ITokenMessenger" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "accumulatedFees", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "addToken", + "inputs": [ + { + "name": "symbol", + "type": "string", + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "relayerFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minBaseFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minSwapFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxFee", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "calculateFeeAmount", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "isSwap", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [ + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "chainGasAmount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "circleTokenPool", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "feeStructures", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "relayerFee", + "type": "uint40", + "internalType": "uint40" + }, + { + "name": "minBaseFee", + "type": "uint72", + "internalType": "uint72" + }, + { + "name": "minSwapFee", + "type": "uint72", + "internalType": "uint72" + }, + { + "name": "maxFee", + "type": "uint72", + "internalType": "uint72" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getBridgeTokens", + "inputs": [], + "outputs": [ + { + "name": "bridgeTokens", + "type": "tuple[]", + "internalType": "struct BridgeToken[]", + "components": [ + { + "name": "symbol", + "type": "string", + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getLocalToken", + "inputs": [ + { + "name": "remoteDomain", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "remoteToken", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "owner_", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isRequestFulfilled", + "inputs": [ + { + "name": "requestID", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "localDomain", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint32", + "internalType": "uint32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "messageTransmitter", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IMessageTransmitter" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pauseSending", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "protocolFee", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "receiveCircleToken", + "inputs": [ + { + "name": "message", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "signature", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "requestVersion", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "formattedRequest", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "relayerFeeCollectors", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "remoteDomainConfig", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "domain", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "synapseCCTP", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "removeToken", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "rescueGas", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "sendCircleToken", + "inputs": [ + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "burnToken", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "requestVersion", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "swapParams", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setChainGasAmount", + "inputs": [ + { + "name": "newChainGasAmount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setCircleTokenPool", + "inputs": [ + { + "name": "circleToken", + "type": "address", + "internalType": "address" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setFeeCollector", + "inputs": [ + { + "name": "feeCollector", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setProtocolFee", + "inputs": [ + { + "name": "newProtocolFee", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setRemoteDomainConfig", + "inputs": [ + { + "name": "remoteChainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "remoteDomain", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "remoteSynapseCCTP", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setTokenFee", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "relayerFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minBaseFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minSwapFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxFee", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "symbolToToken", + "inputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "tokenMessenger", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract ITokenMessenger" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "tokenToSymbol", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { + "name": "newOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "unpauseSending", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawProtocolFees", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawRelayerFees", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "ChainGasAirdropped", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ChainGasAmountUpdated", + "inputs": [ + { + "name": "chainGasAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "CircleRequestFulfilled", + "inputs": [ + { + "name": "originDomain", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + }, + { + "name": "recipient", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "mintToken", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "requestID", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "CircleRequestSent", + "inputs": [ + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "nonce", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "requestVersion", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + }, + { + "name": "formattedRequest", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + }, + { + "name": "requestID", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "CircleTokenPoolSet", + "inputs": [ + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "FeeCollected", + "inputs": [ + { + "name": "feeCollector", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "relayerFeeAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "protocolFeeAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "FeeCollectorUpdated", + "inputs": [ + { + "name": "relayer", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "oldFeeCollector", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "newFeeCollector", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "FeesWithdrawn", + "inputs": [ + { + "name": "recipient", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProtocolFeeUpdated", + "inputs": [ + { + "name": "newProtocolFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RemoteDomainConfigSet", + "inputs": [ + { + "name": "remoteChainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "remoteDomain", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + }, + { + "name": "remoteSynapseCCTP", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenAdded", + "inputs": [ + { + "name": "symbol", + "type": "string", + "indexed": false, + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenFeeSet", + "inputs": [ + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "relayerFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "minBaseFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "minSwapFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "maxFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRemoved", + "inputs": [ + { + "name": "symbol", + "type": "string", + "indexed": false, + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "CCTPGasRescueFailed", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectChainId", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectConfig", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectDomain", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectGasAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectProtocolFee", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectTokenAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPInsufficientAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPMessageNotReceived", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPSymbolAlreadyAdded", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPSymbolIncorrect", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPTokenAlreadyAdded", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPTokenNotFound", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPZeroAddress", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPZeroAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CastOverflow", + "inputs": [] + }, + { + "type": "error", + "name": "ForwarderDeploymentFailed", + "inputs": [] + }, + { + "type": "error", + "name": "IncorrectRequestLength", + "inputs": [] + }, + { + "type": "error", + "name": "RemoteCCTPDeploymentNotSet", + "inputs": [] + }, + { + "type": "error", + "name": "UnknownRequestVersion", + "inputs": [] + } + ] +} \ No newline at end of file diff --git a/deployments/optimism/SynapseCCTP.json b/deployments/optimism/SynapseCCTP.json index baba5e2bc..c31ba0a1a 100644 --- a/deployments/optimism/SynapseCCTP.json +++ b/deployments/optimism/SynapseCCTP.json @@ -1,998 +1,1155 @@ { - "address": "0x5e69c336661dde70404e3345BA61F9c01DdB4C36", - "constructorArgs": "0x0000000000000000000000002b4069517957735be00cee0fadae88a26365528f0000000000000000000000000fea3e5840334fc758a3decf14546bfdfbef5cd3", + "address": "0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E", + "constructorArgs": "0x0000000000000000000000002b4069517957735be00cee0fadae88a26365528f", "abi": [ { + "type": "constructor", "inputs": [ { - "internalType": "contract ITokenMessenger", "name": "tokenMessenger_", - "type": "address" - }, - { - "internalType": "address", - "name": "owner_", - "type": "address" + "type": "address", + "internalType": "contract ITokenMessenger" } ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "CCTPGasRescueFailed", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPIncorrectChainId", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPIncorrectConfig", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPIncorrectDomain", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPIncorrectGasAmount", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPIncorrectProtocolFee", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPInsufficientAmount", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPMessageNotReceived", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPSymbolAlreadyAdded", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPSymbolIncorrect", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPTokenAlreadyAdded", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPTokenNotFound", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPZeroAddress", - "type": "error" - }, - { - "inputs": [], - "name": "CCTPZeroAmount", - "type": "error" - }, - { - "inputs": [], - "name": "CastOverflow", - "type": "error" + "stateMutability": "nonpayable" }, { - "inputs": [], - "name": "ForwarderDeploymentFailed", - "type": "error" - }, - { - "inputs": [], - "name": "IncorrectRequestLength", - "type": "error" - }, - { - "inputs": [], - "name": "RemoteCCTPDeploymentNotSet", - "type": "error" - }, - { - "inputs": [], - "name": "UnknownRequestVersion", - "type": "error" - }, - { - "anonymous": false, + "type": "function", + "name": "accumulatedFees", "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "address", + "internalType": "address" } ], - "name": "ChainGasAirdropped", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "outputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "chainGasAmount", - "type": "uint256" + "name": "", + "type": "uint256", + "internalType": "uint256" } ], - "name": "ChainGasAmountUpdated", - "type": "event" + "stateMutability": "view" }, { - "anonymous": false, + "type": "function", + "name": "addToken", "inputs": [ { - "indexed": false, - "internalType": "uint32", - "name": "originDomain", - "type": "uint32" - }, - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" + "name": "symbol", + "type": "string", + "internalType": "string" }, { - "indexed": false, - "internalType": "address", - "name": "mintToken", - "type": "address" + "name": "token", + "type": "address", + "internalType": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" + "name": "relayerFee", + "type": "uint256", + "internalType": "uint256" }, { - "indexed": false, - "internalType": "address", - "name": "token", - "type": "address" + "name": "minBaseFee", + "type": "uint256", + "internalType": "uint256" }, { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" + "name": "minSwapFee", + "type": "uint256", + "internalType": "uint256" }, { - "indexed": false, - "internalType": "bytes32", - "name": "requestID", - "type": "bytes32" + "name": "maxFee", + "type": "uint256", + "internalType": "uint256" } ], - "name": "CircleRequestFulfilled", - "type": "event" + "outputs": [], + "stateMutability": "nonpayable" }, { - "anonymous": false, + "type": "function", + "name": "calculateFeeAmount", "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "nonce", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "address", "name": "token", - "type": "address" + "type": "address", + "internalType": "address" }, { - "indexed": false, - "internalType": "uint256", "name": "amount", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "indexed": false, - "internalType": "uint32", - "name": "requestVersion", - "type": "uint32" - }, + "name": "isSwap", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [ { - "indexed": false, - "internalType": "bytes", - "name": "formattedRequest", - "type": "bytes" - }, + "name": "fee", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "chainGasAmount", + "inputs": [], + "outputs": [ { - "indexed": false, - "internalType": "bytes32", - "name": "requestID", - "type": "bytes32" + "name": "", + "type": "uint256", + "internalType": "uint256" } ], - "name": "CircleRequestSent", - "type": "event" + "stateMutability": "view" }, { - "anonymous": false, + "type": "function", + "name": "circleTokenPool", "inputs": [ { - "indexed": false, - "internalType": "address", - "name": "feeCollector", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "relayerFeeAmount", - "type": "uint256" - }, + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "protocolFeeAmount", - "type": "uint256" + "name": "", + "type": "address", + "internalType": "address" } ], - "name": "FeeCollected", - "type": "event" + "stateMutability": "view" }, { - "anonymous": false, + "type": "function", + "name": "feeStructures", "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "relayer", - "type": "address" + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "relayerFee", + "type": "uint40", + "internalType": "uint40" }, { - "indexed": false, - "internalType": "address", - "name": "oldFeeCollector", - "type": "address" + "name": "minBaseFee", + "type": "uint72", + "internalType": "uint72" }, { - "indexed": false, - "internalType": "address", - "name": "newFeeCollector", - "type": "address" + "name": "minSwapFee", + "type": "uint72", + "internalType": "uint72" + }, + { + "name": "maxFee", + "type": "uint72", + "internalType": "uint72" } ], - "name": "FeeCollectorUpdated", - "type": "event" + "stateMutability": "view" + }, + { + "type": "function", + "name": "getBridgeTokens", + "inputs": [], + "outputs": [ + { + "name": "bridgeTokens", + "type": "tuple[]", + "internalType": "struct BridgeToken[]", + "components": [ + { + "name": "symbol", + "type": "string", + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + } + ], + "stateMutability": "view" }, { - "anonymous": false, + "type": "function", + "name": "getLocalToken", "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" + "name": "remoteDomain", + "type": "uint32", + "internalType": "uint32" }, { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" + "name": "remoteToken", + "type": "address", + "internalType": "address" } ], - "name": "OwnershipTransferred", - "type": "event" + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" }, { - "anonymous": false, + "type": "function", + "name": "initialize", "inputs": [ { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" + "name": "owner_", + "type": "address", + "internalType": "address" } ], - "name": "Paused", - "type": "event" + "outputs": [], + "stateMutability": "nonpayable" }, { - "anonymous": false, + "type": "function", + "name": "isRequestFulfilled", "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "newProtocolFee", - "type": "uint256" + "name": "requestID", + "type": "bytes32", + "internalType": "bytes32" } ], - "name": "ProtocolFeeUpdated", - "type": "event" + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" }, { - "anonymous": false, - "inputs": [ + "type": "function", + "name": "localDomain", + "inputs": [], + "outputs": [ { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" + "name": "", + "type": "uint32", + "internalType": "uint32" } ], - "name": "Unpaused", - "type": "event" + "stateMutability": "view" }, { - "inputs": [ + "type": "function", + "name": "messageTransmitter", + "inputs": [], + "outputs": [ { - "internalType": "address", "name": "", - "type": "address" - }, + "type": "address", + "internalType": "contract IMessageTransmitter" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ { - "internalType": "address", "name": "", - "type": "address" + "type": "address", + "internalType": "address" } ], - "name": "accumulatedFees", + "stateMutability": "view" + }, + { + "type": "function", + "name": "pauseSending", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "protocolFee", + "inputs": [], "outputs": [ { - "internalType": "uint256", "name": "", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "receiveCircleToken", "inputs": [ { - "internalType": "string", - "name": "symbol", - "type": "string" + "name": "message", + "type": "bytes", + "internalType": "bytes" }, { - "internalType": "address", - "name": "token", - "type": "address" + "name": "signature", + "type": "bytes", + "internalType": "bytes" }, { - "internalType": "uint256", - "name": "relayerFee", - "type": "uint256" + "name": "requestVersion", + "type": "uint32", + "internalType": "uint32" }, { - "internalType": "uint256", - "name": "minBaseFee", - "type": "uint256" - }, + "name": "formattedRequest", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "relayerFeeCollectors", + "inputs": [ { - "internalType": "uint256", - "name": "minSwapFee", - "type": "uint256" + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "remoteDomainConfig", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "domain", + "type": "uint32", + "internalType": "uint32" }, { - "internalType": "uint256", - "name": "maxFee", - "type": "uint256" + "name": "synapseCCTP", + "type": "address", + "internalType": "address" } ], - "name": "addToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "removeToken", "inputs": [ { - "internalType": "address", "name": "token", - "type": "address" + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "rescueGas", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "sendCircleToken", + "inputs": [ + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "burnToken", + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "amount", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "bool", - "name": "isSwap", - "type": "bool" + "name": "requestVersion", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "swapParams", + "type": "bytes", + "internalType": "bytes" } ], - "name": "calculateFeeAmount", - "outputs": [ + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setChainGasAmount", + "inputs": [ { - "internalType": "uint256", - "name": "fee", - "type": "uint256" + "name": "newChainGasAmount", + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { - "inputs": [], - "name": "chainGasAmount", - "outputs": [ + "type": "function", + "name": "setCircleTokenPool", + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "name": "circleToken", + "type": "address", + "internalType": "address" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "setFeeCollector", "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" + "name": "feeCollector", + "type": "address", + "internalType": "address" } ], - "name": "circleTokenPool", - "outputs": [ + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setProtocolFee", + "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" + "name": "newProtocolFee", + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "setRemoteDomainConfig", "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" + "name": "remoteChainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "remoteDomain", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "remoteSynapseCCTP", + "type": "address", + "internalType": "address" } ], - "name": "feeStructures", - "outputs": [ + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setTokenFee", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, { - "internalType": "uint40", "name": "relayerFee", - "type": "uint40" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint72", "name": "minBaseFee", - "type": "uint72" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint72", "name": "minSwapFee", - "type": "uint72" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint72", "name": "maxFee", - "type": "uint72" + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { - "inputs": [], - "name": "getBridgeTokens", - "outputs": [ + "type": "function", + "name": "symbolToToken", + "inputs": [ { - "components": [ - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "internalType": "struct BridgeToken[]", - "name": "bridgeTokens", - "type": "tuple[]" + "name": "", + "type": "string", + "internalType": "string" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "remoteDomain", - "type": "uint32" - }, + "outputs": [ { - "internalType": "address", - "name": "remoteToken", - "type": "address" + "name": "", + "type": "address", + "internalType": "address" } ], - "name": "getLocalToken", + "stateMutability": "view" + }, + { + "type": "function", + "name": "tokenMessenger", + "inputs": [], "outputs": [ { - "internalType": "address", "name": "", - "type": "address" + "type": "address", + "internalType": "contract ITokenMessenger" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "tokenToSymbol", "inputs": [ { - "internalType": "bytes32", - "name": "requestID", - "type": "bytes32" + "name": "", + "type": "address", + "internalType": "address" } ], - "name": "isRequestFulfilled", "outputs": [ { - "internalType": "bool", "name": "", - "type": "bool" + "type": "string", + "internalType": "string" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { - "inputs": [], - "name": "localDomain", - "outputs": [ + "type": "function", + "name": "transferOwnership", + "inputs": [ { - "internalType": "uint32", - "name": "", - "type": "uint32" + "name": "newOwner", + "type": "address", + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "unpauseSending", "inputs": [], - "name": "messageTransmitter", - "outputs": [ + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawProtocolFees", + "inputs": [ { - "internalType": "contract IMessageTransmitter", - "name": "", - "type": "address" + "name": "token", + "type": "address", + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { - "inputs": [], - "name": "owner", - "outputs": [ + "type": "function", + "name": "withdrawRelayerFees", + "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" + "name": "token", + "type": "address", + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "outputs": [], + "stateMutability": "nonpayable" }, { - "inputs": [], - "name": "pauseSending", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "type": "event", + "name": "ChainGasAirdropped", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false }, { - "inputs": [], - "name": "paused", - "outputs": [ + "type": "event", + "name": "ChainGasAmountUpdated", + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "name": "chainGasAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "anonymous": false }, { - "inputs": [], - "name": "protocolFee", - "outputs": [ + "type": "event", + "name": "CircleRequestFulfilled", + "inputs": [ + { + "name": "originDomain", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + }, + { + "name": "recipient", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "mintToken", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "requestID", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" } ], - "stateMutability": "view", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "CircleRequestSent", "inputs": [ { - "internalType": "bytes", - "name": "message", - "type": "bytes" + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "internalType": "bytes", - "name": "signature", - "type": "bytes" + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "nonce", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "internalType": "uint32", "name": "requestVersion", - "type": "uint32" + "type": "uint32", + "indexed": false, + "internalType": "uint32" }, { - "internalType": "bytes", "name": "formattedRequest", - "type": "bytes" + "type": "bytes", + "indexed": false, + "internalType": "bytes" + }, + { + "name": "requestID", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" } ], - "name": "receiveCircleToken", - "outputs": [], - "stateMutability": "payable", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "CircleTokenPoolSet", "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "relayerFeeCollectors", - "outputs": [ + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, { - "internalType": "address", - "name": "", - "type": "address" + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "FeeCollected", "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "remoteDomainConfig", - "outputs": [ + "name": "feeCollector", + "type": "address", + "indexed": false, + "internalType": "address" + }, { - "internalType": "uint32", - "name": "domain", - "type": "uint32" + "name": "relayerFeeAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "internalType": "address", - "name": "synapseCCTP", - "type": "address" + "name": "protocolFeeAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "FeeCollectorUpdated", "inputs": [ { - "internalType": "address", - "name": "token", - "type": "address" + "name": "relayer", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "oldFeeCollector", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "newFeeCollector", + "type": "address", + "indexed": false, + "internalType": "address" } ], - "name": "removeToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "rescueGas", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "FeesWithdrawn", "inputs": [ { - "internalType": "address", "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" + "type": "address", + "indexed": false, + "internalType": "address" }, { - "internalType": "address", - "name": "burnToken", - "type": "address" + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" }, { - "internalType": "uint256", "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint32", - "name": "requestVersion", - "type": "uint32" - }, - { - "internalType": "bytes", - "name": "swapParams", - "type": "bytes" - } - ], - "name": "sendCircleToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newChainGasAmount", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], - "name": "setChainGasAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "OwnershipTransferred", "inputs": [ { - "internalType": "address", - "name": "circleToken", - "type": "address" + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" }, { - "internalType": "address", - "name": "pool", - "type": "address" + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" } ], - "name": "setCircleTokenPool", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "Paused", "inputs": [ { - "internalType": "address", - "name": "feeCollector", - "type": "address" + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" } ], - "name": "setFeeCollector", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "ProtocolFeeUpdated", "inputs": [ { - "internalType": "uint256", "name": "newProtocolFee", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], - "name": "setProtocolFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "RemoteDomainConfigSet", "inputs": [ { - "internalType": "uint256", "name": "remoteChainId", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "internalType": "uint32", "name": "remoteDomain", - "type": "uint32" + "type": "uint32", + "indexed": false, + "internalType": "uint32" }, { - "internalType": "address", "name": "remoteSynapseCCTP", - "type": "address" + "type": "address", + "indexed": false, + "internalType": "address" } ], - "name": "setRemoteDomainConfig", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false + }, + { + "type": "event", + "name": "TokenAdded", + "inputs": [ + { + "name": "symbol", + "type": "string", + "indexed": false, + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false }, { + "type": "event", + "name": "TokenFeeSet", "inputs": [ { - "internalType": "address", "name": "token", - "type": "address" + "type": "address", + "indexed": false, + "internalType": "address" }, { - "internalType": "uint256", "name": "relayerFee", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "internalType": "uint256", "name": "minBaseFee", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "internalType": "uint256", "name": "minSwapFee", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "internalType": "uint256", "name": "maxFee", - "type": "uint256" + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], - "name": "setTokenFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false }, { + "type": "event", + "name": "TokenRemoved", "inputs": [ { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "name": "symbolToToken", - "outputs": [ + "name": "symbol", + "type": "string", + "indexed": false, + "internalType": "string" + }, { - "internalType": "address", - "name": "", - "type": "address" + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "anonymous": false }, { - "inputs": [], - "name": "tokenMessenger", - "outputs": [ + "type": "event", + "name": "Unpaused", + "inputs": [ { - "internalType": "contract ITokenMessenger", - "name": "", - "type": "address" + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "anonymous": false }, { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "tokenToSymbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" + "type": "error", + "name": "CCTPGasRescueFailed", + "inputs": [] }, { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "type": "error", + "name": "CCTPIncorrectChainId", + "inputs": [] }, { - "inputs": [], - "name": "unpauseSending", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "type": "error", + "name": "CCTPIncorrectConfig", + "inputs": [] }, { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "withdrawProtocolFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "type": "error", + "name": "CCTPIncorrectDomain", + "inputs": [] }, { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "withdrawRelayerFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "type": "error", + "name": "CCTPIncorrectGasAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectProtocolFee", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectTokenAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPInsufficientAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPMessageNotReceived", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPSymbolAlreadyAdded", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPSymbolIncorrect", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPTokenAlreadyAdded", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPTokenNotFound", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPZeroAddress", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPZeroAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CastOverflow", + "inputs": [] + }, + { + "type": "error", + "name": "ForwarderDeploymentFailed", + "inputs": [] + }, + { + "type": "error", + "name": "IncorrectRequestLength", + "inputs": [] + }, + { + "type": "error", + "name": "RemoteCCTPDeploymentNotSet", + "inputs": [] + }, + { + "type": "error", + "name": "UnknownRequestVersion", + "inputs": [] } ] } \ No newline at end of file diff --git a/deployments/optimism/SynapseCCTPRouter.json b/deployments/optimism/SynapseCCTPRouter.json index add84d9a4..f2e719289 100644 --- a/deployments/optimism/SynapseCCTPRouter.json +++ b/deployments/optimism/SynapseCCTPRouter.json @@ -1,423 +1,423 @@ { - "address": "0xD359bc471554504f683fbd4f6e36848612349DDF", - "constructorArgs": "0x0000000000000000000000005e69c336661dde70404e3345ba61f9c01ddb4c36", + "address": "0xd5a597d6e7ddf373a92C8f477DAAA673b0902F48", + "constructorArgs": "0x00000000000000000000000012715a66773bd9c54534a01abf01d05f6b4bd35e", "abi": [ { + "type": "constructor", "inputs": [ { - "internalType": "address", "name": "_synapseCCTP", - "type": "address" + "type": "address", + "internalType": "address" } ], - "stateMutability": "nonpayable", - "type": "constructor" + "stateMutability": "nonpayable" }, { - "inputs": [], - "name": "DeadlineExceeded", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientOutputAmount", - "type": "error" - }, - { - "inputs": [], - "name": "MsgValueIncorrect", - "type": "error" - }, - { - "inputs": [], - "name": "PoolNotFound", - "type": "error" - }, - { - "inputs": [], - "name": "TokenAddressMismatch", - "type": "error" - }, - { - "inputs": [], - "name": "TokenNotContract", - "type": "error" - }, - { - "inputs": [], - "name": "TokenNotETH", - "type": "error" - }, - { - "inputs": [], - "name": "TokensIdentical", - "type": "error" - }, - { - "inputs": [], - "name": "UnknownRequestAction", - "type": "error" + "type": "receive", + "stateMutability": "payable" }, { + "type": "function", + "name": "adapterSwap", "inputs": [ { - "internalType": "address", "name": "recipient", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "address", "name": "tokenIn", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "amountIn", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "address", "name": "tokenOut", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "bytes", "name": "rawParams", - "type": "bytes" + "type": "bytes", + "internalType": "bytes" } ], - "name": "adapterSwap", "outputs": [ { - "internalType": "uint256", "name": "amountOut", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "payable", - "type": "function" + "stateMutability": "payable" }, { + "type": "function", + "name": "bridge", "inputs": [ { - "internalType": "address", "name": "recipient", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "chainId", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "address", "name": "token", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "amount", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { + "name": "originQuery", + "type": "tuple", + "internalType": "struct SwapQuery", "components": [ { - "internalType": "address", "name": "routerAdapter", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "address", "name": "tokenOut", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "minAmountOut", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint256", "name": "deadline", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "bytes", "name": "rawParams", - "type": "bytes" + "type": "bytes", + "internalType": "bytes" } - ], - "internalType": "struct SwapQuery", - "name": "originQuery", - "type": "tuple" + ] }, { + "name": "destQuery", + "type": "tuple", + "internalType": "struct SwapQuery", "components": [ { - "internalType": "address", "name": "routerAdapter", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "address", "name": "tokenOut", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "minAmountOut", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint256", "name": "deadline", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "bytes", "name": "rawParams", - "type": "bytes" + "type": "bytes", + "internalType": "bytes" } - ], - "internalType": "struct SwapQuery", - "name": "destQuery", - "type": "tuple" + ] } ], - "name": "bridge", "outputs": [], - "stateMutability": "payable", - "type": "function" + "stateMutability": "payable" }, { + "type": "function", + "name": "calculateFeeAmount", "inputs": [ { - "internalType": "address", "name": "token", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "amount", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "bool", "name": "isSwap", - "type": "bool" + "type": "bool", + "internalType": "bool" } ], - "name": "calculateFeeAmount", "outputs": [ { - "internalType": "uint256", "name": "fee", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "feeStructures", "inputs": [ { - "internalType": "address", "name": "token", - "type": "address" + "type": "address", + "internalType": "address" } ], - "name": "feeStructures", "outputs": [ { - "internalType": "uint40", "name": "relayerFee", - "type": "uint40" + "type": "uint40", + "internalType": "uint40" }, { - "internalType": "uint72", "name": "minBaseFee", - "type": "uint72" + "type": "uint72", + "internalType": "uint72" }, { - "internalType": "uint72", "name": "minSwapFee", - "type": "uint72" + "type": "uint72", + "internalType": "uint72" }, { - "internalType": "uint72", "name": "maxFee", - "type": "uint72" + "type": "uint72", + "internalType": "uint72" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "getConnectedBridgeTokens", "inputs": [ { - "internalType": "address", "name": "tokenOut", - "type": "address" + "type": "address", + "internalType": "address" } ], - "name": "getConnectedBridgeTokens", "outputs": [ { + "name": "tokens", + "type": "tuple[]", + "internalType": "struct BridgeToken[]", "components": [ { - "internalType": "string", "name": "symbol", - "type": "string" + "type": "string", + "internalType": "string" }, { - "internalType": "address", "name": "token", - "type": "address" + "type": "address", + "internalType": "address" } - ], - "internalType": "struct BridgeToken[]", - "name": "tokens", - "type": "tuple[]" + ] } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "getDestinationAmountOut", "inputs": [ { + "name": "requests", + "type": "tuple[]", + "internalType": "struct DestRequest[]", "components": [ { - "internalType": "string", "name": "symbol", - "type": "string" + "type": "string", + "internalType": "string" }, { - "internalType": "uint256", "name": "amountIn", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } - ], - "internalType": "struct DestRequest[]", - "name": "requests", - "type": "tuple[]" + ] }, { - "internalType": "address", "name": "tokenOut", - "type": "address" + "type": "address", + "internalType": "address" } ], - "name": "getDestinationAmountOut", "outputs": [ { + "name": "destQueries", + "type": "tuple[]", + "internalType": "struct SwapQuery[]", "components": [ { - "internalType": "address", "name": "routerAdapter", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "address", "name": "tokenOut", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "minAmountOut", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint256", "name": "deadline", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "bytes", "name": "rawParams", - "type": "bytes" + "type": "bytes", + "internalType": "bytes" } - ], - "internalType": "struct SwapQuery[]", - "name": "destQueries", - "type": "tuple[]" + ] } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { + "type": "function", + "name": "getOriginAmountOut", "inputs": [ { - "internalType": "address", "name": "tokenIn", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "string[]", "name": "tokenSymbols", - "type": "string[]" + "type": "string[]", + "internalType": "string[]" }, { - "internalType": "uint256", "name": "amountIn", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" } ], - "name": "getOriginAmountOut", "outputs": [ { + "name": "originQueries", + "type": "tuple[]", + "internalType": "struct SwapQuery[]", "components": [ { - "internalType": "address", "name": "routerAdapter", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "address", "name": "tokenOut", - "type": "address" + "type": "address", + "internalType": "address" }, { - "internalType": "uint256", "name": "minAmountOut", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "uint256", "name": "deadline", - "type": "uint256" + "type": "uint256", + "internalType": "uint256" }, { - "internalType": "bytes", "name": "rawParams", - "type": "bytes" + "type": "bytes", + "internalType": "bytes" } - ], - "internalType": "struct SwapQuery[]", - "name": "originQueries", - "type": "tuple[]" + ] } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { - "inputs": [], + "type": "function", "name": "synapseCCTP", + "inputs": [], "outputs": [ { - "internalType": "address", "name": "", - "type": "address" + "type": "address", + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "view" }, { - "stateMutability": "payable", - "type": "receive" + "type": "error", + "name": "DeadlineExceeded", + "inputs": [] + }, + { + "type": "error", + "name": "InsufficientOutputAmount", + "inputs": [] + }, + { + "type": "error", + "name": "MsgValueIncorrect", + "inputs": [] + }, + { + "type": "error", + "name": "PoolNotFound", + "inputs": [] + }, + { + "type": "error", + "name": "TokenAddressMismatch", + "inputs": [] + }, + { + "type": "error", + "name": "TokenNotContract", + "inputs": [] + }, + { + "type": "error", + "name": "TokenNotETH", + "inputs": [] + }, + { + "type": "error", + "name": "TokensIdentical", + "inputs": [] + }, + { + "type": "error", + "name": "UnknownRequestAction", + "inputs": [] } ] } \ No newline at end of file diff --git a/deployments/optimism/TransparentUpgradeableProxy.SynapseCCTP.json b/deployments/optimism/TransparentUpgradeableProxy.SynapseCCTP.json new file mode 100644 index 000000000..0b233d985 --- /dev/null +++ b/deployments/optimism/TransparentUpgradeableProxy.SynapseCCTP.json @@ -0,0 +1,80 @@ +{ + "address": "0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E", + "constructorArgs": "0x00000000000000000000000000b0b14bab0ac46653a40bb00c137d2bb62802b60000000000000000000000001d8f3f3ee9a973a54620e467755b157babb2958b00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000024c4d66de80000000000000000000000000fea3e5840334fc758a3decf14546bfdfbef5cd300000000000000000000000000000000000000000000000000000000", + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "_logic", + "type": "address", + "internalType": "address" + }, + { + "name": "admin_", + "type": "address", + "internalType": "address" + }, + { + "name": "_data", + "type": "bytes", + "internalType": "bytes" + } + ], + "stateMutability": "payable" + }, + { + "type": "fallback", + "stateMutability": "payable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "event", + "name": "AdminChanged", + "inputs": [ + { + "name": "previousAdmin", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "newAdmin", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "BeaconUpgraded", + "inputs": [ + { + "name": "beacon", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Upgraded", + "inputs": [ + { + "name": "implementation", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/deployments/polygon/DefaultPoolCalc.json b/deployments/polygon/DefaultPoolCalc.json new file mode 100644 index 000000000..c8d3c5586 --- /dev/null +++ b/deployments/polygon/DefaultPoolCalc.json @@ -0,0 +1,30 @@ +{ + "address": "0x0000000000Cc5af216a3E1614091a20e11bbfD32", + "constructorArgs": "0x", + "abi": [ + { + "type": "function", + "name": "calculateAddLiquidity", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "amounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + } + ] +} \ No newline at end of file diff --git a/deployments/polygon/ProxyAdmin.SynapseCCTP.json b/deployments/polygon/ProxyAdmin.SynapseCCTP.json new file mode 100644 index 000000000..e529c2e12 --- /dev/null +++ b/deployments/polygon/ProxyAdmin.SynapseCCTP.json @@ -0,0 +1,155 @@ +{ + "address": "0xc5269d5143B37877A1041DfaF2C21a76E709AF27", + "constructorArgs": "0x", + "abi": [ + { + "type": "function", + "name": "changeProxyAdmin", + "inputs": [ + { + "name": "proxy", + "type": "address", + "internalType": "contract ITransparentUpgradeableProxy" + }, + { + "name": "newAdmin", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getProxyAdmin", + "inputs": [ + { + "name": "proxy", + "type": "address", + "internalType": "contract ITransparentUpgradeableProxy" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getProxyImplementation", + "inputs": [ + { + "name": "proxy", + "type": "address", + "internalType": "contract ITransparentUpgradeableProxy" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { + "name": "newOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "upgrade", + "inputs": [ + { + "name": "proxy", + "type": "address", + "internalType": "contract ITransparentUpgradeableProxy" + }, + { + "name": "implementation", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "upgradeAndCall", + "inputs": [ + { + "name": "proxy", + "type": "address", + "internalType": "contract ITransparentUpgradeableProxy" + }, + { + "name": "implementation", + "type": "address", + "internalType": "address" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/deployments/polygon/SwapQuoterV2.json b/deployments/polygon/SwapQuoterV2.json new file mode 100644 index 000000000..d80c56843 --- /dev/null +++ b/deployments/polygon/SwapQuoterV2.json @@ -0,0 +1,703 @@ +{ + "address": "0x7443C01542f4913f276AED4D617117f3E8FAD21e", + "constructorArgs": "0x0000000000000000000000007e7a0e201fd38d3adaa9523da6c109a07118c96a0000000000000000000000000000000000cc5af216a3e1614091a20e11bbfd320000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf12700000000000000000000000000fea3e5840334fc758a3decf14546bfdfbef5cd3", + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "synapseRouter_", + "type": "address", + "internalType": "address" + }, + { + "name": "defaultPoolCalc_", + "type": "address", + "internalType": "address" + }, + { + "name": "weth_", + "type": "address", + "internalType": "address" + }, + { + "name": "owner_", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "addPools", + "inputs": [ + { + "name": "pools", + "type": "tuple[]", + "internalType": "struct SwapQuoterV2.BridgePool[]", + "components": [ + { + "name": "bridgeToken", + "type": "address", + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "allPools", + "inputs": [], + "outputs": [ + { + "name": "pools", + "type": "tuple[]", + "internalType": "struct Pool[]", + "components": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "lpToken", + "type": "address", + "internalType": "address" + }, + { + "name": "tokens", + "type": "tuple[]", + "internalType": "struct PoolToken[]", + "components": [ + { + "name": "isWeth", + "type": "bool", + "internalType": "bool" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "areConnectedTokens", + "inputs": [ + { + "name": "tokenIn", + "type": "tuple", + "internalType": "struct LimitedToken", + "components": [ + { + "name": "actionMask", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateAddLiquidity", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "amounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateRemoveLiquidity", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "amountsOut", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateSwap", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "tokenIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "dx", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateWithdrawOneToken", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenIndex", + "type": "uint8", + "internalType": "uint8" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "defaultPoolCalc", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "findConnectedTokens", + "inputs": [ + { + "name": "bridgeTokensIn", + "type": "tuple[]", + "internalType": "struct LimitedToken[]", + "components": [ + { + "name": "actionMask", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "amountFound", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "isConnected", + "type": "bool[]", + "internalType": "bool[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getAmountOut", + "inputs": [ + { + "name": "tokenIn", + "type": "tuple", + "internalType": "struct LimitedToken", + "components": [ + { + "name": "actionMask", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + }, + { + "name": "amountIn", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "query", + "type": "tuple", + "internalType": "struct SwapQuery", + "components": [ + { + "name": "routerAdapter", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + }, + { + "name": "minAmountOut", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "rawParams", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getBridgePools", + "inputs": [], + "outputs": [ + { + "name": "bridgePools", + "type": "tuple[]", + "internalType": "struct SwapQuoterV2.BridgePool[]", + "components": [ + { + "name": "bridgeToken", + "type": "address", + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getOriginDefaultPools", + "inputs": [], + "outputs": [ + { + "name": "originDefaultPools", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getOriginLinkedPools", + "inputs": [], + "outputs": [ + { + "name": "originLinkedPools", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "poolInfo", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "numTokens", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "lpToken", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "poolTokens", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "tokens", + "type": "tuple[]", + "internalType": "struct PoolToken[]", + "components": [ + { + "name": "isWeth", + "type": "bool", + "internalType": "bool" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "poolsAmount", + "inputs": [], + "outputs": [ + { + "name": "amtPools", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "removePools", + "inputs": [ + { + "name": "pools", + "type": "tuple[]", + "internalType": "struct SwapQuoterV2.BridgePool[]", + "components": [ + { + "name": "bridgeToken", + "type": "address", + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setSynapseRouter", + "inputs": [ + { + "name": "synapseRouter_", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "synapseRouter", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { + "name": "newOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "weth", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PoolAdded", + "inputs": [ + { + "name": "bridgeToken", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "indexed": false, + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PoolRemoved", + "inputs": [ + { + "name": "bridgeToken", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "poolType", + "type": "uint8", + "indexed": false, + "internalType": "enum SwapQuoterV2.PoolType" + }, + { + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "SynapseRouterUpdated", + "inputs": [ + { + "name": "synapseRouter", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "SwapQuoterV2__DuplicatedPool", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "SwapQuoterV2__UnknownPool", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + } + ] +} \ No newline at end of file diff --git a/deployments/polygon/SynapseCCTP.Implementation.json b/deployments/polygon/SynapseCCTP.Implementation.json new file mode 100644 index 000000000..482585442 --- /dev/null +++ b/deployments/polygon/SynapseCCTP.Implementation.json @@ -0,0 +1,1155 @@ +{ + "address": "0x86AebDd89357217039368831a8AB9273BBF3A48f", + "constructorArgs": "0x0000000000000000000000009daf8c91aefae50b9c0e69629d3f6ca40ca3b3fe", + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "tokenMessenger_", + "type": "address", + "internalType": "contract ITokenMessenger" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "accumulatedFees", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "addToken", + "inputs": [ + { + "name": "symbol", + "type": "string", + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "relayerFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minBaseFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minSwapFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxFee", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "calculateFeeAmount", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "isSwap", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [ + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "chainGasAmount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "circleTokenPool", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "feeStructures", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "relayerFee", + "type": "uint40", + "internalType": "uint40" + }, + { + "name": "minBaseFee", + "type": "uint72", + "internalType": "uint72" + }, + { + "name": "minSwapFee", + "type": "uint72", + "internalType": "uint72" + }, + { + "name": "maxFee", + "type": "uint72", + "internalType": "uint72" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getBridgeTokens", + "inputs": [], + "outputs": [ + { + "name": "bridgeTokens", + "type": "tuple[]", + "internalType": "struct BridgeToken[]", + "components": [ + { + "name": "symbol", + "type": "string", + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getLocalToken", + "inputs": [ + { + "name": "remoteDomain", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "remoteToken", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "owner_", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isRequestFulfilled", + "inputs": [ + { + "name": "requestID", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "localDomain", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint32", + "internalType": "uint32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "messageTransmitter", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IMessageTransmitter" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pauseSending", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "protocolFee", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "receiveCircleToken", + "inputs": [ + { + "name": "message", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "signature", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "requestVersion", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "formattedRequest", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "relayerFeeCollectors", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "remoteDomainConfig", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "domain", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "synapseCCTP", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "removeToken", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "rescueGas", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "sendCircleToken", + "inputs": [ + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "burnToken", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "requestVersion", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "swapParams", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setChainGasAmount", + "inputs": [ + { + "name": "newChainGasAmount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setCircleTokenPool", + "inputs": [ + { + "name": "circleToken", + "type": "address", + "internalType": "address" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setFeeCollector", + "inputs": [ + { + "name": "feeCollector", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setProtocolFee", + "inputs": [ + { + "name": "newProtocolFee", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setRemoteDomainConfig", + "inputs": [ + { + "name": "remoteChainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "remoteDomain", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "remoteSynapseCCTP", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setTokenFee", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "relayerFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minBaseFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minSwapFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxFee", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "symbolToToken", + "inputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "tokenMessenger", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract ITokenMessenger" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "tokenToSymbol", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { + "name": "newOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "unpauseSending", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawProtocolFees", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawRelayerFees", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "ChainGasAirdropped", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ChainGasAmountUpdated", + "inputs": [ + { + "name": "chainGasAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "CircleRequestFulfilled", + "inputs": [ + { + "name": "originDomain", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + }, + { + "name": "recipient", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "mintToken", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "requestID", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "CircleRequestSent", + "inputs": [ + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "nonce", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "requestVersion", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + }, + { + "name": "formattedRequest", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + }, + { + "name": "requestID", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "CircleTokenPoolSet", + "inputs": [ + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "FeeCollected", + "inputs": [ + { + "name": "feeCollector", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "relayerFeeAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "protocolFeeAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "FeeCollectorUpdated", + "inputs": [ + { + "name": "relayer", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "oldFeeCollector", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "newFeeCollector", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "FeesWithdrawn", + "inputs": [ + { + "name": "recipient", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProtocolFeeUpdated", + "inputs": [ + { + "name": "newProtocolFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RemoteDomainConfigSet", + "inputs": [ + { + "name": "remoteChainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "remoteDomain", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + }, + { + "name": "remoteSynapseCCTP", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenAdded", + "inputs": [ + { + "name": "symbol", + "type": "string", + "indexed": false, + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenFeeSet", + "inputs": [ + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "relayerFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "minBaseFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "minSwapFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "maxFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRemoved", + "inputs": [ + { + "name": "symbol", + "type": "string", + "indexed": false, + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "CCTPGasRescueFailed", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectChainId", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectConfig", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectDomain", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectGasAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectProtocolFee", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectTokenAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPInsufficientAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPMessageNotReceived", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPSymbolAlreadyAdded", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPSymbolIncorrect", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPTokenAlreadyAdded", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPTokenNotFound", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPZeroAddress", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPZeroAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CastOverflow", + "inputs": [] + }, + { + "type": "error", + "name": "ForwarderDeploymentFailed", + "inputs": [] + }, + { + "type": "error", + "name": "IncorrectRequestLength", + "inputs": [] + }, + { + "type": "error", + "name": "RemoteCCTPDeploymentNotSet", + "inputs": [] + }, + { + "type": "error", + "name": "UnknownRequestVersion", + "inputs": [] + } + ] +} \ No newline at end of file diff --git a/deployments/polygon/SynapseCCTP.json b/deployments/polygon/SynapseCCTP.json new file mode 100644 index 000000000..65887c963 --- /dev/null +++ b/deployments/polygon/SynapseCCTP.json @@ -0,0 +1,1155 @@ +{ + "address": "0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E", + "constructorArgs": "0x0000000000000000000000009daf8c91aefae50b9c0e69629d3f6ca40ca3b3fe", + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "tokenMessenger_", + "type": "address", + "internalType": "contract ITokenMessenger" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "accumulatedFees", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "addToken", + "inputs": [ + { + "name": "symbol", + "type": "string", + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "relayerFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minBaseFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minSwapFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxFee", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "calculateFeeAmount", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "isSwap", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [ + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "chainGasAmount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "circleTokenPool", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "feeStructures", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "relayerFee", + "type": "uint40", + "internalType": "uint40" + }, + { + "name": "minBaseFee", + "type": "uint72", + "internalType": "uint72" + }, + { + "name": "minSwapFee", + "type": "uint72", + "internalType": "uint72" + }, + { + "name": "maxFee", + "type": "uint72", + "internalType": "uint72" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getBridgeTokens", + "inputs": [], + "outputs": [ + { + "name": "bridgeTokens", + "type": "tuple[]", + "internalType": "struct BridgeToken[]", + "components": [ + { + "name": "symbol", + "type": "string", + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getLocalToken", + "inputs": [ + { + "name": "remoteDomain", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "remoteToken", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "owner_", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isRequestFulfilled", + "inputs": [ + { + "name": "requestID", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "localDomain", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint32", + "internalType": "uint32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "messageTransmitter", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IMessageTransmitter" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pauseSending", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "protocolFee", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "receiveCircleToken", + "inputs": [ + { + "name": "message", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "signature", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "requestVersion", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "formattedRequest", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "relayerFeeCollectors", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "remoteDomainConfig", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "domain", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "synapseCCTP", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "removeToken", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "rescueGas", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "sendCircleToken", + "inputs": [ + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "burnToken", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "requestVersion", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "swapParams", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setChainGasAmount", + "inputs": [ + { + "name": "newChainGasAmount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setCircleTokenPool", + "inputs": [ + { + "name": "circleToken", + "type": "address", + "internalType": "address" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setFeeCollector", + "inputs": [ + { + "name": "feeCollector", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setProtocolFee", + "inputs": [ + { + "name": "newProtocolFee", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setRemoteDomainConfig", + "inputs": [ + { + "name": "remoteChainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "remoteDomain", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "remoteSynapseCCTP", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setTokenFee", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "relayerFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minBaseFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minSwapFee", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxFee", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "symbolToToken", + "inputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "tokenMessenger", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract ITokenMessenger" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "tokenToSymbol", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { + "name": "newOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "unpauseSending", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawProtocolFees", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawRelayerFees", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "ChainGasAirdropped", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ChainGasAmountUpdated", + "inputs": [ + { + "name": "chainGasAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "CircleRequestFulfilled", + "inputs": [ + { + "name": "originDomain", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + }, + { + "name": "recipient", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "mintToken", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "fee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "requestID", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "CircleRequestSent", + "inputs": [ + { + "name": "chainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "nonce", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "requestVersion", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + }, + { + "name": "formattedRequest", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + }, + { + "name": "requestID", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "CircleTokenPoolSet", + "inputs": [ + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "FeeCollected", + "inputs": [ + { + "name": "feeCollector", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "relayerFeeAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "protocolFeeAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "FeeCollectorUpdated", + "inputs": [ + { + "name": "relayer", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "oldFeeCollector", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "newFeeCollector", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "FeesWithdrawn", + "inputs": [ + { + "name": "recipient", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProtocolFeeUpdated", + "inputs": [ + { + "name": "newProtocolFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RemoteDomainConfigSet", + "inputs": [ + { + "name": "remoteChainId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "remoteDomain", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + }, + { + "name": "remoteSynapseCCTP", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenAdded", + "inputs": [ + { + "name": "symbol", + "type": "string", + "indexed": false, + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenFeeSet", + "inputs": [ + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "relayerFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "minBaseFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "minSwapFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "maxFee", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRemoved", + "inputs": [ + { + "name": "symbol", + "type": "string", + "indexed": false, + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "CCTPGasRescueFailed", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectChainId", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectConfig", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectDomain", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectGasAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectProtocolFee", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPIncorrectTokenAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPInsufficientAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPMessageNotReceived", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPSymbolAlreadyAdded", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPSymbolIncorrect", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPTokenAlreadyAdded", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPTokenNotFound", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPZeroAddress", + "inputs": [] + }, + { + "type": "error", + "name": "CCTPZeroAmount", + "inputs": [] + }, + { + "type": "error", + "name": "CastOverflow", + "inputs": [] + }, + { + "type": "error", + "name": "ForwarderDeploymentFailed", + "inputs": [] + }, + { + "type": "error", + "name": "IncorrectRequestLength", + "inputs": [] + }, + { + "type": "error", + "name": "RemoteCCTPDeploymentNotSet", + "inputs": [] + }, + { + "type": "error", + "name": "UnknownRequestVersion", + "inputs": [] + } + ] +} \ No newline at end of file diff --git a/deployments/polygon/SynapseCCTPRouter.json b/deployments/polygon/SynapseCCTPRouter.json new file mode 100644 index 000000000..f2e719289 --- /dev/null +++ b/deployments/polygon/SynapseCCTPRouter.json @@ -0,0 +1,423 @@ +{ + "address": "0xd5a597d6e7ddf373a92C8f477DAAA673b0902F48", + "constructorArgs": "0x00000000000000000000000012715a66773bd9c54534a01abf01d05f6b4bd35e", + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "_synapseCCTP", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "adapterSwap", + "inputs": [ + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenIn", + "type": "address", + "internalType": "address" + }, + { + "name": "amountIn", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + }, + { + "name": "rawParams", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "bridge", + "inputs": [ + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "originQuery", + "type": "tuple", + "internalType": "struct SwapQuery", + "components": [ + { + "name": "routerAdapter", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + }, + { + "name": "minAmountOut", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "rawParams", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "destQuery", + "type": "tuple", + "internalType": "struct SwapQuery", + "components": [ + { + "name": "routerAdapter", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + }, + { + "name": "minAmountOut", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "rawParams", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "calculateFeeAmount", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "isSwap", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [ + { + "name": "fee", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "feeStructures", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "relayerFee", + "type": "uint40", + "internalType": "uint40" + }, + { + "name": "minBaseFee", + "type": "uint72", + "internalType": "uint72" + }, + { + "name": "minSwapFee", + "type": "uint72", + "internalType": "uint72" + }, + { + "name": "maxFee", + "type": "uint72", + "internalType": "uint72" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getConnectedBridgeTokens", + "inputs": [ + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "tokens", + "type": "tuple[]", + "internalType": "struct BridgeToken[]", + "components": [ + { + "name": "symbol", + "type": "string", + "internalType": "string" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getDestinationAmountOut", + "inputs": [ + { + "name": "requests", + "type": "tuple[]", + "internalType": "struct DestRequest[]", + "components": [ + { + "name": "symbol", + "type": "string", + "internalType": "string" + }, + { + "name": "amountIn", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "destQueries", + "type": "tuple[]", + "internalType": "struct SwapQuery[]", + "components": [ + { + "name": "routerAdapter", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + }, + { + "name": "minAmountOut", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "rawParams", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getOriginAmountOut", + "inputs": [ + { + "name": "tokenIn", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenSymbols", + "type": "string[]", + "internalType": "string[]" + }, + { + "name": "amountIn", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "originQueries", + "type": "tuple[]", + "internalType": "struct SwapQuery[]", + "components": [ + { + "name": "routerAdapter", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + }, + { + "name": "minAmountOut", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "rawParams", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "synapseCCTP", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "error", + "name": "DeadlineExceeded", + "inputs": [] + }, + { + "type": "error", + "name": "InsufficientOutputAmount", + "inputs": [] + }, + { + "type": "error", + "name": "MsgValueIncorrect", + "inputs": [] + }, + { + "type": "error", + "name": "PoolNotFound", + "inputs": [] + }, + { + "type": "error", + "name": "TokenAddressMismatch", + "inputs": [] + }, + { + "type": "error", + "name": "TokenNotContract", + "inputs": [] + }, + { + "type": "error", + "name": "TokenNotETH", + "inputs": [] + }, + { + "type": "error", + "name": "TokensIdentical", + "inputs": [] + }, + { + "type": "error", + "name": "UnknownRequestAction", + "inputs": [] + } + ] +} \ No newline at end of file diff --git a/deployments/polygon/TransparentUpgradeableProxy.SynapseCCTP.json b/deployments/polygon/TransparentUpgradeableProxy.SynapseCCTP.json new file mode 100644 index 000000000..748a8a381 --- /dev/null +++ b/deployments/polygon/TransparentUpgradeableProxy.SynapseCCTP.json @@ -0,0 +1,80 @@ +{ + "address": "0x12715a66773BD9C54534a01aBF01d05F6B4Bd35E", + "constructorArgs": "0x00000000000000000000000086aebdd89357217039368831a8ab9273bbf3a48f000000000000000000000000c5269d5143b37877a1041dfaf2c21a76e709af2700000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000024c4d66de80000000000000000000000000fea3e5840334fc758a3decf14546bfdfbef5cd300000000000000000000000000000000000000000000000000000000", + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "_logic", + "type": "address", + "internalType": "address" + }, + { + "name": "admin_", + "type": "address", + "internalType": "address" + }, + { + "name": "_data", + "type": "bytes", + "internalType": "bytes" + } + ], + "stateMutability": "payable" + }, + { + "type": "fallback", + "stateMutability": "payable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "event", + "name": "AdminChanged", + "inputs": [ + { + "name": "previousAdmin", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "newAdmin", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "BeaconUpgraded", + "inputs": [ + { + "name": "beacon", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Upgraded", + "inputs": [ + { + "name": "implementation", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + } + ] +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index bdf691ca4..0ad9534e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,6 +5,7 @@ "requires": true, "packages": { "": { + "name": "synapse-contracts", "version": "1.0.0", "license": "ISC", "dependencies": { @@ -17,6 +18,7 @@ "@openzeppelin/contracts-4.5.0": "npm:@openzeppelin/contracts@4.5.0", "@openzeppelin/contracts-4.7.3": "npm:@openzeppelin/contracts@^4.7.3", "@openzeppelin/contracts-4.8.0": "npm:@openzeppelin/contracts@4.8.0", + "@openzeppelin/contracts-4.9.5": "npm:@openzeppelin/contracts@4.9.5", "@openzeppelin/contracts-upgradeable": "3.4.1", "@openzeppelin/contracts-upgradeable-4.5.0": "npm:@openzeppelin/contracts-upgradeable@4.5.0", "@openzeppelin/contracts-upgradeable-4.7.3": "npm:@openzeppelin/contracts-upgradeable@^4.7.3", @@ -2210,6 +2212,12 @@ "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.8.0.tgz", "integrity": "sha512-AGuwhRRL+NaKx73WKRNzeCxOCOCxpaqF+kp8TJ89QzAipSwZy/NoflkWaL9bywXFRhIzXt8j38sfF7KBKCPWLw==" }, + "node_modules/@openzeppelin/contracts-4.9.5": { + "name": "@openzeppelin/contracts", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.9.5.tgz", + "integrity": "sha512-ZK+W5mVhRppff9BE6YdR8CC52C8zAvsVAiWhEtQ5+oNxFE6h1WdeWo+FJSF8KKvtxxVYZ7MTP/5KoVpAU3aSWg==" + }, "node_modules/@openzeppelin/contracts-upgradeable": { "version": "3.4.1", "resolved": "https://registry.npmjs.org/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-3.4.1.tgz", @@ -32277,6 +32285,11 @@ "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.8.0.tgz", "integrity": "sha512-AGuwhRRL+NaKx73WKRNzeCxOCOCxpaqF+kp8TJ89QzAipSwZy/NoflkWaL9bywXFRhIzXt8j38sfF7KBKCPWLw==" }, + "@openzeppelin/contracts-4.9.5": { + "version": "npm:@openzeppelin/contracts@4.9.5", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.9.5.tgz", + "integrity": "sha512-ZK+W5mVhRppff9BE6YdR8CC52C8zAvsVAiWhEtQ5+oNxFE6h1WdeWo+FJSF8KKvtxxVYZ7MTP/5KoVpAU3aSWg==" + }, "@openzeppelin/contracts-upgradeable": { "version": "3.4.1", "resolved": "https://registry.npmjs.org/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-3.4.1.tgz", diff --git a/package.json b/package.json index 59805d9e2..1b6624413 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "@openzeppelin/contracts-4.5.0": "npm:@openzeppelin/contracts@4.5.0", "@openzeppelin/contracts-4.7.3": "npm:@openzeppelin/contracts@^4.7.3", "@openzeppelin/contracts-4.8.0": "npm:@openzeppelin/contracts@4.8.0", + "@openzeppelin/contracts-4.9.5": "npm:@openzeppelin/contracts@4.9.5", "@openzeppelin/contracts-upgradeable": "3.4.1", "@openzeppelin/contracts-upgradeable-4.5.0": "npm:@openzeppelin/contracts-upgradeable@4.5.0", "@openzeppelin/contracts-upgradeable-4.7.3": "npm:@openzeppelin/contracts-upgradeable@^4.7.3", diff --git a/script/cctp-chains.sh b/script/cctp-chains.sh new file mode 100755 index 000000000..ac0b31f06 --- /dev/null +++ b/script/cctp-chains.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash +# This script parses the list of CCTP chains from CCTP global config and runs a command for each chain +# Usage: ./script/cctp-chains.sh "" [] +# - chainName will be run for each CCTP chain + +# Colors +RED="\033[0;31m" +GREEN="\033[0;32m" +NC="\033[0m" # No Color + +COMMAND=$1 +# Get the rest of the args +shift 1 +ARGS=$@ +# Check that all required args exist +if [ -z "$COMMAND" ]; then + echo -e "${RED}Usage: ./script/cctp-chains.sh \"\" []${NC}" + exit 1 +fi + +# Get the list of chain aliases from CCTP global config +CCTP_CONFIG_FILE="script/configs/SynapseCCTP.chains.json" +if [ ! -f "$CCTP_CONFIG_FILE" ]; then + echo -e "${RED}CCTP global config file not found: $CCTP_CONFIG_FILE${NC}" + exit 1 +fi +# Aliases are the keys of the .mainnet.domains object +CHAIN_ALIASES=$(cat $CCTP_CONFIG_FILE | jq -r '.mainnet.domains | keys[]') +# Print the comma separated list of chain aliases +PRETTY_CHAIN_ALIASES=$(echo $CHAIN_ALIASES | sed 's/ /, /g') +echo "Found chains: $PRETTY_CHAIN_ALIASES" +# Add space before args, if they are not empty (for pretty printing) +PRETTY_ARGS="" +if [ ! -z "$ARGS" ]; then + PRETTY_ARGS=" $ARGS" +fi +echo -e "${GREEN}Running [$COMMAND $PRETTY_ARGS] for each chain...${NC}" +# Loop through the chain aliases +for CHAIN_ALIAS in $CHAIN_ALIASES; do + # Run the command for each chain + $COMMAND $CHAIN_ALIAS $ARGS +done diff --git a/script/cctp/DeploySynapseCCTP.Implementation.s.sol b/script/cctp/DeploySynapseCCTP.Implementation.s.sol new file mode 100644 index 000000000..19a0ab14d --- /dev/null +++ b/script/cctp/DeploySynapseCCTP.Implementation.s.sol @@ -0,0 +1,114 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.17; + +import {ITokenMessenger, SynapseCCTP} from "../../contracts/cctp/SynapseCCTP.sol"; + +import {BasicSynapseScript, StringUtils} from "../templates/BasicSynapse.s.sol"; +import {stdJson} from "forge-std/Script.sol"; + +import {ProxyAdmin} from "@openzeppelin/contracts-4.9.5/proxy/transparent/ProxyAdmin.sol"; + +// solhint-disable no-console +contract DeploySynapseCCTPImplementation is BasicSynapseScript { + using stdJson for string; + using StringUtils for string; + + string public constant SYNAPSE_CCTP = "SynapseCCTP"; + string public constant IMPLEMENTATION_SUFFIX = ".Implementation"; + string public constant PROXY_ADMIN = "ProxyAdmin"; + address public tokenMessenger; + + string public proxyAdminName = PROXY_ADMIN.concat(".", SYNAPSE_CCTP); + address public proxyAdmin; + address public devMultisig; + + address public implementation; + + function run() external { + // Setup the BasicSynapseScript + setUp(); + loadConfig(); + vm.startBroadcast(); + deployAndInitialize(); + deployProxyAdmin(); + vm.stopBroadcast(); + finalChecks(); + } + + function loadConfig() public { + string memory config = getDeployConfig(SYNAPSE_CCTP); + // Read tokenMessenger from config + tokenMessenger = config.readAddress(".tokenMessenger"); + require(tokenMessenger != address(0), "TokenMessenger not set"); + // Read DevMultisig deployment address for the current chain + devMultisig = getDeploymentAddress("DevMultisig"); + printLog("Using [devMultisig = %s]", devMultisig); + } + + function deployAndInitialize() public { + implementation = deployAndSaveAs({ + contractName: SYNAPSE_CCTP, + contractAlias: SYNAPSE_CCTP.concat(IMPLEMENTATION_SUFFIX), + deployContract: cbDeploySynapseCCTP + }); + // Initialize the implementation just in case + address owner = SynapseCCTP(implementation).owner(); + if (owner == address(0)) { + SynapseCCTP(implementation).initialize(msg.sender); + printLog("Initialized SynapseCCTP implementation"); + } else { + printLog("SynapseCCTP implementation already initialized"); + printLog(string.concat(TAB, "owner = ", vm.toString(owner))); + } + } + + function deployProxyAdmin() public { + // Check if the ProxyAdmin has already been deployed + proxyAdmin = tryGetDeploymentAddress(proxyAdminName); + if (proxyAdmin == address(0)) { + // Deploy the ProxyAdmin + proxyAdmin = deployAndSaveAs({ + contractName: PROXY_ADMIN, + contractAlias: proxyAdminName, + deployContract: cbDeployProxyAdmin + }); + } + // Transfer ownership of the ProxyAdmin to DevMultisig + printLog("Transferring ownership of ProxyAdmin to DevMultisig"); + increaseIndent(); + address adminOwner = ProxyAdmin(proxyAdmin).owner(); + if (adminOwner == msg.sender) { + address multisig = getDeploymentAddress("DevMultisig"); + ProxyAdmin(proxyAdmin).transferOwnership(multisig); + printLog("Ownership transferred to %s", multisig); + } else { + printLog("Skipping: ProxyAdmin owned by %s", adminOwner); + } + decreaseIndent(); + } + + /// @notice Callback function to deploy the ProxyAdmin contract. + /// Must follow this signature for the deploy script to work: + /// `deployContract() internal returns (address deployedAt, bytes memory constructorArgs)` + function cbDeployProxyAdmin() internal returns (address deployedAt, bytes memory constructorArgs) { + deployedAt = address(new ProxyAdmin()); + constructorArgs = ""; + } + + /// @notice Callback function to deploy the SynapseCCTP contract. + /// Must follow this signature for the deploy script to work: + /// `deployContract() internal returns (address deployedAt, bytes memory constructorArgs)` + function cbDeploySynapseCCTP() internal returns (address deployedAt, bytes memory constructorArgs) { + deployedAt = address(new SynapseCCTP(ITokenMessenger(tokenMessenger))); + constructorArgs = abi.encode(tokenMessenger); + } + + function finalChecks() internal view { + require( + address(SynapseCCTP(implementation).tokenMessenger()) == tokenMessenger, + "Failed to set tokenMessenger" + ); + require(SynapseCCTP(implementation).owner() == msg.sender, "Failed to set owner"); + require(ProxyAdmin(proxyAdmin).owner() == devMultisig, "Failed to set ProxyAdmin owner"); + } +} diff --git a/script/cctp/DeploySynapseCCTP.Proxy.sol b/script/cctp/DeploySynapseCCTP.Proxy.sol new file mode 100644 index 000000000..98f31c9be --- /dev/null +++ b/script/cctp/DeploySynapseCCTP.Proxy.sol @@ -0,0 +1,115 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.17; + +import {ITokenMessenger, SynapseCCTP} from "../../contracts/cctp/SynapseCCTP.sol"; + +import {BasicSynapseScript, StringUtils} from "../templates/BasicSynapse.s.sol"; +import {stdJson} from "forge-std/Script.sol"; + +import {ProxyAdmin} from "@openzeppelin/contracts-4.9.5/proxy/transparent/ProxyAdmin.sol"; +// prettier-ignore +import { + TransparentUpgradeableProxy, + ITransparentUpgradeableProxy +} from "@openzeppelin/contracts-4.9.5/proxy/transparent/TransparentUpgradeableProxy.sol"; + +// solhint-disable no-console +contract DeploySynapseCCTPImplementation is BasicSynapseScript { + using stdJson for string; + using StringUtils for string; + + string public constant SYNAPSE_CCTP = "SynapseCCTP"; + string public constant IMPLEMENTATION_SUFFIX = ".Implementation"; + string public constant PROXY_NAME = "TransparentUpgradeableProxy"; + string public constant PROXY_ADMIN = "ProxyAdmin"; + + address public tokenMessenger; + address public implementation; + + string public proxyAdminName = PROXY_ADMIN.concat(".", SYNAPSE_CCTP); + address public proxyAdmin; + address public proxy; + + address public owner; + + function run() external { + // Setup the BasicSynapseScript + setUp(); + loadConfig(); + vm.startBroadcast(); + skipNonces(); + deployAndSaveProxy(); + vm.stopBroadcast(); + finalChecks(); + } + + function loadConfig() public { + string memory config = getDeployConfig(SYNAPSE_CCTP); + // Read tokenMessenger from config + tokenMessenger = config.readAddress(".tokenMessenger"); + require(tokenMessenger != address(0), "TokenMessenger not set"); + // Load contracts + implementation = getDeploymentAddress(SYNAPSE_CCTP.concat(IMPLEMENTATION_SUFFIX)); + printLog("Using [implementation = %s]", implementation); + proxyAdmin = getDeploymentAddress(proxyAdminName); + printLog("Using [proxyAdmin = %s]", proxyAdmin); + // Load owner address + owner = vm.envAddress("OWNER_ADDR"); + require(owner != address(0), "Owner not set"); + printLog("Using [owner = %s]", owner); + } + + function skipNonces() public { + uint256 deploymentNonce = vm.envUint("SYNAPSE_CCTP_NONCE"); + uint256 initialNonce = vm.getNonce(msg.sender); + if (initialNonce > deploymentNonce) { + printLog(unicode"❗ Initial nonce higher than expected, DOUBLE CHECK THE ADDRESS"); + return; + } + if (initialNonce == deploymentNonce) { + printLog(unicode"💬 Nonce already configured"); + return; + } + increaseIndent(); + for (uint256 i = initialNonce; i < deploymentNonce; i++) { + printLog(string.concat("Skipping nonce ", vm.toString(i))); + payable(msg.sender).transfer(0); + } + decreaseIndent(); + } + + function deployAndSaveProxy() public { + string memory cctpProxyName = PROXY_NAME.concat(".", SYNAPSE_CCTP); + bool alreadyDeployed = tryGetDeploymentAddress(cctpProxyName) != address(0); + proxy = deployAndSaveAs({ + contractName: PROXY_NAME, + contractAlias: cctpProxyName, + deployContract: cdDeploySynapseCCTPProxy + }); + // Save deployment for the proxy contract using implementation ABI if it hasn't been deployed yet + if (!alreadyDeployed) { + saveProxyDeployment({ + contractName: SYNAPSE_CCTP, + implementationAlias: SYNAPSE_CCTP.concat(IMPLEMENTATION_SUFFIX), + deployedAt: proxy + }); + } + } + + /// @notice Callback function to deploy the SynapseCCTP contract. + /// Must follow this signature for the deploy script to work: + /// `deployContract() internal returns (address deployedAt, bytes memory constructorArgs)` + function cdDeploySynapseCCTPProxy() internal returns (address deployedAt, bytes memory constructorArgs) { + // SynapseCCTP.initialize(owner) + bytes memory initData = abi.encodeCall(SynapseCCTP.initialize, (owner)); + deployedAt = address( + new TransparentUpgradeableProxy({_logic: implementation, admin_: proxyAdmin, _data: initData}) + ); + constructorArgs = abi.encode(implementation, proxyAdmin, initData); + } + + function finalChecks() internal view { + require(address(SynapseCCTP(proxy).tokenMessenger()) == tokenMessenger, "Failed to set tokenMessenger"); + require(SynapseCCTP(proxy).owner() == owner, "Failed to set owner"); + } +} diff --git a/script/cctp/SetupSynapseCCTP.s.sol b/script/cctp/SetupSynapseCCTP.s.sol index 57bdf0607..6c4d890e9 100644 --- a/script/cctp/SetupSynapseCCTP.s.sol +++ b/script/cctp/SetupSynapseCCTP.s.sol @@ -130,7 +130,7 @@ contract SetupCCTPScript is BasicSynapseScript { function setupRemoteDeployments() public { console.log("Setting up remote deployments"); string memory config = getGlobalConfig({contractName: SYNAPSE_CCTP, globalProperty: "chains"}); - string[] memory chains = config.readStringArray(ENVIRONMENT.concat(".chains")); + string[] memory chains = vm.parseJsonKeys(config, ENVIRONMENT.concat(".domains")); bool chainFound = false; for (uint256 i = 0; i < chains.length; ++i) { string memory remoteChain = chains[i]; diff --git a/script/cctp/check-chain.sh b/script/cctp/check-chain.sh new file mode 100755 index 000000000..ec7bfef71 --- /dev/null +++ b/script/cctp/check-chain.sh @@ -0,0 +1,50 @@ +#!/usr/bin/env bash +# This script checks the CCTP deployment on a given chain +# Usage: ./script/cctp/check-chain.sh + +# Colors +RED="\033[0;31m" +GREEN="\033[0;32m" +NC="\033[0m" # No Color + +CHAIN_NAME=$1 +if [ -z "$CHAIN_NAME" ]; then + echo -e "${RED}Usage: ./script/cctp/check-chain.sh ${NC}" + exit 1 +fi + +# Fetch the RPC URL for the chain from .env +source .env +# Check that RPC URL env var exists +CHAIN_RPC_ENV=${CHAIN_NAME^^}_API +CHAIN_RPC_URL=${!CHAIN_RPC_ENV} +if [ -z "$CHAIN_RPC_URL" ]; then + echo -e "${RED}Error: $CHAIN_RPC_ENV env var not found${NC}" + exit 1 +fi +echo -e "${GREEN}Looking into SynapseCCTP deployment on $CHAIN_NAME${NC}" + +# Get SynapseCCTP deployment address +artifactFN="deployments/$CHAIN_NAME/SynapseCCTP.json" +if [ ! -f "$artifactFN" ]; then + echo -e "${RED}Error: $artifactFN not found${NC}" + exit 1 +fi +synapseCCTP=$(cat $artifactFN | jq -r '.address') +echo " SynapseCCTP: $synapseCCTP" +owner=$(cast call -r $CHAIN_RPC_URL $synapseCCTP "owner()(address)") +echo " Owner: $owner" + +proxyAdminFN="deployments/$CHAIN_NAME/ProxyAdmin.SynapseCCTP.json" +if [ ! -f "$proxyAdminFN" ]; then + echo -e "${RED}Error: $proxyAdminFN not found${NC}" + exit 1 +fi +proxyAdmin=$(cat $proxyAdminFN | jq -r '.address') + +implementation=$(cast call -r $CHAIN_RPC_URL $proxyAdmin "getProxyImplementation(address)(address)" $synapseCCTP) +echo " Implementation: $implementation" +admin=$(cast call -r $CHAIN_RPC_URL $proxyAdmin "getProxyAdmin(address)(address)" $synapseCCTP) +echo " ProxyAdmin: $admin" +adminOwner=$(cast call -r $CHAIN_RPC_URL $admin "owner()(address)") +echo " ProxyAdmin's owner: $adminOwner" diff --git a/script/cctp/verify-chain.sh b/script/cctp/verify-chain.sh new file mode 100755 index 000000000..2eab21f72 --- /dev/null +++ b/script/cctp/verify-chain.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +# This script verifeis the CCTP deployments on a given chain +# Usage: ./script/cctp/verify-chain.sh + +# Colors +RED="\033[0;31m" +GREEN="\033[0;32m" +NC="\033[0m" # No Color + +CHAIN_NAME=$1 +if [ -z "$CHAIN_NAME" ]; then + echo -e "${RED}Usage: ./script/cctp/check-chain.sh ${NC}" + exit 1 +fi + +./script/verify-contract.sh $CHAIN_NAME SynapseCCTP.Implementation +./script/verify-contract.sh $CHAIN_NAME ProxyAdmin.SynapseCCTP +./script/verify-contract.sh $CHAIN_NAME TransparentUpgradeableProxy.SynapseCCTP --compiler-version "0.8.17" +./script/verify-contract.sh $CHAIN_NAME SynapseCCTPRouter diff --git a/script/configs/SynapseCCTP.chains.json b/script/configs/SynapseCCTP.chains.json index 75b3f3657..1abad67b2 100644 --- a/script/configs/SynapseCCTP.chains.json +++ b/script/configs/SynapseCCTP.chains.json @@ -1,23 +1,23 @@ { "mainnet": { - "chains": ["arbitrum", "avalanche", "base", "mainnet", "optimism"], "domains": { "arbitrum": 3, "avalanche": 1, "base": 6, "mainnet": 0, - "optimism": 2 + "optimism": 2, + "polygon": 7 }, "gasAirdrop": { - "arbitrum": 600000000000000, + "arbitrum": 300000000000000, "avalanche": 25000000000000000, - "base": 500000000000000, + "base": 300000000000000, "mainnet": 0, - "optimism": 300000000000000 + "optimism": 300000000000000, + "polygon": 250000000000000000 } }, "testnet": { - "chains": ["arbitrum_goerli", "fuji", "goerli"], "domains": { "arbitrum_goerli": 3, "fuji": 1, diff --git a/script/configs/arbitrum/SynapseCCTP.dc.json b/script/configs/arbitrum/SynapseCCTP.dc.json index 69408eff4..a1d6fedf9 100644 --- a/script/configs/arbitrum/SynapseCCTP.dc.json +++ b/script/configs/arbitrum/SynapseCCTP.dc.json @@ -2,7 +2,7 @@ "tokenMessenger": "0x19330d10D9Cc8751218eaf51E8885D058642E08A", "tokens": { "USDC": { - "pool": "0x0000000000000000000000000000000000000000", + "pool": "0x9A2Dea7B81cfe3e0011D44D41c5c5142b8d9abdF", "token": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", "relayerFee": 4000000, "minBaseFee": 2000000, diff --git a/script/configs/avalanche/SynapseCCTP.dc.json b/script/configs/avalanche/SynapseCCTP.dc.json index b70ba61ec..f86150c5d 100644 --- a/script/configs/avalanche/SynapseCCTP.dc.json +++ b/script/configs/avalanche/SynapseCCTP.dc.json @@ -2,11 +2,11 @@ "tokenMessenger": "0x6B25532e1060CE10cc3B0A99e5683b91BFDe6982", "tokens": { "USDC": { - "pool": "0xA196a03653f6cc5cA0282A8BD7Ec60e93f620afc", + "pool": "0x9A2Dea7B81cfe3e0011D44D41c5c5142b8d9abdF", "token": "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", "relayerFee": 4000000, - "minBaseFee": 1000000, - "minSwapFee": 1500000, + "minBaseFee": 20000000, + "minSwapFee": 40000000, "maxFee": 400000000 } } diff --git a/script/configs/base/SynapseCCTP.dc.json b/script/configs/base/SynapseCCTP.dc.json index 64d351132..c997f7a6d 100644 --- a/script/configs/base/SynapseCCTP.dc.json +++ b/script/configs/base/SynapseCCTP.dc.json @@ -5,8 +5,8 @@ "pool": "0xC9b89AcfB36c9f7d8d2befe38Ac3FB766204Cbd9", "token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "relayerFee": 4000000, - "minBaseFee": 1600000, - "minSwapFee": 1600000, + "minBaseFee": 2000000, + "minSwapFee": 2000000, "maxFee": 400000000 } } diff --git a/script/configs/mainnet/SynapseCCTP.dc.json b/script/configs/mainnet/SynapseCCTP.dc.json index 557de17ba..aef17cc09 100644 --- a/script/configs/mainnet/SynapseCCTP.dc.json +++ b/script/configs/mainnet/SynapseCCTP.dc.json @@ -2,11 +2,11 @@ "tokenMessenger": "0xBd3fa81B58Ba92a82136038B25aDec7066af3155", "tokens": { "USDC": { - "pool": "0x1116898DdA4015eD8dDefb84b6e8Bc24528Af2d8", + "pool": "0xC9b89AcfB36c9f7d8d2befe38Ac3FB766204Cbd9", "token": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "relayerFee": 4000000, - "minBaseFee": 15000000, - "minSwapFee": 30000000, + "minBaseFee": 30000000, + "minSwapFee": 50000000, "maxFee": 400000000 } } diff --git a/script/configs/optimism/SynapseCCTP.dc.json b/script/configs/optimism/SynapseCCTP.dc.json index 24161c189..32547e4f7 100644 --- a/script/configs/optimism/SynapseCCTP.dc.json +++ b/script/configs/optimism/SynapseCCTP.dc.json @@ -5,8 +5,8 @@ "pool": "0x27FD7c2d4C6541e9C87d98c8156c8aB61ea185f6", "token": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85", "relayerFee": 4000000, - "minBaseFee": 1000000, - "minSwapFee": 1000000, + "minBaseFee": 2000000, + "minSwapFee": 2000000, "maxFee": 400000000 } } diff --git a/script/configs/polygon/SwapQuoterV2.dc.json b/script/configs/polygon/SwapQuoterV2.dc.json new file mode 100644 index 000000000..3498b1588 --- /dev/null +++ b/script/configs/polygon/SwapQuoterV2.dc.json @@ -0,0 +1,16 @@ +{ + "pools": { + "0": { + "description": "CCTP.USDC", + "isLinked": true, + "pool": "0x686eC64ae1C2E299C6684e1E2640FcEC7D2c01F1", + "token": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359" + }, + "1": { + "description": "nUSD", + "isLinked": false, + "pool": "0x85fCD7Dd0a1e1A9FCD5FD886ED522dE8221C3EE5", + "token": "0xB6c473756050dE474286bED418B77Aeac39B02aF" + } + } +} \ No newline at end of file diff --git a/script/configs/polygon/SynapseCCTP.dc.json b/script/configs/polygon/SynapseCCTP.dc.json new file mode 100644 index 000000000..f2c72b843 --- /dev/null +++ b/script/configs/polygon/SynapseCCTP.dc.json @@ -0,0 +1,13 @@ +{ + "tokenMessenger": "0x9daF8c91AEFAE50b9c0E69629D3F6Ca40cA3B3FE", + "tokens": { + "USDC": { + "pool": "0x686eC64ae1C2E299C6684e1E2640FcEC7D2c01F1", + "token": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359", + "relayerFee": 4000000, + "minBaseFee": 450000, + "minSwapFee": 1000000, + "maxFee": 400000000 + } + } +} diff --git a/script/networks.json b/script/networks.json index 9016ca8a5..bedcdc59f 100644 --- a/script/networks.json +++ b/script/networks.json @@ -2,6 +2,7 @@ "forgeOptions": { "arbitrum": "--with-gas-price 100000000", "aurora": "--legacy --slow", + "base": "--with-gas-price 100000000", "boba": "--legacy --skip-simulation --slow", "canto": "--legacy --slow", "cronos": "--slow", @@ -12,7 +13,7 @@ "metis": "--legacy", "moonbeam": "--skip-simulation --slow", "moonriver": "--skip-simulation --slow", - "optimism": "--with-gas-price 1337", + "optimism": "--with-gas-price 100000000", "polygon": "--slow" } } diff --git a/script/run.sh b/script/run.sh index 7aababf2d..88ae2bbee 100755 --- a/script/run.sh +++ b/script/run.sh @@ -52,15 +52,6 @@ for arg in "$@"; do fi done -# Fetch the RPC URL for the chain from .env -source .env -CHAIN_RPC_ENV=${CHAIN_NAME^^}_API -CHAIN_RPC_URL=${!CHAIN_RPC_ENV} -if [ -z "$CHAIN_RPC_URL" ]; then - echo -e "${RED}Error: $CHAIN_RPC_ENV env var not found${NC}" - exit 1 -fi - # Fetch the chain-specific options from "./script/networks.json" # Check if json file exists NETWORKS_JSON="./script/networks.json" @@ -113,12 +104,7 @@ fi # Print information about the signer address echo -e "${GREEN}Using $WALLET_ADDR [$WALLET_TYPE] as the signer address${NC}" -# Get the signer balance in Ether -BALANCE=$(cast balance --ether --rpc-url $CHAIN_RPC_URL $WALLET_ADDR) -# Get that signer nonce -NONCE=$(cast nonce --rpc-url $CHAIN_RPC_URL $WALLET_ADDR) -echo " Signer balance: $BALANCE" -echo " Signer nonce: $NONCE" +./script/sh/wallet.sh $CHAIN_NAME $WALLET_ENV_NAME # Create directory for fresh deployments in case it doesn't exist mkdir -p ".deployments/$CHAIN_NAME" diff --git a/script/sh/wallet.sh b/script/sh/wallet.sh new file mode 100755 index 000000000..fabccbde9 --- /dev/null +++ b/script/sh/wallet.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash +# This script prints wallet's nonce and balance on the given chain +# Usage: ./script/sh/wallet.sh + +# Colors +RED="\033[0;31m" +NC="\033[0m" # No Color + +CHAIN_NAME=$1 +# Convert the wallet env name to uppercase +WALLET_ENV_NAME=${2^^} +if [ -z "$CHAIN_NAME" ] || [ -z "$WALLET_ENV_NAME" ]; then + echo -e "${RED}Usage: ./script/sh/wallet.sh ${NC}" + exit 1 +fi + +# Fetch the RPC URL for the chain from .env +source .env +# Check that RPC URL env var exists +CHAIN_RPC_ENV=${CHAIN_NAME^^}_API +CHAIN_RPC_URL=${!CHAIN_RPC_ENV} +if [ -z "$CHAIN_RPC_URL" ]; then + echo -e "${RED}Error: $CHAIN_RPC_ENV env var not found${NC}" + exit 1 +fi +# Check that wallet address env var exists +WALLET_ADDR_ENV_NAME=${WALLET_ENV_NAME}_ADDR +WALLET_ADDR=${!WALLET_ADDR_ENV_NAME} +if [ -z "$WALLET_ADDR" ]; then + echo -e "${RED}Error: $WALLET_ADDR_ENV_NAME env var not found${NC}" + exit 1 +fi + +balance=$(cast balance --ether --rpc-url $CHAIN_RPC_URL $WALLET_ADDR) +nonce=$(cast nonce --rpc-url $CHAIN_RPC_URL $WALLET_ADDR) +echo "Wallet $WALLET_ENV_NAME on $CHAIN_NAME" +echo " balance: $balance" +echo " nonce: $nonce" diff --git a/script/templates/BasicSynapse.s.sol b/script/templates/BasicSynapse.s.sol index 1269ce5e7..a62080494 100644 --- a/script/templates/BasicSynapse.s.sol +++ b/script/templates/BasicSynapse.s.sol @@ -304,6 +304,25 @@ contract BasicSynapseScript is BasicUtils { }); } + /// @notice Saves the deployment JSON for a proxy contract on a given chain under the specified alias. + /// The constructor args are fetched from the implementation deployment JSON. + /// Note: writes to the FRESH deployment path, which is moved to the correct location after the contract is deployed. + /// Note: requires ffi to be turned on, and jq to be installed. + function saveProxyDeployment( + string memory contractName, + string memory implementationAlias, + address deployedAt + ) internal { + bytes memory constructorArgs = getConstructorArgs({chain: activeChain, contractName: implementationAlias}); + string memory dataWithoutABI = serializeDeploymentData(deployedAt, constructorArgs); + saveDeploymentData({ + chain: activeChain, + contractName: contractName, + contractAlias: contractName, + dataWithoutABI: dataWithoutABI + }); + } + /// @notice Saves the deploy config for a contract on the active chain function saveDeployConfig(string memory contractName, string memory data) internal { saveDeployConfig({chain: activeChain, contractName: contractName, data: data}); diff --git a/script/templates/BasicUtils.sol b/script/templates/BasicUtils.sol index 968570abf..9aba693ee 100644 --- a/script/templates/BasicUtils.sol +++ b/script/templates/BasicUtils.sol @@ -29,10 +29,19 @@ abstract contract BasicUtils is CommonBase { { data = "deployment"; data.serialize("address", deployedAt); - if (constructorArgs.length == 0) { - return data.serialize("constructorArgs", string("0x")); + return serializeBytes(data, "constructorArgs", constructorArgs); + } + + /// @notice Serializes a bytes value to a JSON string. Uses "0x" as the default value. + function serializeBytes( + string memory json, + string memory key, + bytes memory value + ) internal returns (string memory) { + if (value.length == 0) { + return json.serialize(key, string("0x")); } else { - return data.serialize("constructorArgs", constructorArgs); + return json.serialize(key, value); } } @@ -141,6 +150,15 @@ abstract contract BasicUtils is CommonBase { require(deployment != address(0), contractName.concat(" not deployed on ", chain)); } + function getConstructorArgs(string memory chain, string memory contractName) + internal + view + returns (bytes memory constructorArgs) + { + string memory json = vm.readFile(deploymentPath(chain, contractName)); + return json.readBytes(".constructorArgs"); + } + /// @notice Returns the deployment address for a contract on a given chain, if it exists. /// Returns address(0), if it doesn't exist. function tryGetDeploymentAddress(string memory chain, string memory contractName)