Feature Tip: Add private address tag to any address under My Name Tag !
Source Code
Overview
ETH Balance
0.000001 ETH
Eth Value
Less Than $0.01 (@ $2,226.02/ETH)Latest 22 from a total of 22 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Renounce Role | 23934623 | 61 days ago | IN | 0 ETH | 0.00000097 | ||||
| Grant Role | 23934616 | 61 days ago | IN | 0 ETH | 0.00000216 | ||||
| Renounce Role | 23934561 | 61 days ago | IN | 0 ETH | 0.00000111 | ||||
| Grant Role | 23934560 | 61 days ago | IN | 0 ETH | 0.00000226 | ||||
| Set Local To Rem... | 23677516 | 97 days ago | IN | 0 ETH | 0.00000441 | ||||
| Set Local To Rem... | 23677515 | 97 days ago | IN | 0 ETH | 0.00000444 | ||||
| Set Local To Rem... | 23677514 | 97 days ago | IN | 0 ETH | 0.0000044 | ||||
| Set Peer Deploym... | 23677513 | 97 days ago | IN | 0 ETH | 0.00000455 | ||||
| Set Adapter | 23677511 | 97 days ago | IN | 0 ETH | 0.00000453 | ||||
| Set Local To Rem... | 23583114 | 111 days ago | IN | 0 ETH | 0.00002594 | ||||
| Set Local To Rem... | 23583111 | 111 days ago | IN | 0 ETH | 0.00002401 | ||||
| Set Local To Rem... | 23583109 | 111 days ago | IN | 0 ETH | 0.00002163 | ||||
| Set Peer Deploym... | 23583106 | 111 days ago | IN | 0 ETH | 0.00003149 | ||||
| Set Adapter | 23583095 | 111 days ago | IN | 0 ETH | 0.00002008 | ||||
| Set Local To Rem... | 23583093 | 111 days ago | IN | 0 ETH | 0.00002146 | ||||
| Set Local To Rem... | 23583092 | 111 days ago | IN | 0 ETH | 0.0000206 | ||||
| Set Local To Rem... | 23583091 | 111 days ago | IN | 0 ETH | 0.00002052 | ||||
| Set Peer Deploym... | 23583089 | 111 days ago | IN | 0 ETH | 0.00003159 | ||||
| Set Adapter | 23583088 | 111 days ago | IN | 0 ETH | 0.00002163 | ||||
| Set Bridge Route... | 23583087 | 111 days ago | IN | 0 ETH | 0.00002125 | ||||
| Grant Role | 23582000 | 111 days ago | IN | 0 ETH | 0.00003548 | ||||
| Grant Role | 23581999 | 111 days ago | IN | 0 ETH | 0.0000343 |
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| Bridge ETH To | 23884553 | 68 days ago | 0.000001 ETH | ||||
| Transfer | 23884553 | 68 days ago | 0.000001 ETH | ||||
| Bridge ETH To | 23884549 | 68 days ago | 0.000001 ETH | ||||
| Transfer | 23884549 | 68 days ago | 0.000001 ETH | ||||
| Bridge ETH To | 23884524 | 68 days ago | 0.000001 ETH | ||||
| Transfer | 23884524 | 68 days ago | 0.000001 ETH | ||||
| Bridge ETH To | 23884511 | 68 days ago | 0.000001 ETH | ||||
| Transfer | 23884511 | 68 days ago | 0.000001 ETH | ||||
| Bridge ETH To | 23884503 | 68 days ago | 0.000001 ETH | ||||
| Transfer | 23884503 | 68 days ago | 0.000001 ETH | ||||
| Bridge ETH To | 23884499 | 68 days ago | 0.000001 ETH | ||||
| Transfer | 23884499 | 68 days ago | 0.000001 ETH | ||||
| Bridge ETH To | 23884486 | 68 days ago | 0.000001 ETH | ||||
| Transfer | 23884486 | 68 days ago | 0.000001 ETH | ||||
| Deposit | 23862728 | 72 days ago | 0.000001 ETH | ||||
| Transfer | 23862726 | 72 days ago | 0.000001 ETH | ||||
| Deposit | 23862640 | 72 days ago | 0.000001 ETH | ||||
| Transfer | 23862639 | 72 days ago | 0.000001 ETH | ||||
| Transfer | 23850896 | 73 days ago | 0.000001 ETH | ||||
| Bridge ETH To | 23848955 | 73 days ago | 0.000001 ETH | ||||
| Transfer | 23848955 | 73 days ago | 0.000001 ETH | ||||
| Deposit | 23848955 | 73 days ago | 0.000001 ETH | ||||
| Transfer | 23848953 | 73 days ago | 0.000001 ETH | ||||
| Bridge ETH To | 23843966 | 74 days ago | 0.000001 ETH | ||||
| Transfer | 23843966 | 74 days ago | 0.000001 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
OptimismBridgeAdapter
Compiler Version
v0.8.22+commit.4fc1097e
Optimization Enabled:
Yes with 20000 runs
Other Settings:
shanghai EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity 0.8.22;
import { AccessControl } from "@openzeppelin/contracts/access/AccessControl.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { IOptimismBridge } from "../interfaces/IOptimismBridge.sol";
import { IBridgeAdapter } from "../interfaces/IBridgeAdapter.sol";
import { IBridgeRouter } from "../interfaces/IBridgeRouter.sol";
import { Constants } from "../Constants.sol";
interface IWETH9 {
function deposit() external payable;
function withdraw(uint256) external;
}
interface ICrossDomainMessenger {
function sendMessage(address _target, bytes calldata _message, uint32 _minGasLimit) external;
function xDomainMessageSender() external view returns (address);
}
/**
* @title OptimismBridgeAdapter
*
* @dev This contract works identically on both L1 and L2. The main difference is
* the configuration of the peer chains.
*
* FOR L1 DEPLOYMENT:
* - deploymentsForPeer[l2ChainId] = bridge and messenger addresses for the L2 chain.
* - peerChains[l2ChainId] = L2 adapter and token mappings.
* - Can manage multiple L2 connections.
*
* FOR L2 DEPLOYMENT:
* - deploymentsForPeer[1] = bridge and messenger addresses for Ethereum.
* - peerChains[1] = L1 adapter and token mappings.
* - It should only manage a single connection.
*/
contract OptimismBridgeAdapter is IBridgeAdapter, AccessControl {
using SafeERC20 for IERC20;
bytes32 public constant SETTER_ROLE = keccak256("SETTER_ROLE");
bytes32 public constant RESCUE_ROLE = keccak256("RESCUE_ROLE");
error ZeroAmount();
error ZeroAddress();
error ZeroChainId();
error ZeroGasLimit();
error ZeroIdentifier();
error ChainIdCannotBeThis();
error CallerNotRouter(address caller);
error InvalidRemoteToken(address token);
error UnsupportedRemote(uint256 chainId);
error CallerNotOtherAdapter(address caller, address messengerSender);
error InsufficientFunds(address token, uint256 available, uint256 required);
event PeerAdapterSet(uint256 indexed chainId, address indexed adapter);
event PeerTokenSet(uint256 indexed chainId, address indexed localToken, address indexed remoteToken);
event PeerDeploymentSet(uint256 indexed chainId, address indexed l1Bridge, address indexed messenger);
event BridgeRouterSet(address indexed bridgeRouter);
event OptimismAdapterTriggered(
address indexed localToken,
uint256 amount,
uint256 indexed destChainId,
bytes32 indexed destAddress,
bytes data
);
/// @notice Peer chain configuration
/// @dev This contract communicates with its instance on the peer chain.
/// That is why we need to know the peer adapter.
/// Also, the optimism bridge requires knowing the token addresses on both chains.
struct PeerChain {
address adapter;
mapping(address => address) localToRemoteToken;
}
/// @notice Bridge and messenger configuration for peer chains.
/// @dev There is a bridge and messenger on L1 for each L2 chain.
/// For L2 chains, there is a single bridge and messenger that connect to Ethereum.
/// Since it is the same format, we can use the same data structures for both.
/// @param bridge Address of the optimism bridge contract for peer chain
/// @param bridgeMinGasLimit Minimum gas limit for bridge operations
/// @param messenger Address of the CrossDomainMessenger contract for peer chain
/// @param messengerMinGasLimit Minimum gas limit for messenger operations
struct PeerDeployments {
address bridge;
uint32 bridgeMinGasLimit;
address messenger;
uint32 messengerMinGasLimit;
}
/// @dev Bridge/messenger addresses for each peer chain
mapping(uint256 chainId => PeerDeployments) public deploymentsForPeer;
/// @dev Adapter and token mappings for each peer chain
mapping(uint256 chainId => PeerChain) public peerChains;
/// @dev the router is only contract allowed to call the bridge function
IBridgeRouter public router;
/// @notice L1 chain ID
/// @dev L2s need to first send funds to L1 even if the dest chain is not L1‚
uint256 public immutable L1_CHAIN_ID;
bool public immutable IS_L2;
address public immutable weth;
modifier onlyRouter() {
if (msg.sender != address(router)) revert CallerNotRouter(msg.sender);
_;
}
modifier onlyMessengerOrRescue(uint256 srcChainId) {
if (!hasRole(RESCUE_ROLE, msg.sender)) {
address messenger = deploymentsForPeer[srcChainId].messenger;
address peerAdapter = peerChains[srcChainId].adapter;
if (messenger != msg.sender || ICrossDomainMessenger(messenger).xDomainMessageSender() != peerAdapter) {
revert CallerNotOtherAdapter(msg.sender, ICrossDomainMessenger(messenger).xDomainMessageSender());
}
}
_;
}
constructor(address admin, address _weth, uint256 l1ChainId) {
if (_weth == address(0) || admin == address(0)) revert ZeroAddress();
if (l1ChainId == 0) revert ZeroChainId();
weth = _weth;
L1_CHAIN_ID = l1ChainId;
IS_L2 = block.chainid != L1_CHAIN_ID;
_grantRole(DEFAULT_ADMIN_ROLE, admin);
}
function forwardFunds(
address localToken,
uint256 amount,
uint256 destChainId,
bytes32 destAddress,
bytes calldata data
) external payable onlyRouter {
if (localToken == Constants.ETH_ADDRESS) {
_bridgeETH(localToken, amount, destChainId, destAddress, data);
} else if (localToken == weth) {
// pull WETH from caller
IERC20(localToken).safeTransferFrom(msg.sender, address(this), amount);
// unwrap to ETH
IWETH9(localToken).withdraw(amount);
// then bridge ETH
_bridgeETH(localToken, amount, destChainId, destAddress, data);
} else {
IERC20(localToken).safeTransferFrom(msg.sender, address(this), amount);
_bridgeERC20(localToken, amount, destChainId, destAddress, data);
}
emit OptimismAdapterTriggered(localToken, amount, destChainId, destAddress, data);
}
function _bridgeERC20(
address localToken,
uint256 amount,
uint256 destChainId,
bytes32 destAddress,
bytes memory data
) internal {
// if this contract is deployed on L2, the funds go through ethereum
// therefore, hopChainId should be set to the Ethereum chain ID
uint256 hopChainId = IS_L2 ? L1_CHAIN_ID : destChainId;
// The usage of "storage" is for optimization.
// These two variables should NOT BE modified.
PeerDeployments storage destDeployment = deploymentsForPeer[hopChainId];
PeerChain storage destPeer = peerChains[hopChainId];
address remoteToken = destPeer.localToRemoteToken[localToken];
address remoteAdapter = destPeer.adapter;
if (remoteToken == address(0)) revert InvalidRemoteToken(localToken);
if (remoteAdapter == address(0)) revert UnsupportedRemote(hopChainId);
if (destDeployment.bridge == address(0) || destDeployment.messenger == address(0))
revert UnsupportedRemote(hopChainId);
IERC20(localToken).forceApprove(address(destDeployment.bridge), amount);
IOptimismBridge(destDeployment.bridge).bridgeERC20To(
localToken,
remoteToken,
remoteAdapter,
amount,
destDeployment.bridgeMinGasLimit,
data
);
bytes memory message = abi.encodeWithSelector(
this.receiveFunds.selector,
remoteToken,
amount,
block.chainid,
destChainId,
destAddress,
data
);
ICrossDomainMessenger(destDeployment.messenger).sendMessage({
_target: remoteAdapter,
_message: message,
_minGasLimit: destDeployment.messengerMinGasLimit
});
}
function _bridgeETH(
address localToken,
uint256 amount,
uint256 destChainId,
bytes32 destAddress,
bytes memory data
) internal {
// if this contract is deployed on L2, the funds go through ethereum
// therefore, hopChainId should be set to the Ethereum chain ID
uint256 hopChainId = IS_L2 ? L1_CHAIN_ID : destChainId;
// The usage of "storage" is for optimization.
// These variables should NOT BE modified.
PeerDeployments storage destDeployment = deploymentsForPeer[hopChainId];
PeerChain storage destPeer = peerChains[hopChainId];
address remoteToken = destPeer.localToRemoteToken[localToken];
address remoteAdapter = destPeer.adapter;
if (remoteToken == address(0)) revert InvalidRemoteToken(localToken);
if (remoteAdapter == address(0)) revert UnsupportedRemote(hopChainId);
if (destDeployment.bridge == address(0) || destDeployment.messenger == address(0))
revert UnsupportedRemote(hopChainId);
IOptimismBridge(destDeployment.bridge).bridgeETHTo{ value: amount }(
remoteAdapter,
destDeployment.bridgeMinGasLimit,
data
);
bytes memory message = abi.encodeWithSelector(
this.receiveFunds.selector,
remoteToken, // should be ETH_ADDRESS or WETH address on the remote chain
amount,
block.chainid,
destChainId,
destAddress,
data
);
ICrossDomainMessenger(destDeployment.messenger).sendMessage({
_target: remoteAdapter,
_message: message,
_minGasLimit: destDeployment.messengerMinGasLimit
});
}
/// @notice This function gets called by the messenger of the respective peer chain.
/// @dev The funds should have been sent already by the bridge operation by the time this function is called.
/// @param localToken Address of the token token received
/// @param amount Amount of the token received
/// @param srcChainId ID of the source chain
/// @param destChainId ID of the destination chain
/// @param destAddress Address on the destination chain to receive the tokens
/// @param data Additional data to include with the message
function receiveFunds(
address localToken,
uint256 amount,
uint256 srcChainId,
uint256 destChainId,
bytes32 destAddress,
bytes calldata data
) external payable onlyMessengerOrRescue(srcChainId) {
uint256 ethAmount;
IBridgeRouter bridgeRouter = router;
if (localToken == Constants.ETH_ADDRESS) {
uint256 ethBalance = address(this).balance;
if (ethBalance < amount) revert InsufficientFunds(Constants.ETH_ADDRESS, ethBalance, amount);
ethAmount = amount;
} else if (localToken == weth) {
uint256 ethBalance = address(this).balance;
if (ethBalance < amount) revert InsufficientFunds(Constants.ETH_ADDRESS, ethBalance, amount);
// wrap to WETH
IWETH9(localToken).deposit{ value: amount }();
// Transfer tokens to the bridgeRouter
IERC20(localToken).safeTransfer(address(bridgeRouter), amount);
} else {
uint256 tokenBalance = IERC20(localToken).balanceOf(address(this));
if (tokenBalance < amount) revert InsufficientFunds(localToken, tokenBalance, amount);
// Transfer tokens to the bridgeRouter
IERC20(localToken).safeTransfer(address(bridgeRouter), amount);
}
bridgeRouter.handleReceivedFunds{ value: ethAmount }(
localToken,
amount,
srcChainId,
destChainId,
destAddress,
data
);
}
// ========= ADMIN FUNCTIONS ========= //
function setBridgeRouter(address _router) external onlyRole(SETTER_ROLE) {
if (_router == address(0)) revert ZeroAddress();
router = IBridgeRouter(_router);
emit BridgeRouterSet(_router);
}
function setAdapter(uint256 chainId, address adapter) external onlyRole(SETTER_ROLE) {
if (chainId == block.chainid) revert ChainIdCannotBeThis();
if (adapter == address(0)) revert ZeroAddress();
if (chainId == 0) revert ZeroChainId();
peerChains[chainId].adapter = adapter;
emit PeerAdapterSet(chainId, adapter);
}
function setLocalToRemoteToken(
uint256 chainId,
address localToken,
address remoteToken
) external onlyRole(SETTER_ROLE) {
if (localToken == address(0) || remoteToken == address(0)) revert ZeroAddress();
if (chainId == block.chainid) revert ChainIdCannotBeThis();
if (chainId == 0) revert ZeroChainId();
peerChains[chainId].localToRemoteToken[localToken] = remoteToken;
emit PeerTokenSet(chainId, localToken, remoteToken);
}
function setPeerDeployments(
uint256 chainId,
address _bridge,
address messenger,
uint32 bridgeGasLimit,
uint32 messengerGasLimit
) external onlyRole(SETTER_ROLE) {
if (_bridge == address(0) || messenger == address(0)) revert ZeroAddress();
if (bridgeGasLimit == 0 || messengerGasLimit == 0) revert ZeroGasLimit();
if (IS_L2 && chainId != L1_CHAIN_ID) revert UnsupportedRemote(chainId);
if (chainId == block.chainid) revert ChainIdCannotBeThis();
if (chainId == 0) revert ZeroChainId();
deploymentsForPeer[chainId].bridge = _bridge;
deploymentsForPeer[chainId].messenger = messenger;
deploymentsForPeer[chainId].bridgeMinGasLimit = bridgeGasLimit;
deploymentsForPeer[chainId].messengerMinGasLimit = messengerGasLimit;
emit PeerDeploymentSet(chainId, _bridge, messenger);
}
// ========= GETTER FUNCTIONS ========= //
function getPeerChainRemoteToken(uint256 chainId, address localToken) external view returns (address) {
return peerChains[chainId].localToRemoteToken[localToken];
}
/// @notice Allow contract to receive ETH from bridge operations
receive() external payable {}
}// 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) (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) (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: AGPL-3.0
pragma solidity 0.8.22;
interface IOptimismBridge {
function bridgeERC20To(
address _localToken,
address _remoteToken,
address _to,
uint256 _amount,
uint32 _minGasLimit,
bytes calldata _extraData
) external;
function bridgeETHTo(address _to, uint32 _minGasLimit, bytes calldata _extraData) external payable;
}// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.22;
interface IBridgeAdapter {
struct CrossChainData {
uint256 amount;
address localToken;
uint256 srcChainId;
uint256 destChainId;
}
/**
* @notice Executes a bridge operation.
* @param token The address of the token to bridge.
* @param amount The amount of tokens to bridge.
* @param destChainId The ID of the destination chain.
* @param destAddress The destination identifier (low 20 bytes MUST encode an EVM address when applicable).
* @param data Additional data to be passed to destAddress.
*/
function forwardFunds(
address token,
uint256 amount,
uint256 destChainId,
bytes32 destAddress,
bytes calldata data
) external payable;
}// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.22;
/// @notice Interface for the IBridgeRouter
interface IBridgeRouter {
function bridge(
address token,
uint256 amount,
uint256 destChainId,
bytes32 destAddress,
bytes calldata extraData
) external payable;
function handleReceivedFunds(
address token,
uint256 amount,
uint256 srcChainId,
uint256 destChainId,
bytes32 destAddress,
bytes calldata extraData
) external payable;
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.22;
library Constants {
/// @notice ETH sentinel address for consistent ETH handling
address public constant ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
}// 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.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) (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) (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.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);
}{
"remappings": [
"forge-std/=lib/forge-std/src/",
"@layerzerolabs/=../../node_modules/@layerzerolabs/",
"@openzeppelin/=../../node_modules/@openzeppelin/",
"@arbitrum/=../../node_modules/@arbitrum/",
"@vault/=../vault/contracts/",
"@offchainlabs/=../../node_modules/@offchainlabs/",
"ds-test/=../../node_modules/ds-test/",
"hardhat-deploy/=../../node_modules/hardhat-deploy/",
"hardhat/=../../node_modules/hardhat/",
"solady/=../../node_modules/solady/",
"solidity-bytes-utils/=../../node_modules/solidity-bytes-utils/",
"vault/=../../node_modules/vault/"
],
"optimizer": {
"enabled": true,
"runs": 20000
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "shanghai",
"viaIR": false
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"admin","type":"address"},{"internalType":"address","name":"_weth","type":"address"},{"internalType":"uint256","name":"l1ChainId","type":"uint256"}],"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":"caller","type":"address"},{"internalType":"address","name":"messengerSender","type":"address"}],"name":"CallerNotOtherAdapter","type":"error"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"CallerNotRouter","type":"error"},{"inputs":[],"name":"ChainIdCannotBeThis","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"available","type":"uint256"},{"internalType":"uint256","name":"required","type":"uint256"}],"name":"InsufficientFunds","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"InvalidRemoteToken","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"}],"name":"UnsupportedRemote","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"inputs":[],"name":"ZeroAmount","type":"error"},{"inputs":[],"name":"ZeroChainId","type":"error"},{"inputs":[],"name":"ZeroGasLimit","type":"error"},{"inputs":[],"name":"ZeroIdentifier","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"bridgeRouter","type":"address"}],"name":"BridgeRouterSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"localToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"destChainId","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"destAddress","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"OptimismAdapterTriggered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"chainId","type":"uint256"},{"indexed":true,"internalType":"address","name":"adapter","type":"address"}],"name":"PeerAdapterSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"chainId","type":"uint256"},{"indexed":true,"internalType":"address","name":"l1Bridge","type":"address"},{"indexed":true,"internalType":"address","name":"messenger","type":"address"}],"name":"PeerDeploymentSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"chainId","type":"uint256"},{"indexed":true,"internalType":"address","name":"localToken","type":"address"},{"indexed":true,"internalType":"address","name":"remoteToken","type":"address"}],"name":"PeerTokenSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"IS_L2","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"L1_CHAIN_ID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RESCUE_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SETTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"}],"name":"deploymentsForPeer","outputs":[{"internalType":"address","name":"bridge","type":"address"},{"internalType":"uint32","name":"bridgeMinGasLimit","type":"uint32"},{"internalType":"address","name":"messenger","type":"address"},{"internalType":"uint32","name":"messengerMinGasLimit","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"localToken","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"destChainId","type":"uint256"},{"internalType":"bytes32","name":"destAddress","type":"bytes32"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"forwardFunds","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"localToken","type":"address"}],"name":"getPeerChainRemoteToken","outputs":[{"internalType":"address","name":"","type":"address"}],"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":[{"internalType":"uint256","name":"chainId","type":"uint256"}],"name":"peerChains","outputs":[{"internalType":"address","name":"adapter","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"localToken","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"srcChainId","type":"uint256"},{"internalType":"uint256","name":"destChainId","type":"uint256"},{"internalType":"bytes32","name":"destAddress","type":"bytes32"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"receiveFunds","outputs":[],"stateMutability":"payable","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":[],"name":"router","outputs":[{"internalType":"contract IBridgeRouter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"adapter","type":"address"}],"name":"setAdapter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_router","type":"address"}],"name":"setBridgeRouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"localToken","type":"address"},{"internalType":"address","name":"remoteToken","type":"address"}],"name":"setLocalToRemoteToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"_bridge","type":"address"},{"internalType":"address","name":"messenger","type":"address"},{"internalType":"uint32","name":"bridgeGasLimit","type":"uint32"},{"internalType":"uint32","name":"messengerGasLimit","type":"uint32"}],"name":"setPeerDeployments","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":[],"name":"weth","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
60e060405234801562000010575f80fd5b5060405162002b3f38038062002b3f833981016040819052620000339162000188565b6001600160a01b03821615806200005157506001600160a01b038316155b15620000705760405163d92e233d60e01b815260040160405180910390fd5b805f036200009157604051633212217560e21b815260040160405180910390fd5b6001600160a01b03821660c05260808190524681141560a052620000b65f84620000c0565b50505050620001c6565b5f828152602081815260408083206001600160a01b038516845290915281205460ff1662000163575f838152602081815260408083206001600160a01b03861684529091529020805460ff191660011790556200011a3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600162000166565b505f5b92915050565b80516001600160a01b038116811462000183575f80fd5b919050565b5f805f606084860312156200019b575f80fd5b620001a6846200016c565b9250620001b6602085016200016c565b9150604084015190509250925092565b60805160a05160c051612916620002295f395f81816103de01528181610e83015261132501525f818161042401528181610908015281816118e30152611cab01525f818161038c015281816109300152818161190e0152611cd601526129165ff3fe608060405260043610610170575f3560e01c806365f20454116100c6578063a2011b3f1161007c578063d547741f11610057578063d547741f14610581578063e26bbe80146105a0578063f887ea40146105bf575f80fd5b8063a2011b3f14610508578063a217fddf1461053b578063b1a9f8091461054e575f80fd5b8063752d5181116100ac578063752d5181146104655780637770ff9b146104a657806391d14854146104b9575f80fd5b806365f20454146104135780636df4200714610446575f80fd5b806325f5042c1161012657806336568abe1161010157806336568abe146103ae5780633fc8cef3146103cd5780634f1ffc6414610400575f80fd5b806325f5042c1461033d5780632f2ff15d1461035c5780632f90b1841461037b575f80fd5b80630ddc5216116101565780630ddc5216146101d0578063210452c514610247578063248a9ca314610301575f80fd5b806301ffc9a71461017b5780630b799d95146101af575f80fd5b3661017757005b5f80fd5b348015610186575f80fd5b5061019a610195366004612394565b6105eb565b60405190151581526020015b60405180910390f35b3480156101ba575f80fd5b506101ce6101c93660046123f4565b610683565b005b3480156101db575f80fd5b506102226101ea366004612433565b5f91825260026020908152604080842073ffffffffffffffffffffffffffffffffffffffff9384168552600101909152909120541690565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101a6565b348015610252575f80fd5b506102bd610261366004612461565b600160208190525f9182526040909120805491015473ffffffffffffffffffffffffffffffffffffffff8083169263ffffffff740100000000000000000000000000000000000000009182900481169392831692919091041684565b6040805173ffffffffffffffffffffffffffffffffffffffff958616815263ffffffff948516602082015294909216918401919091521660608201526080016101a6565b34801561030c575f80fd5b5061032f61031b366004612461565b5f9081526020819052604090206001015490565b6040519081526020016101a6565b348015610348575f80fd5b506101ce610357366004612490565b610820565b348015610367575f80fd5b506101ce610376366004612433565b610b6f565b348015610386575f80fd5b5061032f7f000000000000000000000000000000000000000000000000000000000000000081565b3480156103b9575f80fd5b506101ce6103c8366004612433565b610b99565b3480156103d8575f80fd5b506102227f000000000000000000000000000000000000000000000000000000000000000081565b6101ce61040e366004612533565b610bf7565b34801561041e575f80fd5b5061019a7f000000000000000000000000000000000000000000000000000000000000000081565b348015610451575f80fd5b506101ce6104603660046125aa565b611166565b348015610470575f80fd5b5061022261047f366004612461565b60026020525f908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b6101ce6104b43660046125c5565b61124c565b3480156104c4575f80fd5b5061019a6104d3366004612433565b5f9182526020828152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b348015610513575f80fd5b5061032f7f61c92169ef077349011ff0b1383c894d86c5f0b41d986366b58a6cf31e93beda81565b348015610546575f80fd5b5061032f5f81565b348015610559575f80fd5b5061032f7fc4c453d647953c0fd35db5a34ee76e60fb4abc3a8fb891a25936b70b38f2925381565b34801561058c575f80fd5b506101ce61059b366004612433565b611515565b3480156105ab575f80fd5b506101ce6105ba366004612433565b611539565b3480156105ca575f80fd5b506003546102229073ffffffffffffffffffffffffffffffffffffffff1681565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061067d57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b7f61c92169ef077349011ff0b1383c894d86c5f0b41d986366b58a6cf31e93beda6106ad816116a0565b73ffffffffffffffffffffffffffffffffffffffff831615806106e4575073ffffffffffffffffffffffffffffffffffffffff8216155b1561071b576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b468403610754576040517f8f3019f900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b835f0361078d576040517fc84885d400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f84815260026020908152604080832073ffffffffffffffffffffffffffffffffffffffff878116808652600190920190935281842080547fffffffffffffffffffffffff000000000000000000000000000000000000000016938716938417905590519192909187917f4cc69fdfa9b0adfd49c511145d4a4a32a08af5627208393e7d8fe525347a559a91a450505050565b7f61c92169ef077349011ff0b1383c894d86c5f0b41d986366b58a6cf31e93beda61084a816116a0565b73ffffffffffffffffffffffffffffffffffffffff85161580610881575073ffffffffffffffffffffffffffffffffffffffff8416155b156108b8576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b63ffffffff831615806108cf575063ffffffff8216155b15610906576040517f3e267f9500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f0000000000000000000000000000000000000000000000000000000000000000801561095357507f00000000000000000000000000000000000000000000000000000000000000008614155b15610992576040517f6d09e79d000000000000000000000000000000000000000000000000000000008152600481018790526024015b60405180910390fd5b4686036109cb576040517f8f3019f900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b855f03610a04576040517fc84885d400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8460015f8881526020019081526020015f205f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508360015f8881526020019081526020015f206001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508260015f8881526020019081526020015f205f0160146101000a81548163ffffffff021916908363ffffffff1602179055508160015f8881526020019081526020015f2060010160146101000a81548163ffffffff021916908363ffffffff1602179055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16877f404a32a413943cc7c44f18efafa9cb94bde0b81d566bfb7bd6f8304616a3ebd860405160405180910390a4505050505050565b5f82815260208190526040902060010154610b89816116a0565b610b9383836116ad565b50505050565b73ffffffffffffffffffffffffffffffffffffffff81163314610be8576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610bf282826117a6565b505050565b335f9081527f266cad2a07820380da249144ee0922486396c59c16dc4ab5f4c00611d746e9b76020526040902054859060ff16610dd3575f81815260016020818152604080842090920154600290915291205473ffffffffffffffffffffffffffffffffffffffff91821691163382141580610d0b57508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cce573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610cf29190612633565b73ffffffffffffffffffffffffffffffffffffffff1614155b15610dd057338273ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d5a573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d7e9190612633565b6040517f3ef0b10900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff928316600482015291166024820152604401610989565b50505b6003545f9073ffffffffffffffffffffffffffffffffffffffff908116908a167fffffffffffffffffffffffff111111111111111111111111111111111111111201610e81574789811015610e78576040517f5c54305e00000000000000000000000000000000000000000000000000000000815273eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee600482015260248101829052604481018b9052606401610989565b899250506110cc565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168a73ffffffffffffffffffffffffffffffffffffffff1603610fb9574789811015610f33576040517f5c54305e00000000000000000000000000000000000000000000000000000000815273eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee600482015260248101829052604481018b9052606401610989565b8a73ffffffffffffffffffffffffffffffffffffffff1663d0e30db08b6040518263ffffffff1660e01b81526004015f604051808303818588803b158015610f79575f80fd5b505af1158015610f8b573d5f803e3d5ffd5b50610fb39350505073ffffffffffffffffffffffffffffffffffffffff8d169050838c61185f565b506110cc565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201525f9073ffffffffffffffffffffffffffffffffffffffff8c16906370a0823190602401602060405180830381865afa158015611023573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611047919061264e565b9050898110156110a9576040517f5c54305e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8c16600482015260248101829052604481018b9052606401610989565b6110ca73ffffffffffffffffffffffffffffffffffffffff8c16838c61185f565b505b6040517f081afce400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82169063081afce490849061112c908e908e908e908e908e908e908e906004016126ac565b5f604051808303818588803b158015611143575f80fd5b505af1158015611155573d5f803e3d5ffd5b505050505050505050505050505050565b7f61c92169ef077349011ff0b1383c894d86c5f0b41d986366b58a6cf31e93beda611190816116a0565b73ffffffffffffffffffffffffffffffffffffffff82166111dd576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84169081179091556040517f69edca9b1bff03431f01e75df74158637c387906f7a0d567c810bd6c74f88395905f90a25050565b60035473ffffffffffffffffffffffffffffffffffffffff16331461129f576040517ffb217bcd000000000000000000000000000000000000000000000000000000008152336004820152602401610989565b7fffffffffffffffffffffffff111111111111111111111111111111111111111273ffffffffffffffffffffffffffffffffffffffff8716016113235761131e8686868686868080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152506118e092505050565b6114b9565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16036114555761139873ffffffffffffffffffffffffffffffffffffffff8716333088611c62565b6040517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810186905273ffffffffffffffffffffffffffffffffffffffff871690632e1a7d4d906024015f604051808303815f87803b1580156113fd575f80fd5b505af115801561140f573d5f803e3d5ffd5b5050505061131e8686868686868080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152506118e092505050565b61147773ffffffffffffffffffffffffffffffffffffffff8716333088611c62565b6114b98686868686868080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250611ca892505050565b82848773ffffffffffffffffffffffffffffffffffffffff167fd9f08efabccca6e1095f294adb587b14471343c38b480ce123931e3bc3d6680f88868660405161150593929190612700565b60405180910390a4505050505050565b5f8281526020819052604090206001015461152f816116a0565b610b9383836117a6565b7f61c92169ef077349011ff0b1383c894d86c5f0b41d986366b58a6cf31e93beda611563816116a0565b46830361159c576040517f8f3019f900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82166115e9576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b825f03611622576040517fc84885d400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8381526002602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff86169081179091559051909185917f49a5f7c5a0962809e89a76c379707f1f0082ae35dc525c0b9aaa8701b79cec7f9190a3505050565b6116aa8133611f41565b50565b5f8281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281205460ff1661179f575f8381526020818152604080832073ffffffffffffffffffffffffffffffffffffffff86168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561173d3390565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161067d565b505f61067d565b5f8281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281205460ff161561179f575f8381526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8616808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a450600161067d565b60405173ffffffffffffffffffffffffffffffffffffffff838116602483015260448201839052610bf291859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611fca565b5f7f000000000000000000000000000000000000000000000000000000000000000061190c578361192e565b7f00000000000000000000000000000000000000000000000000000000000000005b5f8181526001602081815260408084206002835281852073ffffffffffffffffffffffffffffffffffffffff808e16875294810190935293205481549495509293909282169116816119c4576040517f359ff56f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b166004820152602401610989565b73ffffffffffffffffffffffffffffffffffffffff8116611a14576040517f6d09e79d00000000000000000000000000000000000000000000000000000000815260048101869052602401610989565b835473ffffffffffffffffffffffffffffffffffffffff161580611a505750600184015473ffffffffffffffffffffffffffffffffffffffff16155b15611a8a576040517f6d09e79d00000000000000000000000000000000000000000000000000000000815260048101869052602401610989565b83546040517fe11013dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82169163e11013dd918c91611b0191869174010000000000000000000000000000000000000000900463ffffffff16908c90600401612784565b5f604051808303818588803b158015611b18575f80fd5b505af1158015611b2a573d5f803e3d5ffd5b50505050505f634f1ffc6460e01b838b468c8c8c604051602401611b53969594939291906127be565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090941693909317909252600187015491517f3dbb202b00000000000000000000000000000000000000000000000000000000815290925073ffffffffffffffffffffffffffffffffffffffff821691633dbb202b91611c4b918691869163ffffffff740100000000000000000000000000000000000000009091041690600401612810565b5f604051808303815f87803b158015611143575f80fd5b60405173ffffffffffffffffffffffffffffffffffffffff8481166024830152838116604483015260648201839052610b939186918216906323b872dd90608401611899565b5f7f0000000000000000000000000000000000000000000000000000000000000000611cd45783611cf6565b7f00000000000000000000000000000000000000000000000000000000000000005b5f8181526001602081815260408084206002835281852073ffffffffffffffffffffffffffffffffffffffff808e1687529481019093529320548154949550929390928216911681611d8c576040517f359ff56f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b166004820152602401610989565b73ffffffffffffffffffffffffffffffffffffffff8116611ddc576040517f6d09e79d00000000000000000000000000000000000000000000000000000000815260048101869052602401610989565b835473ffffffffffffffffffffffffffffffffffffffff161580611e185750600184015473ffffffffffffffffffffffffffffffffffffffff16155b15611e52576040517f6d09e79d00000000000000000000000000000000000000000000000000000000815260048101869052602401610989565b8354611e789073ffffffffffffffffffffffffffffffffffffffff8c811691168b61205e565b835f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663540abf738b84848d895f0160149054906101000a900463ffffffff168c6040518763ffffffff1660e01b8152600401611ef096959493929190612854565b5f604051808303815f87803b158015611f07575f80fd5b505af1158015611f19573d5f803e3d5ffd5b505050505f634f1ffc6460e01b838b468c8c8c604051602401611b53969594939291906127be565b5f8281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16611fc6576040517fe2517d3f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216600482015260248101839052604401610989565b5050565b5f611feb73ffffffffffffffffffffffffffffffffffffffff841683612135565b905080515f1415801561200f57508080602001905181019061200d91906128a6565b155b15610bf2576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401610989565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790526120ea8482612149565b610b935760405173ffffffffffffffffffffffffffffffffffffffff84811660248301525f604483015261212b91869182169063095ea7b390606401611899565b610b938482611fca565b606061214283835f612204565b9392505050565b5f805f8473ffffffffffffffffffffffffffffffffffffffff168460405161217191906128c5565b5f604051808303815f865af19150503d805f81146121aa576040519150601f19603f3d011682016040523d82523d5f602084013e6121af565b606091505b50915091508180156121d95750805115806121d95750808060200190518101906121d991906128a6565b80156121fb57505f8573ffffffffffffffffffffffffffffffffffffffff163b115b95945050505050565b606081471015612242576040517fcd786059000000000000000000000000000000000000000000000000000000008152306004820152602401610989565b5f808573ffffffffffffffffffffffffffffffffffffffff16848660405161226a91906128c5565b5f6040518083038185875af1925050503d805f81146122a4576040519150601f19603f3d011682016040523d82523d5f602084013e6122a9565b606091505b50915091506122b98683836122c3565b9695505050505050565b6060826122d8576122d382612352565b612142565b81511580156122fc575073ffffffffffffffffffffffffffffffffffffffff84163b155b1561234b576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610989565b5080612142565b8051156123625780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f602082840312156123a4575f80fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114612142575f80fd5b73ffffffffffffffffffffffffffffffffffffffff811681146116aa575f80fd5b5f805f60608486031215612406575f80fd5b833592506020840135612418816123d3565b91506040840135612428816123d3565b809150509250925092565b5f8060408385031215612444575f80fd5b823591506020830135612456816123d3565b809150509250929050565b5f60208284031215612471575f80fd5b5035919050565b803563ffffffff8116811461248b575f80fd5b919050565b5f805f805f60a086880312156124a4575f80fd5b8535945060208601356124b6816123d3565b935060408601356124c6816123d3565b92506124d460608701612478565b91506124e260808701612478565b90509295509295909350565b5f8083601f8401126124fe575f80fd5b50813567ffffffffffffffff811115612515575f80fd5b60208301915083602082850101111561252c575f80fd5b9250929050565b5f805f805f805f60c0888a031215612549575f80fd5b8735612554816123d3565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff81111561258b575f80fd5b6125978a828b016124ee565b989b979a50959850939692959293505050565b5f602082840312156125ba575f80fd5b8135612142816123d3565b5f805f805f8060a087890312156125da575f80fd5b86356125e5816123d3565b9550602087013594506040870135935060608701359250608087013567ffffffffffffffff811115612615575f80fd5b61262189828a016124ee565b979a9699509497509295939492505050565b5f60208284031215612643575f80fd5b8151612142816123d3565b5f6020828403121561265e575f80fd5b5051919050565b81835281816020850137505f602082840101525f60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b73ffffffffffffffffffffffffffffffffffffffff8816815286602082015285604082015284606082015283608082015260c060a08201525f6126f360c083018486612665565b9998505050505050505050565b838152604060208201525f6121fb604083018486612665565b5f5b8381101561273357818101518382015260200161271b565b50505f910152565b5f8151808452612752816020860160208601612719565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff83166020820152606060408201525f6121fb606083018461273b565b73ffffffffffffffffffffffffffffffffffffffff8716815285602082015284604082015283606082015282608082015260c060a08201525f61280460c083018461273b565b98975050505050505050565b73ffffffffffffffffffffffffffffffffffffffff84168152606060208201525f61283e606083018561273b565b905063ffffffff83166040830152949350505050565b5f73ffffffffffffffffffffffffffffffffffffffff8089168352808816602084015280871660408401525084606083015263ffffffff8416608083015260c060a083015261280460c083018461273b565b5f602082840312156128b6575f80fd5b81518015158114612142575f80fd5b5f82516128d6818460208701612719565b919091019291505056fea2646970667358221220b4eb0217bc99e249fe1d59e8bb7b0af595c9a735e68bc9e8f6d2fa07863f1d6364736f6c634300081600330000000000000000000000008420a5d14d54dcb38c56b9475226720e8e417737000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000000001
Deployed Bytecode
0x608060405260043610610170575f3560e01c806365f20454116100c6578063a2011b3f1161007c578063d547741f11610057578063d547741f14610581578063e26bbe80146105a0578063f887ea40146105bf575f80fd5b8063a2011b3f14610508578063a217fddf1461053b578063b1a9f8091461054e575f80fd5b8063752d5181116100ac578063752d5181146104655780637770ff9b146104a657806391d14854146104b9575f80fd5b806365f20454146104135780636df4200714610446575f80fd5b806325f5042c1161012657806336568abe1161010157806336568abe146103ae5780633fc8cef3146103cd5780634f1ffc6414610400575f80fd5b806325f5042c1461033d5780632f2ff15d1461035c5780632f90b1841461037b575f80fd5b80630ddc5216116101565780630ddc5216146101d0578063210452c514610247578063248a9ca314610301575f80fd5b806301ffc9a71461017b5780630b799d95146101af575f80fd5b3661017757005b5f80fd5b348015610186575f80fd5b5061019a610195366004612394565b6105eb565b60405190151581526020015b60405180910390f35b3480156101ba575f80fd5b506101ce6101c93660046123f4565b610683565b005b3480156101db575f80fd5b506102226101ea366004612433565b5f91825260026020908152604080842073ffffffffffffffffffffffffffffffffffffffff9384168552600101909152909120541690565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101a6565b348015610252575f80fd5b506102bd610261366004612461565b600160208190525f9182526040909120805491015473ffffffffffffffffffffffffffffffffffffffff8083169263ffffffff740100000000000000000000000000000000000000009182900481169392831692919091041684565b6040805173ffffffffffffffffffffffffffffffffffffffff958616815263ffffffff948516602082015294909216918401919091521660608201526080016101a6565b34801561030c575f80fd5b5061032f61031b366004612461565b5f9081526020819052604090206001015490565b6040519081526020016101a6565b348015610348575f80fd5b506101ce610357366004612490565b610820565b348015610367575f80fd5b506101ce610376366004612433565b610b6f565b348015610386575f80fd5b5061032f7f000000000000000000000000000000000000000000000000000000000000000181565b3480156103b9575f80fd5b506101ce6103c8366004612433565b610b99565b3480156103d8575f80fd5b506102227f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b6101ce61040e366004612533565b610bf7565b34801561041e575f80fd5b5061019a7f000000000000000000000000000000000000000000000000000000000000000081565b348015610451575f80fd5b506101ce6104603660046125aa565b611166565b348015610470575f80fd5b5061022261047f366004612461565b60026020525f908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b6101ce6104b43660046125c5565b61124c565b3480156104c4575f80fd5b5061019a6104d3366004612433565b5f9182526020828152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b348015610513575f80fd5b5061032f7f61c92169ef077349011ff0b1383c894d86c5f0b41d986366b58a6cf31e93beda81565b348015610546575f80fd5b5061032f5f81565b348015610559575f80fd5b5061032f7fc4c453d647953c0fd35db5a34ee76e60fb4abc3a8fb891a25936b70b38f2925381565b34801561058c575f80fd5b506101ce61059b366004612433565b611515565b3480156105ab575f80fd5b506101ce6105ba366004612433565b611539565b3480156105ca575f80fd5b506003546102229073ffffffffffffffffffffffffffffffffffffffff1681565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061067d57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b7f61c92169ef077349011ff0b1383c894d86c5f0b41d986366b58a6cf31e93beda6106ad816116a0565b73ffffffffffffffffffffffffffffffffffffffff831615806106e4575073ffffffffffffffffffffffffffffffffffffffff8216155b1561071b576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b468403610754576040517f8f3019f900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b835f0361078d576040517fc84885d400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f84815260026020908152604080832073ffffffffffffffffffffffffffffffffffffffff878116808652600190920190935281842080547fffffffffffffffffffffffff000000000000000000000000000000000000000016938716938417905590519192909187917f4cc69fdfa9b0adfd49c511145d4a4a32a08af5627208393e7d8fe525347a559a91a450505050565b7f61c92169ef077349011ff0b1383c894d86c5f0b41d986366b58a6cf31e93beda61084a816116a0565b73ffffffffffffffffffffffffffffffffffffffff85161580610881575073ffffffffffffffffffffffffffffffffffffffff8416155b156108b8576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b63ffffffff831615806108cf575063ffffffff8216155b15610906576040517f3e267f9500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f0000000000000000000000000000000000000000000000000000000000000000801561095357507f00000000000000000000000000000000000000000000000000000000000000018614155b15610992576040517f6d09e79d000000000000000000000000000000000000000000000000000000008152600481018790526024015b60405180910390fd5b4686036109cb576040517f8f3019f900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b855f03610a04576040517fc84885d400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8460015f8881526020019081526020015f205f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508360015f8881526020019081526020015f206001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508260015f8881526020019081526020015f205f0160146101000a81548163ffffffff021916908363ffffffff1602179055508160015f8881526020019081526020015f2060010160146101000a81548163ffffffff021916908363ffffffff1602179055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16877f404a32a413943cc7c44f18efafa9cb94bde0b81d566bfb7bd6f8304616a3ebd860405160405180910390a4505050505050565b5f82815260208190526040902060010154610b89816116a0565b610b9383836116ad565b50505050565b73ffffffffffffffffffffffffffffffffffffffff81163314610be8576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610bf282826117a6565b505050565b335f9081527f266cad2a07820380da249144ee0922486396c59c16dc4ab5f4c00611d746e9b76020526040902054859060ff16610dd3575f81815260016020818152604080842090920154600290915291205473ffffffffffffffffffffffffffffffffffffffff91821691163382141580610d0b57508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cce573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610cf29190612633565b73ffffffffffffffffffffffffffffffffffffffff1614155b15610dd057338273ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d5a573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d7e9190612633565b6040517f3ef0b10900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff928316600482015291166024820152604401610989565b50505b6003545f9073ffffffffffffffffffffffffffffffffffffffff908116908a167fffffffffffffffffffffffff111111111111111111111111111111111111111201610e81574789811015610e78576040517f5c54305e00000000000000000000000000000000000000000000000000000000815273eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee600482015260248101829052604481018b9052606401610989565b899250506110cc565b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff168a73ffffffffffffffffffffffffffffffffffffffff1603610fb9574789811015610f33576040517f5c54305e00000000000000000000000000000000000000000000000000000000815273eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee600482015260248101829052604481018b9052606401610989565b8a73ffffffffffffffffffffffffffffffffffffffff1663d0e30db08b6040518263ffffffff1660e01b81526004015f604051808303818588803b158015610f79575f80fd5b505af1158015610f8b573d5f803e3d5ffd5b50610fb39350505073ffffffffffffffffffffffffffffffffffffffff8d169050838c61185f565b506110cc565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201525f9073ffffffffffffffffffffffffffffffffffffffff8c16906370a0823190602401602060405180830381865afa158015611023573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611047919061264e565b9050898110156110a9576040517f5c54305e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8c16600482015260248101829052604481018b9052606401610989565b6110ca73ffffffffffffffffffffffffffffffffffffffff8c16838c61185f565b505b6040517f081afce400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82169063081afce490849061112c908e908e908e908e908e908e908e906004016126ac565b5f604051808303818588803b158015611143575f80fd5b505af1158015611155573d5f803e3d5ffd5b505050505050505050505050505050565b7f61c92169ef077349011ff0b1383c894d86c5f0b41d986366b58a6cf31e93beda611190816116a0565b73ffffffffffffffffffffffffffffffffffffffff82166111dd576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84169081179091556040517f69edca9b1bff03431f01e75df74158637c387906f7a0d567c810bd6c74f88395905f90a25050565b60035473ffffffffffffffffffffffffffffffffffffffff16331461129f576040517ffb217bcd000000000000000000000000000000000000000000000000000000008152336004820152602401610989565b7fffffffffffffffffffffffff111111111111111111111111111111111111111273ffffffffffffffffffffffffffffffffffffffff8716016113235761131e8686868686868080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152506118e092505050565b6114b9565b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16036114555761139873ffffffffffffffffffffffffffffffffffffffff8716333088611c62565b6040517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810186905273ffffffffffffffffffffffffffffffffffffffff871690632e1a7d4d906024015f604051808303815f87803b1580156113fd575f80fd5b505af115801561140f573d5f803e3d5ffd5b5050505061131e8686868686868080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152506118e092505050565b61147773ffffffffffffffffffffffffffffffffffffffff8716333088611c62565b6114b98686868686868080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250611ca892505050565b82848773ffffffffffffffffffffffffffffffffffffffff167fd9f08efabccca6e1095f294adb587b14471343c38b480ce123931e3bc3d6680f88868660405161150593929190612700565b60405180910390a4505050505050565b5f8281526020819052604090206001015461152f816116a0565b610b9383836117a6565b7f61c92169ef077349011ff0b1383c894d86c5f0b41d986366b58a6cf31e93beda611563816116a0565b46830361159c576040517f8f3019f900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82166115e9576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b825f03611622576040517fc84885d400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8381526002602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff86169081179091559051909185917f49a5f7c5a0962809e89a76c379707f1f0082ae35dc525c0b9aaa8701b79cec7f9190a3505050565b6116aa8133611f41565b50565b5f8281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281205460ff1661179f575f8381526020818152604080832073ffffffffffffffffffffffffffffffffffffffff86168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561173d3390565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161067d565b505f61067d565b5f8281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281205460ff161561179f575f8381526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8616808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a450600161067d565b60405173ffffffffffffffffffffffffffffffffffffffff838116602483015260448201839052610bf291859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611fca565b5f7f000000000000000000000000000000000000000000000000000000000000000061190c578361192e565b7f00000000000000000000000000000000000000000000000000000000000000015b5f8181526001602081815260408084206002835281852073ffffffffffffffffffffffffffffffffffffffff808e16875294810190935293205481549495509293909282169116816119c4576040517f359ff56f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b166004820152602401610989565b73ffffffffffffffffffffffffffffffffffffffff8116611a14576040517f6d09e79d00000000000000000000000000000000000000000000000000000000815260048101869052602401610989565b835473ffffffffffffffffffffffffffffffffffffffff161580611a505750600184015473ffffffffffffffffffffffffffffffffffffffff16155b15611a8a576040517f6d09e79d00000000000000000000000000000000000000000000000000000000815260048101869052602401610989565b83546040517fe11013dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82169163e11013dd918c91611b0191869174010000000000000000000000000000000000000000900463ffffffff16908c90600401612784565b5f604051808303818588803b158015611b18575f80fd5b505af1158015611b2a573d5f803e3d5ffd5b50505050505f634f1ffc6460e01b838b468c8c8c604051602401611b53969594939291906127be565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090941693909317909252600187015491517f3dbb202b00000000000000000000000000000000000000000000000000000000815290925073ffffffffffffffffffffffffffffffffffffffff821691633dbb202b91611c4b918691869163ffffffff740100000000000000000000000000000000000000009091041690600401612810565b5f604051808303815f87803b158015611143575f80fd5b60405173ffffffffffffffffffffffffffffffffffffffff8481166024830152838116604483015260648201839052610b939186918216906323b872dd90608401611899565b5f7f0000000000000000000000000000000000000000000000000000000000000000611cd45783611cf6565b7f00000000000000000000000000000000000000000000000000000000000000015b5f8181526001602081815260408084206002835281852073ffffffffffffffffffffffffffffffffffffffff808e1687529481019093529320548154949550929390928216911681611d8c576040517f359ff56f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b166004820152602401610989565b73ffffffffffffffffffffffffffffffffffffffff8116611ddc576040517f6d09e79d00000000000000000000000000000000000000000000000000000000815260048101869052602401610989565b835473ffffffffffffffffffffffffffffffffffffffff161580611e185750600184015473ffffffffffffffffffffffffffffffffffffffff16155b15611e52576040517f6d09e79d00000000000000000000000000000000000000000000000000000000815260048101869052602401610989565b8354611e789073ffffffffffffffffffffffffffffffffffffffff8c811691168b61205e565b835f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663540abf738b84848d895f0160149054906101000a900463ffffffff168c6040518763ffffffff1660e01b8152600401611ef096959493929190612854565b5f604051808303815f87803b158015611f07575f80fd5b505af1158015611f19573d5f803e3d5ffd5b505050505f634f1ffc6460e01b838b468c8c8c604051602401611b53969594939291906127be565b5f8281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16611fc6576040517fe2517d3f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216600482015260248101839052604401610989565b5050565b5f611feb73ffffffffffffffffffffffffffffffffffffffff841683612135565b905080515f1415801561200f57508080602001905181019061200d91906128a6565b155b15610bf2576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401610989565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790526120ea8482612149565b610b935760405173ffffffffffffffffffffffffffffffffffffffff84811660248301525f604483015261212b91869182169063095ea7b390606401611899565b610b938482611fca565b606061214283835f612204565b9392505050565b5f805f8473ffffffffffffffffffffffffffffffffffffffff168460405161217191906128c5565b5f604051808303815f865af19150503d805f81146121aa576040519150601f19603f3d011682016040523d82523d5f602084013e6121af565b606091505b50915091508180156121d95750805115806121d95750808060200190518101906121d991906128a6565b80156121fb57505f8573ffffffffffffffffffffffffffffffffffffffff163b115b95945050505050565b606081471015612242576040517fcd786059000000000000000000000000000000000000000000000000000000008152306004820152602401610989565b5f808573ffffffffffffffffffffffffffffffffffffffff16848660405161226a91906128c5565b5f6040518083038185875af1925050503d805f81146122a4576040519150601f19603f3d011682016040523d82523d5f602084013e6122a9565b606091505b50915091506122b98683836122c3565b9695505050505050565b6060826122d8576122d382612352565b612142565b81511580156122fc575073ffffffffffffffffffffffffffffffffffffffff84163b155b1561234b576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610989565b5080612142565b8051156123625780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f602082840312156123a4575f80fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114612142575f80fd5b73ffffffffffffffffffffffffffffffffffffffff811681146116aa575f80fd5b5f805f60608486031215612406575f80fd5b833592506020840135612418816123d3565b91506040840135612428816123d3565b809150509250925092565b5f8060408385031215612444575f80fd5b823591506020830135612456816123d3565b809150509250929050565b5f60208284031215612471575f80fd5b5035919050565b803563ffffffff8116811461248b575f80fd5b919050565b5f805f805f60a086880312156124a4575f80fd5b8535945060208601356124b6816123d3565b935060408601356124c6816123d3565b92506124d460608701612478565b91506124e260808701612478565b90509295509295909350565b5f8083601f8401126124fe575f80fd5b50813567ffffffffffffffff811115612515575f80fd5b60208301915083602082850101111561252c575f80fd5b9250929050565b5f805f805f805f60c0888a031215612549575f80fd5b8735612554816123d3565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff81111561258b575f80fd5b6125978a828b016124ee565b989b979a50959850939692959293505050565b5f602082840312156125ba575f80fd5b8135612142816123d3565b5f805f805f8060a087890312156125da575f80fd5b86356125e5816123d3565b9550602087013594506040870135935060608701359250608087013567ffffffffffffffff811115612615575f80fd5b61262189828a016124ee565b979a9699509497509295939492505050565b5f60208284031215612643575f80fd5b8151612142816123d3565b5f6020828403121561265e575f80fd5b5051919050565b81835281816020850137505f602082840101525f60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b73ffffffffffffffffffffffffffffffffffffffff8816815286602082015285604082015284606082015283608082015260c060a08201525f6126f360c083018486612665565b9998505050505050505050565b838152604060208201525f6121fb604083018486612665565b5f5b8381101561273357818101518382015260200161271b565b50505f910152565b5f8151808452612752816020860160208601612719565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b73ffffffffffffffffffffffffffffffffffffffff8416815263ffffffff83166020820152606060408201525f6121fb606083018461273b565b73ffffffffffffffffffffffffffffffffffffffff8716815285602082015284604082015283606082015282608082015260c060a08201525f61280460c083018461273b565b98975050505050505050565b73ffffffffffffffffffffffffffffffffffffffff84168152606060208201525f61283e606083018561273b565b905063ffffffff83166040830152949350505050565b5f73ffffffffffffffffffffffffffffffffffffffff8089168352808816602084015280871660408401525084606083015263ffffffff8416608083015260c060a083015261280460c083018461273b565b5f602082840312156128b6575f80fd5b81518015158114612142575f80fd5b5f82516128d6818460208701612719565b919091019291505056fea2646970667358221220b4eb0217bc99e249fe1d59e8bb7b0af595c9a735e68bc9e8f6d2fa07863f1d6364736f6c63430008160033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000008420a5d14d54dcb38c56b9475226720e8e417737000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000000001
-----Decoded View---------------
Arg [0] : admin (address): 0x8420A5D14d54DCb38C56B9475226720e8E417737
Arg [1] : _weth (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
Arg [2] : l1ChainId (uint256): 1
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000008420a5d14d54dcb38c56b9475226720e8e417737
Arg [1] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000001
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0.000001
Token Allocations
ETH
100.00%
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|---|---|---|---|---|
| ETH | 100.00% | $2,228.35 | 0.000001 | $0.002228 |
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.