Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Multichain Info
No addresses found
Latest 23 internal transactions
Advanced mode:
Parent Transaction Hash | Method | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|---|
Bridge | 21164725 | 147 days ago | 0.00111599 ETH | ||||
Bridge | 21164725 | 147 days ago | 0.00111599 ETH | ||||
Bridge | 21163960 | 147 days ago | 0.00111599 ETH | ||||
Bridge | 21163960 | 147 days ago | 0.00111599 ETH | ||||
Bridge | 21152705 | 148 days ago | 0.0004768 ETH | ||||
Bridge | 21152705 | 148 days ago | 0.0004768 ETH | ||||
Bridge | 21152561 | 148 days ago | 0.0004768 ETH | ||||
Bridge | 21152561 | 148 days ago | 0.0004768 ETH | ||||
Bridge | 21152500 | 149 days ago | 0.0004768 ETH | ||||
Bridge | 21152500 | 149 days ago | 0.0004768 ETH | ||||
Bridge | 21152450 | 149 days ago | 0.0004768 ETH | ||||
Bridge | 21152450 | 149 days ago | 0.0004768 ETH | ||||
Bridge | 21152296 | 149 days ago | 0.0004768 ETH | ||||
Bridge | 21152277 | 149 days ago | 0.0004768 ETH | ||||
Bridge | 21152277 | 149 days ago | 0.0004768 ETH | ||||
Bridge | 21152240 | 149 days ago | 0.0004768 ETH | ||||
Bridge | 21152240 | 149 days ago | 0.0004768 ETH | ||||
Bridge | 21152225 | 149 days ago | 0.0004768 ETH | ||||
Bridge | 21152225 | 149 days ago | 0.0004768 ETH | ||||
Bridge | 21142454 | 150 days ago | 0.02 ETH | ||||
Bridge | 21142454 | 150 days ago | 0.02 ETH | ||||
Bridge | 21121448 | 153 days ago | 0.00038902 ETH | ||||
Bridge | 21121448 | 153 days ago | 0.00038902 ETH |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x80C557e8...ebBCF79fA The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
ETHBridgeRouter
Compiler Version
v0.8.23+commit.f704f362
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.23; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Pausable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "./interfaces/IBridge.sol"; import "./interfaces/IBridgeRouter.sol"; contract ETHBridgeRouter is IBridgeRouter, AccessControl, ReentrancyGuard, Pausable { using SafeERC20 for IERC20; uint256 public gasLimit; uint256 public payloadBufferSize = 161; bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); mapping(address token => BridgeData bridge) private _bridgeAddresses; constructor(address admin) { _grantRole(DEFAULT_ADMIN_ROLE, admin); _grantRole(OPERATOR_ROLE, admin); } function setBridge( address _token, BridgeData calldata _bridge ) external onlyRole(OPERATOR_ROLE) { _bridgeAddresses[_token] = _bridge; emit SetBridge(_token, _bridge.bridge, _bridge.connector); } function setBridgeBatch( address[] calldata _tokens, BridgeData[] calldata _bridges ) external onlyRole(OPERATOR_ROLE) { if (_tokens.length != _bridges.length) { revert LengthsMismatch(); } for (uint256 i = 0; i < _tokens.length; i++) { _bridgeAddresses[_tokens[i]] = _bridges[i]; emit SetBridge(_tokens[i], _bridges[i].bridge, _bridges[i].connector); } } function setGasLimit(uint256 _gasLimit) external onlyRole(OPERATOR_ROLE) { gasLimit = _gasLimit; emit SetGasLimit(_gasLimit); } function setPayloadBufferSize(uint256 _payloadBufferSize) external onlyRole(OPERATOR_ROLE) { payloadBufferSize = _payloadBufferSize; emit SetPayloadBufferSize(_payloadBufferSize); } function bridgeNative( uint256 amount, address receiver ) external payable nonReentrant whenNotPaused { if (msg.value <= 0) { revert InvalidDepositAmount(amount, msg.value); } address bridgeAddress = _bridgeAddresses[address(0)].bridge; address connectorAddress = _bridgeAddresses[address(0)].connector; if (bridgeAddress == address(0) || connectorAddress == address(0)) { revert BridgeNotFound(address(0)); } IBridge bridgeContract = IBridge(bridgeAddress); uint256 totalFees = bridgeContract.getMinFees(connectorAddress, gasLimit, payloadBufferSize); if (msg.value < amount + totalFees) { revert InsufficientFunds(amount + totalFees, msg.value); } bridgeContract.bridge{ value: msg.value }( receiver, amount, gasLimit, connectorAddress, bytes(""), bytes("") ); emit Bridge(msg.sender, address(0), amount, receiver); } function bridge( address token, uint256 amount, address receiver ) external payable nonReentrant whenNotPaused { address bridgeAddress = _bridgeAddresses[token].bridge; address connectorAddress = _bridgeAddresses[token].connector; if (bridgeAddress == address(0) || connectorAddress == address(0)) { revert BridgeNotFound(token); } IERC20(token).safeTransferFrom(msg.sender, address(this), amount); IERC20(token).forceApprove(bridgeAddress, amount); IBridge bridgeContract = IBridge(bridgeAddress); uint256 totalFees = bridgeContract.getMinFees(connectorAddress, gasLimit, payloadBufferSize); if (msg.value < totalFees) { revert InsufficientFunds(totalFees, msg.value); } bridgeContract.bridge{ value: msg.value }( receiver, amount, gasLimit, connectorAddress, bytes(""), bytes("") ); emit Bridge(msg.sender, token, amount, receiver); } function withdraw( address to, uint256 amount ) external nonReentrant onlyRole(DEFAULT_ADMIN_ROLE) { if (amount > address(this).balance) { revert InsufficientFunds(amount, address(this).balance); } (bool success,) = to.call{ value: amount }(""); if (!success) { revert TransferFailed(); } emit Withdraw(to, amount); } function getFees(address token) external view returns (uint256) { address bridgeAddress = _bridgeAddresses[token].bridge; address connectorAddress = _bridgeAddresses[token].connector; if (bridgeAddress == address(0) || connectorAddress == address(0)) { revert BridgeNotFound(token); } IBridge bridgeContract = IBridge(bridgeAddress); return bridgeContract.getMinFees(connectorAddress, gasLimit, payloadBufferSize); } function getBridge(address token) external view returns (BridgeData memory) { return _bridgeAddresses[token]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol) pragma solidity ^0.8.20; import {IAccessControl} from "./IAccessControl.sol"; import {Context} from "../utils/Context.sol"; import {ERC165} from "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ```solidity * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ```solidity * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules} * to enforce additional security measures for this role. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address account => bool) hasRole; bytes32 adminRole; } mapping(bytes32 role => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with an {AccessControlUnauthorizedAccount} error including the required role. */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual returns (bool) { return _roles[role].hasRole[account]; } /** * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()` * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier. */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account` * is missing `role`. */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert AccessControlUnauthorizedAccount(account, role); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `callerConfirmation`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address callerConfirmation) public virtual { if (callerConfirmation != _msgSender()) { revert AccessControlBadConfirmation(); } _revokeRole(role, callerConfirmation); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual returns (bool) { if (!hasRole(role, account)) { _roles[role].hasRole[account] = true; emit RoleGranted(role, account, _msgSender()); return true; } else { return false; } } /** * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual returns (bool) { if (hasRole(role, account)) { _roles[role].hasRole[account] = false; emit RoleRevoked(role, account, _msgSender()); return true; } else { return false; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/IAccessControl.sol) pragma solidity ^0.8.20; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev The `account` is missing a role. */ error AccessControlUnauthorizedAccount(address account, bytes32 neededRole); /** * @dev The caller of a function is not the expected one. * * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}. */ error AccessControlBadConfirmation(); /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `callerConfirmation`. */ function renounceRole(bytes32 role, address callerConfirmation) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. * * ==== Security Considerations * * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be * considered as an intention to spend the allowance in any specific way. The second is that because permits have * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be * generally recommended is: * * ```solidity * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} * doThing(..., value); * } * * function doThing(..., uint256 value) public { * token.safeTransferFrom(msg.sender, address(this), value); * ... * } * ``` * * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also * {SafeERC20-safeTransferFrom}). * * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so * contracts should have entry points that don't rely on permit. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. * * CAUTION: See Security Considerations above. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` 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 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; import {IERC20Permit} from "../extensions/IERC20Permit.sol"; import {Address} from "../../../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; /** * @dev An operation with an ERC20 token failed. */ error SafeERC20FailedOperation(address token); /** * @dev Indicates a failed `decreaseAllowance` request. */ error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease); /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value))); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value))); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); forceApprove(token, spender, oldAllowance + value); } /** * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no * value, non-reverting calls are assumed to be successful. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal { unchecked { uint256 currentAllowance = token.allowance(address(this), spender); if (currentAllowance < requestedDecrease) { revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease); } forceApprove(token, spender, currentAllowance - requestedDecrease); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value)); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0))); _callOptionalReturn(token, approvalCall); } } /** * @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); if (returndata.length != 0 && !abi.decode(returndata, (bool))) { revert SafeERC20FailedOperation(address(token)); } } /** * @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). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // 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 cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol) pragma solidity ^0.8.20; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev The ETH balance of the account is not enough to perform the operation. */ error AddressInsufficientBalance(address account); /** * @dev There's no code at `target` (it is not a contract). */ error AddressEmptyCode(address target); /** * @dev A call to an address target failed. The target may have reverted. */ error FailedInnerCall(); /** * @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://consensys.net/diligence/blog/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.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { if (address(this).balance < amount) { revert AddressInsufficientBalance(address(this)); } (bool success, ) = recipient.call{value: amount}(""); if (!success) { revert FailedInnerCall(); } } /** * @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 or custom error, it is bubbled * up by this function (like regular Solidity function calls). However, if * the call reverted with no returned reason, this function reverts with a * {FailedInnerCall} error. * * 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. */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0); } /** * @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`. */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { if (address(this).balance < value) { revert AddressInsufficientBalance(address(this)); } (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an * unsuccessful call. */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata ) internal view returns (bytes memory) { if (!success) { _revert(returndata); } else { // only check if target is a contract if the call was successful and the return data is empty // otherwise we already know that it was a contract if (returndata.length == 0 && target.code.length == 0) { revert AddressEmptyCode(target); } return returndata; } } /** * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the * revert reason or with a default {FailedInnerCall} error. */ function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) { if (!success) { _revert(returndata); } else { return returndata; } } /** * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}. */ function _revert(bytes memory returndata) private pure { // 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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert FailedInnerCall(); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @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; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol) pragma solidity ^0.8.20; import {Context} from "../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 { bool private _paused; /** * @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); /** * @dev The operation failed because the contract is paused. */ error EnforcedPause(); /** * @dev The operation failed because the contract is not paused. */ error ExpectedPause(); /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { if (paused()) { revert EnforcedPause(); } } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { if (!paused()) { revert ExpectedPause(); } } /** * @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 (last updated v5.0.0) (utils/ReentrancyGuard.sol) pragma solidity ^0.8.20; /** * @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; /** * @dev Unauthorized reentrant call. */ error ReentrancyGuardReentrantCall(); 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() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be NOT_ENTERED if (_status == ENTERED) { revert ReentrancyGuardReentrantCall(); } // Any calls to nonReentrant after this point will fail _status = ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.23; interface IBridge { function bridge( address receiver_, uint256 amount_, uint256 msgGasLimit_, address connector_, bytes calldata extraData_, bytes calldata options_ ) external payable; function bridgeNative( address receiver_, uint256 amount_, uint256 msgGasLimit_, address connector_, bytes calldata extraData_, bytes calldata options_ ) external payable; function getMinFees( address connector_, uint256 msgGasLimit_, uint256 payloadSize_ ) external view returns (uint256 totalFees); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.23; interface IBridgeRouter { struct BridgeData { address bridge; address connector; } event SetBridge(address indexed token, address indexed bridge, address connector); event SetGasLimit(uint256 gasLimit); event Bridge(address indexed user, address indexed token, uint256 amount, address receiver); event Deposit(address indexed user, uint256 amount); event Withdraw(address indexed user, uint256 amount); event SetPayloadBufferSize(uint256 payloadBufferSize); error LengthsMismatch(); error BridgeNotFound(address token); error InvalidDepositAmount(uint256 amount, uint256 msgValue); error TransferFailed(); error InsufficientFunds(uint256 amount, uint256 balance); }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"BridgeNotFound","type":"error"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"balance","type":"uint256"}],"name":"InsufficientFunds","type":"error"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"msgValue","type":"uint256"}],"name":"InvalidDepositAmount","type":"error"},{"inputs":[],"name":"LengthsMismatch","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[],"name":"TransferFailed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"}],"name":"Bridge","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"bridge","type":"address"},{"indexed":false,"internalType":"address","name":"connector","type":"address"}],"name":"SetBridge","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"gasLimit","type":"uint256"}],"name":"SetGasLimit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"payloadBufferSize","type":"uint256"}],"name":"SetPayloadBufferSize","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"bridge","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"bridgeNative","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"gasLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"getBridge","outputs":[{"components":[{"internalType":"address","name":"bridge","type":"address"},{"internalType":"address","name":"connector","type":"address"}],"internalType":"struct IBridgeRouter.BridgeData","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"getFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"payloadBufferSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"components":[{"internalType":"address","name":"bridge","type":"address"},{"internalType":"address","name":"connector","type":"address"}],"internalType":"struct IBridgeRouter.BridgeData","name":"_bridge","type":"tuple"}],"name":"setBridge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_tokens","type":"address[]"},{"components":[{"internalType":"address","name":"bridge","type":"address"},{"internalType":"address","name":"connector","type":"address"}],"internalType":"struct IBridgeRouter.BridgeData[]","name":"_bridges","type":"tuple[]"}],"name":"setBridgeBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_gasLimit","type":"uint256"}],"name":"setGasLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_payloadBufferSize","type":"uint256"}],"name":"setPayloadBufferSize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Deployed Bytecode
0x60806040526004361061011f5760003560e01c8063a217fddf116100a0578063ee7d72b411610064578063ee7d72b414610302578063f3fef3a314610322578063f44c7c8f14610342578063f5b541a6146103cd578063f68016b7146103ef57600080fd5b8063a217fddf14610284578063a6892ee914610299578063d547741f146102b9578063dc729e2c146102d9578063dff2efe0146102ef57600080fd5b80635c975abb116100e75780635c975abb146101f95780636aea40ed146102115780636b2ee4731461022457806391d14854146102445780639af608c91461026457600080fd5b806301ffc9a714610124578063248a9ca3146101595780632f2ff15d1461019757806336568abe146101b95780633f26560d146101d9575b600080fd5b34801561013057600080fd5b5061014461013f366004611304565b610405565b60405190151581526020015b60405180910390f35b34801561016557600080fd5b5061018961017436600461132e565b60009081526020819052604090206001015490565b604051908152602001610150565b3480156101a357600080fd5b506101b76101b236600461135c565b61043c565b005b3480156101c557600080fd5b506101b76101d436600461135c565b610467565b3480156101e557600080fd5b506101b76101f436600461132e565b61049f565b34801561020557600080fd5b5060025460ff16610144565b6101b761021f36600461138c565b6104f4565b34801561023057600080fd5b506101b761023f3660046113ce565b61071d565b34801561025057600080fd5b5061014461025f36600461135c565b6107c8565b34801561027057600080fd5b5061018961027f36600461140f565b6107f1565b34801561029057600080fd5b50610189600081565b3480156102a557600080fd5b506101b76102b436600461142c565b6108e2565b3480156102c557600080fd5b506101b76102d436600461135c565b610a65565b3480156102e557600080fd5b5061018960045481565b6101b76102fd36600461135c565b610a8a565b34801561030e57600080fd5b506101b761031d36600461132e565b610cf2565b34801561032e57600080fd5b506101b761033d3660046114f4565b610d3f565b34801561034e57600080fd5b506103a661035d36600461140f565b604080518082018252600080825260209182018190526001600160a01b039384168152600582528290208251808401909352805484168352600101549092169181019190915290565b6040805182516001600160a01b039081168252602093840151169281019290925201610150565b3480156103d957600080fd5b506101896000805160206116a983398151915281565b3480156103fb57600080fd5b5061018960035481565b60006001600160e01b03198216637965db0b60e01b148061043657506301ffc9a760e01b6001600160e01b03198316145b92915050565b60008281526020819052604090206001015461045781610e3d565b6104618383610e4a565b50505050565b6001600160a01b03811633146104905760405163334bd91960e11b815260040160405180910390fd5b61049a8282610edc565b505050565b6000805160206116a98339815191526104b781610e3d565b60048290556040518281527fbe536540f1073553099afa2770803cc1ed6c4eea7ec7a443f15c0ab48d4467c4906020015b60405180910390a15050565b6104fc610f47565b610504610f71565b6001600160a01b0380841660009081526005602052604090208054600190910154908216911681158061053e57506001600160a01b038116155b1561056c5760405163c2c6a2fb60e01b81526001600160a01b03861660048201526024015b60405180910390fd5b6105816001600160a01b038616333087610f97565b6105956001600160a01b0386168386610ffe565b60035460048054604051631f874f7360e31b81526001600160a01b038581169382019390935260248101939093526044830152839160009183169063fc3a7b9890606401602060405180830381865afa1580156105f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061061a9190611520565b9050803410156106455760405162fae2d560e21b815260048101829052346024820152604401610563565b60035460408051602080820183526000808352835191820184528152915163202f390560e11b81526001600160a01b0386169363405e720a933493610697938c938e9390928c92909190600401611589565b6000604051808303818588803b1580156106b057600080fd5b505af11580156106c4573d6000803e3d6000fd5b5050604080518a81526001600160a01b038a811660208301528c1694503393507f67f945f5724f801e875311edefdc5682e7ab8a70aa56bd34535695f2fda9a95b92500160405180910390a35050505061049a60018055565b6000805160206116a983398151915261073581610e3d565b6001600160a01b038316600090815260056020526040902082906107598282611602565b506107699050602083018361140f565b6001600160a01b039081169084167fb92b0abc2e3a5f1cd53686ee01bc8e03e817e2f939242d498fdb6ffd0bb76e106107a8604086016020870161140f565b6040516001600160a01b03909116815260200160405180910390a3505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6001600160a01b03808216600090815260056020526040812080546001909101549192908116911681158061082d57506001600160a01b038116155b156108565760405163c2c6a2fb60e01b81526001600160a01b0385166004820152602401610563565b60035460048054604051631f874f7360e31b81526001600160a01b03858116938201939093526024810193909352604483015283919082169063fc3a7b9890606401602060405180830381865afa1580156108b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d99190611520565b95945050505050565b6000805160206116a98339815191526108fa81610e3d565b83821461091a5760405163586cb9e160e01b815260040160405180910390fd5b60005b84811015610a5d5783838281811061093757610937611633565b9050604002016005600088888581811061095357610953611633565b9050602002016020810190610968919061140f565b6001600160a01b03168152602081019190915260400160002061098b8282611602565b9050508383828181106109a0576109a0611633565b6109b6926020604090920201908101915061140f565b6001600160a01b03168686838181106109d1576109d1611633565b90506020020160208101906109e6919061140f565b6001600160a01b03167fb92b0abc2e3a5f1cd53686ee01bc8e03e817e2f939242d498fdb6ffd0bb76e10868685818110610a2257610a22611633565b9050604002016020016020810190610a3a919061140f565b6040516001600160a01b03909116815260200160405180910390a360010161091d565b505050505050565b600082815260208190526040902060010154610a8081610e3d565b6104618383610edc565b610a92610f47565b610a9a610f71565b60003411610ac457604051635136402d60e01b815260048101839052346024820152604401610563565b6000805260056020527f05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746bc547f05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746bd546001600160a01b039182169116811580610b3257506001600160a01b038116155b15610b535760405163c2c6a2fb60e01b815260006004820152602401610563565b60035460048054604051631f874f7360e31b81526001600160a01b038581169382019390935260248101939093526044830152839160009183169063fc3a7b9890606401602060405180830381865afa158015610bb4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bd89190611520565b9050610be48187611649565b341015610c1757610bf58187611649565b60405162fae2d560e21b81526004810191909152346024820152604401610563565b60035460408051602080820183526000808352835191820184528152915163202f390560e11b81526001600160a01b0386169363405e720a933493610c69938c938e9390928c92909190600401611589565b6000604051808303818588803b158015610c8257600080fd5b505af1158015610c96573d6000803e3d6000fd5b5050604080518a81526001600160a01b038a166020820152600094503393507f67f945f5724f801e875311edefdc5682e7ab8a70aa56bd34535695f2fda9a95b92500160405180910390a350505050610cee60018055565b5050565b6000805160206116a9833981519152610d0a81610e3d565b60038290556040518281527ff5bdeca176beddded5a1132996e4edf0d16be5100214b17d8bada54bf8676297906020016104e8565b610d47610f47565b6000610d5281610e3d565b47821115610d7b5760405162fae2d560e21b815260048101839052476024820152604401610563565b6000836001600160a01b03168360405160006040518083038185875af1925050503d8060008114610dc8576040519150601f19603f3d011682016040523d82523d6000602084013e610dcd565b606091505b5050905080610def576040516312171d8360e31b815260040160405180910390fd5b836001600160a01b03167f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a942436484604051610e2a91815260200190565b60405180910390a25050610cee60018055565b610e47813361108e565b50565b6000610e5683836107c8565b610ed4576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055610e8c3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4506001610436565b506000610436565b6000610ee883836107c8565b15610ed4576000838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a4506001610436565b600260015403610f6a57604051633ee5aeb560e01b815260040160405180910390fd5b6002600155565b60025460ff1615610f955760405163d93c066560e01b815260040160405180910390fd5b565b6040516001600160a01b0384811660248301528381166044830152606482018390526104619186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506110c7565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b17905261104f848261112a565b610461576040516001600160a01b0384811660248301526000604483015261108491869182169063095ea7b390606401610fcc565b61046184826110c7565b61109882826107c8565b610cee5760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610563565b60006110dc6001600160a01b038416836111cd565b905080516000141580156111015750808060200190518101906110ff919061166a565b155b1561049a57604051635274afe760e01b81526001600160a01b0384166004820152602401610563565b6000806000846001600160a01b031684604051611147919061168c565b6000604051808303816000865af19150503d8060008114611184576040519150601f19603f3d011682016040523d82523d6000602084013e611189565b606091505b50915091508180156111b35750805115806111b35750808060200190518101906111b3919061166a565b80156108d95750505050506001600160a01b03163b151590565b60606111db838360006111e2565b9392505050565b6060814710156112075760405163cd78605960e01b8152306004820152602401610563565b600080856001600160a01b03168486604051611223919061168c565b60006040518083038185875af1925050503d8060008114611260576040519150601f19603f3d011682016040523d82523d6000602084013e611265565b606091505b509150915061127586838361127f565b9695505050505050565b6060826112945761128f826112db565b6111db565b81511580156112ab57506001600160a01b0384163b155b156112d457604051639996b31560e01b81526001600160a01b0385166004820152602401610563565b50806111db565b8051156112eb5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b60006020828403121561131657600080fd5b81356001600160e01b0319811681146111db57600080fd5b60006020828403121561134057600080fd5b5035919050565b6001600160a01b0381168114610e4757600080fd5b6000806040838503121561136f57600080fd5b82359150602083013561138181611347565b809150509250929050565b6000806000606084860312156113a157600080fd5b83356113ac81611347565b92506020840135915060408401356113c381611347565b809150509250925092565b60008082840360608112156113e257600080fd5b83356113ed81611347565b92506040601f198201121561140157600080fd5b506020830190509250929050565b60006020828403121561142157600080fd5b81356111db81611347565b6000806000806040858703121561144257600080fd5b843567ffffffffffffffff8082111561145a57600080fd5b818701915087601f83011261146e57600080fd5b81358181111561147d57600080fd5b8860208260051b850101111561149257600080fd5b6020928301965094509086013590808211156114ad57600080fd5b818701915087601f8301126114c157600080fd5b8135818111156114d057600080fd5b8860208260061b85010111156114e557600080fd5b95989497505060200194505050565b6000806040838503121561150757600080fd5b823561151281611347565b946020939093013593505050565b60006020828403121561153257600080fd5b5051919050565b60005b8381101561155457818101518382015260200161153c565b50506000910152565b60008151808452611575816020860160208601611539565b601f01601f19169290920160200192915050565b6001600160a01b03878116825260208201879052604082018690528416606082015260c0608082018190526000906115c39083018561155d565b82810360a08401526115d5818561155d565b9998505050505050505050565b80546001600160a01b0319166001600160a01b0392909216919091179055565b813561160d81611347565b61161781836115e2565b50602082013561162681611347565b61049a81600184016115e2565b634e487b7160e01b600052603260045260246000fd5b8082018082111561043657634e487b7160e01b600052601160045260246000fd5b60006020828403121561167c57600080fd5b815180151581146111db57600080fd5b6000825161169e818460208701611539565b919091019291505056fe97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929a2646970667358221220dbbaa6fe7c9eb83d0310c6c119a8c89a516ee50f53d45b93b0e8a3439d9dc92164736f6c63430008170033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.