diff --git a/deployments/arbitrum/FastBridge.json b/deployments/arbitrum/FastBridge.json index 818a43e94..8cdca50c9 100644 --- a/deployments/arbitrum/FastBridge.json +++ b/deployments/arbitrum/FastBridge.json @@ -1,585 +1,3 @@ { - "address": "0x6C0771aD91442D670159a8171C35F4828E19aFd2", - "abi": [ - { - "inputs": [{ "internalType": "address", "name": "_owner", "type": "address" }], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { "inputs": [], "name": "AccessControlBadConfirmation", "type": "error" }, - { - "inputs": [ - { "internalType": "address", "name": "account", "type": "address" }, - { "internalType": "bytes32", "name": "neededRole", "type": "bytes32" } - ], - "name": "AccessControlUnauthorizedAccount", - "type": "error" - }, - { - "inputs": [{ "internalType": "address", "name": "target", "type": "address" }], - "name": "AddressEmptyCode", - "type": "error" - }, - { - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "AddressInsufficientBalance", - "type": "error" - }, - { "inputs": [], "name": "AmountIncorrect", "type": "error" }, - { "inputs": [], "name": "ChainIncorrect", "type": "error" }, - { "inputs": [], "name": "DeadlineExceeded", "type": "error" }, - { "inputs": [], "name": "DeadlineNotExceeded", "type": "error" }, - { "inputs": [], "name": "DeadlineTooShort", "type": "error" }, - { "inputs": [], "name": "DisputePeriodNotPassed", "type": "error" }, - { "inputs": [], "name": "DisputePeriodPassed", "type": "error" }, - { "inputs": [], "name": "FailedInnerCall", "type": "error" }, - { "inputs": [], "name": "MsgValueIncorrect", "type": "error" }, - { - "inputs": [{ "internalType": "address", "name": "token", "type": "address" }], - "name": "SafeERC20FailedOperation", - "type": "error" - }, - { "inputs": [], "name": "SenderIncorrect", "type": "error" }, - { "inputs": [], "name": "StatusIncorrect", "type": "error" }, - { "inputs": [], "name": "TokenNotContract", "type": "error" }, - { "inputs": [], "name": "TransactionRelayed", "type": "error" }, - { "inputs": [], "name": "ZeroAddress", "type": "error" }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "transactionId", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "relayer", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, - { "indexed": false, "internalType": "address", "name": "token", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "BridgeDepositClaimed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "transactionId", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, - { "indexed": false, "internalType": "address", "name": "token", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "BridgeDepositRefunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "transactionId", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "relayer", "type": "address" } - ], - "name": "BridgeProofDisputed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "transactionId", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "relayer", "type": "address" }, - { - "indexed": false, - "internalType": "bytes32", - "name": "transactionHash", - "type": "bytes32" - } - ], - "name": "BridgeProofProvided", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "transactionId", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "relayer", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, - { "indexed": false, "internalType": "uint32", "name": "originChainId", "type": "uint32" }, - { "indexed": false, "internalType": "address", "name": "originToken", "type": "address" }, - { "indexed": false, "internalType": "address", "name": "destToken", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "originAmount", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "destAmount", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "chainGasAmount", "type": "uint256" } - ], - "name": "BridgeRelayed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "transactionId", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }, - { "indexed": false, "internalType": "bytes", "name": "request", "type": "bytes" }, - { "indexed": false, "internalType": "uint32", "name": "destChainId", "type": "uint32" }, - { "indexed": false, "internalType": "address", "name": "originToken", "type": "address" }, - { "indexed": false, "internalType": "address", "name": "destToken", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "originAmount", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "destAmount", "type": "uint256" }, - { "indexed": false, "internalType": "bool", "name": "sendChainGas", "type": "bool" } - ], - "name": "BridgeRequested", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldChainGasAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newChainGasAmount", - "type": "uint256" - } - ], - "name": "ChainGasAmountUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "uint256", "name": "oldFeeRate", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "newFeeRate", "type": "uint256" } - ], - "name": "FeeRateUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "token", "type": "address" }, - { "indexed": false, "internalType": "address", "name": "recipient", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "FeesSwept", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "governor", "type": "address" } - ], - "name": "GovernorAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "governor", "type": "address" } - ], - "name": "GovernorRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "guard", "type": "address" } - ], - "name": "GuardAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "guard", "type": "address" } - ], - "name": "GuardRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "relayer", "type": "address" } - ], - "name": "RelayerAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "relayer", "type": "address" } - ], - "name": "RelayerRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { "indexed": true, "internalType": "bytes32", "name": "newAdminRole", "type": "bytes32" } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DISPUTE_PERIOD", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "FEE_BPS", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "FEE_RATE_MAX", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GOVERNOR_ROLE", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GUARD_ROLE", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MIN_DEADLINE_PERIOD", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "RELAYER_ROLE", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_governor", "type": "address" }], - "name": "addGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_guard", "type": "address" }], - "name": "addGuard", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_relayer", "type": "address" }], - "name": "addRelayer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { "internalType": "uint32", "name": "dstChainId", "type": "uint32" }, - { "internalType": "address", "name": "sender", "type": "address" }, - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "address", "name": "originToken", "type": "address" }, - { "internalType": "address", "name": "destToken", "type": "address" }, - { "internalType": "uint256", "name": "originAmount", "type": "uint256" }, - { "internalType": "uint256", "name": "destAmount", "type": "uint256" }, - { "internalType": "bool", "name": "sendChainGas", "type": "bool" }, - { "internalType": "uint256", "name": "deadline", "type": "uint256" } - ], - "internalType": "struct IFastBridge.BridgeParams", - "name": "params", - "type": "tuple" - } - ], - "name": "bridge", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "name": "bridgeProofs", - "outputs": [ - { "internalType": "uint96", "name": "timestamp", "type": "uint96" }, - { "internalType": "address", "name": "relayer", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "name": "bridgeRelays", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "name": "bridgeStatuses", - "outputs": [{ "internalType": "enum FastBridge.BridgeStatus", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "transactionId", "type": "bytes32" }, - { "internalType": "address", "name": "relayer", "type": "address" } - ], - "name": "canClaim", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "chainGasAmount", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes", "name": "request", "type": "bytes" }, - { "internalType": "address", "name": "to", "type": "address" } - ], - "name": "claim", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "deployBlock", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes32", "name": "transactionId", "type": "bytes32" }], - "name": "dispute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes", "name": "request", "type": "bytes" }], - "name": "getBridgeTransaction", - "outputs": [ - { - "components": [ - { "internalType": "uint32", "name": "originChainId", "type": "uint32" }, - { "internalType": "uint32", "name": "destChainId", "type": "uint32" }, - { "internalType": "address", "name": "originSender", "type": "address" }, - { "internalType": "address", "name": "destRecipient", "type": "address" }, - { "internalType": "address", "name": "originToken", "type": "address" }, - { "internalType": "address", "name": "destToken", "type": "address" }, - { "internalType": "uint256", "name": "originAmount", "type": "uint256" }, - { "internalType": "uint256", "name": "destAmount", "type": "uint256" }, - { "internalType": "uint256", "name": "originFeeAmount", "type": "uint256" }, - { "internalType": "bool", "name": "sendChainGas", "type": "bool" }, - { "internalType": "uint256", "name": "deadline", "type": "uint256" }, - { "internalType": "uint256", "name": "nonce", "type": "uint256" } - ], - "internalType": "struct IFastBridge.BridgeTransaction", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes32", "name": "role", "type": "bytes32" }], - "name": "getRoleAdmin", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "hasRole", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "nonce", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "protocolFeeRate", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "protocolFees", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes", "name": "request", "type": "bytes" }, - { "internalType": "bytes32", "name": "destTxHash", "type": "bytes32" } - ], - "name": "prove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes", "name": "request", "type": "bytes" }], - "name": "refund", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes", "name": "request", "type": "bytes" }], - "name": "relay", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_governor", "type": "address" }], - "name": "removeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_guard", "type": "address" }], - "name": "removeGuard", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_relayer", "type": "address" }], - "name": "removeRelayer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "callerConfirmation", "type": "address" } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "newChainGasAmount", "type": "uint256" }], - "name": "setChainGasAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "newFeeRate", "type": "uint256" }], - "name": "setProtocolFeeRate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes4", "name": "interfaceId", "type": "bytes4" }], - "name": "supportsInterface", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "token", "type": "address" }, - { "internalType": "address", "name": "recipient", "type": "address" } - ], - "name": "sweepProtocolFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ] + "address": "0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E" } diff --git a/deployments/base/FastBridge.json b/deployments/base/FastBridge.json index eb56e3707..8cdca50c9 100644 --- a/deployments/base/FastBridge.json +++ b/deployments/base/FastBridge.json @@ -1,1219 +1,3 @@ { - "address": "0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E", - "constructorArgs": "0x000000000000000000000000bd88862fcc17de436f7bd17276c537acadda9a67", - "abi": [ - { - "type": "constructor", - "inputs": [ - { - "name": "_owner", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "DEFAULT_ADMIN_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "DISPUTE_PERIOD", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "FEE_BPS", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "FEE_RATE_MAX", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "GOVERNOR_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "GUARD_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "MIN_DEADLINE_PERIOD", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "REFUNDER_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "REFUND_DELAY", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "RELAYER_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "bridge", - "inputs": [ - { - "name": "params", - "type": "tuple", - "internalType": "struct IFastBridge.BridgeParams", - "components": [ - { - "name": "dstChainId", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "sender", - "type": "address", - "internalType": "address" - }, - { - "name": "to", - "type": "address", - "internalType": "address" - }, - { - "name": "originToken", - "type": "address", - "internalType": "address" - }, - { - "name": "destToken", - "type": "address", - "internalType": "address" - }, - { - "name": "originAmount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "destAmount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "sendChainGas", - "type": "bool", - "internalType": "bool" - }, - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "bridgeProofs", - "inputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "timestamp", - "type": "uint96", - "internalType": "uint96" - }, - { - "name": "relayer", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "bridgeRelays", - "inputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "bridgeStatuses", - "inputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "uint8", - "internalType": "enum FastBridge.BridgeStatus" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "canClaim", - "inputs": [ - { - "name": "transactionId", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "relayer", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "chainGasAmount", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "claim", - "inputs": [ - { - "name": "request", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "to", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "deployBlock", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "dispute", - "inputs": [ - { - "name": "transactionId", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "getBridgeTransaction", - "inputs": [ - { - "name": "request", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [ - { - "name": "", - "type": "tuple", - "internalType": "struct IFastBridge.BridgeTransaction", - "components": [ - { - "name": "originChainId", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "destChainId", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "originSender", - "type": "address", - "internalType": "address" - }, - { - "name": "destRecipient", - "type": "address", - "internalType": "address" - }, - { - "name": "originToken", - "type": "address", - "internalType": "address" - }, - { - "name": "destToken", - "type": "address", - "internalType": "address" - }, - { - "name": "originAmount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "destAmount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "originFeeAmount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "sendChainGas", - "type": "bool", - "internalType": "bool" - }, - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "nonce", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "stateMutability": "pure" - }, - { - "type": "function", - "name": "getRoleAdmin", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getRoleMember", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "index", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getRoleMemberCount", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "grantRole", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "hasRole", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "nonce", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "protocolFeeRate", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "protocolFees", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "prove", - "inputs": [ - { - "name": "request", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "destTxHash", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "refund", - "inputs": [ - { - "name": "request", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "relay", - "inputs": [ - { - "name": "request", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "renounceRole", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "callerConfirmation", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "revokeRole", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setChainGasAmount", - "inputs": [ - { - "name": "newChainGasAmount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setProtocolFeeRate", - "inputs": [ - { - "name": "newFeeRate", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "supportsInterface", - "inputs": [ - { - "name": "interfaceId", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "sweepProtocolFees", - "inputs": [ - { - "name": "token", - "type": "address", - "internalType": "address" - }, - { - "name": "recipient", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "event", - "name": "BridgeDepositClaimed", - "inputs": [ - { - "name": "transactionId", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "relayer", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "to", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "token", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "BridgeDepositRefunded", - "inputs": [ - { - "name": "transactionId", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "to", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "token", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "BridgeProofDisputed", - "inputs": [ - { - "name": "transactionId", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "relayer", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "BridgeProofProvided", - "inputs": [ - { - "name": "transactionId", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "relayer", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "transactionHash", - "type": "bytes32", - "indexed": false, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "BridgeRelayed", - "inputs": [ - { - "name": "transactionId", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "relayer", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "to", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "originChainId", - "type": "uint32", - "indexed": false, - "internalType": "uint32" - }, - { - "name": "originToken", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "destToken", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "originAmount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "destAmount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "chainGasAmount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "BridgeRequested", - "inputs": [ - { - "name": "transactionId", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "sender", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "request", - "type": "bytes", - "indexed": false, - "internalType": "bytes" - }, - { - "name": "destChainId", - "type": "uint32", - "indexed": false, - "internalType": "uint32" - }, - { - "name": "originToken", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "destToken", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "originAmount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "destAmount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "sendChainGas", - "type": "bool", - "indexed": false, - "internalType": "bool" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ChainGasAmountUpdated", - "inputs": [ - { - "name": "oldChainGasAmount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newChainGasAmount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "FeeRateUpdated", - "inputs": [ - { - "name": "oldFeeRate", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newFeeRate", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "FeesSwept", - "inputs": [ - { - "name": "token", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "recipient", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RoleAdminChanged", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "previousAdminRole", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "newAdminRole", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RoleGranted", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "sender", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RoleRevoked", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "sender", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AccessControlBadConfirmation", - "inputs": [] - }, - { - "type": "error", - "name": "AccessControlUnauthorizedAccount", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - }, - { - "name": "neededRole", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "AddressEmptyCode", - "inputs": [ - { - "name": "target", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AddressInsufficientBalance", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AmountIncorrect", - "inputs": [] - }, - { - "type": "error", - "name": "ChainIncorrect", - "inputs": [] - }, - { - "type": "error", - "name": "DeadlineExceeded", - "inputs": [] - }, - { - "type": "error", - "name": "DeadlineNotExceeded", - "inputs": [] - }, - { - "type": "error", - "name": "DeadlineTooShort", - "inputs": [] - }, - { - "type": "error", - "name": "DisputePeriodNotPassed", - "inputs": [] - }, - { - "type": "error", - "name": "DisputePeriodPassed", - "inputs": [] - }, - { - "type": "error", - "name": "FailedInnerCall", - "inputs": [] - }, - { - "type": "error", - "name": "MsgValueIncorrect", - "inputs": [] - }, - { - "type": "error", - "name": "SafeERC20FailedOperation", - "inputs": [ - { - "name": "token", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "SenderIncorrect", - "inputs": [] - }, - { - "type": "error", - "name": "StatusIncorrect", - "inputs": [] - }, - { - "type": "error", - "name": "TokenNotContract", - "inputs": [] - }, - { - "type": "error", - "name": "TransactionRelayed", - "inputs": [] - }, - { - "type": "error", - "name": "ZeroAddress", - "inputs": [] - } - ] + "address": "0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E" } diff --git a/deployments/blast/FastBridge.json b/deployments/blast/FastBridge.json index 105c30805..d35520d8f 100644 --- a/deployments/blast/FastBridge.json +++ b/deployments/blast/FastBridge.json @@ -1,585 +1,3 @@ { - "address": "0xD1734b283d58C1E36fE5187F20Ae17A3Da7e702f", - "abi": [ - { - "inputs": [{ "internalType": "address", "name": "_owner", "type": "address" }], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { "inputs": [], "name": "AccessControlBadConfirmation", "type": "error" }, - { - "inputs": [ - { "internalType": "address", "name": "account", "type": "address" }, - { "internalType": "bytes32", "name": "neededRole", "type": "bytes32" } - ], - "name": "AccessControlUnauthorizedAccount", - "type": "error" - }, - { - "inputs": [{ "internalType": "address", "name": "target", "type": "address" }], - "name": "AddressEmptyCode", - "type": "error" - }, - { - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "AddressInsufficientBalance", - "type": "error" - }, - { "inputs": [], "name": "AmountIncorrect", "type": "error" }, - { "inputs": [], "name": "ChainIncorrect", "type": "error" }, - { "inputs": [], "name": "DeadlineExceeded", "type": "error" }, - { "inputs": [], "name": "DeadlineNotExceeded", "type": "error" }, - { "inputs": [], "name": "DeadlineTooShort", "type": "error" }, - { "inputs": [], "name": "DisputePeriodNotPassed", "type": "error" }, - { "inputs": [], "name": "DisputePeriodPassed", "type": "error" }, - { "inputs": [], "name": "FailedInnerCall", "type": "error" }, - { "inputs": [], "name": "MsgValueIncorrect", "type": "error" }, - { - "inputs": [{ "internalType": "address", "name": "token", "type": "address" }], - "name": "SafeERC20FailedOperation", - "type": "error" - }, - { "inputs": [], "name": "SenderIncorrect", "type": "error" }, - { "inputs": [], "name": "StatusIncorrect", "type": "error" }, - { "inputs": [], "name": "TokenNotContract", "type": "error" }, - { "inputs": [], "name": "TransactionRelayed", "type": "error" }, - { "inputs": [], "name": "ZeroAddress", "type": "error" }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "transactionId", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "relayer", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, - { "indexed": false, "internalType": "address", "name": "token", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "BridgeDepositClaimed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "transactionId", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, - { "indexed": false, "internalType": "address", "name": "token", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "BridgeDepositRefunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "transactionId", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "relayer", "type": "address" } - ], - "name": "BridgeProofDisputed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "transactionId", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "relayer", "type": "address" }, - { - "indexed": false, - "internalType": "bytes32", - "name": "transactionHash", - "type": "bytes32" - } - ], - "name": "BridgeProofProvided", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "transactionId", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "relayer", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, - { "indexed": false, "internalType": "uint32", "name": "originChainId", "type": "uint32" }, - { "indexed": false, "internalType": "address", "name": "originToken", "type": "address" }, - { "indexed": false, "internalType": "address", "name": "destToken", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "originAmount", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "destAmount", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "chainGasAmount", "type": "uint256" } - ], - "name": "BridgeRelayed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "transactionId", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }, - { "indexed": false, "internalType": "bytes", "name": "request", "type": "bytes" }, - { "indexed": false, "internalType": "uint32", "name": "destChainId", "type": "uint32" }, - { "indexed": false, "internalType": "address", "name": "originToken", "type": "address" }, - { "indexed": false, "internalType": "address", "name": "destToken", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "originAmount", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "destAmount", "type": "uint256" }, - { "indexed": false, "internalType": "bool", "name": "sendChainGas", "type": "bool" } - ], - "name": "BridgeRequested", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldChainGasAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newChainGasAmount", - "type": "uint256" - } - ], - "name": "ChainGasAmountUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "uint256", "name": "oldFeeRate", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "newFeeRate", "type": "uint256" } - ], - "name": "FeeRateUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "token", "type": "address" }, - { "indexed": false, "internalType": "address", "name": "recipient", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "FeesSwept", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "governor", "type": "address" } - ], - "name": "GovernorAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "governor", "type": "address" } - ], - "name": "GovernorRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "guard", "type": "address" } - ], - "name": "GuardAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "guard", "type": "address" } - ], - "name": "GuardRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "relayer", "type": "address" } - ], - "name": "RelayerAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "relayer", "type": "address" } - ], - "name": "RelayerRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { "indexed": true, "internalType": "bytes32", "name": "newAdminRole", "type": "bytes32" } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DISPUTE_PERIOD", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "FEE_BPS", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "FEE_RATE_MAX", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GOVERNOR_ROLE", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GUARD_ROLE", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MIN_DEADLINE_PERIOD", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "RELAYER_ROLE", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_governor", "type": "address" }], - "name": "addGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_guard", "type": "address" }], - "name": "addGuard", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_relayer", "type": "address" }], - "name": "addRelayer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { "internalType": "uint32", "name": "dstChainId", "type": "uint32" }, - { "internalType": "address", "name": "sender", "type": "address" }, - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "address", "name": "originToken", "type": "address" }, - { "internalType": "address", "name": "destToken", "type": "address" }, - { "internalType": "uint256", "name": "originAmount", "type": "uint256" }, - { "internalType": "uint256", "name": "destAmount", "type": "uint256" }, - { "internalType": "bool", "name": "sendChainGas", "type": "bool" }, - { "internalType": "uint256", "name": "deadline", "type": "uint256" } - ], - "internalType": "struct IFastBridge.BridgeParams", - "name": "params", - "type": "tuple" - } - ], - "name": "bridge", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "name": "bridgeProofs", - "outputs": [ - { "internalType": "uint96", "name": "timestamp", "type": "uint96" }, - { "internalType": "address", "name": "relayer", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "name": "bridgeRelays", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "name": "bridgeStatuses", - "outputs": [{ "internalType": "enum FastBridge.BridgeStatus", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "transactionId", "type": "bytes32" }, - { "internalType": "address", "name": "relayer", "type": "address" } - ], - "name": "canClaim", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "chainGasAmount", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes", "name": "request", "type": "bytes" }, - { "internalType": "address", "name": "to", "type": "address" } - ], - "name": "claim", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "deployBlock", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes32", "name": "transactionId", "type": "bytes32" }], - "name": "dispute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes", "name": "request", "type": "bytes" }], - "name": "getBridgeTransaction", - "outputs": [ - { - "components": [ - { "internalType": "uint32", "name": "originChainId", "type": "uint32" }, - { "internalType": "uint32", "name": "destChainId", "type": "uint32" }, - { "internalType": "address", "name": "originSender", "type": "address" }, - { "internalType": "address", "name": "destRecipient", "type": "address" }, - { "internalType": "address", "name": "originToken", "type": "address" }, - { "internalType": "address", "name": "destToken", "type": "address" }, - { "internalType": "uint256", "name": "originAmount", "type": "uint256" }, - { "internalType": "uint256", "name": "destAmount", "type": "uint256" }, - { "internalType": "uint256", "name": "originFeeAmount", "type": "uint256" }, - { "internalType": "bool", "name": "sendChainGas", "type": "bool" }, - { "internalType": "uint256", "name": "deadline", "type": "uint256" }, - { "internalType": "uint256", "name": "nonce", "type": "uint256" } - ], - "internalType": "struct IFastBridge.BridgeTransaction", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes32", "name": "role", "type": "bytes32" }], - "name": "getRoleAdmin", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "hasRole", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "nonce", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "protocolFeeRate", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "protocolFees", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes", "name": "request", "type": "bytes" }, - { "internalType": "bytes32", "name": "destTxHash", "type": "bytes32" } - ], - "name": "prove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes", "name": "request", "type": "bytes" }], - "name": "refund", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes", "name": "request", "type": "bytes" }], - "name": "relay", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_governor", "type": "address" }], - "name": "removeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_guard", "type": "address" }], - "name": "removeGuard", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_relayer", "type": "address" }], - "name": "removeRelayer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "callerConfirmation", "type": "address" } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "newChainGasAmount", "type": "uint256" }], - "name": "setChainGasAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "newFeeRate", "type": "uint256" }], - "name": "setProtocolFeeRate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes4", "name": "interfaceId", "type": "bytes4" }], - "name": "supportsInterface", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "token", "type": "address" }, - { "internalType": "address", "name": "recipient", "type": "address" } - ], - "name": "sweepProtocolFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ] + "address": "0x34F52752975222d5994C206cE08C1d5B329f24dD" } diff --git a/deployments/bsc/FastBridge.json b/deployments/bsc/FastBridge.json index 49b7c8b81..8cdca50c9 100644 --- a/deployments/bsc/FastBridge.json +++ b/deployments/bsc/FastBridge.json @@ -1,4 +1,3 @@ { - "address": "0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E", - "constructorArgs": "0x000000000000000000000000bd88862fcc17de436f7bd17276c537acadda9a67" + "address": "0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E" } diff --git a/deployments/linea/AlgebraModule.Lynex.json b/deployments/linea/AlgebraModule.Lynex.json new file mode 100644 index 000000000..11ef6e096 --- /dev/null +++ b/deployments/linea/AlgebraModule.Lynex.json @@ -0,0 +1,188 @@ +{ + "address": "0x8721e488c0cf6206A9eDAdFCafdd24367c5d432a", + "constructorArgs": "0x0000000000000000000000003921e8cb45b17fc029a0a6de958330ca4e58339000000000000000000000000070ceb9e0237546115e2f108f8f7658e42daf3296", + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "algebraRouter_", + "type": "address", + "internalType": "address" + }, + { + "name": "algebraStaticQuoter_", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "algebraRouter", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IAlgebraRouter" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "algebraStaticQuoter", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IAlgebraStaticQuoter" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getPoolQuote", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenFrom", + "type": "tuple", + "internalType": "struct IndexedToken", + "components": [ + { + "name": "index", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "tokenTo", + "type": "tuple", + "internalType": "struct IndexedToken", + "components": [ + { + "name": "index", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "amountIn", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getPoolTokens", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "tokens", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "poolSwap", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenFrom", + "type": "tuple", + "internalType": "struct IndexedToken", + "components": [ + { + "name": "index", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "tokenTo", + "type": "tuple", + "internalType": "struct IndexedToken", + "components": [ + { + "name": "index", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "amountIn", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + } + ] +} \ No newline at end of file diff --git a/deployments/linea/DefaultPoolCalc.json b/deployments/linea/DefaultPoolCalc.json new file mode 100644 index 000000000..c8d3c5586 --- /dev/null +++ b/deployments/linea/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/linea/FastBridge.json b/deployments/linea/FastBridge.json new file mode 100644 index 000000000..d35520d8f --- /dev/null +++ b/deployments/linea/FastBridge.json @@ -0,0 +1,3 @@ +{ + "address": "0x34F52752975222d5994C206cE08C1d5B329f24dD" +} diff --git a/deployments/linea/FastBridgeRouter.json b/deployments/linea/FastBridgeRouter.json new file mode 100644 index 000000000..64f929154 --- /dev/null +++ b/deployments/linea/FastBridgeRouter.json @@ -0,0 +1,391 @@ +{ + "address": "0x0000000000489d89D2B233D3375C045dfD05745F", + "constructorArgs": "0x0000000000000000000000000fea3e5840334fc758a3decf14546bfdfbef5cd3", + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "owner_", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "GAS_REBATE_FLAG", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes1", + "internalType": "bytes1" + } + ], + "stateMutability": "view" + }, + { + "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": "fastBridge", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getOriginAmountOut", + "inputs": [ + { + "name": "tokenIn", + "type": "address", + "internalType": "address" + }, + { + "name": "rfqTokens", + "type": "address[]", + "internalType": "address[]" + }, + { + "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": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setFastBridge", + "inputs": [ + { + "name": "fastBridge_", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setSwapQuoter", + "inputs": [ + { + "name": "swapQuoter_", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "swapQuoter", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { + "name": "newOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "FastBridgeSet", + "inputs": [ + { + "name": "newFastBridge", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "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": "SwapQuoterSet", + "inputs": [ + { + "name": "newSwapQuoter", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "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": [] + } + ] +} \ No newline at end of file diff --git a/deployments/linea/LinkedPool.RFQ.USDC.json b/deployments/linea/LinkedPool.RFQ.USDC.json new file mode 100644 index 000000000..fca04834d --- /dev/null +++ b/deployments/linea/LinkedPool.RFQ.USDC.json @@ -0,0 +1,600 @@ +{ + "address": "0x71035BE2414fF19d90302f528b97183B87c3c096", + "constructorArgs": "0x000000000000000000000000176211869ca2b568f2a7d4ee941e073a821ee1ff0000000000000000000000000fea3e5840334fc758a3decf14546bfdfbef5cd3", + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "bridgeToken", + "type": "address", + "internalType": "address" + }, + { + "name": "owner_", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "addPool", + "inputs": [ + { + "name": "nodeIndex", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "poolModule", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "areConnectedTokens", + "inputs": [ + { + "name": "tokenIn", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "areConnected", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateSwap", + "inputs": [ + { + "name": "nodeIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "nodeIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "dx", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "findBestPath", + "inputs": [ + { + "name": "tokenIn", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + }, + { + "name": "amountIn", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "nodeIndexFromBest", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "nodeIndexToBest", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "amountOutBest", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getAttachedPools", + "inputs": [ + { + "name": "index", + "type": "uint8", + "internalType": "uint8" + } + ], + "outputs": [ + { + "name": "pools", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getNodeParent", + "inputs": [ + { + "name": "nodeIndex", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "parentIndex", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "parentPool", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getPoolModule", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getToken", + "inputs": [ + { + "name": "index", + "type": "uint8", + "internalType": "uint8" + } + ], + "outputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getTokenIndexes", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "nodes", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "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": "swap", + "inputs": [ + { + "name": "nodeIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "nodeIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "dx", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "tokenIndexes", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint8", + "internalType": "uint8" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "tokenNodesAmount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { + "name": "newOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "updatePoolModule", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "newPoolModule", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "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": "parentIndex", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "poolModule", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PoolModuleUpdated", + "inputs": [ + { + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "oldPoolModule", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "newPoolModule", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenNodeAdded", + "inputs": [ + { + "name": "childIndex", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "parentPool", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenSwap", + "inputs": [ + { + "name": "buyer", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "tokensSold", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokensBought", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "soldId", + "type": "uint128", + "indexed": false, + "internalType": "uint128" + }, + { + "name": "boughtId", + "type": "uint128", + "indexed": false, + "internalType": "uint128" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "LinkedPool__DeadlineExceeded", + "inputs": [ + { + "name": "timestamp", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "LinkedPool__EmptyPoolAddress", + "inputs": [] + }, + { + "type": "error", + "name": "LinkedPool__EqualSwapIndexes", + "inputs": [ + { + "name": "index", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "type": "error", + "name": "LinkedPool__MinDyNotMet", + "inputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "TokenTree__DifferentTokenLists", + "inputs": [] + }, + { + "type": "error", + "name": "TokenTree__IndexOutOfRange", + "inputs": [ + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "TokenTree__NodeTokenNotInPool", + "inputs": [] + }, + { + "type": "error", + "name": "TokenTree__PoolAlreadyAttached", + "inputs": [] + }, + { + "type": "error", + "name": "TokenTree__PoolAlreadyOnRootPath", + "inputs": [] + }, + { + "type": "error", + "name": "TokenTree__SwapPoolUsedTwice", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "TokenTree__TooManyNodes", + "inputs": [] + }, + { + "type": "error", + "name": "TokenTree__TooManyPools", + "inputs": [] + }, + { + "type": "error", + "name": "TokenTree__UnknownPool", + "inputs": [] + } + ] +} \ No newline at end of file diff --git a/deployments/linea/SwapQuoterV2.json b/deployments/linea/SwapQuoterV2.json new file mode 100644 index 000000000..a3961d5fb --- /dev/null +++ b/deployments/linea/SwapQuoterV2.json @@ -0,0 +1,703 @@ +{ + "address": "0x55DEc55aDbd9a2102438339A294CB921A5248285", + "constructorArgs": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cc5af216a3e1614091a20e11bbfd32000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f0000000000000000000000000fea3e5840334fc758a3decf14546bfdfbef5cd3", + "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/linea/WGAS.json b/deployments/linea/WGAS.json new file mode 100644 index 000000000..fcabba397 --- /dev/null +++ b/deployments/linea/WGAS.json @@ -0,0 +1,3 @@ +{ + "address": "0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f" +} diff --git a/deployments/mainnet/FastBridge.json b/deployments/mainnet/FastBridge.json index 8b48e056e..8cdca50c9 100644 --- a/deployments/mainnet/FastBridge.json +++ b/deployments/mainnet/FastBridge.json @@ -1,585 +1,3 @@ { - "address": "0x4983DB49336fD4f95e864aB6DA9135e057EF0be1", - "abi": [ - { - "inputs": [{ "internalType": "address", "name": "_owner", "type": "address" }], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { "inputs": [], "name": "AccessControlBadConfirmation", "type": "error" }, - { - "inputs": [ - { "internalType": "address", "name": "account", "type": "address" }, - { "internalType": "bytes32", "name": "neededRole", "type": "bytes32" } - ], - "name": "AccessControlUnauthorizedAccount", - "type": "error" - }, - { - "inputs": [{ "internalType": "address", "name": "target", "type": "address" }], - "name": "AddressEmptyCode", - "type": "error" - }, - { - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "AddressInsufficientBalance", - "type": "error" - }, - { "inputs": [], "name": "AmountIncorrect", "type": "error" }, - { "inputs": [], "name": "ChainIncorrect", "type": "error" }, - { "inputs": [], "name": "DeadlineExceeded", "type": "error" }, - { "inputs": [], "name": "DeadlineNotExceeded", "type": "error" }, - { "inputs": [], "name": "DeadlineTooShort", "type": "error" }, - { "inputs": [], "name": "DisputePeriodNotPassed", "type": "error" }, - { "inputs": [], "name": "DisputePeriodPassed", "type": "error" }, - { "inputs": [], "name": "FailedInnerCall", "type": "error" }, - { "inputs": [], "name": "MsgValueIncorrect", "type": "error" }, - { - "inputs": [{ "internalType": "address", "name": "token", "type": "address" }], - "name": "SafeERC20FailedOperation", - "type": "error" - }, - { "inputs": [], "name": "SenderIncorrect", "type": "error" }, - { "inputs": [], "name": "StatusIncorrect", "type": "error" }, - { "inputs": [], "name": "TokenNotContract", "type": "error" }, - { "inputs": [], "name": "TransactionRelayed", "type": "error" }, - { "inputs": [], "name": "ZeroAddress", "type": "error" }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "transactionId", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "relayer", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, - { "indexed": false, "internalType": "address", "name": "token", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "BridgeDepositClaimed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "transactionId", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, - { "indexed": false, "internalType": "address", "name": "token", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "BridgeDepositRefunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "transactionId", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "relayer", "type": "address" } - ], - "name": "BridgeProofDisputed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "transactionId", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "relayer", "type": "address" }, - { - "indexed": false, - "internalType": "bytes32", - "name": "transactionHash", - "type": "bytes32" - } - ], - "name": "BridgeProofProvided", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "transactionId", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "relayer", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, - { "indexed": false, "internalType": "uint32", "name": "originChainId", "type": "uint32" }, - { "indexed": false, "internalType": "address", "name": "originToken", "type": "address" }, - { "indexed": false, "internalType": "address", "name": "destToken", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "originAmount", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "destAmount", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "chainGasAmount", "type": "uint256" } - ], - "name": "BridgeRelayed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "transactionId", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }, - { "indexed": false, "internalType": "bytes", "name": "request", "type": "bytes" }, - { "indexed": false, "internalType": "uint32", "name": "destChainId", "type": "uint32" }, - { "indexed": false, "internalType": "address", "name": "originToken", "type": "address" }, - { "indexed": false, "internalType": "address", "name": "destToken", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "originAmount", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "destAmount", "type": "uint256" }, - { "indexed": false, "internalType": "bool", "name": "sendChainGas", "type": "bool" } - ], - "name": "BridgeRequested", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldChainGasAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newChainGasAmount", - "type": "uint256" - } - ], - "name": "ChainGasAmountUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "uint256", "name": "oldFeeRate", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "newFeeRate", "type": "uint256" } - ], - "name": "FeeRateUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "token", "type": "address" }, - { "indexed": false, "internalType": "address", "name": "recipient", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "FeesSwept", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "governor", "type": "address" } - ], - "name": "GovernorAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "governor", "type": "address" } - ], - "name": "GovernorRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "guard", "type": "address" } - ], - "name": "GuardAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "guard", "type": "address" } - ], - "name": "GuardRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "relayer", "type": "address" } - ], - "name": "RelayerAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "relayer", "type": "address" } - ], - "name": "RelayerRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { "indexed": true, "internalType": "bytes32", "name": "newAdminRole", "type": "bytes32" } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DISPUTE_PERIOD", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "FEE_BPS", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "FEE_RATE_MAX", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GOVERNOR_ROLE", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GUARD_ROLE", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MIN_DEADLINE_PERIOD", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "RELAYER_ROLE", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_governor", "type": "address" }], - "name": "addGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_guard", "type": "address" }], - "name": "addGuard", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_relayer", "type": "address" }], - "name": "addRelayer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { "internalType": "uint32", "name": "dstChainId", "type": "uint32" }, - { "internalType": "address", "name": "sender", "type": "address" }, - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "address", "name": "originToken", "type": "address" }, - { "internalType": "address", "name": "destToken", "type": "address" }, - { "internalType": "uint256", "name": "originAmount", "type": "uint256" }, - { "internalType": "uint256", "name": "destAmount", "type": "uint256" }, - { "internalType": "bool", "name": "sendChainGas", "type": "bool" }, - { "internalType": "uint256", "name": "deadline", "type": "uint256" } - ], - "internalType": "struct IFastBridge.BridgeParams", - "name": "params", - "type": "tuple" - } - ], - "name": "bridge", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "name": "bridgeProofs", - "outputs": [ - { "internalType": "uint96", "name": "timestamp", "type": "uint96" }, - { "internalType": "address", "name": "relayer", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "name": "bridgeRelays", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "name": "bridgeStatuses", - "outputs": [{ "internalType": "enum FastBridge.BridgeStatus", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "transactionId", "type": "bytes32" }, - { "internalType": "address", "name": "relayer", "type": "address" } - ], - "name": "canClaim", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "chainGasAmount", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes", "name": "request", "type": "bytes" }, - { "internalType": "address", "name": "to", "type": "address" } - ], - "name": "claim", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "deployBlock", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes32", "name": "transactionId", "type": "bytes32" }], - "name": "dispute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes", "name": "request", "type": "bytes" }], - "name": "getBridgeTransaction", - "outputs": [ - { - "components": [ - { "internalType": "uint32", "name": "originChainId", "type": "uint32" }, - { "internalType": "uint32", "name": "destChainId", "type": "uint32" }, - { "internalType": "address", "name": "originSender", "type": "address" }, - { "internalType": "address", "name": "destRecipient", "type": "address" }, - { "internalType": "address", "name": "originToken", "type": "address" }, - { "internalType": "address", "name": "destToken", "type": "address" }, - { "internalType": "uint256", "name": "originAmount", "type": "uint256" }, - { "internalType": "uint256", "name": "destAmount", "type": "uint256" }, - { "internalType": "uint256", "name": "originFeeAmount", "type": "uint256" }, - { "internalType": "bool", "name": "sendChainGas", "type": "bool" }, - { "internalType": "uint256", "name": "deadline", "type": "uint256" }, - { "internalType": "uint256", "name": "nonce", "type": "uint256" } - ], - "internalType": "struct IFastBridge.BridgeTransaction", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes32", "name": "role", "type": "bytes32" }], - "name": "getRoleAdmin", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "hasRole", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "nonce", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "protocolFeeRate", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "protocolFees", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes", "name": "request", "type": "bytes" }, - { "internalType": "bytes32", "name": "destTxHash", "type": "bytes32" } - ], - "name": "prove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes", "name": "request", "type": "bytes" }], - "name": "refund", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes", "name": "request", "type": "bytes" }], - "name": "relay", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_governor", "type": "address" }], - "name": "removeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_guard", "type": "address" }], - "name": "removeGuard", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_relayer", "type": "address" }], - "name": "removeRelayer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "callerConfirmation", "type": "address" } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "newChainGasAmount", "type": "uint256" }], - "name": "setChainGasAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "newFeeRate", "type": "uint256" }], - "name": "setProtocolFeeRate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes4", "name": "interfaceId", "type": "bytes4" }], - "name": "supportsInterface", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "token", "type": "address" }, - { "internalType": "address", "name": "recipient", "type": "address" } - ], - "name": "sweepProtocolFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ] + "address": "0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E" } diff --git a/deployments/optimism/FastBridge.json b/deployments/optimism/FastBridge.json index 818a43e94..8cdca50c9 100644 --- a/deployments/optimism/FastBridge.json +++ b/deployments/optimism/FastBridge.json @@ -1,585 +1,3 @@ { - "address": "0x6C0771aD91442D670159a8171C35F4828E19aFd2", - "abi": [ - { - "inputs": [{ "internalType": "address", "name": "_owner", "type": "address" }], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { "inputs": [], "name": "AccessControlBadConfirmation", "type": "error" }, - { - "inputs": [ - { "internalType": "address", "name": "account", "type": "address" }, - { "internalType": "bytes32", "name": "neededRole", "type": "bytes32" } - ], - "name": "AccessControlUnauthorizedAccount", - "type": "error" - }, - { - "inputs": [{ "internalType": "address", "name": "target", "type": "address" }], - "name": "AddressEmptyCode", - "type": "error" - }, - { - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "AddressInsufficientBalance", - "type": "error" - }, - { "inputs": [], "name": "AmountIncorrect", "type": "error" }, - { "inputs": [], "name": "ChainIncorrect", "type": "error" }, - { "inputs": [], "name": "DeadlineExceeded", "type": "error" }, - { "inputs": [], "name": "DeadlineNotExceeded", "type": "error" }, - { "inputs": [], "name": "DeadlineTooShort", "type": "error" }, - { "inputs": [], "name": "DisputePeriodNotPassed", "type": "error" }, - { "inputs": [], "name": "DisputePeriodPassed", "type": "error" }, - { "inputs": [], "name": "FailedInnerCall", "type": "error" }, - { "inputs": [], "name": "MsgValueIncorrect", "type": "error" }, - { - "inputs": [{ "internalType": "address", "name": "token", "type": "address" }], - "name": "SafeERC20FailedOperation", - "type": "error" - }, - { "inputs": [], "name": "SenderIncorrect", "type": "error" }, - { "inputs": [], "name": "StatusIncorrect", "type": "error" }, - { "inputs": [], "name": "TokenNotContract", "type": "error" }, - { "inputs": [], "name": "TransactionRelayed", "type": "error" }, - { "inputs": [], "name": "ZeroAddress", "type": "error" }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "transactionId", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "relayer", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, - { "indexed": false, "internalType": "address", "name": "token", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "BridgeDepositClaimed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "transactionId", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, - { "indexed": false, "internalType": "address", "name": "token", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "BridgeDepositRefunded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "transactionId", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "relayer", "type": "address" } - ], - "name": "BridgeProofDisputed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "transactionId", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "relayer", "type": "address" }, - { - "indexed": false, - "internalType": "bytes32", - "name": "transactionHash", - "type": "bytes32" - } - ], - "name": "BridgeProofProvided", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "transactionId", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "relayer", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, - { "indexed": false, "internalType": "uint32", "name": "originChainId", "type": "uint32" }, - { "indexed": false, "internalType": "address", "name": "originToken", "type": "address" }, - { "indexed": false, "internalType": "address", "name": "destToken", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "originAmount", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "destAmount", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "chainGasAmount", "type": "uint256" } - ], - "name": "BridgeRelayed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "transactionId", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }, - { "indexed": false, "internalType": "bytes", "name": "request", "type": "bytes" }, - { "indexed": false, "internalType": "uint32", "name": "destChainId", "type": "uint32" }, - { "indexed": false, "internalType": "address", "name": "originToken", "type": "address" }, - { "indexed": false, "internalType": "address", "name": "destToken", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "originAmount", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "destAmount", "type": "uint256" }, - { "indexed": false, "internalType": "bool", "name": "sendChainGas", "type": "bool" } - ], - "name": "BridgeRequested", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldChainGasAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newChainGasAmount", - "type": "uint256" - } - ], - "name": "ChainGasAmountUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "uint256", "name": "oldFeeRate", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "newFeeRate", "type": "uint256" } - ], - "name": "FeeRateUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "token", "type": "address" }, - { "indexed": false, "internalType": "address", "name": "recipient", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "FeesSwept", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "governor", "type": "address" } - ], - "name": "GovernorAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "governor", "type": "address" } - ], - "name": "GovernorRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "guard", "type": "address" } - ], - "name": "GuardAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "guard", "type": "address" } - ], - "name": "GuardRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "relayer", "type": "address" } - ], - "name": "RelayerAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "relayer", "type": "address" } - ], - "name": "RelayerRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { "indexed": true, "internalType": "bytes32", "name": "newAdminRole", "type": "bytes32" } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DISPUTE_PERIOD", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "FEE_BPS", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "FEE_RATE_MAX", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GOVERNOR_ROLE", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GUARD_ROLE", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MIN_DEADLINE_PERIOD", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "RELAYER_ROLE", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_governor", "type": "address" }], - "name": "addGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_guard", "type": "address" }], - "name": "addGuard", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_relayer", "type": "address" }], - "name": "addRelayer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { "internalType": "uint32", "name": "dstChainId", "type": "uint32" }, - { "internalType": "address", "name": "sender", "type": "address" }, - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "address", "name": "originToken", "type": "address" }, - { "internalType": "address", "name": "destToken", "type": "address" }, - { "internalType": "uint256", "name": "originAmount", "type": "uint256" }, - { "internalType": "uint256", "name": "destAmount", "type": "uint256" }, - { "internalType": "bool", "name": "sendChainGas", "type": "bool" }, - { "internalType": "uint256", "name": "deadline", "type": "uint256" } - ], - "internalType": "struct IFastBridge.BridgeParams", - "name": "params", - "type": "tuple" - } - ], - "name": "bridge", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "name": "bridgeProofs", - "outputs": [ - { "internalType": "uint96", "name": "timestamp", "type": "uint96" }, - { "internalType": "address", "name": "relayer", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "name": "bridgeRelays", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "name": "bridgeStatuses", - "outputs": [{ "internalType": "enum FastBridge.BridgeStatus", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "transactionId", "type": "bytes32" }, - { "internalType": "address", "name": "relayer", "type": "address" } - ], - "name": "canClaim", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "chainGasAmount", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes", "name": "request", "type": "bytes" }, - { "internalType": "address", "name": "to", "type": "address" } - ], - "name": "claim", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "deployBlock", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes32", "name": "transactionId", "type": "bytes32" }], - "name": "dispute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes", "name": "request", "type": "bytes" }], - "name": "getBridgeTransaction", - "outputs": [ - { - "components": [ - { "internalType": "uint32", "name": "originChainId", "type": "uint32" }, - { "internalType": "uint32", "name": "destChainId", "type": "uint32" }, - { "internalType": "address", "name": "originSender", "type": "address" }, - { "internalType": "address", "name": "destRecipient", "type": "address" }, - { "internalType": "address", "name": "originToken", "type": "address" }, - { "internalType": "address", "name": "destToken", "type": "address" }, - { "internalType": "uint256", "name": "originAmount", "type": "uint256" }, - { "internalType": "uint256", "name": "destAmount", "type": "uint256" }, - { "internalType": "uint256", "name": "originFeeAmount", "type": "uint256" }, - { "internalType": "bool", "name": "sendChainGas", "type": "bool" }, - { "internalType": "uint256", "name": "deadline", "type": "uint256" }, - { "internalType": "uint256", "name": "nonce", "type": "uint256" } - ], - "internalType": "struct IFastBridge.BridgeTransaction", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes32", "name": "role", "type": "bytes32" }], - "name": "getRoleAdmin", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "hasRole", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "nonce", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "protocolFeeRate", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "protocolFees", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes", "name": "request", "type": "bytes" }, - { "internalType": "bytes32", "name": "destTxHash", "type": "bytes32" } - ], - "name": "prove", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes", "name": "request", "type": "bytes" }], - "name": "refund", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes", "name": "request", "type": "bytes" }], - "name": "relay", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_governor", "type": "address" }], - "name": "removeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_guard", "type": "address" }], - "name": "removeGuard", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_relayer", "type": "address" }], - "name": "removeRelayer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "callerConfirmation", "type": "address" } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "newChainGasAmount", "type": "uint256" }], - "name": "setChainGasAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "newFeeRate", "type": "uint256" }], - "name": "setProtocolFeeRate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes4", "name": "interfaceId", "type": "bytes4" }], - "name": "supportsInterface", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "token", "type": "address" }, - { "internalType": "address", "name": "recipient", "type": "address" } - ], - "name": "sweepProtocolFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ] + "address": "0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E" } diff --git a/deployments/scroll/FastBridge.json b/deployments/scroll/FastBridge.json index f8b2207a7..8cdca50c9 100644 --- a/deployments/scroll/FastBridge.json +++ b/deployments/scroll/FastBridge.json @@ -1,1223 +1,3 @@ { - "address": "0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E", - "constructorArgs": "0x000000000000000000000000bd88862fcc17de436f7bd17276c537acadda9a67", - "receipt": { - "hash": "0x9ce7e666984536f630e5d1b5d395a7ad8dd94b82311cb549e0d80de63ce1e5e1", - "blockNumber": 5124895 - }, - "abi": [ - { - "type": "constructor", - "inputs": [ - { - "name": "_owner", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "DEFAULT_ADMIN_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "DISPUTE_PERIOD", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "FEE_BPS", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "FEE_RATE_MAX", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "GOVERNOR_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "GUARD_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "MIN_DEADLINE_PERIOD", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "REFUNDER_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "REFUND_DELAY", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "RELAYER_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "bridge", - "inputs": [ - { - "name": "params", - "type": "tuple", - "internalType": "struct IFastBridge.BridgeParams", - "components": [ - { - "name": "dstChainId", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "sender", - "type": "address", - "internalType": "address" - }, - { - "name": "to", - "type": "address", - "internalType": "address" - }, - { - "name": "originToken", - "type": "address", - "internalType": "address" - }, - { - "name": "destToken", - "type": "address", - "internalType": "address" - }, - { - "name": "originAmount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "destAmount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "sendChainGas", - "type": "bool", - "internalType": "bool" - }, - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "bridgeProofs", - "inputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "timestamp", - "type": "uint96", - "internalType": "uint96" - }, - { - "name": "relayer", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "bridgeRelays", - "inputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "bridgeStatuses", - "inputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "uint8", - "internalType": "enum FastBridge.BridgeStatus" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "canClaim", - "inputs": [ - { - "name": "transactionId", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "relayer", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "chainGasAmount", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "claim", - "inputs": [ - { - "name": "request", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "to", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "deployBlock", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "dispute", - "inputs": [ - { - "name": "transactionId", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "getBridgeTransaction", - "inputs": [ - { - "name": "request", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [ - { - "name": "", - "type": "tuple", - "internalType": "struct IFastBridge.BridgeTransaction", - "components": [ - { - "name": "originChainId", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "destChainId", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "originSender", - "type": "address", - "internalType": "address" - }, - { - "name": "destRecipient", - "type": "address", - "internalType": "address" - }, - { - "name": "originToken", - "type": "address", - "internalType": "address" - }, - { - "name": "destToken", - "type": "address", - "internalType": "address" - }, - { - "name": "originAmount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "destAmount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "originFeeAmount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "sendChainGas", - "type": "bool", - "internalType": "bool" - }, - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "nonce", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "stateMutability": "pure" - }, - { - "type": "function", - "name": "getRoleAdmin", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getRoleMember", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "index", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getRoleMemberCount", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "grantRole", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "hasRole", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "nonce", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "protocolFeeRate", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "protocolFees", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "prove", - "inputs": [ - { - "name": "request", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "destTxHash", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "refund", - "inputs": [ - { - "name": "request", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "relay", - "inputs": [ - { - "name": "request", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "renounceRole", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "callerConfirmation", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "revokeRole", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setChainGasAmount", - "inputs": [ - { - "name": "newChainGasAmount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setProtocolFeeRate", - "inputs": [ - { - "name": "newFeeRate", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "supportsInterface", - "inputs": [ - { - "name": "interfaceId", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "sweepProtocolFees", - "inputs": [ - { - "name": "token", - "type": "address", - "internalType": "address" - }, - { - "name": "recipient", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "event", - "name": "BridgeDepositClaimed", - "inputs": [ - { - "name": "transactionId", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "relayer", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "to", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "token", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "BridgeDepositRefunded", - "inputs": [ - { - "name": "transactionId", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "to", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "token", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "BridgeProofDisputed", - "inputs": [ - { - "name": "transactionId", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "relayer", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "BridgeProofProvided", - "inputs": [ - { - "name": "transactionId", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "relayer", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "transactionHash", - "type": "bytes32", - "indexed": false, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "BridgeRelayed", - "inputs": [ - { - "name": "transactionId", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "relayer", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "to", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "originChainId", - "type": "uint32", - "indexed": false, - "internalType": "uint32" - }, - { - "name": "originToken", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "destToken", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "originAmount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "destAmount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "chainGasAmount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "BridgeRequested", - "inputs": [ - { - "name": "transactionId", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "sender", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "request", - "type": "bytes", - "indexed": false, - "internalType": "bytes" - }, - { - "name": "destChainId", - "type": "uint32", - "indexed": false, - "internalType": "uint32" - }, - { - "name": "originToken", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "destToken", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "originAmount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "destAmount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "sendChainGas", - "type": "bool", - "indexed": false, - "internalType": "bool" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ChainGasAmountUpdated", - "inputs": [ - { - "name": "oldChainGasAmount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newChainGasAmount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "FeeRateUpdated", - "inputs": [ - { - "name": "oldFeeRate", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newFeeRate", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "FeesSwept", - "inputs": [ - { - "name": "token", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "recipient", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RoleAdminChanged", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "previousAdminRole", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "newAdminRole", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RoleGranted", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "sender", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RoleRevoked", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "sender", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AccessControlBadConfirmation", - "inputs": [] - }, - { - "type": "error", - "name": "AccessControlUnauthorizedAccount", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - }, - { - "name": "neededRole", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "AddressEmptyCode", - "inputs": [ - { - "name": "target", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AddressInsufficientBalance", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AmountIncorrect", - "inputs": [] - }, - { - "type": "error", - "name": "ChainIncorrect", - "inputs": [] - }, - { - "type": "error", - "name": "DeadlineExceeded", - "inputs": [] - }, - { - "type": "error", - "name": "DeadlineNotExceeded", - "inputs": [] - }, - { - "type": "error", - "name": "DeadlineTooShort", - "inputs": [] - }, - { - "type": "error", - "name": "DisputePeriodNotPassed", - "inputs": [] - }, - { - "type": "error", - "name": "DisputePeriodPassed", - "inputs": [] - }, - { - "type": "error", - "name": "FailedInnerCall", - "inputs": [] - }, - { - "type": "error", - "name": "MsgValueIncorrect", - "inputs": [] - }, - { - "type": "error", - "name": "SafeERC20FailedOperation", - "inputs": [ - { - "name": "token", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "SenderIncorrect", - "inputs": [] - }, - { - "type": "error", - "name": "StatusIncorrect", - "inputs": [] - }, - { - "type": "error", - "name": "TokenNotContract", - "inputs": [] - }, - { - "type": "error", - "name": "TransactionRelayed", - "inputs": [] - }, - { - "type": "error", - "name": "ZeroAddress", - "inputs": [] - } - ] -} \ No newline at end of file + "address": "0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E" +} diff --git a/deployments/scroll/LinkedPool.RFQ.USDC.json b/deployments/scroll/LinkedPool.RFQ.USDC.json new file mode 100644 index 000000000..67cbe23e8 --- /dev/null +++ b/deployments/scroll/LinkedPool.RFQ.USDC.json @@ -0,0 +1,600 @@ +{ + "address": "0xA9d3E57033a636471D05c7bD6f4F564152e1c3f4", + "constructorArgs": "0x00000000000000000000000006efdbff2a14a7c8e15944d1f4a48f9f95f663a40000000000000000000000000fea3e5840334fc758a3decf14546bfdfbef5cd3", + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "bridgeToken", + "type": "address", + "internalType": "address" + }, + { + "name": "owner_", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "addPool", + "inputs": [ + { + "name": "nodeIndex", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "poolModule", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "areConnectedTokens", + "inputs": [ + { + "name": "tokenIn", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "areConnected", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "calculateSwap", + "inputs": [ + { + "name": "nodeIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "nodeIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "dx", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "findBestPath", + "inputs": [ + { + "name": "tokenIn", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "address" + }, + { + "name": "amountIn", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "nodeIndexFromBest", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "nodeIndexToBest", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "amountOutBest", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getAttachedPools", + "inputs": [ + { + "name": "index", + "type": "uint8", + "internalType": "uint8" + } + ], + "outputs": [ + { + "name": "pools", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getNodeParent", + "inputs": [ + { + "name": "nodeIndex", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "parentIndex", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "parentPool", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getPoolModule", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getToken", + "inputs": [ + { + "name": "index", + "type": "uint8", + "internalType": "uint8" + } + ], + "outputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getTokenIndexes", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "nodes", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "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": "swap", + "inputs": [ + { + "name": "nodeIndexFrom", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "nodeIndexTo", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "dx", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "tokenIndexes", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint8", + "internalType": "uint8" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "tokenNodesAmount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { + "name": "newOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "updatePoolModule", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "newPoolModule", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "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": "parentIndex", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "poolModule", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PoolModuleUpdated", + "inputs": [ + { + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "oldPoolModule", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "newPoolModule", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenNodeAdded", + "inputs": [ + { + "name": "childIndex", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "parentPool", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenSwap", + "inputs": [ + { + "name": "buyer", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "tokensSold", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokensBought", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "soldId", + "type": "uint128", + "indexed": false, + "internalType": "uint128" + }, + { + "name": "boughtId", + "type": "uint128", + "indexed": false, + "internalType": "uint128" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "LinkedPool__DeadlineExceeded", + "inputs": [ + { + "name": "timestamp", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "LinkedPool__EmptyPoolAddress", + "inputs": [] + }, + { + "type": "error", + "name": "LinkedPool__EqualSwapIndexes", + "inputs": [ + { + "name": "index", + "type": "uint8", + "internalType": "uint8" + } + ] + }, + { + "type": "error", + "name": "LinkedPool__MinDyNotMet", + "inputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minDy", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "TokenTree__DifferentTokenLists", + "inputs": [] + }, + { + "type": "error", + "name": "TokenTree__IndexOutOfRange", + "inputs": [ + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "TokenTree__NodeTokenNotInPool", + "inputs": [] + }, + { + "type": "error", + "name": "TokenTree__PoolAlreadyAttached", + "inputs": [] + }, + { + "type": "error", + "name": "TokenTree__PoolAlreadyOnRootPath", + "inputs": [] + }, + { + "type": "error", + "name": "TokenTree__SwapPoolUsedTwice", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "TokenTree__TooManyNodes", + "inputs": [] + }, + { + "type": "error", + "name": "TokenTree__TooManyPools", + "inputs": [] + }, + { + "type": "error", + "name": "TokenTree__UnknownPool", + "inputs": [] + } + ] +} \ No newline at end of file diff --git a/deployments/scroll/UniswapV3SR02Module.json b/deployments/scroll/UniswapV3SR02Module.json new file mode 100644 index 000000000..e5996fa4e --- /dev/null +++ b/deployments/scroll/UniswapV3SR02Module.json @@ -0,0 +1,188 @@ +{ + "address": "0x9E6401B1F85AffD5b2225e7891883E7b8ff29986", + "constructorArgs": "0x000000000000000000000000fc30937f5cde93df8d48acaf7e6f5d8d8a31f6360000000000000000000000009ffa621e973cb1f9be6b75848a55a71a66f227d7", + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "uniswapV3SwapRouter02_", + "type": "address", + "internalType": "address" + }, + { + "name": "uniswapV3StaticQuoter_", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getPoolQuote", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenFrom", + "type": "tuple", + "internalType": "struct IndexedToken", + "components": [ + { + "name": "index", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "tokenTo", + "type": "tuple", + "internalType": "struct IndexedToken", + "components": [ + { + "name": "index", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "amountIn", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getPoolTokens", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "tokens", + "type": "address[]", + "internalType": "address[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "poolSwap", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenFrom", + "type": "tuple", + "internalType": "struct IndexedToken", + "components": [ + { + "name": "index", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "tokenTo", + "type": "tuple", + "internalType": "struct IndexedToken", + "components": [ + { + "name": "index", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + }, + { + "name": "amountIn", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "uniswapV3StaticQuoter", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IUniswapV3StaticQuoter" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "uniswapV3SwapRouter02", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract ISwapRouter02" + } + ], + "stateMutability": "view" + } + ] +} \ No newline at end of file diff --git a/foundry.toml b/foundry.toml index de30b887d..2077f6f5c 100644 --- a/foundry.toml +++ b/foundry.toml @@ -6,6 +6,7 @@ src = "contracts" out = "artifacts" libs = ["node_modules", "lib"] ffi = true +unchecked_cheatcode_artifacts = true fs_permissions = [{ access = "read", path = "./artifacts"}, { access = "read-write", path = "./deployments"}, { access = "read-write", path = "./.deployments"}, {access = "read-write", path = "./script"}] ## set only when the `hardhat` profile is selected diff --git a/script/configs/SwapQuoterV2.originOnly.json b/script/configs/SwapQuoterV2.originOnly.json index 9dc1764e2..9d397c43b 100644 --- a/script/configs/SwapQuoterV2.originOnly.json +++ b/script/configs/SwapQuoterV2.originOnly.json @@ -1,3 +1,5 @@ { - "optimism": ["LinkedPool.nUSD"] + "linea": ["LinkedPool.RFQ.USDC"], + "optimism": ["LinkedPool.nUSD"], + "scroll": ["LinkedPool.RFQ.USDC"] } diff --git a/script/configs/arbitrum/LinkedPool.CCTP.USDC.dot b/script/configs/arbitrum/LinkedPool.CCTP.USDC.dot index 78eac0447..5d82021d0 100644 --- a/script/configs/arbitrum/LinkedPool.CCTP.USDC.dot +++ b/script/configs/arbitrum/LinkedPool.CCTP.USDC.dot @@ -1,19 +1,19 @@ graph G { - token0 [label = "0: USDC";]; - token1 [label = "1: USDC.e";]; - token2 [label = "2: USDT";]; - token3 [label = "3: USDC.e";]; - token4 [label = "4: USDT";]; - token5 [label = "5: FRAX";]; - token6 [label = "6: DAI";]; - token7 [label = "7: nUSD";]; - token8 [label = "8: USDT";]; - token9 [label = "9: nUSD";]; - token10 [label = "10: USDC.e";]; - token11 [label = "11: nUSD";]; - token12 [label = "12: USDC.e";]; - token13 [label = "13: USDT";]; - pool0 [label = "UniswapV3 0x8e29";shape = rect;style = dashed;]; + token0 [label = "USDC\n0";]; + token1 [label = "USDC.e\n1";]; + token2 [label = "USDT\n2";]; + token3 [label = "USDC.e\n3";]; + token4 [label = "USDT\n4";]; + token5 [label = "FRAX\n5";]; + token6 [label = "DAI\n6";]; + token7 [label = "nUSD\n7";]; + token8 [label = "USDT\n8";]; + token9 [label = "nUSD\n9";]; + token10 [label = "USDC.e\n10";]; + token11 [label = "nUSD\n11";]; + token12 [label = "USDC.e\n12";]; + token13 [label = "USDT\n13";]; + pool0 [label = "UniswapV3\n0x8e29";shape = rect;style = dashed;]; token0 -- pool0; subgraph cluster0 { style = dotted; @@ -24,7 +24,7 @@ graph G { token1; } } - pool1 [label = "UniswapV3 0xbe3a";shape = rect;style = dashed;]; + pool1 [label = "UniswapV3\n0xbe3a";shape = rect;style = dashed;]; token0 -- pool1; subgraph cluster1 { style = dotted; @@ -35,7 +35,7 @@ graph G { token2; } } - pool2 [label = "GMXV1StableArbitrum 0x489e";shape = rect;style = dashed;]; + pool2 [label = "GMXV1StableArbitrum\n0x489e";shape = rect;style = dashed;]; token0 -- pool2; subgraph cluster2 { style = dotted; @@ -51,7 +51,7 @@ graph G { token5 -- token6; } } - pool3 [label = "DefaultPool 0x9dd3";shape = rect;style = dashed;]; + pool3 [label = "DefaultPool\n0x9dd3";shape = rect;style = dashed;]; token1 -- pool3; subgraph cluster3 { style = dotted; @@ -63,7 +63,7 @@ graph G { token7 -- token8; } } - pool4 [label = "DefaultPool 0x9dd3";shape = rect;style = dashed;]; + pool4 [label = "DefaultPool\n0x9dd3";shape = rect;style = dashed;]; token2 -- pool4; subgraph cluster4 { style = dotted; @@ -75,7 +75,7 @@ graph G { token9 -- token10; } } - pool5 [label = "DefaultPool 0xcb59";shape = rect;style = dashed;]; + pool5 [label = "DefaultPool\n0xcb59";shape = rect;style = dashed;]; token0 -- pool5; subgraph cluster5 { style = dotted; @@ -86,7 +86,7 @@ graph G { token11; } } - pool6 [label = "DefaultPool 0x9dd3";shape = rect;style = dashed;]; + pool6 [label = "DefaultPool\n0x9dd3";shape = rect;style = dashed;]; token11 -- pool6; subgraph cluster6 { style = dotted; diff --git a/script/configs/arbitrum/LinkedPool.CCTP.USDC.png b/script/configs/arbitrum/LinkedPool.CCTP.USDC.png new file mode 100644 index 000000000..443ade759 Binary files /dev/null and b/script/configs/arbitrum/LinkedPool.CCTP.USDC.png differ diff --git a/script/configs/arbitrum/LinkedPool.CCTP.USDC.svg b/script/configs/arbitrum/LinkedPool.CCTP.USDC.svg deleted file mode 100644 index 1ecbd2beb..000000000 --- a/script/configs/arbitrum/LinkedPool.CCTP.USDC.svg +++ /dev/null @@ -1,273 +0,0 @@ - - - - - - -G - - -cluster0 - - - -cluster1 - - - -cluster2 - - - -cluster3 - - - -cluster4 - - - -cluster5 - - - -cluster6 - - - - -token0 - -0: USDC - - - -pool0 - -UniswapV3 0x8e29 - - - -token0--pool0 - - - - -pool1 - -UniswapV3 0xbe3a - - - -token0--pool1 - - - - -pool2 - -GMXV1StableArbitrum 0x489e - - - -token0--pool2 - - - - -pool5 - -DefaultPool 0xcb59 - - - -token0--pool5 - - - - -token1 - -1: USDC.e - - - -pool3 - -DefaultPool 0x9dd3 - - - -token1--pool3 - - - - -token2 - -2: USDT - - - -pool4 - -DefaultPool 0x9dd3 - - - -token2--pool4 - - - - -token3 - -3: USDC.e - - - -token4 - -4: USDT - - - - -token5 - -5: FRAX - - - - -token6 - -6: DAI - - - - -token7 - -7: nUSD - - - -token8 - -8: USDT - - - - -token9 - -9: nUSD - - - -token10 - -10: USDC.e - - - - -token11 - -11: nUSD - - - -pool6 - -DefaultPool 0x9dd3 - - - -token11--pool6 - - - - -token12 - -12: USDC.e - - - -token13 - -13: USDT - - - - -pool0--token1 - - - - -pool1--token2 - - - - -pool2--token3 - - - - -pool2--token4 - - - - -pool2--token5 - - - - -pool2--token6 - - - - -pool3--token7 - - - - -pool3--token8 - - - - -pool4--token9 - - - - -pool4--token10 - - - - -pool5--token11 - - - - -pool6--token12 - - - - -pool6--token13 - - - - diff --git a/script/configs/avalanche/LinkedPool.CCTP.USDC.png b/script/configs/avalanche/LinkedPool.CCTP.USDC.png new file mode 100644 index 000000000..730308c21 Binary files /dev/null and b/script/configs/avalanche/LinkedPool.CCTP.USDC.png differ diff --git a/script/configs/avalanche/LinkedPool.CCTP.USDC.svg b/script/configs/avalanche/LinkedPool.CCTP.USDC.svg deleted file mode 100644 index 64a849047..000000000 --- a/script/configs/avalanche/LinkedPool.CCTP.USDC.svg +++ /dev/null @@ -1,501 +0,0 @@ - - - - - - -G - - -cluster0 - - - -cluster1 - - - -cluster2 - - - -cluster3 - - - -cluster4 - - - -cluster5 - - - -cluster6 - - - -cluster7 - - - -cluster8 - - - -cluster9 - - - -cluster10 - - - -cluster11 - - - -cluster12 - - - - -token0 - -USDC -0 - - - -pool0 - -DefaultPool -0xa196 - - - -token0--pool0 - - - - -pool2 - -UniswapV3SR02 -0x8042 - - - -token0--pool2 - - - - -pool3 - -GMXV1StableAvalanche -0x9ab2 - - - -token0--pool3 - - - - -pool5 - -TraderJoeV21 -0x9b2c - - - -token0--pool5 - - - - -pool6 - -TraderJoeV21 -0x7c13 - - - -token0--pool6 - - - - -pool8 - -TraderJoeV21 -0xe2b1 - - - -token0--pool8 - - - - -token1 - -nUSD -1 - - - -token2 - -USDt -2 - - - - -pool1 - -DefaultPool -0xed2a - - - -token1--pool1 - - - - -token3 - -DAI.e -3 - - - -token4 - -USDC.e -4 - - - - -token5 - -USDT.e -5 - - - - -token6 - -USDt -6 - - - -pool9 - -TraderJoeV21 -0x6fe0 - - - -token6--pool9 - - - - -token7 - -USDC.e -7 - - - -pool4 - -DefaultPool -0xed2a - - - -token7--pool4 - - - - -token8 - -nUSD -8 - - - -token9 - -DAI.e -9 - - - - -token10 - -USDT.e -10 - - - - -token11 - -USDt -11 - - - -pool10 - -TraderJoeV21 -0x6fe0 - - - -token11--pool10 - - - - -token12 - -USDC.e -12 - - - -pool7 - -DefaultPool -0xed2a - - - -token12--pool7 - - - - -token13 - -nUSD -13 - - - -token14 - -DAI.e -14 - - - - -token15 - -USDT.e -15 - - - - -token16 - -USDT.e -16 - - - -pool11 - -DefaultPool -0xed2a - - - -token16--pool11 - - - - -pool12 - -TraderJoeV21 -0x6fe0 - - - -token16--pool12 - - - - -token17 - -USDT.e -17 - - - -token18 - -USDT.e -18 - - - -token19 - -nUSD -19 - - - -token20 - -DAI.e -20 - - - - -token21 - -USDC.e -21 - - - - -token22 - -USDt -22 - - - -pool0--token1 - - - - -pool0--token2 - - - - -pool1--token3 - - - - -pool1--token4 - - - - -pool1--token5 - - - - -pool2--token6 - - - - -pool3--token7 - - - - -pool4--token8 - - - - -pool4--token9 - - - - -pool4--token10 - - - - -pool5--token11 - - - - -pool6--token12 - - - - -pool7--token13 - - - - -pool7--token14 - - - - -pool7--token15 - - - - -pool8--token16 - - - - -pool9--token17 - - - - -pool10--token18 - - - - -pool11--token19 - - - - -pool11--token20 - - - - -pool11--token21 - - - - -pool12--token22 - - - - diff --git a/script/configs/avalanche/LinkedPool.nUSD.png b/script/configs/avalanche/LinkedPool.nUSD.png new file mode 100644 index 000000000..3de687fb2 Binary files /dev/null and b/script/configs/avalanche/LinkedPool.nUSD.png differ diff --git a/script/configs/avalanche/LinkedPool.nUSD.svg b/script/configs/avalanche/LinkedPool.nUSD.svg deleted file mode 100644 index 049857af7..000000000 --- a/script/configs/avalanche/LinkedPool.nUSD.svg +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - -G - - -cluster0 - - - -cluster1 - - - - -token0 - -nUSD -0 - - - -pool0 - -DefaultPool -0xed2a - - - -token0--pool0 - - - - -pool1 - -DefaultPool -0xa196 - - - -token0--pool1 - - - - -token1 - -DAI.e -1 - - - -token2 - -USDC.e -2 - - - - -token3 - -USDT.e -3 - - - - -token4 - -USDC -4 - - - -token5 - -USDt -5 - - - - -pool0--token1 - - - - -pool0--token2 - - - - -pool0--token3 - - - - -pool1--token4 - - - - -pool1--token5 - - - - diff --git a/script/configs/base/LinkedPool.CCTP.USDC.dot b/script/configs/base/LinkedPool.CCTP.USDC.dot index 2871f19bb..c86715658 100644 --- a/script/configs/base/LinkedPool.CCTP.USDC.dot +++ b/script/configs/base/LinkedPool.CCTP.USDC.dot @@ -1,12 +1,12 @@ graph G { - token0 [label = "0: USDC";]; - token1 [label = "1: USDbC";]; - token2 [label = "2: DAI";]; - token3 [label = "3: USDbC";]; - token4 [label = "4: axlUSDC";]; - token5 [label = "5: crvUSD";]; - token6 [label = "6: DAI";]; - pool0 [label = "UniswapV3.BaseSwap 0x8849";shape = rect;style = dashed;]; + token0 [label = "USDC\n0";]; + token1 [label = "USDbC\n1";]; + token2 [label = "DAI\n2";]; + token3 [label = "USDbC\n3";]; + token4 [label = "axlUSDC\n4";]; + token5 [label = "crvUSD\n5";]; + token6 [label = "DAI\n6";]; + pool0 [label = "UniswapV3.BaseSwap\n0x8849";shape = rect;style = dashed;]; token0 -- pool0; subgraph cluster0 { style = dotted; @@ -17,7 +17,7 @@ graph G { token1; } } - pool1 [label = "Algebra.SynthSwap 0x2c1e";shape = rect;style = dashed;]; + pool1 [label = "Algebra.SynthSwap\n0x2c1e";shape = rect;style = dashed;]; token1 -- pool1; subgraph cluster1 { style = dotted; @@ -28,7 +28,7 @@ graph G { token2; } } - pool2 [label = "CurveV1 0xf6c5";shape = rect;style = dashed;]; + pool2 [label = "CurveV1\n0xf6c5";shape = rect;style = dashed;]; token0 -- pool2; subgraph cluster2 { style = dotted; @@ -42,7 +42,7 @@ graph G { token4 -- token5; } } - pool3 [label = "Algebra.SynthSwap 0x2c1e";shape = rect;style = dashed;]; + pool3 [label = "Algebra.SynthSwap\n0x2c1e";shape = rect;style = dashed;]; token3 -- pool3; subgraph cluster3 { style = dotted; diff --git a/script/configs/base/LinkedPool.CCTP.USDC.png b/script/configs/base/LinkedPool.CCTP.USDC.png new file mode 100644 index 000000000..f7c7e9eda Binary files /dev/null and b/script/configs/base/LinkedPool.CCTP.USDC.png differ diff --git a/script/configs/base/LinkedPool.CCTP.USDC.svg b/script/configs/base/LinkedPool.CCTP.USDC.svg deleted file mode 100644 index 7fe311371..000000000 --- a/script/configs/base/LinkedPool.CCTP.USDC.svg +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - -G - - -cluster0 - - - -cluster1 - - - -cluster2 - - - -cluster3 - - - - -token0 - -0: USDC - - - -pool0 - -UniswapV3.BaseSwap 0x8849 - - - -token0--pool0 - - - - -pool2 - -CurveV1 0xf6c5 - - - -token0--pool2 - - - - -token1 - -1: USDbC - - - -pool1 - -Algebra.SynthSwap 0x2c1e - - - -token1--pool1 - - - - -token2 - -2: DAI - - - -token3 - -3: USDbC - - - -token4 - -4: axlUSDC - - - - -pool3 - -Algebra.SynthSwap 0x2c1e - - - -token3--pool3 - - - - -token5 - -5: crvUSD - - - - -token6 - -6: DAI - - - -pool0--token1 - - - - -pool1--token2 - - - - -pool2--token3 - - - - -pool2--token4 - - - - -pool2--token5 - - - - -pool3--token6 - - - - diff --git a/script/configs/linea/AlgebraModule.dc.json b/script/configs/linea/AlgebraModule.dc.json new file mode 100644 index 000000000..91ec2af84 --- /dev/null +++ b/script/configs/linea/AlgebraModule.dc.json @@ -0,0 +1,6 @@ +{ + "Lynex": { + "algebraRouter": "0x3921e8cb45B17fC029A0a6dE958330ca4e583390", + "algebraStaticQuoter": "0x70CeB9E0237546115E2F108f8F7658e42dAF3296" + } +} diff --git a/script/configs/linea/LinkedPool.RFQ.USDC.dc.json b/script/configs/linea/LinkedPool.RFQ.USDC.dc.json new file mode 100644 index 000000000..5a7baaf82 --- /dev/null +++ b/script/configs/linea/LinkedPool.RFQ.USDC.dc.json @@ -0,0 +1,10 @@ +{ + "bridgeToken": "0x176211869cA2b568f2A7D4EE941E073a821EE1ff", + "pools": [ + { + "nodeIndex": 0, + "pool": "0x6E9AD0B8A41E2c148e7B0385d3EcBFDb8A216a9B", + "poolModule": "Algebra.Lynex" + } + ] +} diff --git a/script/configs/linea/LinkedPool.RFQ.USDC.dot b/script/configs/linea/LinkedPool.RFQ.USDC.dot new file mode 100644 index 000000000..4ff583323 --- /dev/null +++ b/script/configs/linea/LinkedPool.RFQ.USDC.dot @@ -0,0 +1,15 @@ +graph G { + token0 [label = "USDC\n0";]; + token1 [label = "USDT\n1";]; + pool0 [label = "Algebra.Lynex\n0x6e9a";shape = rect;style = dashed;]; + token0 -- pool0; + subgraph cluster0 { + style = dotted; + pool0 -- token1; + subgraph { + rank = same; + edge [style = invis;]; + token1; + } + } +} diff --git a/script/configs/linea/LinkedPool.RFQ.USDC.png b/script/configs/linea/LinkedPool.RFQ.USDC.png new file mode 100644 index 000000000..147aec70f Binary files /dev/null and b/script/configs/linea/LinkedPool.RFQ.USDC.png differ diff --git a/script/configs/linea/SwapQuoterV2.dc.json b/script/configs/linea/SwapQuoterV2.dc.json new file mode 100644 index 000000000..7952feae9 --- /dev/null +++ b/script/configs/linea/SwapQuoterV2.dc.json @@ -0,0 +1,10 @@ +{ + "pools": { + "0": { + "description": "originOnly.LinkedPool.RFQ.USDC", + "isLinked": true, + "pool": "0x71035BE2414fF19d90302f528b97183B87c3c096", + "token": "0x0000000000000000000000000000000000000000" + } + } +} \ No newline at end of file diff --git a/script/configs/mainnet/LinkedPool.CCTP.USDC.png b/script/configs/mainnet/LinkedPool.CCTP.USDC.png new file mode 100644 index 000000000..0ce9fabbe Binary files /dev/null and b/script/configs/mainnet/LinkedPool.CCTP.USDC.png differ diff --git a/script/configs/mainnet/LinkedPool.CCTP.USDC.svg b/script/configs/mainnet/LinkedPool.CCTP.USDC.svg deleted file mode 100644 index 36cf0be5f..000000000 --- a/script/configs/mainnet/LinkedPool.CCTP.USDC.svg +++ /dev/null @@ -1,270 +0,0 @@ - - - - - - -G - - -cluster0 - - - -cluster1 - - - -cluster2 - - - -cluster3 - - - -cluster4 - - - -cluster5 - - - -cluster6 - - - -cluster7 - - - - -token0 - -USDC -0 - - - -pool0 - -NexusPool -0x1116 - - - -token0--pool0 - - - - -pool1 - -CurveV1 -0x4dec - - - -token0--pool1 - - - - -pool2 - -CurveV1 -0xdcef - - - -token0--pool2 - - - - -pool3 - -UniswapV3 -0x73ea - - - -token0--pool3 - - - - -pool4 - -UniswapV3 -0xc63b - - - -token0--pool4 - - - - -pool5 - -UniswapV3 -0x4e09 - - - -token0--pool5 - - - - -pool6 - -UniswapV3 -0x1339 - - - -token0--pool6 - - - - -pool7 - -UniswapV3 -0x3416 - - - -token0--pool7 - - - - -token1 - -DAI -1 - - - -token2 - -USDT -2 - - - - -token3 - -nUSD -3 - - - - -token4 - -crvUSD -4 - - - -token5 - -FRAX -5 - - - -token6 - -crvUSD -6 - - - -token7 - -FRAX -7 - - - -token8 - -LUSD -8 - - - -token9 - -PYUSD -9 - - - -token10 - -USDT -10 - - - -pool0--token1 - - - - -pool0--token2 - - - - -pool0--token3 - - - - -pool1--token4 - - - - -pool2--token5 - - - - -pool3--token6 - - - - -pool4--token7 - - - - -pool5--token8 - - - - -pool6--token9 - - - - -pool7--token10 - - - - diff --git a/script/configs/optimism/LinkedPool.CCTP.USDC.png b/script/configs/optimism/LinkedPool.CCTP.USDC.png new file mode 100644 index 000000000..67980e5cb Binary files /dev/null and b/script/configs/optimism/LinkedPool.CCTP.USDC.png differ diff --git a/script/configs/optimism/LinkedPool.CCTP.USDC.svg b/script/configs/optimism/LinkedPool.CCTP.USDC.svg deleted file mode 100644 index 156658ba3..000000000 --- a/script/configs/optimism/LinkedPool.CCTP.USDC.svg +++ /dev/null @@ -1,550 +0,0 @@ - - - - - - -G - - -cluster0 - - - -cluster1 - - - -cluster2 - - - -cluster3 - - - -cluster4 - - - -cluster5 - - - -cluster6 - - - -cluster7 - - - -cluster8 - - - -cluster9 - - - -cluster10 - - - -cluster11 - - - -cluster12 - - - -cluster13 - - - -cluster14 - - - -cluster15 - - - -cluster16 - - - -cluster17 - - - - -token0 - -USDC -0 - - - -pool0 - -UniswapV3 -0x2e2d - - - -token0--pool0 - - - - -pool8 - -UniswapV3 -0xa73c - - - -token0--pool8 - - - - -pool9 - -UniswapV3 -0x2ab2 - - - -token0--pool9 - - - - -token1 - -USDC.e -1 - - - -pool1 - -UniswapV3 -0xbf16 - - - -token1--pool1 - - - - -pool2 - -VelodromeV2 -0x1971 - - - -token1--pool2 - - - - -pool3 - -CurveV1 -0x1337 - - - -token1--pool3 - - - - -pool4 - -UniswapV3 -0xf1f1 - - - -token1--pool4 - - - - -pool5 - -VelodromeV2 -0x2b47 - - - -token1--pool5 - - - - -pool6 - -VelodromeV2 -0x6d5b - - - -token1--pool6 - - - - -pool7 - -UniswapV3 -0x252c - - - -token1--pool7 - - - - -token2 - -DAI -2 - - - -token3 - -DAI -3 - - - -token4 - -DAI -4 - - - -token5 - -USDT -5 - - - - -token6 - -USDT -6 - - - -token7 - -USDT -7 - - - -token8 - -sUSD -8 - - - -token9 - -sUSD -9 - - - -token10 - -USDT -10 - - - -token11 - -USDC.e -11 - - - -pool10 - -UniswapV3 -0xbf16 - - - -token11--pool10 - - - - -pool11 - -VelodromeV2 -0x1971 - - - -token11--pool11 - - - - -pool12 - -CurveV1 -0x1337 - - - -token11--pool12 - - - - -pool13 - -UniswapV3 -0xf1f1 - - - -token11--pool13 - - - - -pool14 - -VelodromeV2 -0x2b47 - - - -token11--pool14 - - - - -pool15 - -VelodromeV2 -0x6d5b - - - -token11--pool15 - - - - -pool16 - -UniswapV3 -0x252c - - - -token11--pool16 - - - - -pool17 - -DefaultPool -0xf449 - - - -token11--pool17 - - - - -token12 - -DAI -12 - - - -token13 - -DAI -13 - - - -token14 - -DAI -14 - - - -token15 - -USDT -15 - - - - -token16 - -USDT -16 - - - -token17 - -USDT -17 - - - -token18 - -sUSD -18 - - - -token19 - -sUSD -19 - - - -token20 - -nUSD -20 - - - -pool0--token1 - - - - -pool1--token2 - - - - -pool2--token3 - - - - -pool3--token4 - - - - -pool3--token5 - - - - -pool4--token6 - - - - -pool5--token7 - - - - -pool6--token8 - - - - -pool7--token9 - - - - -pool8--token10 - - - - -pool9--token11 - - - - -pool10--token12 - - - - -pool11--token13 - - - - -pool12--token14 - - - - -pool12--token15 - - - - -pool13--token16 - - - - -pool14--token17 - - - - -pool15--token18 - - - - -pool16--token19 - - - - -pool17--token20 - - - - diff --git a/script/configs/optimism/LinkedPool.nUSD.png b/script/configs/optimism/LinkedPool.nUSD.png new file mode 100644 index 000000000..639d4fa47 Binary files /dev/null and b/script/configs/optimism/LinkedPool.nUSD.png differ diff --git a/script/configs/optimism/LinkedPool.nUSD.svg b/script/configs/optimism/LinkedPool.nUSD.svg deleted file mode 100644 index c3d726373..000000000 --- a/script/configs/optimism/LinkedPool.nUSD.svg +++ /dev/null @@ -1,257 +0,0 @@ - - - - - - -G - - -cluster0 - - - -cluster1 - - - -cluster2 - - - -cluster3 - - - -cluster4 - - - -cluster5 - - - -cluster6 - - - -cluster7 - - - - -token0 - -nUSD -0 - - - -pool0 - -DefaultPool -0xf449 - - - -token0--pool0 - - - - -token1 - -USDC.e -1 - - - -pool1 - -UniswapV3 -0xbf16 - - - -token1--pool1 - - - - -pool2 - -VelodromeV2 -0x1971 - - - -token1--pool2 - - - - -pool3 - -CurveV1 -0x1337 - - - -token1--pool3 - - - - -pool4 - -UniswapV3 -0xf1f1 - - - -token1--pool4 - - - - -pool5 - -VelodromeV2 -0x2b47 - - - -token1--pool5 - - - - -pool6 - -VelodromeV2 -0x6d5b - - - -token1--pool6 - - - - -pool7 - -UniswapV3 -0x2e2d - - - -token1--pool7 - - - - -token2 - -DAI -2 - - - -token3 - -DAI -3 - - - -token4 - -DAI -4 - - - -token5 - -USDT -5 - - - - -token6 - -USDT -6 - - - -token7 - -USDT -7 - - - -token8 - -sUSD -8 - - - -token9 - -USDC -9 - - - -pool0--token1 - - - - -pool1--token2 - - - - -pool2--token3 - - - - -pool3--token4 - - - - -pool3--token5 - - - - -pool4--token6 - - - - -pool5--token7 - - - - -pool6--token8 - - - - -pool7--token9 - - - - diff --git a/script/configs/polygon/LinkedPool.USDC.e.png b/script/configs/polygon/LinkedPool.USDC.e.png new file mode 100644 index 000000000..6687a0089 Binary files /dev/null and b/script/configs/polygon/LinkedPool.USDC.e.png differ diff --git a/script/configs/polygon/LinkedPool.USDC.e.svg b/script/configs/polygon/LinkedPool.USDC.e.svg deleted file mode 100644 index 8fae532b6..000000000 --- a/script/configs/polygon/LinkedPool.USDC.e.svg +++ /dev/null @@ -1,382 +0,0 @@ - - - - - - -G - - -cluster0 - - - -cluster1 - - - -cluster2 - - - -cluster3 - - - -cluster4 - - - -cluster5 - - - -cluster6 - - - -cluster7 - - - -cluster8 - - - -cluster9 - - - -cluster10 - - - -cluster11 - - - - -token0 - -USDC.e -0 - - - -pool0 - -UniswapV3 -0xd36e - - - -token0--pool0 - - - - -pool1 - -Algebra.QuickSwap -0xeecb - - - -token0--pool1 - - - - -pool2 - -UniswapV3 -0xdac8 - - - -token0--pool2 - - - - -pool3 - -Algebra.QuickSwap -0x7b92 - - - -token0--pool3 - - - - -pool4 - -UniswapV3 -0x5645 - - - -token0--pool4 - - - - -pool5 - -Algebra.QuickSwap -0xe7e0 - - - -token0--pool5 - - - - -pool6 - -UniswapV3 -0xbeaf - - - -token0--pool6 - - - - -pool7 - -DefaultPool -0x85fc - - - -token0--pool7 - - - - -token1 - -USDC -1 - - - -pool8 - -UniswapV3 -0x3108 - - - -token1--pool8 - - - - -pool9 - -UniswapV3 -0xf369 - - - -token1--pool9 - - - - -token2 - -USDC -2 - - - -pool10 - -UniswapV3 -0x3108 - - - -token2--pool10 - - - - -pool11 - -UniswapV3 -0xf369 - - - -token2--pool11 - - - - -token3 - -USDT -3 - - - -token4 - -USDT -4 - - - -token5 - -DAI -5 - - - -token6 - -DAI -6 - - - -token7 - -FRAX -7 - - - -token8 - -nUSD -8 - - - -token9 - -DAI -9 - - - - -token10 - -USDT -10 - - - - -token11 - -USDT -11 - - - -token12 - -DAI -12 - - - -token13 - -USDT -13 - - - -token14 - -DAI -14 - - - -pool0--token1 - - - - -pool1--token2 - - - - -pool2--token3 - - - - -pool3--token4 - - - - -pool4--token5 - - - - -pool5--token6 - - - - -pool6--token7 - - - - -pool7--token8 - - - - -pool7--token9 - - - - -pool7--token10 - - - - -pool8--token11 - - - - -pool9--token12 - - - - -pool10--token13 - - - - -pool11--token14 - - - - diff --git a/script/configs/scroll/LinkedPool.RFQ.USDC.dc.json b/script/configs/scroll/LinkedPool.RFQ.USDC.dc.json index 2a9b5cee6..87bd19846 100644 --- a/script/configs/scroll/LinkedPool.RFQ.USDC.dc.json +++ b/script/configs/scroll/LinkedPool.RFQ.USDC.dc.json @@ -3,8 +3,8 @@ "pools": [ { "nodeIndex": 0, - "pool": "0x887B414d34bA20Ae7ED5378380682f22071d08c2", - "poolModule": "UniswapV3.Metavault" + "pool": "0xf1783F3377b3A70465C193eF33942c0803121ba0", + "poolModule": "UniswapV3SR02" } ] } diff --git a/script/configs/scroll/LinkedPool.RFQ.USDC.dot b/script/configs/scroll/LinkedPool.RFQ.USDC.dot index f19a84ee3..fd30ace0e 100644 --- a/script/configs/scroll/LinkedPool.RFQ.USDC.dot +++ b/script/configs/scroll/LinkedPool.RFQ.USDC.dot @@ -1,7 +1,7 @@ graph G { token0 [label = "USDC\n0";]; token1 [label = "USDT\n1";]; - pool0 [label = "UniswapV3.Metavault\n0x887b";shape = rect;style = dashed;]; + pool0 [label = "UniswapV3SR02\n0xf178";shape = rect;style = dashed;]; token0 -- pool0; subgraph cluster0 { style = dotted; diff --git a/script/configs/scroll/LinkedPool.RFQ.USDC.png b/script/configs/scroll/LinkedPool.RFQ.USDC.png new file mode 100644 index 000000000..983f9165b Binary files /dev/null and b/script/configs/scroll/LinkedPool.RFQ.USDC.png differ diff --git a/script/configs/scroll/LinkedPool.RFQ.USDC.svg b/script/configs/scroll/LinkedPool.RFQ.USDC.svg deleted file mode 100644 index 8546b0d71..000000000 --- a/script/configs/scroll/LinkedPool.RFQ.USDC.svg +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - -G - - -cluster0 - - - - -token0 - -USDC -0 - - - -pool0 - -UniswapV3.Metavault -0x887b - - - -token0--pool0 - - - - -token1 - -USDT -1 - - - -pool0--token1 - - - - diff --git a/script/configs/scroll/SwapQuoterV2.dc.json b/script/configs/scroll/SwapQuoterV2.dc.json new file mode 100644 index 000000000..f767c3aa9 --- /dev/null +++ b/script/configs/scroll/SwapQuoterV2.dc.json @@ -0,0 +1,10 @@ +{ + "pools": { + "0": { + "description": "originOnly.LinkedPool.RFQ.USDC", + "isLinked": true, + "pool": "0xA9d3E57033a636471D05c7bD6f4F564152e1c3f4", + "token": "0x0000000000000000000000000000000000000000" + } + } +} \ No newline at end of file diff --git a/script/configs/scroll/UniswapV3SR02Module.dc.json b/script/configs/scroll/UniswapV3SR02Module.dc.json new file mode 100644 index 000000000..229f4090d --- /dev/null +++ b/script/configs/scroll/UniswapV3SR02Module.dc.json @@ -0,0 +1,4 @@ +{ + "uniswapV3SwapRouter02": "0xfc30937f5cDe93Df8d48aCAF7e6f5D8D8A31F636", + "uniswapV3StaticQuoter": "0x9Ffa621e973CB1f9Be6B75848a55a71A66f227d7" +} diff --git a/script/generate-token-trees.sh b/script/generate-token-trees.sh new file mode 100755 index 000000000..5d7bff03d --- /dev/null +++ b/script/generate-token-trees.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +# This script generates the token tree visualization for all linked pools +# Note: there are no transactions to broadcast +# Usage: ./script/generate-token-trees.sh + +# Build the contracts first +forge build + +# Find all config files. These are located in script/configs and have LinkedPool.*.dc.json name +configs=$(find script/configs -name "LinkedPool.*.dc.json") + +for config in $configs; do + # Config file has path script/configs/chainName/LinkedPool.symbol.dc.json + # Extract chain name and symbol from the path + chainName=$(echo "$config" | sed -n 's/.*configs\/\(.*\)\/LinkedPool\..*\.dc\.json/\1/p') + symbol=$(echo "$config" | sed -n 's/.*LinkedPool\.\(.*\)\.dc\.json/\1/p') + echo "Cleaning up token tree for $chainName $symbol" + # Remove script/configs/chainName/LinkedPool.symbol.* files except the one we are processing, + # e.g. remove script/configs/linea/LinkedPool.USDC.png but keep script/configs/linea/LinkedPool.USDC.dc.json + find "script/configs/$chainName" -name "LinkedPool.$symbol.*" ! -name "LinkedPool.$symbol.dc.json" -exec rm {} \; + forge script ./script/router/linkedPool/GenerateTokenTree.s.sol -f "$chainName" --sig "run(string)" "$symbol" +done diff --git a/script/rfq/ConfigureFastBridgeRouter.t.sol b/script/rfq/ConfigureFastBridgeRouter.t.sol index a1e038ecb..75347e8d8 100644 --- a/script/rfq/ConfigureFastBridgeRouter.t.sol +++ b/script/rfq/ConfigureFastBridgeRouter.t.sol @@ -27,13 +27,17 @@ contract ConfigureFastBridgeRouter is BasicSynapseScript { function configureFastBridgeRouter() internal { address fastBridge = getDeploymentAddress("FastBridge"); if (fastBridgeRouter.fastBridge() != fastBridge) { - printLog("Setting FastBridge address to %s", fastBridge); fastBridgeRouter.setFastBridge(fastBridge); + printLog(string.concat(unicode"✅ Fast bridge set to ", vm.toString(fastBridge))); + } else { + printLog(string.concat(unicode"🟡 Skipping: Fast bridge is already set to ", vm.toString(fastBridge))); } address swapQuoter = getDeploymentAddress("SwapQuoterV2"); if (fastBridgeRouter.swapQuoter() != swapQuoter) { - printLog("Setting SwapQuoter address to %s", swapQuoter); fastBridgeRouter.setSwapQuoter(swapQuoter); + printLog(string.concat(unicode"✅ SwapQuoter set to ", vm.toString(swapQuoter))); + } else { + printLog(string.concat(unicode"🟡 Skipping: SwapQuoter is already set to ", vm.toString(swapQuoter))); } } } diff --git a/script/router/linkedPool/GenerateTokenTree.s.sol b/script/router/linkedPool/GenerateTokenTree.s.sol index 638e2bcd4..3dfbce4b4 100644 --- a/script/router/linkedPool/GenerateTokenTree.s.sol +++ b/script/router/linkedPool/GenerateTokenTree.s.sol @@ -41,7 +41,7 @@ contract GenerateTokenTree is BasicSynapseScript { LinkedPool public linkedPool; string public graphFN; - string public graphSVG; + string public graphPNG; // (pool index => list of nodes added with the pool) mapping(uint256 => uint256[]) public poolToAddedNodes; @@ -52,13 +52,13 @@ contract GenerateTokenTree is BasicSynapseScript { string memory configName = StringUtils.concat("LinkedPool.", bridgeSymbol); config = getDeployConfig(configName); graphFN = genericConfigPath({fileName: configName.concat(".dot")}); - graphSVG = genericConfigPath({fileName: configName.concat(".svg")}); + graphPNG = genericConfigPath({fileName: configName.concat(".png")}); // Deploy new Linked Pool in a forked environment deployLinkedPool(); addPoolsToTokenTree(); // Inspect the Linked Pool and generate the graph image file printGraph(); - generateSVG(); + generatePNG(); } // ═════════════════════════════════════════════ LINKED POOL SETUP ═════════════════════════════════════════════════ @@ -94,14 +94,14 @@ contract GenerateTokenTree is BasicSynapseScript { // ═════════════════════════════════════════════ IMAGE GENERATION ══════════════════════════════════════════════════ - /// @notice Generates SVG image from the DOT file. - function generateSVG() internal { + /// @notice Generates PNG image from the DOT file. + function generatePNG() internal { string[] memory inputs = new string[](5); inputs[0] = "dot"; - inputs[1] = "-Tsvg"; + inputs[1] = "-Tpng"; inputs[2] = graphFN; inputs[3] = "-o"; - inputs[4] = graphSVG; + inputs[4] = graphPNG; vm.ffi(inputs); } diff --git a/script/router/quoter/ConfigureQuoterV2.s.sol b/script/router/quoter/ConfigureQuoterV2.s.sol index 7248a38f9..2186edc9f 100644 --- a/script/router/quoter/ConfigureQuoterV2.s.sol +++ b/script/router/quoter/ConfigureQuoterV2.s.sol @@ -77,7 +77,7 @@ contract ConfigureQuoterV2 is BasicRouterScript { } function setSynapseRouter() internal { - address latestRouter = getLatestRouterDeployment(); + address latestRouter = tryGetLatestRouterDeployment(); if (quoterV2.synapseRouter() != latestRouter) { console2.log("Setting synapseRouter to %s", latestRouter); quoterV2.setSynapseRouter(latestRouter); diff --git a/test/router/linkedPool/LinkedPoolConfig.Integration.Linea.USDC.t.sol b/test/router/linkedPool/LinkedPoolConfig.Integration.Linea.USDC.t.sol new file mode 100644 index 000000000..2d16181b1 --- /dev/null +++ b/test/router/linkedPool/LinkedPoolConfig.Integration.Linea.USDC.t.sol @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.17; + +import {LinkedPoolConfigIntegrationTest} from "./LinkedPoolConfigIntegration.sol"; + +contract LinkedPoolConfigUSDCLineaTestFork is LinkedPoolConfigIntegrationTest { + /// @notice Test swaps worth 10_000 USDC + uint256 public constant SWAP_VALUE = 10_000; + + /// @notice Used pools have accurate quoting functions, so should have no delta + uint256 public constant MAX_PERCENT_DELTA = 0; + + constructor() LinkedPoolConfigIntegrationTest("linea", "RFQ.USDC", SWAP_VALUE, MAX_PERCENT_DELTA) {} +} diff --git a/test/router/modules/pool/LinkedPool.Algebra.Integration.Linea.t.sol b/test/router/modules/pool/LinkedPool.Algebra.Integration.Linea.t.sol new file mode 100644 index 000000000..d5f9b51d8 --- /dev/null +++ b/test/router/modules/pool/LinkedPool.Algebra.Integration.Linea.t.sol @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.17; + +import {LinkedPoolIntegrationTest} from "./LinkedPoolIntegration.sol"; + +import {AlgebraModule} from "../../../../contracts/router/modules/pool/algebra/AlgebraModule.sol"; + +contract LinkedPoolAlgebraModuleLineaTestFork is LinkedPoolIntegrationTest { + // 2024-07-23 + uint256 public constant LINEA_BLOCK_NUMBER = 0; + + // Eden's Algebra Static Quoter on Linea + address public constant ALGEBRA_STATIC_QUOTER = 0x70CeB9E0237546115E2F108f8F7658e42dAF3296; + + // Algebra Router on Linea + address public constant ALGEBRA_ROUTER = 0x3921e8cb45B17fC029A0a6dE958330ca4e583390; + // Algebra USDC.e/USDT pool on Linea + address public constant ALGEBRA_USDT_POOL = 0x6E9AD0B8A41E2c148e7B0385d3EcBFDb8A216a9B; + + // Bridged USDC (USDC_E) on Linea + address public constant USDC_E = 0x176211869cA2b568f2A7D4EE941E073a821EE1ff; + // USDT on Linea + address public constant USDT = 0xA219439258ca9da29E9Cc4cE5596924745e12B93; + + address public algebraModule; + + constructor() LinkedPoolIntegrationTest("linea", "AlgebraModule.Lynex", LINEA_BLOCK_NUMBER) {} + + function deployModule() public override { + algebraModule = address(new AlgebraModule(ALGEBRA_ROUTER, ALGEBRA_STATIC_QUOTER)); + } + + function addExpectedTokens() public override { + // Expected order of tokens: + // 0: USDC.e + // 1: USDT + addExpectedToken(USDC_E, "USDC.e"); + addExpectedToken(USDT, "USDT"); + } + + function addPools() public override { + addPool({poolName: "USDC.e/USDT", nodeIndex: 0, pool: ALGEBRA_USDT_POOL, poolModule: algebraModule}); + } +} diff --git a/test/router/modules/pool/LinkedPool.UniswapV3SR02.Integration.Scroll.t.sol b/test/router/modules/pool/LinkedPool.UniswapV3SR02.Integration.Scroll.t.sol new file mode 100644 index 000000000..3126337a4 --- /dev/null +++ b/test/router/modules/pool/LinkedPool.UniswapV3SR02.Integration.Scroll.t.sol @@ -0,0 +1,48 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.17; + +import {LinkedPoolIntegrationTest} from "./LinkedPoolIntegration.sol"; + +import {UniswapV3SR02Module} from "../../../../contracts/router/modules/pool/uniswap/UniswapV3SR02Module.sol"; + +contract LinkedPoolUniswapV3SR02ModuleScrollTestFork is LinkedPoolIntegrationTest { + // 2024-07-23 + uint256 public constant SCROLL_BLOCK_NUMBER = 7704400; + + // Uniswap V3 Router on Scroll + address public constant UNI_V3_ROUTER = 0xfc30937f5cDe93Df8d48aCAF7e6f5D8D8A31F636; + // Eden's Uniswap V3 Static Quoter on Scroll + address public constant UNI_V3_STATIC_QUOTER = 0x9Ffa621e973CB1f9Be6B75848a55a71A66f227d7; + // Uniswap V3 USDC/USDT pool on Scroll + address public constant UNI_V3_USDC_USDT_POOL = 0xf1783F3377b3A70465C193eF33942c0803121ba0; + + // USDC on Scroll + address public constant USDC = 0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4; + // USDT on Scroll + address public constant USDT = 0xf55BEC9cafDbE8730f096Aa55dad6D22d44099Df; + + UniswapV3SR02Module public uniswapV3SR02Module; + + constructor() LinkedPoolIntegrationTest("scroll", "UniswapV3SR02Module", SCROLL_BLOCK_NUMBER) {} + + function deployModule() public override { + uniswapV3SR02Module = new UniswapV3SR02Module(UNI_V3_ROUTER, UNI_V3_STATIC_QUOTER); + } + + function addExpectedTokens() public override { + // Expected order of tokens: + // 0: USDC + // 1: USDT + addExpectedToken(USDC, "USDC"); + addExpectedToken(USDT, "USDT"); + } + + function addPools() public override { + addPool({ + poolName: "USDC/USDT", + nodeIndex: 0, + pool: UNI_V3_USDC_USDT_POOL, + poolModule: address(uniswapV3SR02Module) + }); + } +}