Overview
ETH Balance
0 ETH
ETH Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 25 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Bond Withdrawal ... | 20765807 | 22 hrs ago | IN | 0 ETH | 0.00000253 | ||||
Bond Withdrawal ... | 20744759 | 42 hrs ago | IN | 0 ETH | 0.00000253 | ||||
Bond Withdrawal ... | 20744342 | 42 hrs ago | IN | 0 ETH | 0.00000253 | ||||
Bond Withdrawal ... | 20713560 | 2 days ago | IN | 0 ETH | 0.00000253 | ||||
Bond Withdrawal ... | 20674537 | 4 days ago | IN | 0 ETH | 0.00000253 | ||||
Bond Withdrawal ... | 20672430 | 4 days ago | IN | 0 ETH | 0.00000256 | ||||
Bond Withdrawal ... | 20667329 | 4 days ago | IN | 0 ETH | 0.00000253 | ||||
Bond Withdrawal ... | 20661923 | 4 days ago | IN | 0 ETH | 0.00000253 | ||||
Bond Withdrawal ... | 20644072 | 5 days ago | IN | 0 ETH | 0.00000253 | ||||
Bond Withdrawal ... | 20638094 | 5 days ago | IN | 0 ETH | 0.00000278 | ||||
Bond Withdrawal ... | 20628441 | 6 days ago | IN | 0 ETH | 0.00000304 | ||||
Bond Withdrawal ... | 20618592 | 6 days ago | IN | 0 ETH | 0.00000253 | ||||
Bond Withdrawal ... | 20595533 | 7 days ago | IN | 0 ETH | 0.00000331 | ||||
Bond Withdrawal ... | 20559905 | 8 days ago | IN | 0 ETH | 0.00000253 | ||||
Bond Withdrawal ... | 20526350 | 10 days ago | IN | 0 ETH | 0.00000253 | ||||
Bond Withdrawal ... | 20521948 | 10 days ago | IN | 0 ETH | 0.00000258 | ||||
Bond Withdrawal ... | 20497534 | 11 days ago | IN | 0 ETH | 0.00000317 | ||||
Bond Withdrawal ... | 20493364 | 11 days ago | IN | 0 ETH | 0.00000827 | ||||
Bond Withdrawal ... | 20456217 | 12 days ago | IN | 0 ETH | 0.00000253 | ||||
Bond Withdrawal ... | 20416483 | 14 days ago | IN | 0 ETH | 0.00000629 | ||||
Bond Withdrawal ... | 20353750 | 16 days ago | IN | 0 ETH | 0.00000253 | ||||
Bond Withdrawal ... | 20320145 | 18 days ago | IN | 0 ETH | 0.00000309 | ||||
Bond Withdrawal ... | 20319451 | 18 days ago | IN | 0 ETH | 0.00000315 | ||||
Bond Withdrawal ... | 20318694 | 18 days ago | IN | 0 ETH | 0.00000335 | ||||
Bond Withdrawal ... | 20317084 | 18 days ago | IN | 0 ETH | 0.0000036 |
Loading...
Loading
Contract Name:
L2_PolygonzkBridge
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 50000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; pragma experimental ABIEncoderV2; import "./L2_Bridge.sol"; contract L2_PolygonzkBridge is L2_Bridge { // Name remains the same for offchain backwards compatibility, but should be renamed to connector in future deployments address public immutable messenger; constructor ( address _messenger, address l1Governance, HopBridgeToken hToken, address l1BridgeAddress, uint256[] memory activeChainIds, address[] memory bonders ) public L2_Bridge( l1Governance, hToken, l1BridgeAddress, activeChainIds, bonders ) { messenger = _messenger; } function _sendCrossDomainMessage(bytes memory message) internal override { (bool success,) = messenger.call(message); require(success, "L2_PLY_ZK_BRG: Call to messenger failed"); } function _verifySender(address expectedSender) internal override { require(msg.sender == expectedSender, "L2_PLY_ZK_BRG: Caller is not the expected sender"); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) return 0; uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: modulo by zero"); return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); return a - b; } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../../utils/Context.sol"; import "./IERC20.sol"; import "../../math/SafeMath.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for {name} and {symbol}, initializes {decimals} with * a default value of 18. * * To select a different value for {decimals}, use {_setupDecimals}. * * All three of these values are immutable: they can only be set once during * construction. */ constructor (string memory name_, string memory symbol_) public { _name = name_; _symbol = symbol_; _decimals = 18; } /** * @dev Returns the name of the token. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is * called. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual returns (uint8) { return _decimals; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */ function _setupDecimals(uint8 decimals_) internal virtual { _decimals = decimals_; } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./IERC20.sol"; import "../../math/SafeMath.sol"; import "../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN 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 payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor () internal { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; /** * @dev Accounting is an abstract contract that encapsulates the most critical logic in the Hop contracts. * The accounting system works by using two balances that can only increase `_credit` and `_debit`. * A bonder's available balance is the total credit minus the total debit. The contract exposes * two external functions that allows a bonder to stake and unstake and exposes two internal * functions to its child contracts that allow the child contract to add to the credit * and debit balance. In addition, child contracts can override `_additionalDebit` to account * for any additional debit balance in an alternative way. Lastly, it exposes a modifier, * `requirePositiveBalance`, that can be used by child contracts to ensure the bonder does not * use more than its available stake. */ abstract contract Accounting is ReentrancyGuard { using SafeMath for uint256; mapping(address => bool) private _isBonder; mapping(address => uint256) private _credit; mapping(address => uint256) private _debit; event Stake ( address indexed account, uint256 amount ); event Unstake ( address indexed account, uint256 amount ); event BonderAdded ( address indexed newBonder ); event BonderRemoved ( address indexed previousBonder ); /* ========== Modifiers ========== */ modifier onlyBonder { require(_isBonder[msg.sender], "ACT: Caller is not bonder"); _; } modifier onlyGovernance { _requireIsGovernance(); _; } /// @dev Used by parent contract to ensure that the Bonder is solvent at the end of the transaction. modifier requirePositiveBalance { _; require(getCredit(msg.sender) >= getDebitAndAdditionalDebit(msg.sender), "ACT: Not enough available credit"); } /// @dev Sets the Bonder addresses constructor(address[] memory bonders) public { for (uint256 i = 0; i < bonders.length; i++) { require(_isBonder[bonders[i]] == false, "ACT: Cannot add duplicate bonder"); _isBonder[bonders[i]] = true; emit BonderAdded(bonders[i]); } } /* ========== Virtual functions ========== */ /** * @dev The following functions are overridden in L1_Bridge and L2_Bridge */ function _transferFromBridge(address recipient, uint256 amount) internal virtual; function _transferToBridge(address from, uint256 amount) internal virtual; function _requireIsGovernance() internal virtual; /** * @dev This function can be optionally overridden by a parent contract to track any additional * debit balance in an alternative way. */ function _additionalDebit(address /*bonder*/) internal view virtual returns (uint256) { this; // Silence state mutability warning without generating any additional byte code return 0; } /* ========== Public/external getters ========== */ /** * @dev Check if address is a Bonder * @param maybeBonder The address being checked * @return true if address is a Bonder */ function getIsBonder(address maybeBonder) public view returns (bool) { return _isBonder[maybeBonder]; } /** * @dev Get the Bonder's credit balance * @param bonder The owner of the credit balance being checked * @return The credit balance for the Bonder */ function getCredit(address bonder) public view returns (uint256) { return _credit[bonder]; } /** * @dev Gets the debit balance tracked by `_debit` and does not include `_additionalDebit()` * @param bonder The owner of the debit balance being checked * @return The debit amount for the Bonder */ function getRawDebit(address bonder) external view returns (uint256) { return _debit[bonder]; } /** * @dev Get the Bonder's total debit * @param bonder The owner of the debit balance being checked * @return The Bonder's total debit balance */ function getDebitAndAdditionalDebit(address bonder) public view returns (uint256) { return _debit[bonder].add(_additionalDebit(bonder)); } /* ========== Bonder external functions ========== */ /** * @dev Allows the Bonder to deposit tokens and increase its credit balance * @param bonder The address being staked on * @param amount The amount being staked */ function stake(address bonder, uint256 amount) external payable nonReentrant { require(_isBonder[bonder] == true, "ACT: Address is not bonder"); _transferToBridge(msg.sender, amount); _addCredit(bonder, amount); emit Stake(bonder, amount); } /** * @dev Allows the caller to withdraw any available balance and add to their debit balance * @param amount The amount being unstaked */ function unstake(uint256 amount) external requirePositiveBalance nonReentrant { _addDebit(msg.sender, amount); _transferFromBridge(msg.sender, amount); emit Unstake(msg.sender, amount); } /** * @dev Add Bonder to allowlist * @param bonder The address being added as a Bonder */ function addBonder(address bonder) external onlyGovernance { require(_isBonder[bonder] == false, "ACT: Address is already bonder"); _isBonder[bonder] = true; emit BonderAdded(bonder); } /** * @dev Remove Bonder from allowlist * @param bonder The address being removed as a Bonder */ function removeBonder(address bonder) external onlyGovernance { require(_isBonder[bonder] == true, "ACT: Address is not bonder"); _isBonder[bonder] = false; emit BonderRemoved(bonder); } /* ========== Internal functions ========== */ function _addCredit(address bonder, uint256 amount) internal { _credit[bonder] = _credit[bonder].add(amount); } function _addDebit(address bonder, uint256 amount) internal { _debit[bonder] = _debit[bonder].add(amount); } }
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; pragma experimental ABIEncoderV2; import "./Accounting.sol"; import "../libraries/Lib_MerkleTree.sol"; /** * @dev Bridge extends the accounting system and encapsulates the logic that is shared by both the * L1 and L2 Bridges. It allows to TransferRoots to be set by parent contracts and for those * TransferRoots to be withdrawn against. It also allows the bonder to bond and withdraw Transfers * directly through `bondWithdrawal` and then settle those bonds against their TransferRoot once it * has been set. */ abstract contract Bridge is Accounting { using Lib_MerkleTree for bytes32; struct TransferRoot { uint256 total; uint256 amountWithdrawn; uint256 createdAt; } /* ========== Events ========== */ event Withdrew( bytes32 indexed transferId, address indexed recipient, uint256 amount, bytes32 transferNonce ); event WithdrawalBonded( bytes32 indexed transferId, uint256 amount ); event WithdrawalBondSettled( address indexed bonder, bytes32 indexed transferId, bytes32 indexed rootHash ); event MultipleWithdrawalsSettled( address indexed bonder, bytes32 indexed rootHash, uint256 totalBondsSettled ); event TransferRootSet( bytes32 indexed rootHash, uint256 totalAmount ); /* ========== State ========== */ mapping(bytes32 => TransferRoot) private _transferRoots; mapping(bytes32 => bool) private _spentTransferIds; mapping(address => mapping(bytes32 => uint256)) private _bondedWithdrawalAmounts; uint256 constant RESCUE_DELAY = 8 weeks; constructor(address[] memory bonders) public Accounting(bonders) {} /* ========== Public Getters ========== */ /** * @dev Get the hash that represents an individual Transfer. * @param chainId The id of the destination chain * @param recipient The address receiving the Transfer * @param amount The amount being transferred including the `_bonderFee` * @param transferNonce Used to avoid transferId collisions * @param bonderFee The amount paid to the address that withdraws the Transfer * @param amountOutMin The minimum amount received after attempting to swap in the destination * AMM market. 0 if no swap is intended. * @param deadline The deadline for swapping in the destination AMM market. 0 if no * swap is intended. */ function getTransferId( uint256 chainId, address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline ) public pure returns (bytes32) { return keccak256(abi.encode( chainId, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline )); } /** * @notice getChainId can be overridden by subclasses if needed for compatibility or testing purposes. * @dev Get the current chainId * @return chainId The current chainId */ function getChainId() public virtual view returns (uint256 chainId) { this; // Silence state mutability warning without generating any additional byte code assembly { chainId := chainid() } } /** * @dev Get the TransferRoot id for a given rootHash and totalAmount * @param rootHash The Merkle root of the TransferRoot * @param totalAmount The total of all Transfers in the TransferRoot * @return The calculated transferRootId */ function getTransferRootId(bytes32 rootHash, uint256 totalAmount) public pure returns (bytes32) { return keccak256(abi.encodePacked(rootHash, totalAmount)); } /** * @dev Get the TransferRoot for a given rootHash and totalAmount * @param rootHash The Merkle root of the TransferRoot * @param totalAmount The total of all Transfers in the TransferRoot * @return The TransferRoot with the calculated transferRootId */ function getTransferRoot(bytes32 rootHash, uint256 totalAmount) public view returns (TransferRoot memory) { return _transferRoots[getTransferRootId(rootHash, totalAmount)]; } /** * @dev Get the amount bonded for the withdrawal of a transfer * @param bonder The Bonder of the withdrawal * @param transferId The Transfer's unique identifier * @return The amount bonded for a Transfer withdrawal */ function getBondedWithdrawalAmount(address bonder, bytes32 transferId) external view returns (uint256) { return _bondedWithdrawalAmounts[bonder][transferId]; } /** * @dev Get the spent status of a transfer ID * @param transferId The transfer's unique identifier * @return True if the transferId has been spent */ function isTransferIdSpent(bytes32 transferId) external view returns (bool) { return _spentTransferIds[transferId]; } /* ========== User/Relayer External Functions ========== */ /** * @notice Can be called by anyone (recipient or relayer) * @dev Withdraw a Transfer from its destination bridge * @param recipient The address receiving the Transfer * @param amount The amount being transferred including the `_bonderFee` * @param transferNonce Used to avoid transferId collisions * @param bonderFee The amount paid to the address that withdraws the Transfer * @param amountOutMin The minimum amount received after attempting to swap in the destination * AMM market. 0 if no swap is intended. (only used to calculate `transferId` in this function) * @param deadline The deadline for swapping in the destination AMM market. 0 if no * swap is intended. (only used to calculate `transferId` in this function) * @param rootHash The Merkle root of the TransferRoot * @param transferRootTotalAmount The total amount being transferred in a TransferRoot * @param transferIdTreeIndex The index of the transferId in the Merkle tree * @param siblings The siblings of the transferId in the Merkle tree * @param totalLeaves The total number of leaves in the Merkle tree */ function withdraw( address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline, bytes32 rootHash, uint256 transferRootTotalAmount, uint256 transferIdTreeIndex, bytes32[] calldata siblings, uint256 totalLeaves ) external nonReentrant { bytes32 transferId = getTransferId( getChainId(), recipient, amount, transferNonce, bonderFee, amountOutMin, deadline ); require( rootHash.verify( transferId, transferIdTreeIndex, siblings, totalLeaves ) , "BRG: Invalid transfer proof"); bytes32 transferRootId = getTransferRootId(rootHash, transferRootTotalAmount); _addToAmountWithdrawn(transferRootId, amount); _fulfillWithdraw(transferId, recipient, amount, uint256(0)); emit Withdrew(transferId, recipient, amount, transferNonce); } /** * @dev Allows the bonder to bond individual withdrawals before their TransferRoot has been committed. * @param recipient The address receiving the Transfer * @param amount The amount being transferred including the `_bonderFee` * @param transferNonce Used to avoid transferId collisions * @param bonderFee The amount paid to the address that withdraws the Transfer */ function bondWithdrawal( address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee ) external onlyBonder requirePositiveBalance nonReentrant { bytes32 transferId = getTransferId( getChainId(), recipient, amount, transferNonce, bonderFee, 0, 0 ); _bondWithdrawal(transferId, amount); _fulfillWithdraw(transferId, recipient, amount, bonderFee); } /** * @dev Refunds the Bonder's stake from a bonded withdrawal and counts that withdrawal against * its TransferRoot. * @param bonder The Bonder of the withdrawal * @param transferId The Transfer's unique identifier * @param rootHash The Merkle root of the TransferRoot * @param transferRootTotalAmount The total amount being transferred in a TransferRoot * @param transferIdTreeIndex The index of the transferId in the Merkle tree * @param siblings The siblings of the transferId in the Merkle tree * @param totalLeaves The total number of leaves in the Merkle tree */ function settleBondedWithdrawal( address bonder, bytes32 transferId, bytes32 rootHash, uint256 transferRootTotalAmount, uint256 transferIdTreeIndex, bytes32[] calldata siblings, uint256 totalLeaves ) external { require( rootHash.verify( transferId, transferIdTreeIndex, siblings, totalLeaves ) , "BRG: Invalid transfer proof"); bytes32 transferRootId = getTransferRootId(rootHash, transferRootTotalAmount); uint256 amount = _bondedWithdrawalAmounts[bonder][transferId]; require(amount > 0, "L2_BRG: transferId has no bond"); _bondedWithdrawalAmounts[bonder][transferId] = 0; _addToAmountWithdrawn(transferRootId, amount); _addCredit(bonder, amount); emit WithdrawalBondSettled(bonder, transferId, rootHash); } /** * @dev Refunds the Bonder for all withdrawals that they bonded in a TransferRoot. * @param bonder The address of the Bonder being refunded * @param transferIds All transferIds in the TransferRoot in order * @param totalAmount The totalAmount of the TransferRoot */ function settleBondedWithdrawals( address bonder, // transferIds _must_ be calldata or it will be mutated by Lib_MerkleTree.getMerkleRoot bytes32[] calldata transferIds, uint256 totalAmount ) external { bytes32 rootHash = Lib_MerkleTree.getMerkleRoot(transferIds); bytes32 transferRootId = getTransferRootId(rootHash, totalAmount); uint256 totalBondsSettled = 0; for(uint256 i = 0; i < transferIds.length; i++) { uint256 transferBondAmount = _bondedWithdrawalAmounts[bonder][transferIds[i]]; if (transferBondAmount > 0) { totalBondsSettled = totalBondsSettled.add(transferBondAmount); _bondedWithdrawalAmounts[bonder][transferIds[i]] = 0; } } _addToAmountWithdrawn(transferRootId, totalBondsSettled); _addCredit(bonder, totalBondsSettled); emit MultipleWithdrawalsSettled(bonder, rootHash, totalBondsSettled); } /* ========== External TransferRoot Rescue ========== */ /** * @dev Allows governance to withdraw the remaining amount from a TransferRoot after the rescue delay has passed. * @param rootHash the Merkle root of the TransferRoot * @param originalAmount The TransferRoot's recorded total * @param recipient The address receiving the remaining balance */ function rescueTransferRoot(bytes32 rootHash, uint256 originalAmount, address recipient) external onlyGovernance { bytes32 transferRootId = getTransferRootId(rootHash, originalAmount); TransferRoot memory transferRoot = getTransferRoot(rootHash, originalAmount); require(transferRoot.createdAt != 0, "BRG: TransferRoot not found"); assert(transferRoot.total == originalAmount); uint256 rescueDelayEnd = transferRoot.createdAt.add(RESCUE_DELAY); require(block.timestamp >= rescueDelayEnd, "BRG: TransferRoot cannot be rescued before the Rescue Delay"); uint256 remainingAmount = transferRoot.total.sub(transferRoot.amountWithdrawn); _addToAmountWithdrawn(transferRootId, remainingAmount); _transferFromBridge(recipient, remainingAmount); } /* ========== Internal Functions ========== */ function _markTransferSpent(bytes32 transferId) internal { require(!_spentTransferIds[transferId], "BRG: The transfer has already been withdrawn"); _spentTransferIds[transferId] = true; } function _addToAmountWithdrawn(bytes32 transferRootId, uint256 amount) internal { TransferRoot storage transferRoot = _transferRoots[transferRootId]; require(transferRoot.total > 0, "BRG: Transfer root not found"); uint256 newAmountWithdrawn = transferRoot.amountWithdrawn.add(amount); require(newAmountWithdrawn <= transferRoot.total, "BRG: Withdrawal exceeds TransferRoot total"); transferRoot.amountWithdrawn = newAmountWithdrawn; } function _setTransferRoot(bytes32 rootHash, uint256 totalAmount) internal { bytes32 transferRootId = getTransferRootId(rootHash, totalAmount); require(_transferRoots[transferRootId].total == 0, "BRG: Transfer root already set"); require(totalAmount > 0, "BRG: Cannot set TransferRoot totalAmount of 0"); _transferRoots[transferRootId] = TransferRoot(totalAmount, 0, block.timestamp); emit TransferRootSet(rootHash, totalAmount); } function _bondWithdrawal(bytes32 transferId, uint256 amount) internal { require(_bondedWithdrawalAmounts[msg.sender][transferId] == 0, "BRG: Withdrawal has already been bonded"); _addDebit(msg.sender, amount); _bondedWithdrawalAmounts[msg.sender][transferId] = amount; emit WithdrawalBonded(transferId, amount); } /* ========== Private Functions ========== */ /// @dev Completes the Transfer, distributes the Bonder fee and marks the Transfer as spent. function _fulfillWithdraw( bytes32 transferId, address recipient, uint256 amount, uint256 bonderFee ) private { _markTransferSpent(transferId); _transferFromBridge(recipient, amount.sub(bonderFee)); if (bonderFee > 0) { _transferFromBridge(msg.sender, bonderFee); } } }
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; /** * @dev Hop Bridge Tokens or "hTokens" are layer-2 tokens that represent a deposit in the L1_Bridge * contract. Each Hop Bridge Token is a regular ERC20 that can be minted and burned by the L2_Bridge * that owns it. */ contract HopBridgeToken is ERC20, Ownable { constructor ( string memory name, string memory symbol, uint8 decimals ) public ERC20(name, symbol) { _setupDecimals(decimals); } /** * @dev Mint new hToken for the account * @param account The account being minted for * @param amount The amount being minted */ function mint(address account, uint256 amount) external onlyOwner { _mint(account, amount); } /** * @dev Burn hToken from the account * @param account The account being burned from * @param amount The amount being burned */ function burn(address account, uint256 amount) external onlyOwner { _burn(account, amount); } }
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "./Bridge.sol"; import "./HopBridgeToken.sol"; import "../libraries/Lib_MerkleTree.sol"; interface I_L2_AmmWrapper { function attemptSwap(address recipient, uint256 amount, uint256 amountOutMin, uint256 deadline) external; } /** * @dev The L2_Bridge is responsible for aggregating pending Transfers into TransferRoots. Each newly * createdTransferRoot is then sent to the L1_Bridge. The L1_Bridge may be the TransferRoot's final * destination or the L1_Bridge may forward the TransferRoot to it's destination L2_Bridge. */ abstract contract L2_Bridge is Bridge { using SafeERC20 for IERC20; address public l1Governance; HopBridgeToken public immutable hToken; address public l1BridgeAddress; address public l1BridgeCaller; I_L2_AmmWrapper public ammWrapper; mapping(uint256 => bool) public activeChainIds; uint256 public minimumForceCommitDelay = 4 hours; uint256 public maxPendingTransfers = 1024; uint256 public minBonderBps = 2; uint256 public minBonderFeeAbsolute = 0; mapping(uint256 => bytes32[]) public pendingTransferIdsForChainId; mapping(uint256 => uint256) public pendingAmountForChainId; mapping(uint256 => uint256) public lastCommitTimeForChainId; uint256 public transferNonceIncrementer; bytes32 private immutable NONCE_DOMAIN_SEPARATOR; event TransfersCommitted ( uint256 indexed destinationChainId, bytes32 indexed rootHash, uint256 totalAmount, uint256 rootCommittedAt ); event TransferSent ( bytes32 indexed transferId, uint256 indexed chainId, address indexed recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 index, uint256 amountOutMin, uint256 deadline ); event TransferFromL1Completed ( address indexed recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address indexed relayer, uint256 relayerFee ); modifier onlyL1Bridge { _verifySender(l1BridgeCaller); _; } constructor ( address _l1Governance, HopBridgeToken _hToken, address _l1BridgeAddress, uint256[] memory _activeChainIds, address[] memory bonders ) public Bridge(bonders) { l1Governance = _l1Governance; hToken = _hToken; l1BridgeAddress = _l1BridgeAddress; for (uint256 i = 0; i < _activeChainIds.length; i++) { activeChainIds[_activeChainIds[i]] = true; } NONCE_DOMAIN_SEPARATOR = keccak256("L2_Bridge v1.0"); } /* ========== Virtual functions ========== */ function _sendCrossDomainMessage(bytes memory message) internal virtual; function _verifySender(address expectedSender) internal virtual; /* ========== Public/External functions ========== */ /** * @notice _amount is the total amount the user wants to send including the Bonder fee * @dev Send hTokens to another supported layer-2 or to layer-1 to be redeemed for the underlying asset. * @param chainId The chainId of the destination chain * @param recipient The address receiving funds at the destination * @param amount The amount being sent * @param bonderFee The amount distributed to the Bonder at the destination. This is subtracted from the `amount`. * @param amountOutMin The minimum amount received after attempting to swap in the destination * AMM market. 0 if no swap is intended. * @param deadline The deadline for swapping in the destination AMM market. 0 if no * swap is intended. */ function send( uint256 chainId, address recipient, uint256 amount, uint256 bonderFee, uint256 amountOutMin, uint256 deadline ) external { require(amount > 0, "L2_BRG: Must transfer a non-zero amount"); require(amount >= bonderFee, "L2_BRG: Bonder fee cannot exceed amount"); require(activeChainIds[chainId], "L2_BRG: chainId is not supported"); uint256 minBonderFeeRelative = amount.mul(minBonderBps).div(10000); // Get the max of minBonderFeeRelative and minBonderFeeAbsolute uint256 minBonderFee = minBonderFeeRelative > minBonderFeeAbsolute ? minBonderFeeRelative : minBonderFeeAbsolute; require(bonderFee >= minBonderFee, "L2_BRG: bonderFee must meet minimum requirements"); bytes32[] storage pendingTransfers = pendingTransferIdsForChainId[chainId]; if (pendingTransfers.length >= maxPendingTransfers) { _commitTransfers(chainId); } hToken.burn(msg.sender, amount); bytes32 transferNonce = getNextTransferNonce(); transferNonceIncrementer++; bytes32 transferId = getTransferId( chainId, recipient, amount, transferNonce, bonderFee, amountOutMin, deadline ); uint256 transferIndex = pendingTransfers.length; pendingTransfers.push(transferId); pendingAmountForChainId[chainId] = pendingAmountForChainId[chainId].add(amount); emit TransferSent( transferId, chainId, recipient, amount, transferNonce, bonderFee, transferIndex, amountOutMin, deadline ); } /** * @dev Aggregates all pending Transfers to the `destinationChainId` and sends them to the * L1_Bridge as a TransferRoot. * @param destinationChainId The chainId of the TransferRoot's destination chain */ function commitTransfers(uint256 destinationChainId) external { uint256 minForceCommitTime = lastCommitTimeForChainId[destinationChainId].add(minimumForceCommitDelay); require(minForceCommitTime < block.timestamp || getIsBonder(msg.sender), "L2_BRG: Only Bonder can commit before min delay"); lastCommitTimeForChainId[destinationChainId] = block.timestamp; _commitTransfers(destinationChainId); } /** * @dev Mints new hTokens for the recipient and optionally swaps them in the AMM market. * @param recipient The address receiving funds * @param amount The amount being distributed * @param amountOutMin The minimum amount received after attempting to swap in the destination * AMM market. 0 if no swap is intended. * @param deadline The deadline for swapping in the AMM market. 0 if no * swap is intended. * @param relayer The address of the relayer. * @param relayerFee The amount distributed to the relayer. This is subtracted from the `amount`. */ function distribute( address recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address relayer, uint256 relayerFee ) external onlyL1Bridge nonReentrant { _distribute(recipient, amount, amountOutMin, deadline, relayer, relayerFee); emit TransferFromL1Completed( recipient, amount, amountOutMin, deadline, relayer, relayerFee ); } /** * @dev Allows the Bonder to bond an individual withdrawal and swap it in the AMM for the * canonical token on behalf of the user. * @param recipient The address receiving the Transfer * @param amount The amount being transferred including the `_bonderFee` * @param transferNonce Used to avoid transferId collisions * @param bonderFee The amount paid to the address that withdraws the Transfer * @param amountOutMin The minimum amount received after attempting to swap in the * AMM market. 0 if no swap is intended. * @param deadline The deadline for swapping in the AMM market. 0 if no * swap is intended. */ function bondWithdrawalAndDistribute( address recipient, uint256 amount, bytes32 transferNonce, uint256 bonderFee, uint256 amountOutMin, uint256 deadline ) external onlyBonder requirePositiveBalance nonReentrant { bytes32 transferId = getTransferId( getChainId(), recipient, amount, transferNonce, bonderFee, amountOutMin, deadline ); _bondWithdrawal(transferId, amount); _markTransferSpent(transferId); _distribute(recipient, amount, amountOutMin, deadline, msg.sender, bonderFee); } /** * @dev Allows the L1 Bridge to set a TransferRoot * @param rootHash The Merkle root of the TransferRoot * @param totalAmount The total amount being transferred in the TransferRoot */ function setTransferRoot(bytes32 rootHash, uint256 totalAmount) external onlyL1Bridge { _setTransferRoot(rootHash, totalAmount); } /* ========== Helper Functions ========== */ function _commitTransfers(uint256 destinationChainId) internal { bytes32[] storage pendingTransfers = pendingTransferIdsForChainId[destinationChainId]; require(pendingTransfers.length > 0, "L2_BRG: Must commit at least 1 Transfer"); bytes32 rootHash = Lib_MerkleTree.getMerkleRoot(pendingTransfers); uint256 totalAmount = pendingAmountForChainId[destinationChainId]; uint256 rootCommittedAt = block.timestamp; emit TransfersCommitted(destinationChainId, rootHash, totalAmount, rootCommittedAt); bytes memory confirmTransferRootMessage = abi.encodeWithSignature( "confirmTransferRoot(uint256,bytes32,uint256,uint256,uint256)", getChainId(), rootHash, destinationChainId, totalAmount, rootCommittedAt ); pendingAmountForChainId[destinationChainId] = 0; delete pendingTransferIdsForChainId[destinationChainId]; _sendCrossDomainMessage(confirmTransferRootMessage); } function _distribute( address recipient, uint256 amount, uint256 amountOutMin, uint256 deadline, address feeRecipient, uint256 fee ) internal { if (fee > 0) { hToken.mint(feeRecipient, fee); } uint256 amountAfterFee = amount.sub(fee); if ( (amountOutMin == 0 && deadline == 0) || address(ammWrapper) == address(0) ) { hToken.mint(recipient, amountAfterFee); } else { hToken.mint(address(this), amountAfterFee); hToken.approve(address(ammWrapper), amountAfterFee); ammWrapper.attemptSwap(recipient, amountAfterFee, amountOutMin, deadline); } } /* ========== Override Functions ========== */ function _transferFromBridge(address recipient, uint256 amount) internal override { hToken.mint(recipient, amount); } function _transferToBridge(address from, uint256 amount) internal override { hToken.burn(from, amount); } function _requireIsGovernance() internal override { _verifySender(l1Governance); } /* ========== External Config Management Functions ========== */ function setL1Governance(address _l1Governance) external onlyGovernance { l1Governance = _l1Governance; } function setAmmWrapper(I_L2_AmmWrapper _ammWrapper) external onlyGovernance { ammWrapper = _ammWrapper; } function setL1BridgeAddress(address _l1BridgeAddress) external onlyGovernance { l1BridgeAddress = _l1BridgeAddress; } function setL1BridgeCaller(address _l1BridgeCaller) external onlyGovernance { l1BridgeCaller = _l1BridgeCaller; } function addActiveChainIds(uint256[] calldata chainIds) external onlyGovernance { for (uint256 i = 0; i < chainIds.length; i++) { activeChainIds[chainIds[i]] = true; } } function removeActiveChainIds(uint256[] calldata chainIds) external onlyGovernance { for (uint256 i = 0; i < chainIds.length; i++) { activeChainIds[chainIds[i]] = false; } } function setMinimumForceCommitDelay(uint256 _minimumForceCommitDelay) external onlyGovernance { minimumForceCommitDelay = _minimumForceCommitDelay; } function setMaxPendingTransfers(uint256 _maxPendingTransfers) external onlyGovernance { maxPendingTransfers = _maxPendingTransfers; } function setHopBridgeTokenOwner(address newOwner) external onlyGovernance { hToken.transferOwnership(newOwner); } function setMinimumBonderFeeRequirements(uint256 _minBonderBps, uint256 _minBonderFeeAbsolute) external onlyGovernance { require(_minBonderBps <= 10000, "L2_BRG: minBonderBps must not exceed 10000"); minBonderBps = _minBonderBps; minBonderFeeAbsolute = _minBonderFeeAbsolute; } /* ========== Public Getters ========== */ function getNextTransferNonce() public view returns (bytes32) { return keccak256(abi.encodePacked(NONCE_DOMAIN_SEPARATOR, getChainId(), transferNonceIncrementer)); } }
// SPDX-License-Identifier: MIT pragma solidity >0.5.0 <0.8.0; /** * @title Lib_MerkleTree * @author River Keefer */ library Lib_MerkleTree { /********************** * Internal Functions * **********************/ /** * Calculates a merkle root for a list of 32-byte leaf hashes. WARNING: If the number * of leaves passed in is not a power of two, it pads out the tree with zero hashes. * If you do not know the original length of elements for the tree you are verifying, * then this may allow empty leaves past _elements.length to pass a verification check down the line. * Note that the _elements argument is modified, therefore it must not be used again afterwards * @param _elements Array of hashes from which to generate a merkle root. * @return Merkle root of the leaves, with zero hashes for non-powers-of-two (see above). */ function getMerkleRoot( bytes32[] memory _elements ) internal pure returns ( bytes32 ) { require( _elements.length > 0, "Lib_MerkleTree: Must provide at least one leaf hash." ); if (_elements.length == 1) { return _elements[0]; } uint256[16] memory defaults = [ 0x290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563, 0x633dc4d7da7256660a892f8f1604a44b5432649cc8ec5cb3ced4c4e6ac94dd1d, 0x890740a8eb06ce9be422cb8da5cdafc2b58c0a5e24036c578de2a433c828ff7d, 0x3b8ec09e026fdc305365dfc94e189a81b38c7597b3d941c279f042e8206e0bd8, 0xecd50eee38e386bd62be9bedb990706951b65fe053bd9d8a521af753d139e2da, 0xdefff6d330bb5403f63b14f33b578274160de3a50df4efecf0e0db73bcdd3da5, 0x617bdd11f7c0a11f49db22f629387a12da7596f9d1704d7465177c63d88ec7d7, 0x292c23a9aa1d8bea7e2435e555a4a60e379a5a35f3f452bae60121073fb6eead, 0xe1cea92ed99acdcb045a6726b2f87107e8a61620a232cf4d7d5b5766b3952e10, 0x7ad66c0a68c72cb89e4fb4303841966e4062a76ab97451e3b9fb526a5ceb7f82, 0xe026cc5a4aed3c22a58cbd3d2ac754c9352c5436f638042dca99034e83636516, 0x3d04cffd8b46a874edf5cfae63077de85f849a660426697b06a829c70dd1409c, 0xad676aa337a485e4728a0b240d92b3ef7b3c372d06d189322bfd5f61f1e7203e, 0xa2fca4a49658f9fab7aa63289c91b7c7b6c832a6d0e69334ff5b0a3483d09dab, 0x4ebfd9cd7bca2505f7bef59cc1c12ecc708fff26ae4af19abe852afe9e20c862, 0x2def10d13dd169f550f578bda343d9717a138562e0093b380a1120789d53cf10 ]; // Reserve memory space for our hashes. bytes memory buf = new bytes(64); // We'll need to keep track of left and right siblings. bytes32 leftSibling; bytes32 rightSibling; // Number of non-empty nodes at the current depth. uint256 rowSize = _elements.length; // Current depth, counting from 0 at the leaves uint256 depth = 0; // Common sub-expressions uint256 halfRowSize; // rowSize / 2 bool rowSizeIsOdd; // rowSize % 2 == 1 while (rowSize > 1) { halfRowSize = rowSize / 2; rowSizeIsOdd = rowSize % 2 == 1; for (uint256 i = 0; i < halfRowSize; i++) { leftSibling = _elements[(2 * i) ]; rightSibling = _elements[(2 * i) + 1]; assembly { mstore(add(buf, 32), leftSibling ) mstore(add(buf, 64), rightSibling) } _elements[i] = keccak256(buf); } if (rowSizeIsOdd) { leftSibling = _elements[rowSize - 1]; rightSibling = bytes32(defaults[depth]); assembly { mstore(add(buf, 32), leftSibling) mstore(add(buf, 64), rightSibling) } _elements[halfRowSize] = keccak256(buf); } rowSize = halfRowSize + (rowSizeIsOdd ? 1 : 0); depth++; } return _elements[0]; } /** * Verifies a merkle branch for the given leaf hash. Assumes the original length * of leaves generated is a known, correct input, and does not return true for indices * extending past that index (even if _siblings would be otherwise valid.) * @param _root The Merkle root to verify against. * @param _leaf The leaf hash to verify inclusion of. * @param _index The index in the tree of this leaf. * @param _siblings Array of sibline nodes in the inclusion proof, starting from depth 0 (bottom of the tree). * @param _totalLeaves The total number of leaves originally passed into. * @return Whether or not the merkle branch and leaf passes verification. */ function verify( bytes32 _root, bytes32 _leaf, uint256 _index, bytes32[] memory _siblings, uint256 _totalLeaves ) internal pure returns ( bool ) { require( _totalLeaves > 0, "Lib_MerkleTree: Total leaves must be greater than zero." ); require( _index < _totalLeaves, "Lib_MerkleTree: Index out of bounds." ); require( _siblings.length == _ceilLog2(_totalLeaves), "Lib_MerkleTree: Total siblings does not correctly correspond to total leaves." ); bytes32 computedRoot = _leaf; for (uint256 i = 0; i < _siblings.length; i++) { if ((_index & 1) == 1) { computedRoot = keccak256( abi.encodePacked( _siblings[i], computedRoot ) ); } else { computedRoot = keccak256( abi.encodePacked( computedRoot, _siblings[i] ) ); } _index >>= 1; } return _root == computedRoot; } /********************* * Private Functions * *********************/ /** * Calculates the integer ceiling of the log base 2 of an input. * @param _in Unsigned input to calculate the log. * @return ceil(log_base_2(_in)) */ function _ceilLog2( uint256 _in ) private pure returns ( uint256 ) { require( _in > 0, "Lib_MerkleTree: Cannot compute ceil(log_2) of 0." ); if (_in == 1) { return 0; } // Find the highest set bit (will be floor(log_2)). // Borrowed with <3 from https://github.com/ethereum/solidity-examples uint256 val = _in; uint256 highest = 0; for (uint256 i = 128; i >= 1; i >>= 1) { if (val & (uint(1) << i) - 1 << i != 0) { highest += i; val >>= i; } } // Increment by one if this is not a perfect logarithm. if ((uint(1) << highest) != _in) { highest += 1; } return highest; } }
{ "optimizer": { "enabled": true, "runs": 50000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_messenger","type":"address"},{"internalType":"address","name":"l1Governance","type":"address"},{"internalType":"contract HopBridgeToken","name":"hToken","type":"address"},{"internalType":"address","name":"l1BridgeAddress","type":"address"},{"internalType":"uint256[]","name":"activeChainIds","type":"uint256[]"},{"internalType":"address[]","name":"bonders","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newBonder","type":"address"}],"name":"BonderAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousBonder","type":"address"}],"name":"BonderRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"bonder","type":"address"},{"indexed":true,"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"totalBondsSettled","type":"uint256"}],"name":"MultipleWithdrawalsSettled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Stake","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"deadline","type":"uint256"},{"indexed":true,"internalType":"address","name":"relayer","type":"address"},{"indexed":false,"internalType":"uint256","name":"relayerFee","type":"uint256"}],"name":"TransferFromL1Completed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"TransferRootSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"transferId","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"chainId","type":"uint256"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"transferNonce","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"bonderFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"TransferSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"totalAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rootCommittedAt","type":"uint256"}],"name":"TransfersCommitted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Unstake","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"bonder","type":"address"},{"indexed":true,"internalType":"bytes32","name":"transferId","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"rootHash","type":"bytes32"}],"name":"WithdrawalBondSettled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"transferId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawalBonded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"transferId","type":"bytes32"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"transferNonce","type":"bytes32"}],"name":"Withdrew","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"activeChainIds","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"chainIds","type":"uint256[]"}],"name":"addActiveChainIds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"}],"name":"addBonder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ammWrapper","outputs":[{"internalType":"contract I_L2_AmmWrapper","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"transferNonce","type":"bytes32"},{"internalType":"uint256","name":"bonderFee","type":"uint256"}],"name":"bondWithdrawal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"transferNonce","type":"bytes32"},{"internalType":"uint256","name":"bonderFee","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"bondWithdrawalAndDistribute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"destinationChainId","type":"uint256"}],"name":"commitTransfers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"address","name":"relayer","type":"address"},{"internalType":"uint256","name":"relayerFee","type":"uint256"}],"name":"distribute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"},{"internalType":"bytes32","name":"transferId","type":"bytes32"}],"name":"getBondedWithdrawalAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"chainId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"}],"name":"getCredit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"}],"name":"getDebitAndAdditionalDebit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"maybeBonder","type":"address"}],"name":"getIsBonder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNextTransferNonce","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"}],"name":"getRawDebit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"transferNonce","type":"bytes32"},{"internalType":"uint256","name":"bonderFee","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"getTransferId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"getTransferRoot","outputs":[{"components":[{"internalType":"uint256","name":"total","type":"uint256"},{"internalType":"uint256","name":"amountWithdrawn","type":"uint256"},{"internalType":"uint256","name":"createdAt","type":"uint256"}],"internalType":"struct Bridge.TransferRoot","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"getTransferRootId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"hToken","outputs":[{"internalType":"contract HopBridgeToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"transferId","type":"bytes32"}],"name":"isTransferIdSpent","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"l1BridgeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"l1BridgeCaller","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"l1Governance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"lastCommitTimeForChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPendingTransfers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"messenger","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minBonderBps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minBonderFeeAbsolute","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimumForceCommitDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"pendingAmountForChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"pendingTransferIdsForChainId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"chainIds","type":"uint256[]"}],"name":"removeActiveChainIds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"}],"name":"removeBonder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"originalAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"rescueTransferRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"bonderFee","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"send","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract I_L2_AmmWrapper","name":"_ammWrapper","type":"address"}],"name":"setAmmWrapper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"setHopBridgeTokenOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_l1BridgeAddress","type":"address"}],"name":"setL1BridgeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_l1BridgeCaller","type":"address"}],"name":"setL1BridgeCaller","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_l1Governance","type":"address"}],"name":"setL1Governance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxPendingTransfers","type":"uint256"}],"name":"setMaxPendingTransfers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minBonderBps","type":"uint256"},{"internalType":"uint256","name":"_minBonderFeeAbsolute","type":"uint256"}],"name":"setMinimumBonderFeeRequirements","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minimumForceCommitDelay","type":"uint256"}],"name":"setMinimumForceCommitDelay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"setTransferRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"},{"internalType":"bytes32","name":"transferId","type":"bytes32"},{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"transferRootTotalAmount","type":"uint256"},{"internalType":"uint256","name":"transferIdTreeIndex","type":"uint256"},{"internalType":"bytes32[]","name":"siblings","type":"bytes32[]"},{"internalType":"uint256","name":"totalLeaves","type":"uint256"}],"name":"settleBondedWithdrawal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"},{"internalType":"bytes32[]","name":"transferIds","type":"bytes32[]"},{"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"settleBondedWithdrawals","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bonder","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"transferNonceIncrementer","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"transferNonce","type":"bytes32"},{"internalType":"uint256","name":"bonderFee","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"transferRootTotalAmount","type":"uint256"},{"internalType":"uint256","name":"transferIdTreeIndex","type":"uint256"},{"internalType":"bytes32[]","name":"siblings","type":"bytes32[]"},{"internalType":"uint256","name":"totalLeaves","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60e0604052613840600c55610400600d556002600e556000600f553480156200002757600080fd5b5060405162004859380380620048598339810160408190526200004a91620002cc565b84848484848080600160008190555060005b81518110156200016b57600160008383815181106200007757fe5b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff1615620000c75760405162461bcd60e51b8152600401620000be90620003e7565b60405180910390fd5b6001806000848481518110620000d957fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055508181815181106200012557fe5b60200260200101516001600160a01b03167f2cec73b7434d3b91198ad1a618f63e6a0761ce281af5ec9ec76606d948d03e2360405160405180910390a26001016200005c565b5050600780546001600160a01b038089166001600160a01b0319928316179092556001600160601b0319606088901b1660805260088054928716929091169190911790555060005b825181101562000202576001600b6000858481518110620001d057fe5b6020908102919091018101518252810191909152604001600020805460ff1916911515919091179055600101620001b3565b50507fcd24e8e9844849186ed93126ac365bc3a49362579aee585431811ea50bd1694c60a052505050505060609490941b6001600160601b03191660c052506200047c92505050565b600082601f8301126200025c578081fd5b8151620002736200026d8262000443565b6200041c565b8181529150602080830190848101818402860182018710156200029557600080fd5b60005b84811015620002c1578151620002ae8162000463565b8452928201929082019060010162000298565b505050505092915050565b60008060008060008060c08789031215620002e5578182fd5b8651620002f28162000463565b80965050602080880151620003078162000463565b60408901519096506200031a8162000463565b60608901519095506200032d8162000463565b60808901519094506001600160401b03808211156200034a578485fd5b818a0191508a601f8301126200035e578485fd5b81516200036f6200026d8262000443565b81815284810190848601868402860187018f10156200038c578889fd5b8895505b83861015620003b057805183526001959095019491860191860162000390565b5060a08d01519097509450505080831115620003ca578384fd5b5050620003da89828a016200024b565b9150509295509295509295565b6020808252818101527f4143543a2043616e6e6f7420616464206475706c696361746520626f6e646572604082015260600190565b6040518181016001600160401b03811182821017156200043b57600080fd5b604052919050565b60006001600160401b0382111562000459578081fd5b5060209081020190565b6001600160a01b03811681146200047957600080fd5b50565b60805160601c60a05160c05160601c61437d620004dc60003980610edc52806131b25250806109ff5250806111ff52806114eb5280611efe5280612331528061265b528061274252806127ed52806128945280612a95525061437d6000f3fe6080604052600436106103295760003560e01c80639bf43028116101a5578063cbd1642e116100ec578063e1825d0611610095578063f8398fa41161006f578063f8398fa41461089c578063fc6e3b3b146108bc578063fd31c5ba146108d1578063ffa9286c146108f157610329565b8063e1825d0614610847578063e40272d714610867578063e9cdfe511461088757610329565b8063d2442783116100c6578063d2442783146107f2578063d4e54c4714610807578063d5ef75511461082757610329565b8063cbd1642e14610785578063cc29a306146107a5578063ce803b4f146107c557610329565b8063af33ae691161014e578063c303526111610128578063c303526114610730578063c7525dd314610745578063c97d172e1461076557610329565b8063af33ae69146106db578063b162717e146106fb578063bed93c841461071b57610329565b8063a9fa4ed51161017f578063a9fa4ed514610688578063adc9772e146106a8578063af215f94146106bb57610329565b80639bf43028146106285780639f600a0b14610648578063a6bd1b331461066857610329565b80633cb747bf116102745780635ab2a5581161021d57806382c69f9d116101f757806382c69f9d146105be5780638f658198146105d3578063960a7afa146105e857806398445caf1461060857610329565b80635ab2a5581461056957806364c6fdb41461057e5780638295f2581461059e57610329565b80634742bbfb1161024e5780634742bbfb146105095780635325937f1461052957806357344e6f1461054957610329565b80633cb747bf146104b25780633d12a85a146104d45780633ef23f7f146104f457610329565b80632e17de78116102d65780633408e470116102b05780633408e4701461045b57806335e2c4af146104705780633a7af6311461048557610329565b80632e17de78146103fb578063302830ab1461041b57806332b949a21461043b57610329565b80630f7aadb7116103075780630f7aadb71461039b57806313948c76146103bb57806323c452cd146103db57610329565b806304e6c2c01461032e578063051e7216146103505780630f5e09e71461037b575b600080fd5b34801561033a57600080fd5b5061034e610349366004613332565b610911565b005b34801561035c57600080fd5b506103656109fb565b6040516103729190613844565b60405180910390f35b34801561038757600080fd5b5061036561039636600461364a565b610a56565b3480156103a757600080fd5b5061034e6103b63660046134da565b610a68565b3480156103c757600080fd5b506103656103d6366004613332565b610bc9565b3480156103e757600080fd5b5061034e6103f6366004613455565b610bf5565b34801561040757600080fd5b5061034e61041636600461364a565b610d07565b34801561042757600080fd5b506103656104363660046133a8565b610dfd565b34801561044757600080fd5b5061034e61045636600461364a565b610e35565b34801561046757600080fd5b50610365610ebb565b34801561047c57600080fd5b50610365610ebf565b34801561049157600080fd5b506104a56104a036600461364a565b610ec5565b6040516103729190613839565b3480156104be57600080fd5b506104c7610eda565b60405161037291906137bf565b3480156104e057600080fd5b5061034e6104ef36600461348f565b610efe565b34801561050057600080fd5b506104c761101c565b34801561051557600080fd5b5061034e61052436600461364a565b611038565b34801561053557600080fd5b5061034e610544366004613332565b611045565b34801561055557600080fd5b50610365610564366004613332565b611127565b34801561057557600080fd5b506104c761114f565b34801561058a57600080fd5b5061034e610599366004613332565b61116b565b3480156105aa57600080fd5b5061034e6105b9366004613332565b6111ba565b3480156105ca57600080fd5b50610365611269565b3480156105df57600080fd5b5061036561126f565b3480156105f457600080fd5b50610365610603366004613662565b611275565b34801561061457600080fd5b50610365610623366004613662565b6112a8565b34801561063457600080fd5b5061034e61064336600461364a565b6112d6565b34801561065457600080fd5b5061034e6106633660046135ea565b6112e3565b34801561067457600080fd5b5061034e610683366004613713565b61135b565b34801561069457600080fd5b5061034e6106a3366004613662565b61162a565b61034e6106b63660046133a8565b611679565b3480156106c757600080fd5b506103656106d63660046136bb565b61178a565b3480156106e757600080fd5b5061034e6106f6366004613332565b6117cc565b34801561070757600080fd5b5061034e61071636600461334e565b61181b565b34801561072757600080fd5b50610365611998565b34801561073c57600080fd5b5061036561199e565b34801561075157600080fd5b5061034e6107603660046133d3565b6119a4565b34801561077157600080fd5b506104a561078036600461364a565b611b2b565b34801561079157600080fd5b5061034e6107a0366004613683565b611b40565b3480156107b157600080fd5b5061034e6107c036600461358d565b611c37565b3480156107d157600080fd5b506107e56107e0366004613662565b611d21565b6040516103729190614258565b3480156107fe57600080fd5b506104c7611d76565b34801561081357600080fd5b5061036561082236600461364a565b611d92565b34801561083357600080fd5b506104a5610842366004613332565b611da4565b34801561085357600080fd5b5061034e610862366004613332565b611dcf565b34801561087357600080fd5b5061034e610882366004613332565b611e1e565b34801561089357600080fd5b506104c7611e6d565b3480156108a857600080fd5b5061034e6108b73660046135ea565b611e89565b3480156108c857600080fd5b506104c7611efc565b3480156108dd57600080fd5b5061034e6108ec366004613662565b611f20565b3480156108fd57600080fd5b5061036561090c366004613332565b611f4c565b610919611f86565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602081905260409091205460ff16151514610987576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613a1a565b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811660008181526001602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055517f4234ba611d325b3ba434c4e1b037967b955b1274d4185ee9847b7491111a48ff9190a250565b60007f0000000000000000000000000000000000000000000000000000000000000000610a26610ebb565b601354604051602001610a3b93929190613770565b60405160208183030381529060405280519060200120905090565b60116020526000908152604090205481565b60026000541415610aa5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e906140ad565b60026000908155610ac2610ab7610ebb565b8e8e8e8e8e8e61178a565b9050610b0881868686808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508d959493925088915050611faa565b610b3e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613e4a565b6000610b4a8888611275565b9050610b56818e612114565b610b63828f8f60006121b4565b8d73ffffffffffffffffffffffffffffffffffffffff16827f9475cdbde5fc71fe2ccd413c82878ee54d061b9f74f9e2e1a03ff1178821502c8f8f604051610bac929190613762565b60405180910390a350506001600055505050505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600360205260409020545b919050565b3360009081526001602052604090205460ff16610c3e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613e13565b60026000541415610c7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e906140ad565b60026000908155610c99610c8d610ebb565b8686868660008061178a565b9050610ca581856121e0565b610cb1818686856121b4565b506001600055610cc033611f4c565b610cc933611127565b1015610d01576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613d81565b50505050565b60026000541415610d44576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e906140ad565b6002600055610d533382612297565b610d5d33826122f4565b3373ffffffffffffffffffffffffffffffffffffffff167f85082129d87b2fe11527cb1b3b7a520aeb5aa6913f88a3d8757fe40d1db02fdd82604051610da39190613844565b60405180910390a26001600055610db933611f4c565b610dc233611127565b1015610dfa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613d81565b50565b73ffffffffffffffffffffffffffffffffffffffff821660009081526006602090815260408083208484529091529020545b92915050565b600c546000828152601260205260408120549091610e539190612396565b905042811080610e675750610e6733611da4565b610e9d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613960565b6000828152601260205260409020429055610eb7826123dc565b5050565b4690565b600e5481565b60009081526005602052604090205460ff1690565b7f000000000000000000000000000000000000000000000000000000000000000081565b3360009081526001602052604090205460ff16610f47576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613e13565b60026000541415610f84576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e906140ad565b60026000908155610fa1610f96610ebb565b88888888888861178a565b9050610fad81876121e0565b610fb681612596565b610fc4878785853389612618565b506001600055610fd333611f4c565b610fdc33611127565b1015611014576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613d81565b505050505050565b60075473ffffffffffffffffffffffffffffffffffffffff1681565b611040611f86565b600d55565b61104d611f86565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604090205460ff16156110ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e906138bb565b73ffffffffffffffffffffffffffffffffffffffff8116600081815260016020819052604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016909217909155517f2cec73b7434d3b91198ad1a618f63e6a0761ce281af5ec9ec76606d948d03e239190a250565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b60085473ffffffffffffffffffffffffffffffffffffffff1681565b611173611f86565b600a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6111c2611f86565b6040517ff2fde38b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063f2fde38b906112349084906004016137bf565b600060405180830381600087803b15801561124e57600080fd5b505af1158015611262573d6000803e3d6000fd5b5050505050565b60135481565b600c5481565b6000828260405160200161128a929190613762565b60405160208183030381529060405280519060200120905092915050565b601060205281600052604060002081815481106112c157fe5b90600052602060002001600091509150505481565b6112de611f86565b600c55565b6112eb611f86565b60005b81811015611356576000600b600085858581811061130857fe5b6020908102929092013583525081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790556001016112ee565b505050565b60008411611395576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613e81565b828410156113cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e906141fb565b6000868152600b602052604090205460ff16611417576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613ede565b600061143a612710611434600e54886129b890919063ffffffff16565b90612a0c565b90506000600f54821161144f57600f54611451565b815b90508085101561148d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613cc7565b6000888152601060205260409020600d548154106114ae576114ae896123dc565b6040517f9dc29fac00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690639dc29fac906115229033908b906004016137e0565b600060405180830381600087803b15801561153c57600080fd5b505af1158015611550573d6000803e3d6000fd5b50505050600061155e6109fb565b6013805460010190559050600061157a8b8b8b858c8c8c61178a565b83546001810185556000858152602080822083018490558e8252601190526040902054919250906115ab908b612396565b601160008e8152602001908152602001600020819055508a73ffffffffffffffffffffffffffffffffffffffff168c837fe35dddd4ea75d7e9b3fe93af4f4e40e778c3da4074c9d93e7c6536f1e803c1eb8d878e878f8f604051611614969594939291906142e2565b60405180910390a4505050505050505050505050565b611632611f86565b61271082111561166e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90614141565b600e91909155600f55565b600260005414156116b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e906140ad565b6002600090815573ffffffffffffffffffffffffffffffffffffffff831681526001602081905260409091205460ff1615151461171f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613a1a565b6117293382612a58565b6117338282612acc565b8173ffffffffffffffffffffffffffffffffffffffff167febedb8b3c678666e7f36970bc8f57abf6d8fa2e828c0da91ea5b75bf68ed101a826040516117799190613844565b60405180910390a250506001600055565b6000878787878787876040516020016117a99796959493929190614279565b604051602081830303815290604052805190602001209050979650505050505050565b6117d4611f86565b600980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6000611859848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250612b2992505050565b905060006118678284611275565b90506000805b8581101561192b5773ffffffffffffffffffffffffffffffffffffffff88166000908152600660205260408120818989858181106118a757fe5b9050602002013581526020019081526020016000205490506000811115611922576118d28382612396565b73ffffffffffffffffffffffffffffffffffffffff8a16600090815260066020526040812091945090818a8a8681811061190857fe5b905060200201358152602001908152602001600020819055505b5060010161186d565b506119368282612114565b6119408782612acc565b828773ffffffffffffffffffffffffffffffffffffffff167f78e830d08be9d5f957414c84d685c061ecbd8467be98b42ebb64f0118b57d2ff836040516119879190613844565b60405180910390a350505050505050565b600d5481565b600f5481565b6119e887858585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508c959493925087915050611faa565b611a1e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613e4a565b6000611a2a8787611275565b73ffffffffffffffffffffffffffffffffffffffff8a1660009081526006602090815260408083208c845290915290205490915080611a95576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e9061384d565b73ffffffffffffffffffffffffffffffffffffffff8a1660009081526006602090815260408083208c8452909152812055611ad08282612114565b611ada8a82612acc565b87898b73ffffffffffffffffffffffffffffffffffffffff167f84eb21b24c31b27a3bc67dde4a598aad06db6e9415cd66544492b9616996143c60405160405180910390a450505050505050505050565b600b6020526000908152604090205460ff1681565b611b48611f86565b6000611b548484611275565b9050611b5e613272565b611b688585611d21565b9050806040015160001415611ba9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e906138f2565b80518414611bb357fe5b6040810151600090611bc8906249d400612396565b905080421015611c04576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e906139bd565b60208201518251600091611c189190612f60565b9050611c248482612114565b611c2e85826122f4565b50505050505050565b600954611c599073ffffffffffffffffffffffffffffffffffffffff16612fa2565b60026000541415611c96576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e906140ad565b6002600055611ca9868686868686612618565b8173ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167f320958176930804eb66c2343c7343fc0367dc16249590c0f195783bee199d09487878786604051611d0c949392919061430a565b60405180910390a35050600160005550505050565b611d29613272565b60046000611d378585611275565b81526020019081526020016000206040518060600160405290816000820154815260200160018201548152602001600282015481525050905092915050565b60095473ffffffffffffffffffffffffffffffffffffffff1681565b60126020526000908152604090205481565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205460ff1690565b611dd7611f86565b600880547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b611e26611f86565b600780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600a5473ffffffffffffffffffffffffffffffffffffffff1681565b611e91611f86565b60005b81811015611356576001600b6000858585818110611eae57fe5b6020908102929092013583525081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055600101611e94565b7f000000000000000000000000000000000000000000000000000000000000000081565b600954611f429073ffffffffffffffffffffffffffffffffffffffff16612fa2565b610eb78282612ff1565b6000610e2f611f5a836130f9565b73ffffffffffffffffffffffffffffffffffffffff841660009081526003602052604090205490612396565b600754611fa89073ffffffffffffffffffffffffffffffffffffffff16612fa2565b565b6000808211611fe5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613d24565b81841061201e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613b79565b612027826130ff565b835114612060576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613f13565b8460005b84518110156121075785600116600114156120bc5784818151811061208557fe5b60200260200101518260405160200161209f929190613762565b6040516020818303038152906040528051906020012091506120fb565b818582815181106120c957fe5b60200260200101516040516020016120e2929190613762565b6040516020818303038152906040528051906020012091505b600195861c9501612064565b5090951495945050505050565b6000828152600460205260409020805461215a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613884565b600181015460009061216c9084612396565b82549091508111156121aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90614050565b6001909101555050565b6121bd84612596565b6121d0836121cb8484612f60565b6122f4565b8015610d0157610d0133826122f4565b33600090815260066020908152604080832085845290915290205415612232576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613f96565b61223c3382612297565b336000908152600660209081526040808320858452909152908190208290555182907f0c3d250c7831051e78aa6a56679e590374c7c424415ffe4aa474491def2fe7059061228b908490613844565b60405180910390a25050565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600360205260409020546122c79082612396565b73ffffffffffffffffffffffffffffffffffffffff90921660009081526003602052604090209190915550565b6040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906340c10f199061236890859085906004016137e0565b600060405180830381600087803b15801561238257600080fd5b505af1158015611014573d6000803e3d6000fd5b6000828201838110156123d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613929565b9392505050565b60008181526010602052604090208054612422576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613ff3565b600061247c8280548060200260200160405190810160405280929190818152602001828054801561247257602002820191906000526020600020905b81548152602001906001019080831161245e575b5050505050612b29565b60008481526011602052604090819020549051919250904290839086907ff52ad20d3b4f50d1c40901dfb95a9ce5270b2fc32694e5c668354721cd87aa74906124c89086908690613762565b60405180910390a360606124da610ebb565b848785856040516024016124f29594939291906142bf565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fef6ebe5e00000000000000000000000000000000000000000000000000000000179052600089815260118252828120819055601090915290812091925061258d9190613293565b611014816131ae565b60008181526005602052604090205460ff16156125df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613abf565b600090815260056020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b80156126c5576040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906340c10f199061269290859085906004016137e0565b600060405180830381600087803b1580156126ac57600080fd5b505af11580156126c0573d6000803e3d6000fd5b505050505b60006126d18683612f60565b9050841580156126df575083155b806127005750600a5473ffffffffffffffffffffffffffffffffffffffff16155b156127b0576040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906340c10f1990612779908a9085906004016137e0565b600060405180830381600087803b15801561279357600080fd5b505af11580156127a7573d6000803e3d6000fd5b50505050611c2e565b6040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906340c10f199061282490309085906004016137e0565b600060405180830381600087803b15801561283e57600080fd5b505af1158015612852573d6000803e3d6000fd5b5050600a546040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000008116945063095ea7b393506128ce92169085906004016137e0565b602060405180830381600087803b1580156128e857600080fd5b505af11580156128fc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612920919061362a565b50600a546040517f676c5ef600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063676c5ef69061297d908a9085908a908a90600401613806565b600060405180830381600087803b15801561299757600080fd5b505af11580156129ab573d6000803e3d6000fd5b5050505050505050505050565b6000826129c757506000610e2f565b828202828482816129d457fe5b04146123d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613c6a565b6000808211612a47576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613a88565b818381612a5057fe5b049392505050565b6040517f9dc29fac00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690639dc29fac9061236890859085906004016137e0565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260026020526040902054612afc9082612396565b73ffffffffffffffffffffffffffffffffffffffff90921660009081526002602052604090209190915550565b600080825111612b65576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e9061419e565b815160011415612b8b5781600081518110612b7c57fe5b60200260200101519050610bf0565b612b936132b1565b5060408051610200810182527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56381527f633dc4d7da7256660a892f8f1604a44b5432649cc8ec5cb3ced4c4e6ac94dd1d60208201527f890740a8eb06ce9be422cb8da5cdafc2b58c0a5e24036c578de2a433c828ff7d818301527f3b8ec09e026fdc305365dfc94e189a81b38c7597b3d941c279f042e8206e0bd86060808301919091527fecd50eee38e386bd62be9bedb990706951b65fe053bd9d8a521af753d139e2da60808301527fdefff6d330bb5403f63b14f33b578274160de3a50df4efecf0e0db73bcdd3da560a08301527f617bdd11f7c0a11f49db22f629387a12da7596f9d1704d7465177c63d88ec7d760c08301527f292c23a9aa1d8bea7e2435e555a4a60e379a5a35f3f452bae60121073fb6eead60e08301527fe1cea92ed99acdcb045a6726b2f87107e8a61620a232cf4d7d5b5766b3952e106101008301527f7ad66c0a68c72cb89e4fb4303841966e4062a76ab97451e3b9fb526a5ceb7f826101208301527fe026cc5a4aed3c22a58cbd3d2ac754c9352c5436f638042dca99034e836365166101408301527f3d04cffd8b46a874edf5cfae63077de85f849a660426697b06a829c70dd1409c6101608301527fad676aa337a485e4728a0b240d92b3ef7b3c372d06d189322bfd5f61f1e7203e6101808301527fa2fca4a49658f9fab7aa63289c91b7c7b6c832a6d0e69334ff5b0a3483d09dab6101a08301527f4ebfd9cd7bca2505f7bef59cc1c12ecc708fff26ae4af19abe852afe9e20c8626101c08301527f2def10d13dd169f550f578bda343d9717a138562e0093b380a1120789d53cf106101e0830152825183815280820184529192909190602082018180368337505085519192506000918291508180805b6001841115612f3c5750506002820460018084161460005b82811015612eb8578a8160020281518110612e5f57fe5b602002602001015196508a8160020260010181518110612e7b57fe5b6020026020010151955086602089015285604089015287805190602001208b8281518110612ea557fe5b6020908102919091010152600101612e48565b508015612f1b57896001850381518110612ece57fe5b60200260200101519550878360108110612ee457fe5b602002015160001b945085602088015284604088015286805190602001208a8381518110612f0e57fe5b6020026020010181815250505b80612f27576000612f2a565b60015b60ff1682019350600190920191612e30565b89600081518110612f4957fe5b602002602001015198505050505050505050919050565b600082821115612f9c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613a51565b50900390565b3373ffffffffffffffffffffffffffffffffffffffff821614610dfa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e906140e4565b6000612ffd8383611275565b60008181526004602052604090205490915015613046576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613c33565b60008211613080576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613db6565b6040805160608101825283815260006020808301828152428486019081528684526004909252918490209251835590516001830155516002909101555183907fb33d2162aead99dab59e77a7a67ea025b776bf8ca8079e132afdf9b23e03bd42906130ec908590613844565b60405180910390a2505050565b50600090565b600080821161313a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613bd6565b816001141561314b57506000610bf0565b81600060805b60018110613199577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6001821b01811b8316156131915791821c91908101905b60011c613151565b506001811b84146123d5576001019392505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16826040516131f59190613786565b6000604051808303816000865af19150503d8060008114613232576040519150601f19603f3d011682016040523d82523d6000602084013e613237565b606091505b5050905080610eb7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613b1c565b60405180606001604052806000815260200160008152602001600081525090565b5080546000825590600052602060002090810190610dfa91906132d0565b6040518061020001604052806010906020820280368337509192915050565b5b808211156132e557600081556001016132d1565b5090565b60008083601f8401126132fa578182fd5b50813567ffffffffffffffff811115613311578182fd5b602083019150836020808302850101111561332b57600080fd5b9250929050565b600060208284031215613343578081fd5b81356123d581614325565b60008060008060608587031215613363578283fd5b843561336e81614325565b9350602085013567ffffffffffffffff811115613389578384fd5b613395878288016132e9565b9598909750949560400135949350505050565b600080604083850312156133ba578182fd5b82356133c581614325565b946020939093013593505050565b60008060008060008060008060e0898b0312156133ee578384fd5b88356133f981614325565b97506020890135965060408901359550606089013594506080890135935060a089013567ffffffffffffffff811115613430578384fd5b61343c8b828c016132e9565b999c989b50969995989497949560c00135949350505050565b6000806000806080858703121561346a578384fd5b843561347581614325565b966020860135965060408601359560600135945092505050565b60008060008060008060c087890312156134a7578182fd5b86356134b281614325565b9860208801359850604088013597606081013597506080810135965060a00135945092505050565b6000806000806000806000806000806000806101608d8f0312156134fc578384fd5b6135068d35614325565b8c359b5060208d01359a5060408d0135995060608d0135985060808d0135975060a08d0135965060c08d0135955060e08d013594506101008d0135935067ffffffffffffffff6101208e0135111561355c578283fd5b61356d8e6101208f01358f016132e9565b81945080935050506101408d013590509295989b509295989b509295989b565b60008060008060008060c087890312156135a5578384fd5b86356135b081614325565b955060208701359450604087013593506060870135925060808701356135d581614325565b8092505060a087013590509295509295509295565b600080602083850312156135fc578182fd5b823567ffffffffffffffff811115613612578283fd5b61361e858286016132e9565b90969095509350505050565b60006020828403121561363b578081fd5b815180151581146123d5578182fd5b60006020828403121561365b578081fd5b5035919050565b60008060408385031215613674578182fd5b50508035926020909101359150565b600080600060608486031215613697578081fd5b833592506020840135915060408401356136b081614325565b809150509250925092565b600080600080600080600060e0888a0312156136d5578081fd5b8735965060208801356136e781614325565b96999698505050506040850135946060810135946080820135945060a0820135935060c0909101359150565b60008060008060008060c0878903121561372b578384fd5b86359550602087013561373d81614325565b95989597505050506040840135936060810135936080820135935060a0909101359150565b918252602082015260400190565b9283526020830191909152604082015260600190565b60008251815b818110156137a6576020818601810151858301520161378c565b818111156137b45782828501525b509190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff94909416845260208401929092526040830152606082015260800190565b901515815260200190565b90815260200190565b6020808252601e908201527f4c325f4252473a207472616e73666572496420686173206e6f20626f6e640000604082015260600190565b6020808252601c908201527f4252473a205472616e7366657220726f6f74206e6f7420666f756e6400000000604082015260600190565b6020808252601e908201527f4143543a204164647265737320697320616c726561647920626f6e6465720000604082015260600190565b6020808252601b908201527f4252473a205472616e73666572526f6f74206e6f7420666f756e640000000000604082015260600190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252602f908201527f4c325f4252473a204f6e6c7920426f6e6465722063616e20636f6d6d6974206260408201527f65666f7265206d696e2064656c61790000000000000000000000000000000000606082015260800190565b6020808252603b908201527f4252473a205472616e73666572526f6f742063616e6e6f74206265207265736360408201527f756564206265666f726520746865205265736375652044656c61790000000000606082015260800190565b6020808252601a908201527f4143543a2041646472657373206973206e6f7420626f6e646572000000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b6020808252602c908201527f4252473a20546865207472616e736665722068617320616c726561647920626560408201527f656e2077697468647261776e0000000000000000000000000000000000000000606082015260800190565b60208082526027908201527f4c325f504c595f5a4b5f4252473a2043616c6c20746f206d657373656e67657260408201527f206661696c656400000000000000000000000000000000000000000000000000606082015260800190565b60208082526024908201527f4c69625f4d65726b6c65547265653a20496e646578206f7574206f6620626f7560408201527f6e64732e00000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526030908201527f4c69625f4d65726b6c65547265653a2043616e6e6f7420636f6d70757465206360408201527f65696c286c6f675f3229206f6620302e00000000000000000000000000000000606082015260800190565b6020808252601e908201527f4252473a205472616e7366657220726f6f7420616c7265616479207365740000604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60408201527f7700000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526030908201527f4c325f4252473a20626f6e646572466565206d757374206d656574206d696e6960408201527f6d756d20726571756972656d656e747300000000000000000000000000000000606082015260800190565b60208082526037908201527f4c69625f4d65726b6c65547265653a20546f74616c206c6561766573206d757360408201527f742062652067726561746572207468616e207a65726f2e000000000000000000606082015260800190565b6020808252818101527f4143543a204e6f7420656e6f75676820617661696c61626c6520637265646974604082015260600190565b6020808252602d908201527f4252473a2043616e6e6f7420736574205472616e73666572526f6f7420746f7460408201527f616c416d6f756e74206f66203000000000000000000000000000000000000000606082015260800190565b60208082526019908201527f4143543a2043616c6c6572206973206e6f7420626f6e64657200000000000000604082015260600190565b6020808252601b908201527f4252473a20496e76616c6964207472616e736665722070726f6f660000000000604082015260600190565b60208082526027908201527f4c325f4252473a204d757374207472616e736665722061206e6f6e2d7a65726f60408201527f20616d6f756e7400000000000000000000000000000000000000000000000000606082015260800190565b6020808252818101527f4c325f4252473a20636861696e4964206973206e6f7420737570706f72746564604082015260600190565b6020808252604d908201527f4c69625f4d65726b6c65547265653a20546f74616c207369626c696e6773206460408201527f6f6573206e6f7420636f72726563746c7920636f72726573706f6e6420746f2060608201527f746f74616c206c65617665732e00000000000000000000000000000000000000608082015260a00190565b60208082526027908201527f4252473a205769746864726177616c2068617320616c7265616479206265656e60408201527f20626f6e64656400000000000000000000000000000000000000000000000000606082015260800190565b60208082526027908201527f4c325f4252473a204d75737420636f6d6d6974206174206c656173742031205460408201527f72616e7366657200000000000000000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f4252473a205769746864726177616c2065786365656473205472616e7366657260408201527f526f6f7420746f74616c00000000000000000000000000000000000000000000606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526030908201527f4c325f504c595f5a4b5f4252473a2043616c6c6572206973206e6f742074686560408201527f2065787065637465642073656e64657200000000000000000000000000000000606082015260800190565b6020808252602a908201527f4c325f4252473a206d696e426f6e646572427073206d757374206e6f7420657860408201527f6365656420313030303000000000000000000000000000000000000000000000606082015260800190565b60208082526034908201527f4c69625f4d65726b6c65547265653a204d7573742070726f766964652061742060408201527f6c65617374206f6e65206c65616620686173682e000000000000000000000000606082015260800190565b60208082526027908201527f4c325f4252473a20426f6e646572206665652063616e6e6f742065786365656460408201527f20616d6f756e7400000000000000000000000000000000000000000000000000606082015260800190565b81518152602080830151908201526040918201519181019190915260600190565b96875273ffffffffffffffffffffffffffffffffffffffff95909516602087015260408601939093526060850191909152608084015260a083015260c082015260e00190565b948552602085019390935260408401919091526060830152608082015260a00190565b958652602086019490945260408501929092526060840152608083015260a082015260c00190565b93845260208401929092526040830152606082015260800190565b73ffffffffffffffffffffffffffffffffffffffff81168114610dfa57600080fdfea26469706673582212202db67d0adbfd2ff432df673c4a2cc928f343afd24785289f9845b6c2c3969fd964736f6c634300060c0033000000000000000000000000a50395bdeaca7062255109fede012efe63d6d4020000000000000000000000009c8841cee9fb7b0991c43f50a749c942360ab234000000000000000000000000652a38fa87f60a122aef360eeefcaf6258eddf6a000000000000000000000000b8901acb165ed027e32754e0ffe830802919727f00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000710bda329b2a6224e4b44833de30f38e7f81d564
Deployed Bytecode
0x6080604052600436106103295760003560e01c80639bf43028116101a5578063cbd1642e116100ec578063e1825d0611610095578063f8398fa41161006f578063f8398fa41461089c578063fc6e3b3b146108bc578063fd31c5ba146108d1578063ffa9286c146108f157610329565b8063e1825d0614610847578063e40272d714610867578063e9cdfe511461088757610329565b8063d2442783116100c6578063d2442783146107f2578063d4e54c4714610807578063d5ef75511461082757610329565b8063cbd1642e14610785578063cc29a306146107a5578063ce803b4f146107c557610329565b8063af33ae691161014e578063c303526111610128578063c303526114610730578063c7525dd314610745578063c97d172e1461076557610329565b8063af33ae69146106db578063b162717e146106fb578063bed93c841461071b57610329565b8063a9fa4ed51161017f578063a9fa4ed514610688578063adc9772e146106a8578063af215f94146106bb57610329565b80639bf43028146106285780639f600a0b14610648578063a6bd1b331461066857610329565b80633cb747bf116102745780635ab2a5581161021d57806382c69f9d116101f757806382c69f9d146105be5780638f658198146105d3578063960a7afa146105e857806398445caf1461060857610329565b80635ab2a5581461056957806364c6fdb41461057e5780638295f2581461059e57610329565b80634742bbfb1161024e5780634742bbfb146105095780635325937f1461052957806357344e6f1461054957610329565b80633cb747bf146104b25780633d12a85a146104d45780633ef23f7f146104f457610329565b80632e17de78116102d65780633408e470116102b05780633408e4701461045b57806335e2c4af146104705780633a7af6311461048557610329565b80632e17de78146103fb578063302830ab1461041b57806332b949a21461043b57610329565b80630f7aadb7116103075780630f7aadb71461039b57806313948c76146103bb57806323c452cd146103db57610329565b806304e6c2c01461032e578063051e7216146103505780630f5e09e71461037b575b600080fd5b34801561033a57600080fd5b5061034e610349366004613332565b610911565b005b34801561035c57600080fd5b506103656109fb565b6040516103729190613844565b60405180910390f35b34801561038757600080fd5b5061036561039636600461364a565b610a56565b3480156103a757600080fd5b5061034e6103b63660046134da565b610a68565b3480156103c757600080fd5b506103656103d6366004613332565b610bc9565b3480156103e757600080fd5b5061034e6103f6366004613455565b610bf5565b34801561040757600080fd5b5061034e61041636600461364a565b610d07565b34801561042757600080fd5b506103656104363660046133a8565b610dfd565b34801561044757600080fd5b5061034e61045636600461364a565b610e35565b34801561046757600080fd5b50610365610ebb565b34801561047c57600080fd5b50610365610ebf565b34801561049157600080fd5b506104a56104a036600461364a565b610ec5565b6040516103729190613839565b3480156104be57600080fd5b506104c7610eda565b60405161037291906137bf565b3480156104e057600080fd5b5061034e6104ef36600461348f565b610efe565b34801561050057600080fd5b506104c761101c565b34801561051557600080fd5b5061034e61052436600461364a565b611038565b34801561053557600080fd5b5061034e610544366004613332565b611045565b34801561055557600080fd5b50610365610564366004613332565b611127565b34801561057557600080fd5b506104c761114f565b34801561058a57600080fd5b5061034e610599366004613332565b61116b565b3480156105aa57600080fd5b5061034e6105b9366004613332565b6111ba565b3480156105ca57600080fd5b50610365611269565b3480156105df57600080fd5b5061036561126f565b3480156105f457600080fd5b50610365610603366004613662565b611275565b34801561061457600080fd5b50610365610623366004613662565b6112a8565b34801561063457600080fd5b5061034e61064336600461364a565b6112d6565b34801561065457600080fd5b5061034e6106633660046135ea565b6112e3565b34801561067457600080fd5b5061034e610683366004613713565b61135b565b34801561069457600080fd5b5061034e6106a3366004613662565b61162a565b61034e6106b63660046133a8565b611679565b3480156106c757600080fd5b506103656106d63660046136bb565b61178a565b3480156106e757600080fd5b5061034e6106f6366004613332565b6117cc565b34801561070757600080fd5b5061034e61071636600461334e565b61181b565b34801561072757600080fd5b50610365611998565b34801561073c57600080fd5b5061036561199e565b34801561075157600080fd5b5061034e6107603660046133d3565b6119a4565b34801561077157600080fd5b506104a561078036600461364a565b611b2b565b34801561079157600080fd5b5061034e6107a0366004613683565b611b40565b3480156107b157600080fd5b5061034e6107c036600461358d565b611c37565b3480156107d157600080fd5b506107e56107e0366004613662565b611d21565b6040516103729190614258565b3480156107fe57600080fd5b506104c7611d76565b34801561081357600080fd5b5061036561082236600461364a565b611d92565b34801561083357600080fd5b506104a5610842366004613332565b611da4565b34801561085357600080fd5b5061034e610862366004613332565b611dcf565b34801561087357600080fd5b5061034e610882366004613332565b611e1e565b34801561089357600080fd5b506104c7611e6d565b3480156108a857600080fd5b5061034e6108b73660046135ea565b611e89565b3480156108c857600080fd5b506104c7611efc565b3480156108dd57600080fd5b5061034e6108ec366004613662565b611f20565b3480156108fd57600080fd5b5061036561090c366004613332565b611f4c565b610919611f86565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602081905260409091205460ff16151514610987576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613a1a565b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811660008181526001602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055517f4234ba611d325b3ba434c4e1b037967b955b1274d4185ee9847b7491111a48ff9190a250565b60007fcd24e8e9844849186ed93126ac365bc3a49362579aee585431811ea50bd1694c610a26610ebb565b601354604051602001610a3b93929190613770565b60405160208183030381529060405280519060200120905090565b60116020526000908152604090205481565b60026000541415610aa5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e906140ad565b60026000908155610ac2610ab7610ebb565b8e8e8e8e8e8e61178a565b9050610b0881868686808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508d959493925088915050611faa565b610b3e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613e4a565b6000610b4a8888611275565b9050610b56818e612114565b610b63828f8f60006121b4565b8d73ffffffffffffffffffffffffffffffffffffffff16827f9475cdbde5fc71fe2ccd413c82878ee54d061b9f74f9e2e1a03ff1178821502c8f8f604051610bac929190613762565b60405180910390a350506001600055505050505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600360205260409020545b919050565b3360009081526001602052604090205460ff16610c3e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613e13565b60026000541415610c7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e906140ad565b60026000908155610c99610c8d610ebb565b8686868660008061178a565b9050610ca581856121e0565b610cb1818686856121b4565b506001600055610cc033611f4c565b610cc933611127565b1015610d01576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613d81565b50505050565b60026000541415610d44576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e906140ad565b6002600055610d533382612297565b610d5d33826122f4565b3373ffffffffffffffffffffffffffffffffffffffff167f85082129d87b2fe11527cb1b3b7a520aeb5aa6913f88a3d8757fe40d1db02fdd82604051610da39190613844565b60405180910390a26001600055610db933611f4c565b610dc233611127565b1015610dfa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613d81565b50565b73ffffffffffffffffffffffffffffffffffffffff821660009081526006602090815260408083208484529091529020545b92915050565b600c546000828152601260205260408120549091610e539190612396565b905042811080610e675750610e6733611da4565b610e9d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613960565b6000828152601260205260409020429055610eb7826123dc565b5050565b4690565b600e5481565b60009081526005602052604090205460ff1690565b7f000000000000000000000000a50395bdeaca7062255109fede012efe63d6d40281565b3360009081526001602052604090205460ff16610f47576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613e13565b60026000541415610f84576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e906140ad565b60026000908155610fa1610f96610ebb565b88888888888861178a565b9050610fad81876121e0565b610fb681612596565b610fc4878785853389612618565b506001600055610fd333611f4c565b610fdc33611127565b1015611014576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613d81565b505050505050565b60075473ffffffffffffffffffffffffffffffffffffffff1681565b611040611f86565b600d55565b61104d611f86565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604090205460ff16156110ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e906138bb565b73ffffffffffffffffffffffffffffffffffffffff8116600081815260016020819052604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016909217909155517f2cec73b7434d3b91198ad1a618f63e6a0761ce281af5ec9ec76606d948d03e239190a250565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b60085473ffffffffffffffffffffffffffffffffffffffff1681565b611173611f86565b600a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6111c2611f86565b6040517ff2fde38b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000652a38fa87f60a122aef360eeefcaf6258eddf6a169063f2fde38b906112349084906004016137bf565b600060405180830381600087803b15801561124e57600080fd5b505af1158015611262573d6000803e3d6000fd5b5050505050565b60135481565b600c5481565b6000828260405160200161128a929190613762565b60405160208183030381529060405280519060200120905092915050565b601060205281600052604060002081815481106112c157fe5b90600052602060002001600091509150505481565b6112de611f86565b600c55565b6112eb611f86565b60005b81811015611356576000600b600085858581811061130857fe5b6020908102929092013583525081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790556001016112ee565b505050565b60008411611395576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613e81565b828410156113cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e906141fb565b6000868152600b602052604090205460ff16611417576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613ede565b600061143a612710611434600e54886129b890919063ffffffff16565b90612a0c565b90506000600f54821161144f57600f54611451565b815b90508085101561148d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613cc7565b6000888152601060205260409020600d548154106114ae576114ae896123dc565b6040517f9dc29fac00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000652a38fa87f60a122aef360eeefcaf6258eddf6a1690639dc29fac906115229033908b906004016137e0565b600060405180830381600087803b15801561153c57600080fd5b505af1158015611550573d6000803e3d6000fd5b50505050600061155e6109fb565b6013805460010190559050600061157a8b8b8b858c8c8c61178a565b83546001810185556000858152602080822083018490558e8252601190526040902054919250906115ab908b612396565b601160008e8152602001908152602001600020819055508a73ffffffffffffffffffffffffffffffffffffffff168c837fe35dddd4ea75d7e9b3fe93af4f4e40e778c3da4074c9d93e7c6536f1e803c1eb8d878e878f8f604051611614969594939291906142e2565b60405180910390a4505050505050505050505050565b611632611f86565b61271082111561166e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90614141565b600e91909155600f55565b600260005414156116b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e906140ad565b6002600090815573ffffffffffffffffffffffffffffffffffffffff831681526001602081905260409091205460ff1615151461171f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613a1a565b6117293382612a58565b6117338282612acc565b8173ffffffffffffffffffffffffffffffffffffffff167febedb8b3c678666e7f36970bc8f57abf6d8fa2e828c0da91ea5b75bf68ed101a826040516117799190613844565b60405180910390a250506001600055565b6000878787878787876040516020016117a99796959493929190614279565b604051602081830303815290604052805190602001209050979650505050505050565b6117d4611f86565b600980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6000611859848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250612b2992505050565b905060006118678284611275565b90506000805b8581101561192b5773ffffffffffffffffffffffffffffffffffffffff88166000908152600660205260408120818989858181106118a757fe5b9050602002013581526020019081526020016000205490506000811115611922576118d28382612396565b73ffffffffffffffffffffffffffffffffffffffff8a16600090815260066020526040812091945090818a8a8681811061190857fe5b905060200201358152602001908152602001600020819055505b5060010161186d565b506119368282612114565b6119408782612acc565b828773ffffffffffffffffffffffffffffffffffffffff167f78e830d08be9d5f957414c84d685c061ecbd8467be98b42ebb64f0118b57d2ff836040516119879190613844565b60405180910390a350505050505050565b600d5481565b600f5481565b6119e887858585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508c959493925087915050611faa565b611a1e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613e4a565b6000611a2a8787611275565b73ffffffffffffffffffffffffffffffffffffffff8a1660009081526006602090815260408083208c845290915290205490915080611a95576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e9061384d565b73ffffffffffffffffffffffffffffffffffffffff8a1660009081526006602090815260408083208c8452909152812055611ad08282612114565b611ada8a82612acc565b87898b73ffffffffffffffffffffffffffffffffffffffff167f84eb21b24c31b27a3bc67dde4a598aad06db6e9415cd66544492b9616996143c60405160405180910390a450505050505050505050565b600b6020526000908152604090205460ff1681565b611b48611f86565b6000611b548484611275565b9050611b5e613272565b611b688585611d21565b9050806040015160001415611ba9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e906138f2565b80518414611bb357fe5b6040810151600090611bc8906249d400612396565b905080421015611c04576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e906139bd565b60208201518251600091611c189190612f60565b9050611c248482612114565b611c2e85826122f4565b50505050505050565b600954611c599073ffffffffffffffffffffffffffffffffffffffff16612fa2565b60026000541415611c96576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e906140ad565b6002600055611ca9868686868686612618565b8173ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167f320958176930804eb66c2343c7343fc0367dc16249590c0f195783bee199d09487878786604051611d0c949392919061430a565b60405180910390a35050600160005550505050565b611d29613272565b60046000611d378585611275565b81526020019081526020016000206040518060600160405290816000820154815260200160018201548152602001600282015481525050905092915050565b60095473ffffffffffffffffffffffffffffffffffffffff1681565b60126020526000908152604090205481565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205460ff1690565b611dd7611f86565b600880547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b611e26611f86565b600780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600a5473ffffffffffffffffffffffffffffffffffffffff1681565b611e91611f86565b60005b81811015611356576001600b6000858585818110611eae57fe5b6020908102929092013583525081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055600101611e94565b7f000000000000000000000000652a38fa87f60a122aef360eeefcaf6258eddf6a81565b600954611f429073ffffffffffffffffffffffffffffffffffffffff16612fa2565b610eb78282612ff1565b6000610e2f611f5a836130f9565b73ffffffffffffffffffffffffffffffffffffffff841660009081526003602052604090205490612396565b600754611fa89073ffffffffffffffffffffffffffffffffffffffff16612fa2565b565b6000808211611fe5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613d24565b81841061201e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613b79565b612027826130ff565b835114612060576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613f13565b8460005b84518110156121075785600116600114156120bc5784818151811061208557fe5b60200260200101518260405160200161209f929190613762565b6040516020818303038152906040528051906020012091506120fb565b818582815181106120c957fe5b60200260200101516040516020016120e2929190613762565b6040516020818303038152906040528051906020012091505b600195861c9501612064565b5090951495945050505050565b6000828152600460205260409020805461215a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613884565b600181015460009061216c9084612396565b82549091508111156121aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90614050565b6001909101555050565b6121bd84612596565b6121d0836121cb8484612f60565b6122f4565b8015610d0157610d0133826122f4565b33600090815260066020908152604080832085845290915290205415612232576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613f96565b61223c3382612297565b336000908152600660209081526040808320858452909152908190208290555182907f0c3d250c7831051e78aa6a56679e590374c7c424415ffe4aa474491def2fe7059061228b908490613844565b60405180910390a25050565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600360205260409020546122c79082612396565b73ffffffffffffffffffffffffffffffffffffffff90921660009081526003602052604090209190915550565b6040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000652a38fa87f60a122aef360eeefcaf6258eddf6a16906340c10f199061236890859085906004016137e0565b600060405180830381600087803b15801561238257600080fd5b505af1158015611014573d6000803e3d6000fd5b6000828201838110156123d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613929565b9392505050565b60008181526010602052604090208054612422576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613ff3565b600061247c8280548060200260200160405190810160405280929190818152602001828054801561247257602002820191906000526020600020905b81548152602001906001019080831161245e575b5050505050612b29565b60008481526011602052604090819020549051919250904290839086907ff52ad20d3b4f50d1c40901dfb95a9ce5270b2fc32694e5c668354721cd87aa74906124c89086908690613762565b60405180910390a360606124da610ebb565b848785856040516024016124f29594939291906142bf565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fef6ebe5e00000000000000000000000000000000000000000000000000000000179052600089815260118252828120819055601090915290812091925061258d9190613293565b611014816131ae565b60008181526005602052604090205460ff16156125df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613abf565b600090815260056020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b80156126c5576040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000652a38fa87f60a122aef360eeefcaf6258eddf6a16906340c10f199061269290859085906004016137e0565b600060405180830381600087803b1580156126ac57600080fd5b505af11580156126c0573d6000803e3d6000fd5b505050505b60006126d18683612f60565b9050841580156126df575083155b806127005750600a5473ffffffffffffffffffffffffffffffffffffffff16155b156127b0576040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000652a38fa87f60a122aef360eeefcaf6258eddf6a16906340c10f1990612779908a9085906004016137e0565b600060405180830381600087803b15801561279357600080fd5b505af11580156127a7573d6000803e3d6000fd5b50505050611c2e565b6040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000652a38fa87f60a122aef360eeefcaf6258eddf6a16906340c10f199061282490309085906004016137e0565b600060405180830381600087803b15801561283e57600080fd5b505af1158015612852573d6000803e3d6000fd5b5050600a546040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000652a38fa87f60a122aef360eeefcaf6258eddf6a8116945063095ea7b393506128ce92169085906004016137e0565b602060405180830381600087803b1580156128e857600080fd5b505af11580156128fc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612920919061362a565b50600a546040517f676c5ef600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063676c5ef69061297d908a9085908a908a90600401613806565b600060405180830381600087803b15801561299757600080fd5b505af11580156129ab573d6000803e3d6000fd5b5050505050505050505050565b6000826129c757506000610e2f565b828202828482816129d457fe5b04146123d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613c6a565b6000808211612a47576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613a88565b818381612a5057fe5b049392505050565b6040517f9dc29fac00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000652a38fa87f60a122aef360eeefcaf6258eddf6a1690639dc29fac9061236890859085906004016137e0565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260026020526040902054612afc9082612396565b73ffffffffffffffffffffffffffffffffffffffff90921660009081526002602052604090209190915550565b600080825111612b65576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e9061419e565b815160011415612b8b5781600081518110612b7c57fe5b60200260200101519050610bf0565b612b936132b1565b5060408051610200810182527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56381527f633dc4d7da7256660a892f8f1604a44b5432649cc8ec5cb3ced4c4e6ac94dd1d60208201527f890740a8eb06ce9be422cb8da5cdafc2b58c0a5e24036c578de2a433c828ff7d818301527f3b8ec09e026fdc305365dfc94e189a81b38c7597b3d941c279f042e8206e0bd86060808301919091527fecd50eee38e386bd62be9bedb990706951b65fe053bd9d8a521af753d139e2da60808301527fdefff6d330bb5403f63b14f33b578274160de3a50df4efecf0e0db73bcdd3da560a08301527f617bdd11f7c0a11f49db22f629387a12da7596f9d1704d7465177c63d88ec7d760c08301527f292c23a9aa1d8bea7e2435e555a4a60e379a5a35f3f452bae60121073fb6eead60e08301527fe1cea92ed99acdcb045a6726b2f87107e8a61620a232cf4d7d5b5766b3952e106101008301527f7ad66c0a68c72cb89e4fb4303841966e4062a76ab97451e3b9fb526a5ceb7f826101208301527fe026cc5a4aed3c22a58cbd3d2ac754c9352c5436f638042dca99034e836365166101408301527f3d04cffd8b46a874edf5cfae63077de85f849a660426697b06a829c70dd1409c6101608301527fad676aa337a485e4728a0b240d92b3ef7b3c372d06d189322bfd5f61f1e7203e6101808301527fa2fca4a49658f9fab7aa63289c91b7c7b6c832a6d0e69334ff5b0a3483d09dab6101a08301527f4ebfd9cd7bca2505f7bef59cc1c12ecc708fff26ae4af19abe852afe9e20c8626101c08301527f2def10d13dd169f550f578bda343d9717a138562e0093b380a1120789d53cf106101e0830152825183815280820184529192909190602082018180368337505085519192506000918291508180805b6001841115612f3c5750506002820460018084161460005b82811015612eb8578a8160020281518110612e5f57fe5b602002602001015196508a8160020260010181518110612e7b57fe5b6020026020010151955086602089015285604089015287805190602001208b8281518110612ea557fe5b6020908102919091010152600101612e48565b508015612f1b57896001850381518110612ece57fe5b60200260200101519550878360108110612ee457fe5b602002015160001b945085602088015284604088015286805190602001208a8381518110612f0e57fe5b6020026020010181815250505b80612f27576000612f2a565b60015b60ff1682019350600190920191612e30565b89600081518110612f4957fe5b602002602001015198505050505050505050919050565b600082821115612f9c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613a51565b50900390565b3373ffffffffffffffffffffffffffffffffffffffff821614610dfa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e906140e4565b6000612ffd8383611275565b60008181526004602052604090205490915015613046576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613c33565b60008211613080576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613db6565b6040805160608101825283815260006020808301828152428486019081528684526004909252918490209251835590516001830155516002909101555183907fb33d2162aead99dab59e77a7a67ea025b776bf8ca8079e132afdf9b23e03bd42906130ec908590613844565b60405180910390a2505050565b50600090565b600080821161313a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613bd6565b816001141561314b57506000610bf0565b81600060805b60018110613199577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6001821b01811b8316156131915791821c91908101905b60011c613151565b506001811b84146123d5576001019392505050565b60007f000000000000000000000000a50395bdeaca7062255109fede012efe63d6d40273ffffffffffffffffffffffffffffffffffffffff16826040516131f59190613786565b6000604051808303816000865af19150503d8060008114613232576040519150601f19603f3d011682016040523d82523d6000602084013e613237565b606091505b5050905080610eb7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90613b1c565b60405180606001604052806000815260200160008152602001600081525090565b5080546000825590600052602060002090810190610dfa91906132d0565b6040518061020001604052806010906020820280368337509192915050565b5b808211156132e557600081556001016132d1565b5090565b60008083601f8401126132fa578182fd5b50813567ffffffffffffffff811115613311578182fd5b602083019150836020808302850101111561332b57600080fd5b9250929050565b600060208284031215613343578081fd5b81356123d581614325565b60008060008060608587031215613363578283fd5b843561336e81614325565b9350602085013567ffffffffffffffff811115613389578384fd5b613395878288016132e9565b9598909750949560400135949350505050565b600080604083850312156133ba578182fd5b82356133c581614325565b946020939093013593505050565b60008060008060008060008060e0898b0312156133ee578384fd5b88356133f981614325565b97506020890135965060408901359550606089013594506080890135935060a089013567ffffffffffffffff811115613430578384fd5b61343c8b828c016132e9565b999c989b50969995989497949560c00135949350505050565b6000806000806080858703121561346a578384fd5b843561347581614325565b966020860135965060408601359560600135945092505050565b60008060008060008060c087890312156134a7578182fd5b86356134b281614325565b9860208801359850604088013597606081013597506080810135965060a00135945092505050565b6000806000806000806000806000806000806101608d8f0312156134fc578384fd5b6135068d35614325565b8c359b5060208d01359a5060408d0135995060608d0135985060808d0135975060a08d0135965060c08d0135955060e08d013594506101008d0135935067ffffffffffffffff6101208e0135111561355c578283fd5b61356d8e6101208f01358f016132e9565b81945080935050506101408d013590509295989b509295989b509295989b565b60008060008060008060c087890312156135a5578384fd5b86356135b081614325565b955060208701359450604087013593506060870135925060808701356135d581614325565b8092505060a087013590509295509295509295565b600080602083850312156135fc578182fd5b823567ffffffffffffffff811115613612578283fd5b61361e858286016132e9565b90969095509350505050565b60006020828403121561363b578081fd5b815180151581146123d5578182fd5b60006020828403121561365b578081fd5b5035919050565b60008060408385031215613674578182fd5b50508035926020909101359150565b600080600060608486031215613697578081fd5b833592506020840135915060408401356136b081614325565b809150509250925092565b600080600080600080600060e0888a0312156136d5578081fd5b8735965060208801356136e781614325565b96999698505050506040850135946060810135946080820135945060a0820135935060c0909101359150565b60008060008060008060c0878903121561372b578384fd5b86359550602087013561373d81614325565b95989597505050506040840135936060810135936080820135935060a0909101359150565b918252602082015260400190565b9283526020830191909152604082015260600190565b60008251815b818110156137a6576020818601810151858301520161378c565b818111156137b45782828501525b509190910192915050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff94909416845260208401929092526040830152606082015260800190565b901515815260200190565b90815260200190565b6020808252601e908201527f4c325f4252473a207472616e73666572496420686173206e6f20626f6e640000604082015260600190565b6020808252601c908201527f4252473a205472616e7366657220726f6f74206e6f7420666f756e6400000000604082015260600190565b6020808252601e908201527f4143543a204164647265737320697320616c726561647920626f6e6465720000604082015260600190565b6020808252601b908201527f4252473a205472616e73666572526f6f74206e6f7420666f756e640000000000604082015260600190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252602f908201527f4c325f4252473a204f6e6c7920426f6e6465722063616e20636f6d6d6974206260408201527f65666f7265206d696e2064656c61790000000000000000000000000000000000606082015260800190565b6020808252603b908201527f4252473a205472616e73666572526f6f742063616e6e6f74206265207265736360408201527f756564206265666f726520746865205265736375652044656c61790000000000606082015260800190565b6020808252601a908201527f4143543a2041646472657373206973206e6f7420626f6e646572000000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b6020808252602c908201527f4252473a20546865207472616e736665722068617320616c726561647920626560408201527f656e2077697468647261776e0000000000000000000000000000000000000000606082015260800190565b60208082526027908201527f4c325f504c595f5a4b5f4252473a2043616c6c20746f206d657373656e67657260408201527f206661696c656400000000000000000000000000000000000000000000000000606082015260800190565b60208082526024908201527f4c69625f4d65726b6c65547265653a20496e646578206f7574206f6620626f7560408201527f6e64732e00000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526030908201527f4c69625f4d65726b6c65547265653a2043616e6e6f7420636f6d70757465206360408201527f65696c286c6f675f3229206f6620302e00000000000000000000000000000000606082015260800190565b6020808252601e908201527f4252473a205472616e7366657220726f6f7420616c7265616479207365740000604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60408201527f7700000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526030908201527f4c325f4252473a20626f6e646572466565206d757374206d656574206d696e6960408201527f6d756d20726571756972656d656e747300000000000000000000000000000000606082015260800190565b60208082526037908201527f4c69625f4d65726b6c65547265653a20546f74616c206c6561766573206d757360408201527f742062652067726561746572207468616e207a65726f2e000000000000000000606082015260800190565b6020808252818101527f4143543a204e6f7420656e6f75676820617661696c61626c6520637265646974604082015260600190565b6020808252602d908201527f4252473a2043616e6e6f7420736574205472616e73666572526f6f7420746f7460408201527f616c416d6f756e74206f66203000000000000000000000000000000000000000606082015260800190565b60208082526019908201527f4143543a2043616c6c6572206973206e6f7420626f6e64657200000000000000604082015260600190565b6020808252601b908201527f4252473a20496e76616c6964207472616e736665722070726f6f660000000000604082015260600190565b60208082526027908201527f4c325f4252473a204d757374207472616e736665722061206e6f6e2d7a65726f60408201527f20616d6f756e7400000000000000000000000000000000000000000000000000606082015260800190565b6020808252818101527f4c325f4252473a20636861696e4964206973206e6f7420737570706f72746564604082015260600190565b6020808252604d908201527f4c69625f4d65726b6c65547265653a20546f74616c207369626c696e6773206460408201527f6f6573206e6f7420636f72726563746c7920636f72726573706f6e6420746f2060608201527f746f74616c206c65617665732e00000000000000000000000000000000000000608082015260a00190565b60208082526027908201527f4252473a205769746864726177616c2068617320616c7265616479206265656e60408201527f20626f6e64656400000000000000000000000000000000000000000000000000606082015260800190565b60208082526027908201527f4c325f4252473a204d75737420636f6d6d6974206174206c656173742031205460408201527f72616e7366657200000000000000000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f4252473a205769746864726177616c2065786365656473205472616e7366657260408201527f526f6f7420746f74616c00000000000000000000000000000000000000000000606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526030908201527f4c325f504c595f5a4b5f4252473a2043616c6c6572206973206e6f742074686560408201527f2065787065637465642073656e64657200000000000000000000000000000000606082015260800190565b6020808252602a908201527f4c325f4252473a206d696e426f6e646572427073206d757374206e6f7420657860408201527f6365656420313030303000000000000000000000000000000000000000000000606082015260800190565b60208082526034908201527f4c69625f4d65726b6c65547265653a204d7573742070726f766964652061742060408201527f6c65617374206f6e65206c65616620686173682e000000000000000000000000606082015260800190565b60208082526027908201527f4c325f4252473a20426f6e646572206665652063616e6e6f742065786365656460408201527f20616d6f756e7400000000000000000000000000000000000000000000000000606082015260800190565b81518152602080830151908201526040918201519181019190915260600190565b96875273ffffffffffffffffffffffffffffffffffffffff95909516602087015260408601939093526060850191909152608084015260a083015260c082015260e00190565b948552602085019390935260408401919091526060830152608082015260a00190565b958652602086019490945260408501929092526060840152608083015260a082015260c00190565b93845260208401929092526040830152606082015260800190565b73ffffffffffffffffffffffffffffffffffffffff81168114610dfa57600080fdfea26469706673582212202db67d0adbfd2ff432df673c4a2cc928f343afd24785289f9845b6c2c3969fd964736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000a50395bdeaca7062255109fede012efe63d6d4020000000000000000000000009c8841cee9fb7b0991c43f50a749c942360ab234000000000000000000000000652a38fa87f60a122aef360eeefcaf6258eddf6a000000000000000000000000b8901acb165ed027e32754e0ffe830802919727f00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000710bda329b2a6224e4b44833de30f38e7f81d564
-----Decoded View---------------
Arg [0] : _messenger (address): 0xa50395bdEaca7062255109fedE012eFE63d6D402
Arg [1] : l1Governance (address): 0x9C8841cee9fB7b0991c43F50a749C942360Ab234
Arg [2] : hToken (address): 0x652a38FA87f60A122AEF360eEeFcaf6258eDdF6A
Arg [3] : l1BridgeAddress (address): 0xb8901acB165ed027E32754E0FFe830802919727f
Arg [4] : activeChainIds (uint256[]): 1
Arg [5] : bonders (address[]): 0x710bDa329b2a6224E4B44833DE30F38E7f81d564
-----Encoded View---------------
10 Constructor Arguments found :
Arg [0] : 000000000000000000000000a50395bdeaca7062255109fede012efe63d6d402
Arg [1] : 0000000000000000000000009c8841cee9fb7b0991c43f50a749c942360ab234
Arg [2] : 000000000000000000000000652a38fa87f60a122aef360eeefcaf6258eddf6a
Arg [3] : 000000000000000000000000b8901acb165ed027e32754e0ffe830802919727f
Arg [4] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [9] : 000000000000000000000000710bda329b2a6224e4b44833de30f38e7f81d564
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 35 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
BASE | 100.00% | $1,933.3 | 147.3882 | $284,945.57 |
Loading...
Loading
Loading...
Loading
[ 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.