diff --git a/packages/bridge-contracts/contracts/messagePassingBridge/MessagePassingBridge.sol b/packages/bridge-contracts/contracts/messagePassingBridge/MessagePassingBridge.sol index 522eac3..dd5e807 100644 --- a/packages/bridge-contracts/contracts/messagePassingBridge/MessagePassingBridge.sol +++ b/packages/bridge-contracts/contracts/messagePassingBridge/MessagePassingBridge.sol @@ -8,6 +8,7 @@ import {StringToAddress, AddressToString} from '@axelar-network/axelar-gmp-sdk-s import {AccessControlUpgradeable} from '@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol'; +import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; import './LZHandlerUpgradeable.sol'; import './AxelarHandlerUpgradeable.sol'; import './BridgeHelperLibrary.sol'; @@ -151,7 +152,7 @@ contract MessagePassingBridge is __LZHandlerUpgradeable_init(lzEndpoint_); guardian = msg.sender; bridgeLimits = limits; - bridgeFees = fees; + setBridgeFees(fees); feeRecipient = nameService.getAddress('UBISCHEME'); if (feeRecipient == address(0)) feeRecipient = avatar; @@ -227,8 +228,9 @@ contract MessagePassingBridge is * @dev Function for setting the bridge fees * @param fees The bridge fees to set */ - function setBridgeFees(BridgeFees memory fees) external { + function setBridgeFees(BridgeFees memory fees) public { _onlyOwnerOrGuardian(); + require(fees.fee <= 10000, 'invalid fee'); bridgeFees = fees; } @@ -263,7 +265,7 @@ contract MessagePassingBridge is function withdraw(address token, uint256 amount) external { _onlyAvatar(); if (amount == 0) amount = IERC20(token).balanceOf(address(this)); - IERC20(token).transfer(msg.sender, amount); + SafeERC20.safeTransfer(IERC20(token), msg.sender, amount); } /** @@ -309,7 +311,7 @@ contract MessagePassingBridge is // } /** - * @dev Enforces transfer limits and checks if the transfer is valid + * @dev Enforces transfer limits and checks if the transfer is valid. limits are enforced on the target minting side. * @param from The address to transfer from * @param target The address to transfer to * @param amount The amount to transfer @@ -357,7 +359,8 @@ contract MessagePassingBridge is } /** - * @dev Bridges tokens from one chain to another, this performs burning or locking + * @dev Bridges tokens from one chain to another, this performs burning or locking. + * @notice limits are not enforced here. limits are enforced on the target minting side. * @param from The address to bridge tokens from * @param target The address to bridge tokens to * @param targetChainId The chain ID of the target chain @@ -470,7 +473,7 @@ contract MessagePassingBridge is } /** - * @dev Bridges tokens from one chain to another, this performs minting or unlock + * @dev Bridges tokens from one chain to another, this performs minting or unlock. limits are enforced here * @param from The address to bridge tokens from * @param target The address to bridge tokens to * @param normalizedAmount The amount of tokens to bridge diff --git a/packages/bridge-contracts/deploy/deployMessageBridge.ts b/packages/bridge-contracts/deploy/deployMessageBridge.ts index 18a7d69..de49d31 100644 --- a/packages/bridge-contracts/deploy/deployMessageBridge.ts +++ b/packages/bridge-contracts/deploy/deployMessageBridge.ts @@ -166,7 +166,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const chainData = chainsData[network.name === 'localhost' ? 'celo' : network.name]; const proxySalt = ethers.utils.keccak256( - ethers.utils.arrayify(ethers.utils.toUtf8Bytes('MessagePassingBridge' + (isTestnet ? 'Testnet' : 'V1'))), + ethers.utils.arrayify(ethers.utils.toUtf8Bytes(isTestnet ? 'Testnet' : 'MessagePassingBridgeV1')), ); console.log(chainData, network.name, { isTestnet, proxySalt }); const bridgeProxyDeploy = await deployments.deterministic('MessagePassingBridge', { diff --git a/packages/bridge-contracts/hardhat.config.ts b/packages/bridge-contracts/hardhat.config.ts index a79af5d..b6f3ab2 100644 --- a/packages/bridge-contracts/hardhat.config.ts +++ b/packages/bridge-contracts/hardhat.config.ts @@ -11,10 +11,13 @@ import '@nomiclabs/hardhat-waffle'; import 'hardhat-deploy'; import { HttpNetworkAccountsConfig } from 'hardhat/types'; import { configDotenv } from 'dotenv'; - +import * as envEnc from '@chainlink/env-enc'; configDotenv(); +envEnc.config(); -const pkey = process.env.PRIVATE_KEY; +const pkey = process.argv.find((_) => _.includes('testnet') || _.includes('staging')) + ? process.env.DEV_KEY + : process.env.PRIVATE_KEY; const mnemonic = process.env.MNEMONIC; let accounts: unknown = 'remote'; diff --git a/packages/bridge-contracts/package.json b/packages/bridge-contracts/package.json index ff28bf5..2095302 100644 --- a/packages/bridge-contracts/package.json +++ b/packages/bridge-contracts/package.json @@ -24,6 +24,7 @@ "devDependencies": { "@axelar-network/axelar-gmp-sdk-solidity": "^3.6.1", "@axelar-network/axelarjs-sdk": "^0.13.6", + "@chainlink/env-enc": "^1.0.5", "@gooddollar/goodprotocol": "2.0.34-beta.4", "@layerzerolabs/scan-client": "^0.0.6", "@layerzerolabs/solidity-examples": "^0.0.13", @@ -48,7 +49,7 @@ "ethers": "^5.*", "hardhat": "2.*", "hardhat-contract-sizer": "^2.6.1", - "hardhat-deploy": "0.11.44", + "hardhat-deploy": "0.11.43", "hardhat-gas-reporter": "^1.0.9", "merkle-patricia-tree": "^2.*", "prettier": "^2.5.1", diff --git a/packages/bridge-contracts/release/mpb.json b/packages/bridge-contracts/release/mpb.json index f985c7e..b59ff3f 100644 --- a/packages/bridge-contracts/release/mpb.json +++ b/packages/bridge-contracts/release/mpb.json @@ -4664,7 +4664,7 @@ ] }, "MessagePassingBridge_Implementation": { - "address": "0x7baFe060A37E31E707b8B28a90a36731ee99aFBa", + "address": "0x12ab702f015D3302f3cc0c4AbA0626A127D06A07", "abi": [ { "inputs": [ @@ -8597,11 +8597,11 @@ ], "50": [ { - "name": "xdc", + "name": "development-xdc", "chainId": "50", "contracts": { "BridgeHelperLibrary": { - "address": "0xdEE49F247c8B567273437F41CC326A2fA1e9cC3D", + "address": "0x5D4C25c3B621027A8011474Eb005e45Dd014a2c1", "abi": [ { "inputs": [ @@ -8835,7 +8835,7 @@ ] }, "MessagePassingBridge_Implementation": { - "address": "0xa7bFc0D36300B5978Cfa18301446caD3E855aE06", + "address": "0x9aDF1E99b06CeDDB5787675f9744bc53B4e34a41", "abi": [ { "inputs": [ @@ -8854,6 +8854,11 @@ "name": "lzEndpoint", "type": "address" }, + { + "internalType": "bool", + "name": "isTestnet", + "type": "bool" + }, { "internalType": "uint32", "name": "homeChainId", @@ -9371,6 +9376,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "TESTNET", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -9406,11 +9424,6 @@ "internalType": "uint256", "name": "chainId", "type": "uint256" - }, - { - "internalType": "address", - "name": "remote", - "type": "address" } ], "name": "addLzChainSupport", @@ -9918,7 +9931,7 @@ "type": "uint256" } ], - "stateMutability": "pure", + "stateMutability": "view", "type": "function" }, { @@ -10834,7 +10847,7 @@ } }, { - "name": "xdc_testnet", + "name": "xdc", "chainId": "50", "contracts": { "BridgeHelperLibrary": { @@ -10996,7 +11009,7 @@ ] }, "MessagePassingBridge": { - "address": "0xD77Ace8A2b38811Ec1f04e098390b583b9354Db7", + "address": "0xa3247276DbCC76Dd7705273f766eB3E8a5ecF4a5", "abi": [ { "anonymous": false, @@ -11072,7 +11085,7 @@ ] }, "MessagePassingBridge_Implementation": { - "address": "0x86D908d5EF85903823e12CD959db8aa6b2638a89", + "address": "0xe4CFA18A3d0a7d77fAA42961ee943c9221d61937", "abi": [ { "inputs": [ @@ -13069,12 +13082,10 @@ ] } } - } - ], - "122": [ + }, { - "name": "fuse", - "chainId": "122", + "name": "xdc_testnet", + "chainId": "50", "contracts": { "BridgeHelperLibrary": { "address": "0xdEE49F247c8B567273437F41CC326A2fA1e9cC3D", @@ -13235,7 +13246,7 @@ ] }, "MessagePassingBridge": { - "address": "0xa3247276DbCC76Dd7705273f766eB3E8a5ecF4a5", + "address": "0xD77Ace8A2b38811Ec1f04e098390b583b9354Db7", "abi": [ { "anonymous": false, @@ -13311,7 +13322,7 @@ ] }, "MessagePassingBridge_Implementation": { - "address": "0x6f252280eB53df085eAD27BBe55d615741A8268D", + "address": "0xe4CFA18A3d0a7d77fAA42961ee943c9221d61937", "abi": [ { "inputs": [ @@ -15308,13 +15319,15 @@ ] } } - }, + } + ], + "122": [ { - "name": "fuse_testnet", + "name": "fuse", "chainId": "122", "contracts": { "BridgeHelperLibrary": { - "address": "0x52735D63bfAe96ddb1aD81C7356d938E8E5e2C19", + "address": "0xdEE49F247c8B567273437F41CC326A2fA1e9cC3D", "abi": [ { "inputs": [ @@ -15472,7 +15485,7 @@ ] }, "MessagePassingBridge": { - "address": "0x1d722ecd6186BAd155BA9198a93c079B6705dcD9", + "address": "0xa3247276DbCC76Dd7705273f766eB3E8a5ecF4a5", "abi": [ { "anonymous": false, @@ -15548,7 +15561,7 @@ ] }, "MessagePassingBridge_Implementation": { - "address": "0x9A1f9A4DA988c65111Ef56D002CC46EBb003A03b", + "address": "0xFB62aA509a7B260b6697B671C969a184d6c39E90", "abi": [ { "inputs": [ @@ -15567,11 +15580,6 @@ "name": "lzEndpoint", "type": "address" }, - { - "internalType": "bool", - "name": "isTestnet", - "type": "bool" - }, { "internalType": "uint32", "name": "homeChainId", @@ -16089,19 +16097,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "TESTNET", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -16126,6 +16121,29 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "lzChainId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "remote", + "type": "address" + } + ], + "name": "addLzChainSupport", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -16626,7 +16644,7 @@ "type": "uint256" } ], - "stateMutability": "view", + "stateMutability": "pure", "type": "function" }, { @@ -16645,7 +16663,7 @@ "type": "uint256" } ], - "stateMutability": "pure", + "stateMutability": "view", "type": "function" }, { @@ -16863,6 +16881,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "lzChainToIdsMapping", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "lzEndpoint", @@ -17420,7 +17457,7 @@ "type": "uint16" } ], - "stateMutability": "pure", + "stateMutability": "view", "type": "function" }, { @@ -17462,6 +17499,13 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "upgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -17514,12 +17558,10 @@ ] } } - } - ], - "42220": [ + }, { - "name": "celo", - "chainId": "42220", + "name": "fuse_testnet", + "chainId": "122", "contracts": { "BridgeHelperLibrary": { "address": "0xdEE49F247c8B567273437F41CC326A2fA1e9cC3D", @@ -17680,7 +17722,7 @@ ] }, "MessagePassingBridge": { - "address": "0xa3247276DbCC76Dd7705273f766eB3E8a5ecF4a5", + "address": "0xD77Ace8A2b38811Ec1f04e098390b583b9354Db7", "abi": [ { "anonymous": false, @@ -17756,7 +17798,7 @@ ] }, "MessagePassingBridge_Implementation": { - "address": "0x7bDaF2Fb332761b2a6A565a43ccB0ACfC36d2C3D", + "address": "0xFB62aA509a7B260b6697B671C969a184d6c39E90", "abi": [ { "inputs": [ @@ -19753,9 +19795,11 @@ ] } } - }, + } + ], + "42220": [ { - "name": "celo_testnet", + "name": "celo", "chainId": "42220", "contracts": { "BridgeHelperLibrary": { @@ -19917,7 +19961,7 @@ ] }, "MessagePassingBridge": { - "address": "0xD77Ace8A2b38811Ec1f04e098390b583b9354Db7", + "address": "0xa3247276DbCC76Dd7705273f766eB3E8a5ecF4a5", "abi": [ { "anonymous": false, @@ -19993,7 +20037,7 @@ ] }, "MessagePassingBridge_Implementation": { - "address": "0xF7c7bba5b1Cd748d087706a3245616f199663d67", + "address": "0xF3eAB7018d74E7Df95A5d8dC70987C0539bDF48f", "abi": [ { "inputs": [ @@ -21931,6 +21975,13 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "upgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -21983,6 +22034,2483 @@ ] } } + }, + { + "name": "celo_testnet", + "chainId": "42220", + "contracts": { + "BridgeHelperLibrary": { + "address": "0xdEE49F247c8B567273437F41CC326A2fA1e9cC3D", + "abi": [ + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "dailyLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "txLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accountDailyLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minAmount", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "onlyWhitelisted", + "type": "bool" + } + ], + "internalType": "struct IMessagePassingBridge.BridgeLimits", + "name": "bridgeLimits", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "lastTransferReset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "bridged24Hours", + "type": "uint256" + } + ], + "internalType": "struct IMessagePassingBridge.AccountLimit", + "name": "accountDailyLimit", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "lastTransferReset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "bridged24Hours", + "type": "uint256" + } + ], + "internalType": "struct IMessagePassingBridge.BridgeDailyLimit", + "name": "bridgeDailyLimit", + "type": "tuple" + }, + { + "internalType": "contract INameService", + "name": "nameService", + "type": "INameService" + }, + { + "internalType": "bool", + "name": "isClosed", + "type": "bool" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "canBridge", + "outputs": [ + { + "internalType": "bool", + "name": "isWithinLimit", + "type": "bool" + }, + { + "internalType": "string", + "name": "error", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "decimals", + "type": "uint8" + } + ], + "name": "normalizeFrom18ToTokenDecimals", + "outputs": [ + { + "internalType": "uint256", + "name": "normalized", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "decimals", + "type": "uint8" + } + ], + "name": "normalizeFromTokenTo18Decimals", + "outputs": [ + { + "internalType": "uint256", + "name": "normalized", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + } + ] + }, + "MessagePassingBridge": { + "address": "0xD77Ace8A2b38811Ec1f04e098390b583b9354Db7", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ] + }, + "MessagePassingBridge_Implementation": { + "address": "0xF3eAB7018d74E7Df95A5d8dC70987C0539bDF48f", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "axlGateway", + "type": "address" + }, + { + "internalType": "address", + "name": "axlGasReceiver", + "type": "address" + }, + { + "internalType": "address", + "name": "lzEndpoint", + "type": "address" + }, + { + "internalType": "uint32", + "name": "homeChainId", + "type": "uint32" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + } + ], + "name": "ALREADY_EXECUTED", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "name": "BRIDGE_LIMITS", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "lzEndpoint", + "type": "address" + } + ], + "name": "INVALID_ENDPOINT", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + } + ], + "name": "INVALID_SENDER", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + } + ], + "name": "INVALID_TARGET_OR_CHAINID", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAddress", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAddressString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "required", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sent", + "type": "uint256" + } + ], + "name": "LZ_FEE", + "type": "error" + }, + { + "inputs": [], + "name": "MISSING_FEE", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "NOT_GUARDIAN", + "type": "error" + }, + { + "inputs": [], + "name": "NotApprovedByGateway", + "type": "error" + }, + { + "inputs": [], + "name": "TRANSFER", + "type": "error" + }, + { + "inputs": [], + "name": "TRANSFER_FROM", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + } + ], + "name": "UNSUPPORTED_CHAIN", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "WRONG_TOKEN", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "targetChainId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "normalizedAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "enum IMessagePassingBridge.BridgeService", + "name": "bridge", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "BridgeRequest", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "normalizedAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "fee", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sourceChainId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "enum IMessagePassingBridge.BridgeService", + "name": "bridge", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "ExecutedTransfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "sourceChainId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "sourceAddress", + "type": "address" + } + ], + "name": "FalseSender", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_reason", + "type": "bytes" + } + ], + "name": "MessageFailed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_payloadHash", + "type": "bytes32" + } + ], + "name": "RetryMessageSuccess", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_minDstGas", + "type": "uint256" + } + ], + "name": "SetMinDstGas", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "precrime", + "type": "address" + } + ], + "name": "SetPrecrime", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_path", + "type": "bytes" + } + ], + "name": "SetTrustedRemote", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_remoteAddress", + "type": "bytes" + } + ], + "name": "SetTrustedRemoteAddress", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_PAYLOAD_SIZE_LIMIT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "HOME_CHAIN_ID", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "accountsDailyLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "lastTransferReset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "bridged24Hours", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "lzChainId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "remote", + "type": "address" + } + ], + "name": "addLzChainSupport", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "approveRequest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "approvedRequests", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "avatar", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "bridgeDailyLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "lastTransferReset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "bridged24Hours", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "bridgeFees", + "outputs": [ + { + "internalType": "uint256", + "name": "minFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "fee", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "bridgeLimits", + "outputs": [ + { + "internalType": "uint256", + "name": "dailyLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "txLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accountDailyLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minAmount", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "onlyWhitelisted", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "targetChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "enum IMessagePassingBridge.BridgeService", + "name": "bridge", + "type": "uint8" + } + ], + "name": "bridgeTo", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "targetChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "gasRefundAddress", + "type": "address" + } + ], + "name": "bridgeToWithAxelar", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "targetChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "adapterParams", + "type": "bytes" + } + ], + "name": "bridgeToWithLz", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "canBridge", + "outputs": [ + { + "internalType": "bool", + "name": "isWithinLimit", + "type": "bool" + }, + { + "internalType": "string", + "name": "error", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "currentId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "dao", + "outputs": [ + { + "internalType": "contract Controller", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "disabledSourceBridges", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "address", + "name": "_fromAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_toAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_normalizedAmount", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_useZro", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "_adapterParams", + "type": "bytes" + } + ], + "name": "estimateSendFee", + "outputs": [ + { + "internalType": "uint256", + "name": "nativeFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zroFee", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "commandId", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "sourceChain", + "type": "string" + }, + { + "internalType": "string", + "name": "sourceAddress", + "type": "string" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "commandId", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "sourceChain", + "type": "string" + }, + { + "internalType": "string", + "name": "sourceAddress", + "type": "string" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "string", + "name": "tokenSymbol", + "type": "string" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "executeWithToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "executedRequests", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "name": "failedMessages", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "faucet", + "outputs": [ + { + "internalType": "contract IFaucet", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeRecipient", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + } + ], + "name": "forceResumeReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "axlChainId", + "type": "string" + } + ], + "name": "fromAxelarChainId", + "outputs": [ + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "lzChainId", + "type": "uint16" + } + ], + "name": "fromLzChainId", + "outputs": [ + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gasService", + "outputs": [ + { + "internalType": "contract IAxelarGasService", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gateway", + "outputs": [ + { + "internalType": "contract IAxelarGateway", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_chainId", + "type": "uint16" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_configType", + "type": "uint256" + } + ], + "name": "getConfig", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + } + ], + "name": "getTrustedRemoteAddress", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "guardian", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract INameService", + "name": "nameService", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "dailyLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "txLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accountDailyLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minAmount", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "onlyWhitelisted", + "type": "bool" + } + ], + "internalType": "struct IMessagePassingBridge.BridgeLimits", + "name": "limits", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "minFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "fee", + "type": "uint256" + } + ], + "internalType": "struct IMessagePassingBridge.BridgeFees", + "name": "fees", + "type": "tuple" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isClosed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + } + ], + "name": "isTrustedRemote", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "lzChainIdsMapping", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "lzChainToIdsMapping", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lzEndpoint", + "outputs": [ + { + "internalType": "contract ILayerZeroEndpointUpgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lzEndpoint_", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "lzReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "minDstGasLookup", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "nameService", + "outputs": [ + { + "internalType": "contract INameService", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "nativeToken", + "outputs": [ + { + "internalType": "contract IGoodDollar", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "nonblockingLzReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "isPaused", + "type": "bool" + } + ], + "name": "pauseBridge", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "payloadSizeLimitLookup", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "precrime", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "preventRequest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "retryMessage", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "minFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "fee", + "type": "uint256" + } + ], + "internalType": "struct IMessagePassingBridge.BridgeFees", + "name": "fees", + "type": "tuple" + } + ], + "name": "setBridgeFees", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "dailyLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "txLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accountDailyLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minAmount", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "onlyWhitelisted", + "type": "bool" + } + ], + "internalType": "struct IMessagePassingBridge.BridgeLimits", + "name": "limits", + "type": "tuple" + } + ], + "name": "setBridgeLimits", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_chainId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_configType", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_config", + "type": "bytes" + } + ], + "name": "setConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32[]", + "name": "bridgeKeys", + "type": "bytes32[]" + }, + { + "internalType": "bool[]", + "name": "disabled", + "type": "bool[]" + } + ], + "name": "setDisabledBridges", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_faucet", + "type": "address" + } + ], + "name": "setFaucet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + } + ], + "name": "setFeeRecipient", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_guardian", + "type": "address" + } + ], + "name": "setGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_packetType", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_minGas", + "type": "uint256" + } + ], + "name": "setMinDstGas", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_size", + "type": "uint256" + } + ], + "name": "setPayloadSizeLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_precrime", + "type": "address" + } + ], + "name": "setPrecrime", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + } + ], + "name": "setReceiveVersion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + } + ], + "name": "setSendVersion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_path", + "type": "bytes" + } + ], + "name": "setTrustedRemote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_remoteAddress", + "type": "bytes" + } + ], + "name": "setTrustedRemoteAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + } + ], + "name": "toAxelarChainId", + "outputs": [ + { + "internalType": "string", + "name": "axlChainId", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + } + ], + "name": "toLzChainId", + "outputs": [ + { + "internalType": "uint16", + "name": "lzChainId", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "trustedRemoteLookup", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "updateAvatar", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "upgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ] + } + } + }, + { + "name": "development-celo", + "chainId": "42220", + "contracts": { + "BridgeHelperLibrary": { + "address": "0x5D4C25c3B621027A8011474Eb005e45Dd014a2c1", + "abi": [ + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "dailyLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "txLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accountDailyLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minAmount", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "onlyWhitelisted", + "type": "bool" + } + ], + "internalType": "struct IMessagePassingBridge.BridgeLimits", + "name": "bridgeLimits", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "lastTransferReset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "bridged24Hours", + "type": "uint256" + } + ], + "internalType": "struct IMessagePassingBridge.AccountLimit", + "name": "accountDailyLimit", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "lastTransferReset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "bridged24Hours", + "type": "uint256" + } + ], + "internalType": "struct IMessagePassingBridge.BridgeDailyLimit", + "name": "bridgeDailyLimit", + "type": "tuple" + }, + { + "internalType": "contract INameService", + "name": "nameService", + "type": "INameService" + }, + { + "internalType": "bool", + "name": "isClosed", + "type": "bool" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "canBridge", + "outputs": [ + { + "internalType": "bool", + "name": "isWithinLimit", + "type": "bool" + }, + { + "internalType": "string", + "name": "error", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "decimals", + "type": "uint8" + } + ], + "name": "normalizeFrom18ToTokenDecimals", + "outputs": [ + { + "internalType": "uint256", + "name": "normalized", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "decimals", + "type": "uint8" + } + ], + "name": "normalizeFromTokenTo18Decimals", + "outputs": [ + { + "internalType": "uint256", + "name": "normalized", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + } + ] + }, + "MessagePassingBridge": { + "address": "0xD3dd0944835bD31DFF1DDe616ecd198D543Dd83d", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ] + } + } } ], "44787": [ @@ -23917,4 +26445,4 @@ } } ] -} +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 948ba01..50c121e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -769,6 +769,17 @@ __metadata: languageName: node linkType: hard +"@chainlink/env-enc@npm:^1.0.5": + version: 1.0.5 + resolution: "@chainlink/env-enc@npm:1.0.5" + dependencies: + yargs: "npm:^17.7.1" + bin: + env-enc: dist/cli.js + checksum: 10/004d7749ba6a6ec3f26ab69e12709dd66c7f10bfcb478aed2142421590a736eaf29141ae2c011fc99f15166bb491c4bb6e80251585105d3ebec1416608d8fad2 + languageName: node + linkType: hard + "@colors/colors@npm:1.5.0": version: 1.5.0 resolution: "@colors/colors@npm:1.5.0" @@ -1542,6 +1553,7 @@ __metadata: dependencies: "@axelar-network/axelar-gmp-sdk-solidity": "npm:^3.6.1" "@axelar-network/axelarjs-sdk": "npm:^0.13.6" + "@chainlink/env-enc": "npm:^1.0.5" "@gooddollar/goodprotocol": "npm:2.0.34-beta.4" "@layerzerolabs/scan-client": "npm:^0.0.6" "@layerzerolabs/solidity-examples": "npm:^0.0.13" @@ -1566,7 +1578,7 @@ __metadata: ethers: "npm:^5.*" hardhat: "npm:2.*" hardhat-contract-sizer: "npm:^2.6.1" - hardhat-deploy: "npm:0.11.44" + hardhat-deploy: "npm:0.11.43" hardhat-gas-reporter: "npm:^1.0.9" merkle-patricia-tree: "npm:^2.*" prettier: "npm:^2.5.1" @@ -10691,9 +10703,9 @@ __metadata: languageName: node linkType: hard -"hardhat-deploy@npm:0.11.44": - version: 0.11.44 - resolution: "hardhat-deploy@npm:0.11.44" +"hardhat-deploy@npm:0.11.43": + version: 0.11.43 + resolution: "hardhat-deploy@npm:0.11.43" dependencies: "@ethersproject/abi": "npm:^5.7.0" "@ethersproject/abstract-signer": "npm:^5.7.0" @@ -10719,7 +10731,7 @@ __metadata: murmur-128: "npm:^0.2.1" qs: "npm:^6.9.4" zksync-web3: "npm:^0.14.3" - checksum: 10/091574ace9b905c1909d094847cc8522cc995fd3823b863bdc45f50d28a31be840bed6e2477395f2f1b69b7b048d0a9ab9b274cd5f6e37193d1823a60e602eb9 + checksum: 10/aa993d4c786407782d1f6bc231a5b8e4b9248172cf18959ccb1ac9133e6807767c564c117d89234646d10e0832e47442584aaf77f62994400bb8cb614f4442b4 languageName: node linkType: hard @@ -21078,6 +21090,21 @@ __metadata: languageName: node linkType: hard +"yargs@npm:^17.7.1": + version: 17.7.2 + resolution: "yargs@npm:17.7.2" + dependencies: + cliui: "npm:^8.0.1" + escalade: "npm:^3.1.1" + get-caller-file: "npm:^2.0.5" + require-directory: "npm:^2.1.1" + string-width: "npm:^4.2.3" + y18n: "npm:^5.0.5" + yargs-parser: "npm:^21.1.1" + checksum: 10/abb3e37678d6e38ea85485ed86ebe0d1e3464c640d7d9069805ea0da12f69d5a32df8e5625e370f9c96dd1c2dc088ab2d0a4dd32af18222ef3c4224a19471576 + languageName: node + linkType: hard + "yargs@npm:^4.7.1": version: 4.8.1 resolution: "yargs@npm:4.8.1"