Feature Tip: Add private address tag to any address under My Name Tag !
More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
0xc563f0accb46ab3e263ae6c65c0625c3f8fd2a81d485dbf5fd7b33eee3a2734b | Bridge | (pending) | 45 mins ago | IN | 0.01603 ETH | (Pending) | |||
0xb45a8e773e22e94aa0e5ab7d2c6ec18196ad87c1b3947dae2590bed3a0336226 | Bridge | (pending) | 1 hr ago | IN | 0.0055 ETH | (Pending) | |||
0xe85113a84fc439e28eac32b1542095bbb199a74fd3b3de267fdac8cea57fa8e0 | Bridge | (pending) | 1 hr ago | IN | 0.007 ETH | (Pending) | |||
0x484058a1295f64e61beb8c87ac6c3eb099da5c790f9ab405b372d2c956747ee9 | Bridge | (pending) | 1 hr ago | IN | 0.01 ETH | (Pending) | |||
0x0ca7d4e842b1ab97124b4199d4e65b7a7210285391be0e06a275e3b3ecb90791 | Bridge | (pending) | 1 hr ago | IN | 0.006 ETH | (Pending) | |||
Bridge | 20005556 | 20 days ago | IN | 0.04 ETH | 0.00256496 | ||||
Bridge | 19849309 | 42 days ago | IN | 0.0055 ETH | 0.0006246 | ||||
Bridge | 19821706 | 46 days ago | IN | 0.0052 ETH | 0.00064587 | ||||
Bridge | 18553774 | 223 days ago | IN | 0.01 ETH | 0.00316675 | ||||
Bridge | 18398187 | 245 days ago | IN | 0.006 ETH | 0.0012492 | ||||
Bridge | 18295264 | 260 days ago | IN | 0.012 ETH | 0.00104219 | ||||
Bridge | 18289693 | 260 days ago | IN | 0.023 ETH | 0.00099901 | ||||
Bridge | 18287889 | 261 days ago | IN | 0.01 ETH | 0.00131149 | ||||
Bridge | 18247140 | 266 days ago | IN | 0.02 ETH | 0.00087587 | ||||
Bridge | 18172270 | 277 days ago | IN | 0 ETH | 0.00322564 | ||||
Bridge | 18172264 | 277 days ago | IN | 0.03 ETH | 0.00347506 | ||||
Bridge | 18172237 | 277 days ago | IN | 0 ETH | 0.00343996 | ||||
Bridge | 18172218 | 277 days ago | IN | 0.025 ETH | 0.00413722 | ||||
Bridge | 18172174 | 277 days ago | IN | 0 ETH | 0.00350675 | ||||
Bridge | 18172173 | 277 days ago | IN | 0 ETH | 0.00277515 | ||||
Bridge | 18172140 | 277 days ago | IN | 0 ETH | 0.00221532 | ||||
Bridge | 18172131 | 277 days ago | IN | 0 ETH | 0.00229517 | ||||
Bridge | 18172131 | 277 days ago | IN | 0.015 ETH | 0.0026039 | ||||
Bridge | 18172092 | 277 days ago | IN | 0.097 ETH | 0.00248 | ||||
Bridge | 18172049 | 277 days ago | IN | 1.186 ETH | 0.00236356 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | Value | ||
---|---|---|---|---|---|---|
20005556 | 20 days ago | 0.04 ETH | ||||
19849309 | 42 days ago | 0.0055 ETH | ||||
19821706 | 46 days ago | 0.0052 ETH | ||||
18553774 | 223 days ago | 0.01 ETH | ||||
18398187 | 245 days ago | 0.006 ETH | ||||
18295264 | 260 days ago | 0.012 ETH | ||||
18289693 | 260 days ago | 0.023 ETH | ||||
18287889 | 261 days ago | 0.01 ETH | ||||
18247140 | 266 days ago | 0.02 ETH | ||||
18172264 | 277 days ago | 0.03 ETH | ||||
18172218 | 277 days ago | 0.025 ETH | ||||
18172131 | 277 days ago | 0.015 ETH | ||||
18172092 | 277 days ago | 0.097 ETH | ||||
18172049 | 277 days ago | 1.186 ETH | ||||
18172005 | 277 days ago | 0.026 ETH | ||||
18171974 | 277 days ago | 0.0065 ETH | ||||
18171899 | 277 days ago | 0.03 ETH | ||||
18171853 | 277 days ago | 0.01 ETH | ||||
18171740 | 277 days ago | 0.33 ETH | ||||
18171714 | 277 days ago | 0.01 ETH | ||||
18171709 | 277 days ago | 0.1 ETH | ||||
18171709 | 277 days ago | 0.008 ETH | ||||
18171633 | 277 days ago | 0.007 ETH | ||||
18171628 | 277 days ago | 0.007 ETH | ||||
18171594 | 277 days ago | 0.02 ETH |
Loading...
Loading
Contract Name:
MetaBridge
Compiler Version
v0.8.1+commit.df193b15
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import {IAdapter, IBridge, ISpender} from "contracts/interfaces/Exports.sol"; import {Constants} from "contracts/utils/Exports.sol"; import "./Spender.sol"; contract MetaBridge is IBridge, Ownable, Pausable, ReentrancyGuard { using SafeERC20 for IERC20; using Address for address; ISpender public immutable spender; // Mapping of adapterId to adapter mapping(string => address) public adapters; mapping(string => bool) public adapterRemoved; constructor() { spender = new Spender(); } /** * @notice Sets the adapter for an aggregator. It can't be changed later. * @param adapterId Aggregator's identifier * @param adapterAddress Address of the contract that contains the logic for this aggregator */ function setAdapter(string calldata adapterId, address adapterAddress) external override onlyOwner { require(adapterAddress.isContract(), "ADAPTER_IS_NOT_A_CONTRACT"); require(!adapterRemoved[adapterId], "ADAPTER_REMOVED"); require(adapters[adapterId] == address(0), "ADAPTER_EXISTS"); require(bytes(adapterId).length > 0, "INVALID_ADAPTED_ID"); adapters[adapterId] = adapterAddress; emit AdapterSet(adapterId, adapterAddress); } /** * @notice Removes the adapter for an existing aggregator. This can't be undone. * @param adapterId Adapter's identifier */ function removeAdapter(string calldata adapterId) external override onlyOwner { require(adapters[adapterId] != address(0), "ADAPTER_DOES_NOT_EXIST"); delete adapters[adapterId]; adapterRemoved[adapterId] = true; emit AdapterRemoved(adapterId); } /** * @notice Performs a bridge * @param adapterId Identifier of the aggregator to be used for the bridge * @param srcToken Identifier of the source chain * @param amount Amount of tokens to be transferred from the destination chain * @param data Dynamic data which is passed in to the delegatecall made to the adapter */ function bridge( string calldata adapterId, address srcToken, uint256 amount, bytes calldata data ) external payable override whenNotPaused nonReentrant { address adapter = adapters[adapterId]; require(adapter != address(0), "ADAPTER_NOT_FOUND"); // Move ERC20 funds to the spender if (srcToken != Constants.NATIVE_TOKEN) { require(msg.value == 0, "NATIVE_ASSET_SENT"); IERC20(srcToken).safeTransferFrom( msg.sender, address(spender), amount ); } else { require(msg.value == amount, "MSGVALUE_AMOUNT_MISMATCH"); } spender.bridge{value: msg.value}( adapter, abi.encodePacked( // bridge signature IAdapter.bridge.selector, abi.encode(msg.sender), data ) ); } /** * @notice Prevents the bridge function from being executed until the contract is unpaused. */ function pauseBridge() external onlyOwner { _pause(); } /** * @notice Unpauses the contract to make the bridge function callable by owner. */ function unpauseBridge() external onlyOwner { _unpause(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
pragma solidity ^0.8.0; import { IAdapter } from "./IAdapter.sol"; import { IBridge } from "./IBridge.sol"; import { ISpender } from "./ISpender.sol";
pragma solidity ^0.8.0; import { Constants } from "./Constants.sol";
pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/Address.sol"; import {IBridge, ISpender} from "contracts/interfaces/Exports.sol"; contract Spender is ISpender { using Address for address; IBridge public immutable metabridge; constructor() public { metabridge = IBridge(msg.sender); } /** * @notice Performs a bridge * @param adapter Address of the aggregator to be used for the bridge * @param data Dynamic data which is passed in to the delegatecall made to the adapter */ function bridge(address adapter, bytes calldata data) external payable override { require(msg.sender == address(metabridge), "FORBIDDEN"); adapter.functionDelegateCall(data, "ADAPTER_DELEGATECALL_FAILED"); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
pragma solidity ^0.8.0; interface IAdapter { event Bridge( address recipient, address aggregator, uint256 destChain, address srcToken, address destToken, uint256 srcAmount ); event Fee(address srcToken, address feeWallet, uint256 fee); function bridge( address recipient, address aggregator, address spender, uint256 destChain, address srcToken, address destToken, uint256 srcAmount, bytes calldata data, uint256 fee, address payable feeWallet ) external payable; }
pragma solidity ^0.8.0; interface IBridge { event AdapterSet( string adapterId, address addr ); event AdapterRemoved(string adapterId); function setAdapter(string calldata adapterId, address adapterAddress) external; function removeAdapter(string calldata adapterId) external; function bridge( string calldata adapterId, address tokenFrom, uint256 amount, bytes calldata data ) external payable; }
pragma solidity ^0.8.0; interface ISpender { function bridge(address adapterAddress, bytes calldata data) external payable; }
pragma solidity ^0.8.0; library Constants { address internal constant NATIVE_TOKEN = 0x0000000000000000000000000000000000000000; }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"adapterId","type":"string"}],"name":"AdapterRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"adapterId","type":"string"},{"indexed":false,"internalType":"address","name":"addr","type":"address"}],"name":"AdapterSet","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":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"adapterRemoved","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"adapters","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"adapterId","type":"string"},{"internalType":"address","name":"srcToken","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"bridge","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pauseBridge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"adapterId","type":"string"}],"name":"removeAdapter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"adapterId","type":"string"},{"internalType":"address","name":"adapterAddress","type":"address"}],"name":"setAdapter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"spender","outputs":[{"internalType":"contract ISpender","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpauseBridge","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a06040523480156200001157600080fd5b506200003262000026620000bb60201b60201c565b620000c360201b60201c565b60008060146101000a81548160ff02191690831515021790555060018081905550604051620000619062000187565b604051809103906000f0801580156200007e573d6000803e3d6000fd5b5073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505062000195565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b61072f806200247a83390190565b60805160601c6122b8620001c260003960008181610727015281816107b80152610cd801526122b86000f3fe6080604052600436106100a75760003560e01c80638da5cb5b116100645780638da5cb5b14610173578063a82f143c1461019e578063b5268389146101b5578063b84f5d1e146101f2578063e8edc8161461022f578063f2fde38b1461025a576100a7565b806339122461146100ac5780633ce33bff146100d55780633ef11fd7146100f15780635c975abb1461011a578063715018a6146101455780637dd0480f1461015c575b600080fd5b3480156100b857600080fd5b506100d360048036038101906100ce91906114da565b610283565b005b6100ef60048036038101906100ea9190611532565b61055f565b005b3480156100fd57600080fd5b5061011860048036038101906101139190611495565b61089f565b005b34801561012657600080fd5b5061012f610a84565b60405161013c9190611a94565b60405180910390f35b34801561015157600080fd5b5061015a610a9a565b005b34801561016857600080fd5b50610171610b22565b005b34801561017f57600080fd5b50610188610ba8565b6040516101959190611a12565b60405180910390f35b3480156101aa57600080fd5b506101b3610bd1565b005b3480156101c157600080fd5b506101dc60048036038101906101d791906115cd565b610c57565b6040516101e99190611a94565b60405180910390f35b3480156101fe57600080fd5b50610219600480360381019061021491906115cd565b610c8d565b6040516102269190611a12565b60405180910390f35b34801561023b57600080fd5b50610244610cd6565b6040516102519190611aaf565b60405180910390f35b34801561026657600080fd5b50610281600480360381019061027c9190611443565b610cfa565b005b61028b610df2565b73ffffffffffffffffffffffffffffffffffffffff166102a9610ba8565b73ffffffffffffffffffffffffffffffffffffffff16146102ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f690611ca2565b60405180910390fd5b61031e8173ffffffffffffffffffffffffffffffffffffffff16610dfa565b61035d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161035490611b42565b60405180910390fd5b6003838360405161036f9291906119f9565b908152602001604051809103902060009054906101000a900460ff16156103cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103c290611ce2565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600284846040516103f59291906119f9565b908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461047a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047190611c82565b60405180910390fd5b600083839050116104c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104b790611c62565b60405180910390fd5b80600284846040516104d39291906119f9565b908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507ff9648cbc19f288e0f271f7e95311238912bf1ea8225e636a13bb1d259126002183838360405161055293929190611aee565b60405180910390a1505050565b610567610a84565b156105a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059e90611c42565b60405180910390fd5b600260015414156105ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105e490611d22565b60405180910390fd5b60026001819055506000600287876040516106099291906119f9565b908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156106aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106a190611be2565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16146107735760003414610721576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161071890611c02565b60405180910390fd5b61076e337f0000000000000000000000000000000000000000000000000000000000000000868873ffffffffffffffffffffffffffffffffffffffff16610e1d909392919063ffffffff16565b6107b6565b8334146107b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ac90611b82565b60405180910390fd5b5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16634cfee326348363ab13824060e01b3360405160200161080d9190611a12565b604051602081830303815290604052888860405160200161083194939291906119ab565b6040516020818303038152906040526040518463ffffffff1660e01b815260040161085d929190611a64565b6000604051808303818588803b15801561087657600080fd5b505af115801561088a573d6000803e3d6000fd5b50505050505060018081905550505050505050565b6108a7610df2565b73ffffffffffffffffffffffffffffffffffffffff166108c5610ba8565b73ffffffffffffffffffffffffffffffffffffffff161461091b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091290611ca2565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600283836040516109459291906119f9565b908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156109cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109c290611ba2565b60405180910390fd5b600282826040516109dd9291906119f9565b908152602001604051809103902060006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600160038383604051610a229291906119f9565b908152602001604051809103902060006101000a81548160ff0219169083151502179055507fb00061f7cc154fc23eb34671ab724fc7eb7b806abae871abae8f1eafce9721358282604051610a78929190611aca565b60405180910390a15050565b60008060149054906101000a900460ff16905090565b610aa2610df2565b73ffffffffffffffffffffffffffffffffffffffff16610ac0610ba8565b73ffffffffffffffffffffffffffffffffffffffff1614610b16576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0d90611ca2565b60405180910390fd5b610b206000610ea6565b565b610b2a610df2565b73ffffffffffffffffffffffffffffffffffffffff16610b48610ba8565b73ffffffffffffffffffffffffffffffffffffffff1614610b9e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b9590611ca2565b60405180910390fd5b610ba6610f6a565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610bd9610df2565b73ffffffffffffffffffffffffffffffffffffffff16610bf7610ba8565b73ffffffffffffffffffffffffffffffffffffffff1614610c4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c4490611ca2565b60405180910390fd5b610c5561100d565b565b6003818051602081018201805184825260208301602085012081835280955050505050506000915054906101000a900460ff1681565b6002818051602081018201805184825260208301602085012081835280955050505050506000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b610d02610df2565b73ffffffffffffffffffffffffffffffffffffffff16610d20610ba8565b73ffffffffffffffffffffffffffffffffffffffff1614610d76576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d6d90611ca2565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610de6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ddd90611bc2565b60405180910390fd5b610def81610ea6565b50565b600033905090565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b610ea0846323b872dd60e01b858585604051602401610e3e93929190611a2d565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506110ae565b50505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b610f72610a84565b15610fb2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fa990611c42565b60405180910390fd5b6001600060146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610ff6610df2565b6040516110039190611a12565b60405180910390a1565b611015610a84565b611054576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161104b90611b62565b60405180910390fd5b60008060146101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa611097610df2565b6040516110a49190611a12565b60405180910390a1565b6000611110826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166111759092919063ffffffff16565b90506000815111156111705780806020019051810190611130919061146c565b61116f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161116690611d02565b60405180910390fd5b5b505050565b6060611184848460008561118d565b90509392505050565b6060824710156111d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111c990611c22565b60405180910390fd5b6111db85610dfa565b61121a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161121190611cc2565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161124391906119e2565b60006040518083038185875af1925050503d8060008114611280576040519150601f19603f3d011682016040523d82523d6000602084013e611285565b606091505b50915091506112958282866112a1565b92505050949350505050565b606083156112b157829050611301565b6000835111156112c45782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112f89190611b20565b60405180910390fd5b9392505050565b600061131b61131684611d67565b611d42565b90508281526020810184848401111561133357600080fd5b61133e848285611e7e565b509392505050565b6000813590506113558161223d565b92915050565b60008151905061136a81612254565b92915050565b60008083601f84011261138257600080fd5b8235905067ffffffffffffffff81111561139b57600080fd5b6020830191508360018202830111156113b357600080fd5b9250929050565b60008083601f8401126113cc57600080fd5b8235905067ffffffffffffffff8111156113e557600080fd5b6020830191508360018202830111156113fd57600080fd5b9250929050565b600082601f83011261141557600080fd5b8135611425848260208601611308565b91505092915050565b60008135905061143d8161226b565b92915050565b60006020828403121561145557600080fd5b600061146384828501611346565b91505092915050565b60006020828403121561147e57600080fd5b600061148c8482850161135b565b91505092915050565b600080602083850312156114a857600080fd5b600083013567ffffffffffffffff8111156114c257600080fd5b6114ce858286016113ba565b92509250509250929050565b6000806000604084860312156114ef57600080fd5b600084013567ffffffffffffffff81111561150957600080fd5b611515868287016113ba565b9350935050602061152886828701611346565b9150509250925092565b6000806000806000806080878903121561154b57600080fd5b600087013567ffffffffffffffff81111561156557600080fd5b61157189828a016113ba565b9650965050602061158489828a01611346565b945050604061159589828a0161142e565b935050606087013567ffffffffffffffff8111156115b257600080fd5b6115be89828a01611370565b92509250509295509295509295565b6000602082840312156115df57600080fd5b600082013567ffffffffffffffff8111156115f957600080fd5b61160584828501611404565b91505092915050565b61161781611de6565b82525050565b61162681611df8565b82525050565b61163d61163882611e04565b611ef1565b82525050565b600061164f8385611dbf565b935061165c838584611e7e565b82840190509392505050565b600061167382611d98565b61167d8185611dae565b935061168d818560208601611e8d565b61169681611f2a565b840191505092915050565b60006116ac82611d98565b6116b68185611dbf565b93506116c6818560208601611e8d565b80840191505092915050565b6116db81611e5a565b82525050565b60006116ed8385611dca565b93506116fa838584611e7e565b61170383611f2a565b840190509392505050565b600061171a8385611ddb565b9350611727838584611e7e565b82840190509392505050565b600061173e82611da3565b6117488185611dca565b9350611758818560208601611e8d565b61176181611f2a565b840191505092915050565b6000611779601983611dca565b915061178482611f3b565b602082019050919050565b600061179c601483611dca565b91506117a782611f64565b602082019050919050565b60006117bf601883611dca565b91506117ca82611f8d565b602082019050919050565b60006117e2601683611dca565b91506117ed82611fb6565b602082019050919050565b6000611805602683611dca565b915061181082611fdf565b604082019050919050565b6000611828601183611dca565b91506118338261202e565b602082019050919050565b600061184b601183611dca565b915061185682612057565b602082019050919050565b600061186e602683611dca565b915061187982612080565b604082019050919050565b6000611891601083611dca565b915061189c826120cf565b602082019050919050565b60006118b4601283611dca565b91506118bf826120f8565b602082019050919050565b60006118d7600e83611dca565b91506118e282612121565b602082019050919050565b60006118fa602083611dca565b91506119058261214a565b602082019050919050565b600061191d601d83611dca565b915061192882612173565b602082019050919050565b6000611940600f83611dca565b915061194b8261219c565b602082019050919050565b6000611963602a83611dca565b915061196e826121c5565b604082019050919050565b6000611986601f83611dca565b915061199182612214565b602082019050919050565b6119a581611e50565b82525050565b60006119b7828761162c565b6004820191506119c782866116a1565b91506119d4828486611643565b915081905095945050505050565b60006119ee82846116a1565b915081905092915050565b6000611a0682848661170e565b91508190509392505050565b6000602082019050611a27600083018461160e565b92915050565b6000606082019050611a42600083018661160e565b611a4f602083018561160e565b611a5c604083018461199c565b949350505050565b6000604082019050611a79600083018561160e565b8181036020830152611a8b8184611668565b90509392505050565b6000602082019050611aa9600083018461161d565b92915050565b6000602082019050611ac460008301846116d2565b92915050565b60006020820190508181036000830152611ae58184866116e1565b90509392505050565b60006040820190508181036000830152611b098185876116e1565b9050611b18602083018461160e565b949350505050565b60006020820190508181036000830152611b3a8184611733565b905092915050565b60006020820190508181036000830152611b5b8161176c565b9050919050565b60006020820190508181036000830152611b7b8161178f565b9050919050565b60006020820190508181036000830152611b9b816117b2565b9050919050565b60006020820190508181036000830152611bbb816117d5565b9050919050565b60006020820190508181036000830152611bdb816117f8565b9050919050565b60006020820190508181036000830152611bfb8161181b565b9050919050565b60006020820190508181036000830152611c1b8161183e565b9050919050565b60006020820190508181036000830152611c3b81611861565b9050919050565b60006020820190508181036000830152611c5b81611884565b9050919050565b60006020820190508181036000830152611c7b816118a7565b9050919050565b60006020820190508181036000830152611c9b816118ca565b9050919050565b60006020820190508181036000830152611cbb816118ed565b9050919050565b60006020820190508181036000830152611cdb81611910565b9050919050565b60006020820190508181036000830152611cfb81611933565b9050919050565b60006020820190508181036000830152611d1b81611956565b9050919050565b60006020820190508181036000830152611d3b81611979565b9050919050565b6000611d4c611d5d565b9050611d588282611ec0565b919050565b6000604051905090565b600067ffffffffffffffff821115611d8257611d81611efb565b5b611d8b82611f2a565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b6000611df182611e30565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000611e6582611e6c565b9050919050565b6000611e7782611e30565b9050919050565b82818337600083830152505050565b60005b83811015611eab578082015181840152602081019050611e90565b83811115611eba576000848401525b50505050565b611ec982611f2a565b810181811067ffffffffffffffff82111715611ee857611ee7611efb565b5b80604052505050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f414441505445525f49535f4e4f545f415f434f4e545241435400000000000000600082015250565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f4d534756414c55455f414d4f554e545f4d49534d415443480000000000000000600082015250565b7f414441505445525f444f45535f4e4f545f455849535400000000000000000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f414441505445525f4e4f545f464f554e44000000000000000000000000000000600082015250565b7f4e41544956455f41535345545f53454e54000000000000000000000000000000600082015250565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b7f494e56414c49445f414441505445445f49440000000000000000000000000000600082015250565b7f414441505445525f455849535453000000000000000000000000000000000000600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f414441505445525f52454d4f5645440000000000000000000000000000000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b61224681611de6565b811461225157600080fd5b50565b61225d81611df8565b811461226857600080fd5b50565b61227481611e50565b811461227f57600080fd5b5056fea2646970667358221220e27bee8f4400b2d9a34a333d6ede18743e8db6f5a22b5046653cfd1a2cd622c264736f6c6343000801003360a060405234801561001057600080fd5b503373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505060805160601c6106c361006c60003960008181607701526101af01526106c36000f3fe6080604052600436106100295760003560e01c80634cfee3261461002e5780634ed6ef191461004a575b600080fd5b61004860048036038101906100439190610387565b610075565b005b34801561005657600080fd5b5061005f6101ad565b60405161006c91906104b5565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610103576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100fa906104f2565b60405180910390fd5b6101a782828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506040518060400160405280601b81526020017f414441505445525f44454c454741544543414c4c5f4641494c454400000000008152508573ffffffffffffffffffffffffffffffffffffffff166101d19092919063ffffffff16565b50505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60606101dc8461029e565b61021b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161021290610512565b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1685604051610243919061049e565b600060405180830381855af49150503d806000811461027e576040519150601f19603f3d011682016040523d82523d6000602084013e610283565b606091505b50915091506102938282866102c1565b925050509392505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b606083156102d157829050610321565b6000835111156102e45782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161031891906104d0565b60405180910390fd5b9392505050565b60008135905061033781610676565b92915050565b60008083601f84011261034f57600080fd5b8235905067ffffffffffffffff81111561036857600080fd5b60208301915083600182028301111561038057600080fd5b9250929050565b60008060006040848603121561039c57600080fd5b60006103aa86828701610328565b935050602084013567ffffffffffffffff8111156103c757600080fd5b6103d38682870161033d565b92509250509250925092565b60006103ea82610532565b6103f48185610548565b93506104048185602086016105ba565b80840191505092915050565b61041981610596565b82525050565b600061042a8261053d565b6104348185610553565b93506104448185602086016105ba565b61044d816105ed565b840191505092915050565b6000610465600983610553565b9150610470826105fe565b602082019050919050565b6000610488602683610553565b915061049382610627565b604082019050919050565b60006104aa82846103df565b915081905092915050565b60006020820190506104ca6000830184610410565b92915050565b600060208201905081810360008301526104ea818461041f565b905092915050565b6000602082019050818103600083015261050b81610458565b9050919050565b6000602082019050818103600083015261052b8161047b565b9050919050565b600081519050919050565b600081519050919050565b600081905092915050565b600082825260208201905092915050565b600061056f82610576565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006105a1826105a8565b9050919050565b60006105b382610576565b9050919050565b60005b838110156105d85780820151818401526020810190506105bd565b838111156105e7576000848401525b50505050565b6000601f19601f8301169050919050565b7f464f5242494444454e0000000000000000000000000000000000000000000000600082015250565b7f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60008201527f6e74726163740000000000000000000000000000000000000000000000000000602082015250565b61067f81610564565b811461068a57600080fd5b5056fea264697066735822122091877ab36cf4ff48228405a194001b5f536ef076f164b4bfa3506beecb77446464736f6c63430008010033
Deployed Bytecode
0x6080604052600436106100a75760003560e01c80638da5cb5b116100645780638da5cb5b14610173578063a82f143c1461019e578063b5268389146101b5578063b84f5d1e146101f2578063e8edc8161461022f578063f2fde38b1461025a576100a7565b806339122461146100ac5780633ce33bff146100d55780633ef11fd7146100f15780635c975abb1461011a578063715018a6146101455780637dd0480f1461015c575b600080fd5b3480156100b857600080fd5b506100d360048036038101906100ce91906114da565b610283565b005b6100ef60048036038101906100ea9190611532565b61055f565b005b3480156100fd57600080fd5b5061011860048036038101906101139190611495565b61089f565b005b34801561012657600080fd5b5061012f610a84565b60405161013c9190611a94565b60405180910390f35b34801561015157600080fd5b5061015a610a9a565b005b34801561016857600080fd5b50610171610b22565b005b34801561017f57600080fd5b50610188610ba8565b6040516101959190611a12565b60405180910390f35b3480156101aa57600080fd5b506101b3610bd1565b005b3480156101c157600080fd5b506101dc60048036038101906101d791906115cd565b610c57565b6040516101e99190611a94565b60405180910390f35b3480156101fe57600080fd5b50610219600480360381019061021491906115cd565b610c8d565b6040516102269190611a12565b60405180910390f35b34801561023b57600080fd5b50610244610cd6565b6040516102519190611aaf565b60405180910390f35b34801561026657600080fd5b50610281600480360381019061027c9190611443565b610cfa565b005b61028b610df2565b73ffffffffffffffffffffffffffffffffffffffff166102a9610ba8565b73ffffffffffffffffffffffffffffffffffffffff16146102ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f690611ca2565b60405180910390fd5b61031e8173ffffffffffffffffffffffffffffffffffffffff16610dfa565b61035d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161035490611b42565b60405180910390fd5b6003838360405161036f9291906119f9565b908152602001604051809103902060009054906101000a900460ff16156103cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103c290611ce2565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600284846040516103f59291906119f9565b908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461047a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047190611c82565b60405180910390fd5b600083839050116104c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104b790611c62565b60405180910390fd5b80600284846040516104d39291906119f9565b908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507ff9648cbc19f288e0f271f7e95311238912bf1ea8225e636a13bb1d259126002183838360405161055293929190611aee565b60405180910390a1505050565b610567610a84565b156105a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059e90611c42565b60405180910390fd5b600260015414156105ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105e490611d22565b60405180910390fd5b60026001819055506000600287876040516106099291906119f9565b908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156106aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106a190611be2565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16146107735760003414610721576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161071890611c02565b60405180910390fd5b61076e337f000000000000000000000000e6e3f947ccd0add1effde3bf3d210e5d711beace868873ffffffffffffffffffffffffffffffffffffffff16610e1d909392919063ffffffff16565b6107b6565b8334146107b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ac90611b82565b60405180910390fd5b5b7f000000000000000000000000e6e3f947ccd0add1effde3bf3d210e5d711beace73ffffffffffffffffffffffffffffffffffffffff16634cfee326348363ab13824060e01b3360405160200161080d9190611a12565b604051602081830303815290604052888860405160200161083194939291906119ab565b6040516020818303038152906040526040518463ffffffff1660e01b815260040161085d929190611a64565b6000604051808303818588803b15801561087657600080fd5b505af115801561088a573d6000803e3d6000fd5b50505050505060018081905550505050505050565b6108a7610df2565b73ffffffffffffffffffffffffffffffffffffffff166108c5610ba8565b73ffffffffffffffffffffffffffffffffffffffff161461091b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091290611ca2565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600283836040516109459291906119f9565b908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156109cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109c290611ba2565b60405180910390fd5b600282826040516109dd9291906119f9565b908152602001604051809103902060006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600160038383604051610a229291906119f9565b908152602001604051809103902060006101000a81548160ff0219169083151502179055507fb00061f7cc154fc23eb34671ab724fc7eb7b806abae871abae8f1eafce9721358282604051610a78929190611aca565b60405180910390a15050565b60008060149054906101000a900460ff16905090565b610aa2610df2565b73ffffffffffffffffffffffffffffffffffffffff16610ac0610ba8565b73ffffffffffffffffffffffffffffffffffffffff1614610b16576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0d90611ca2565b60405180910390fd5b610b206000610ea6565b565b610b2a610df2565b73ffffffffffffffffffffffffffffffffffffffff16610b48610ba8565b73ffffffffffffffffffffffffffffffffffffffff1614610b9e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b9590611ca2565b60405180910390fd5b610ba6610f6a565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610bd9610df2565b73ffffffffffffffffffffffffffffffffffffffff16610bf7610ba8565b73ffffffffffffffffffffffffffffffffffffffff1614610c4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c4490611ca2565b60405180910390fd5b610c5561100d565b565b6003818051602081018201805184825260208301602085012081835280955050505050506000915054906101000a900460ff1681565b6002818051602081018201805184825260208301602085012081835280955050505050506000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000e6e3f947ccd0add1effde3bf3d210e5d711beace81565b610d02610df2565b73ffffffffffffffffffffffffffffffffffffffff16610d20610ba8565b73ffffffffffffffffffffffffffffffffffffffff1614610d76576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d6d90611ca2565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610de6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ddd90611bc2565b60405180910390fd5b610def81610ea6565b50565b600033905090565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b610ea0846323b872dd60e01b858585604051602401610e3e93929190611a2d565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506110ae565b50505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b610f72610a84565b15610fb2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fa990611c42565b60405180910390fd5b6001600060146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610ff6610df2565b6040516110039190611a12565b60405180910390a1565b611015610a84565b611054576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161104b90611b62565b60405180910390fd5b60008060146101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa611097610df2565b6040516110a49190611a12565b60405180910390a1565b6000611110826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166111759092919063ffffffff16565b90506000815111156111705780806020019051810190611130919061146c565b61116f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161116690611d02565b60405180910390fd5b5b505050565b6060611184848460008561118d565b90509392505050565b6060824710156111d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111c990611c22565b60405180910390fd5b6111db85610dfa565b61121a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161121190611cc2565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161124391906119e2565b60006040518083038185875af1925050503d8060008114611280576040519150601f19603f3d011682016040523d82523d6000602084013e611285565b606091505b50915091506112958282866112a1565b92505050949350505050565b606083156112b157829050611301565b6000835111156112c45782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112f89190611b20565b60405180910390fd5b9392505050565b600061131b61131684611d67565b611d42565b90508281526020810184848401111561133357600080fd5b61133e848285611e7e565b509392505050565b6000813590506113558161223d565b92915050565b60008151905061136a81612254565b92915050565b60008083601f84011261138257600080fd5b8235905067ffffffffffffffff81111561139b57600080fd5b6020830191508360018202830111156113b357600080fd5b9250929050565b60008083601f8401126113cc57600080fd5b8235905067ffffffffffffffff8111156113e557600080fd5b6020830191508360018202830111156113fd57600080fd5b9250929050565b600082601f83011261141557600080fd5b8135611425848260208601611308565b91505092915050565b60008135905061143d8161226b565b92915050565b60006020828403121561145557600080fd5b600061146384828501611346565b91505092915050565b60006020828403121561147e57600080fd5b600061148c8482850161135b565b91505092915050565b600080602083850312156114a857600080fd5b600083013567ffffffffffffffff8111156114c257600080fd5b6114ce858286016113ba565b92509250509250929050565b6000806000604084860312156114ef57600080fd5b600084013567ffffffffffffffff81111561150957600080fd5b611515868287016113ba565b9350935050602061152886828701611346565b9150509250925092565b6000806000806000806080878903121561154b57600080fd5b600087013567ffffffffffffffff81111561156557600080fd5b61157189828a016113ba565b9650965050602061158489828a01611346565b945050604061159589828a0161142e565b935050606087013567ffffffffffffffff8111156115b257600080fd5b6115be89828a01611370565b92509250509295509295509295565b6000602082840312156115df57600080fd5b600082013567ffffffffffffffff8111156115f957600080fd5b61160584828501611404565b91505092915050565b61161781611de6565b82525050565b61162681611df8565b82525050565b61163d61163882611e04565b611ef1565b82525050565b600061164f8385611dbf565b935061165c838584611e7e565b82840190509392505050565b600061167382611d98565b61167d8185611dae565b935061168d818560208601611e8d565b61169681611f2a565b840191505092915050565b60006116ac82611d98565b6116b68185611dbf565b93506116c6818560208601611e8d565b80840191505092915050565b6116db81611e5a565b82525050565b60006116ed8385611dca565b93506116fa838584611e7e565b61170383611f2a565b840190509392505050565b600061171a8385611ddb565b9350611727838584611e7e565b82840190509392505050565b600061173e82611da3565b6117488185611dca565b9350611758818560208601611e8d565b61176181611f2a565b840191505092915050565b6000611779601983611dca565b915061178482611f3b565b602082019050919050565b600061179c601483611dca565b91506117a782611f64565b602082019050919050565b60006117bf601883611dca565b91506117ca82611f8d565b602082019050919050565b60006117e2601683611dca565b91506117ed82611fb6565b602082019050919050565b6000611805602683611dca565b915061181082611fdf565b604082019050919050565b6000611828601183611dca565b91506118338261202e565b602082019050919050565b600061184b601183611dca565b915061185682612057565b602082019050919050565b600061186e602683611dca565b915061187982612080565b604082019050919050565b6000611891601083611dca565b915061189c826120cf565b602082019050919050565b60006118b4601283611dca565b91506118bf826120f8565b602082019050919050565b60006118d7600e83611dca565b91506118e282612121565b602082019050919050565b60006118fa602083611dca565b91506119058261214a565b602082019050919050565b600061191d601d83611dca565b915061192882612173565b602082019050919050565b6000611940600f83611dca565b915061194b8261219c565b602082019050919050565b6000611963602a83611dca565b915061196e826121c5565b604082019050919050565b6000611986601f83611dca565b915061199182612214565b602082019050919050565b6119a581611e50565b82525050565b60006119b7828761162c565b6004820191506119c782866116a1565b91506119d4828486611643565b915081905095945050505050565b60006119ee82846116a1565b915081905092915050565b6000611a0682848661170e565b91508190509392505050565b6000602082019050611a27600083018461160e565b92915050565b6000606082019050611a42600083018661160e565b611a4f602083018561160e565b611a5c604083018461199c565b949350505050565b6000604082019050611a79600083018561160e565b8181036020830152611a8b8184611668565b90509392505050565b6000602082019050611aa9600083018461161d565b92915050565b6000602082019050611ac460008301846116d2565b92915050565b60006020820190508181036000830152611ae58184866116e1565b90509392505050565b60006040820190508181036000830152611b098185876116e1565b9050611b18602083018461160e565b949350505050565b60006020820190508181036000830152611b3a8184611733565b905092915050565b60006020820190508181036000830152611b5b8161176c565b9050919050565b60006020820190508181036000830152611b7b8161178f565b9050919050565b60006020820190508181036000830152611b9b816117b2565b9050919050565b60006020820190508181036000830152611bbb816117d5565b9050919050565b60006020820190508181036000830152611bdb816117f8565b9050919050565b60006020820190508181036000830152611bfb8161181b565b9050919050565b60006020820190508181036000830152611c1b8161183e565b9050919050565b60006020820190508181036000830152611c3b81611861565b9050919050565b60006020820190508181036000830152611c5b81611884565b9050919050565b60006020820190508181036000830152611c7b816118a7565b9050919050565b60006020820190508181036000830152611c9b816118ca565b9050919050565b60006020820190508181036000830152611cbb816118ed565b9050919050565b60006020820190508181036000830152611cdb81611910565b9050919050565b60006020820190508181036000830152611cfb81611933565b9050919050565b60006020820190508181036000830152611d1b81611956565b9050919050565b60006020820190508181036000830152611d3b81611979565b9050919050565b6000611d4c611d5d565b9050611d588282611ec0565b919050565b6000604051905090565b600067ffffffffffffffff821115611d8257611d81611efb565b5b611d8b82611f2a565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b6000611df182611e30565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000611e6582611e6c565b9050919050565b6000611e7782611e30565b9050919050565b82818337600083830152505050565b60005b83811015611eab578082015181840152602081019050611e90565b83811115611eba576000848401525b50505050565b611ec982611f2a565b810181811067ffffffffffffffff82111715611ee857611ee7611efb565b5b80604052505050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f414441505445525f49535f4e4f545f415f434f4e545241435400000000000000600082015250565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f4d534756414c55455f414d4f554e545f4d49534d415443480000000000000000600082015250565b7f414441505445525f444f45535f4e4f545f455849535400000000000000000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f414441505445525f4e4f545f464f554e44000000000000000000000000000000600082015250565b7f4e41544956455f41535345545f53454e54000000000000000000000000000000600082015250565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b7f494e56414c49445f414441505445445f49440000000000000000000000000000600082015250565b7f414441505445525f455849535453000000000000000000000000000000000000600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f414441505445525f52454d4f5645440000000000000000000000000000000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b61224681611de6565b811461225157600080fd5b50565b61225d81611df8565b811461226857600080fd5b50565b61227481611e50565b811461227f57600080fd5b5056fea2646970667358221220e27bee8f4400b2d9a34a333d6ede18743e8db6f5a22b5046653cfd1a2cd622c264736f6c63430008010033
Loading...
Loading
Loading...
Loading
OVERVIEW
This is the contract that is used in the MetaMask Bridges product for bridge routing.Multichain Portfolio | 26 Chains
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.