Contract 0x296f55f8fb28e498b858d0bcda06d955b2cb3f97

Txn Hash Method
Block
From
To
Value [Txn Fee]
0xde2e87c0972ee171626d58c83a4f4c2d4804f65417beabca2b6acf18118f2a35Transfer Ownersh...8249422023-11-16 0:28:06106 days 20 hrs ago0x1d7c6783328c145393e84fb47a7f7c548f5ee28d IN  0x296f55f8fb28e498b858d0bcda06d955b2cb3f970 ETH0.00004280661
0xb05bc8e11106c52a1456240f82aa8ce326a78a63b0d5dd7dfeceb79919a83b660x60e060407981552023-11-15 0:35:38107 days 20 hrs ago0x1d7c6783328c145393e84fb47a7f7c548f5ee28d IN  Create: StargateComposer0 ETH0.002538262225
[ Download CSV Export 
Parent Txn Hash Block From To Value
Index Block
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StargateComposer

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 200 runs

Other Settings:
istanbul EvmVersion
File 1 of 13 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.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 () {
        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;
    }
}

File 2 of 13 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.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;
    }
}

File 3 of 13 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.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);
}

File 4 of 13 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.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");
        }
    }
}

File 5 of 13 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.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);
            }
        }
    }
}

File 6 of 13 : Context.sol
// 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;
    }
}

File 7 of 13 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor () {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and 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;
    }
}

File 8 of 13 : StargateComposer.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.7.6;
pragma abicoder v2;

import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";

import "./interfaces/IStargateRouter.sol";
import "./interfaces/IStargateReceiver.sol";
import "./interfaces/IStargateEthVault.sol";
import "./util/BytesLib.sol";
import "./util/SafeCall.sol";

interface IStargateBridge {
    function quoteLayerZeroFee(
        uint16 _chainId,
        uint8 _functionType,
        bytes calldata _toAddress,
        bytes calldata _transferAndCallPayload,
        IStargateRouter.lzTxObj memory _lzTxParams
    ) external view returns (uint256, uint256);
}

interface IPool {
    function token() external view returns (address);
    function convertRate() external view returns (uint256);
}

interface IStargateFactory {
    function getPool(uint256 _poolId) external view returns (address);
}

contract StargateComposer is IStargateRouter, IStargateReceiver, Ownable, ReentrancyGuard {
    using BytesLib for bytes;
    using SafeCall for address;
    using Address for address;
    using SafeERC20 for IERC20;
    using SafeMath for uint256;

    bytes4 private constant SELECTOR = bytes4(keccak256(bytes("transfer(address,uint256)")));
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;
    uint256 private dstGasReserve = 40000;
    uint256 private transferOverhead = 20000;

    uint256 private _swapStatus = _NOT_ENTERED;

    IStargateBridge public immutable stargateBridge;
    IStargateRouter public immutable stargateRouter;
    address public immutable factory;
    uint256 public wethPoolId;

    struct PoolInfo {
        address token;
        address poolAddress;
        uint256 convertRate;
    }

    mapping(uint16 => address) public peers;
    mapping(uint256 => address) public stargateEthVaults;
    mapping(uint16 => mapping(bytes => mapping(uint256 => bytes32))) public payloadHashes;
    mapping(uint256 => PoolInfo) public poolIdToInfo; // cache pool info

    modifier nonSwapReentrant() {
        require(_swapStatus != _ENTERED, "Stargate: reentrant call");
        _swapStatus = _ENTERED;
        _;
        _swapStatus = _NOT_ENTERED;
    }

    event CachedSwapSaved(
        uint16 chainId,
        bytes srcAddress,
        uint256 nonce,
        bytes reason
    );

    event ComposedTokenTransferFailed(
        address token,
        address intendedReceiver,
        uint amountLD
    );

    struct SwapAmount {
        uint256 amountLD; // the amount, in Local Decimals, to be swapped
        uint256 minAmountLD; // the minimum amount accepted out on destination
    }

    constructor(address _stargateBridge, address _stargateRouter, address _stargateEthVault, uint256 _wethPoolId) {
        stargateBridge = IStargateBridge(_stargateBridge);
        stargateRouter = IStargateRouter(_stargateRouter);
        wethPoolId = _wethPoolId;
        setStargateEthVaults(_wethPoolId, _stargateEthVault);

        (bool success, bytes memory data) = _stargateRouter.staticcall(abi.encodeWithSignature("factory()"));
        require(success, "Stargate: invalid factory address");
        factory = abi.decode(data, (address));
    }

    function addLiquidity(
        uint256 _poolId,
        uint256 _amountLD,
        address _to
    ) external override {
        PoolInfo memory poolInfo = _getPoolInfo(_poolId);

        // remove dust
        if (poolInfo.convertRate > 1) _amountLD = _amountLD.div(poolInfo.convertRate).mul(poolInfo.convertRate);

        // transfer tokens into this contract
        IERC20(poolInfo.token).safeTransferFrom(msg.sender, address(this), _amountLD);

        stargateRouter.addLiquidity(_poolId, _amountLD, _to);
    }

    function redeemRemote(
        uint16 _dstChainId,
        uint256 _srcPoolId,
        uint256 _dstPoolId,
        address payable _refundAddress,
        uint256 _amountLP,
        uint256 _minAmountLD,
        bytes calldata _to,
        lzTxObj memory _lzTxParams
    ) external override payable nonReentrant {
        IERC20 lpToken = IERC20(_getPoolInfo(_srcPoolId).poolAddress);
        // transfer lp tokens into this contract
        lpToken.safeTransferFrom(msg.sender, address(this), _amountLP);

        stargateRouter.redeemRemote{value: msg.value}(
            _dstChainId,
            _srcPoolId,
            _dstPoolId,
            _refundAddress,
            _amountLP,
            _minAmountLD,
            _to,
            _lzTxParams
        );
    }

    function redeemLocal(
        uint16 _dstChainId,
        uint256 _srcPoolId,
        uint256 _dstPoolId,
        address payable _refundAddress,
        uint256 _amountLP,
        bytes calldata _to,
        lzTxObj memory _lzTxParams
    ) external override payable nonReentrant {
        IERC20 lpToken = IERC20(_getPoolInfo(_srcPoolId).poolAddress);
        // transfer lp tokens into this contract
        lpToken.safeTransferFrom(msg.sender, address(this), _amountLP);

        stargateRouter.redeemLocal{value: msg.value}(
            _dstChainId,
            _srcPoolId,
            _dstPoolId,
            _refundAddress,
            _amountLP,
            _to,
            _lzTxParams
        );
    }

    function instantRedeemLocal(
        uint16 _srcPoolId,
        uint256 _amountLP,
        address _to
    ) external override nonReentrant returns (uint256 amountSD) {
        IERC20 lpToken = IERC20(_getPoolInfo(_srcPoolId).poolAddress);

        // should always be zero as this contract doesnt hold tokens
        uint balanceBefore = lpToken.balanceOf(address(this));

        // transfer lp tokens into this contract
        lpToken.safeTransferFrom(msg.sender, address(this), _amountLP);

        // redeem the tokens on behalf of user
        amountSD = stargateRouter.instantRedeemLocal(_srcPoolId, _amountLP, _to);

        // any extra lpTokens send back to the original msg.sender
        uint balanceAfter = lpToken.balanceOf(address(this));
        uint diff = balanceAfter - balanceBefore;
        if (diff > 0) lpToken.safeTransfer(msg.sender, diff);
    }

    function sendCredits(
        uint16 _dstChainId,
        uint256 _srcPoolId,
        uint256 _dstPoolId,
        address payable _refundAddress
    ) external payable override nonReentrant {
        stargateRouter.sendCredits{value: msg.value}(_dstChainId, _srcPoolId, _dstPoolId, _refundAddress);
    }

    function quoteLayerZeroFee(
        uint16 _chainId,
        uint8 _functionType,
        bytes calldata _toAddress,
        bytes calldata _transferAndCallPayload,
        IStargateRouter.lzTxObj memory _lzTxParams
    ) external view override returns(uint256, uint256) {
        bytes memory newPayload;
        bytes memory peer;
        if(_transferAndCallPayload.length > 0) {
            newPayload = _buildPayload(_toAddress, _transferAndCallPayload);
            peer = _getPeer(_chainId);

            // overhead for calling composer's sgReceive()
            _lzTxParams.dstGasForCall += dstGasReserve + transferOverhead;
        } else {
            newPayload = "";
            peer = _toAddress;
        }
        return stargateBridge.quoteLayerZeroFee(_chainId, _functionType, peer, newPayload, _lzTxParams);
    }

    function swap(
        uint16 _dstChainId,
        uint256 _srcPoolId,
        uint256 _dstPoolId,
        address payable _refundAddress,
        uint256 _amountLD,
        uint256 _minAmountLD,
        IStargateRouter.lzTxObj memory _lzTxParams,
        bytes calldata _to,
        bytes calldata _payload
    ) external override payable nonSwapReentrant {
        bytes memory newPayload;
        bytes memory peer;
        if(_payload.length > 0) {
            newPayload = _buildPayload(_to, _payload);
            peer = _getPeer(_dstChainId);

            // overhead for calling composer's sgReceive()
            _lzTxParams.dstGasForCall += dstGasReserve + transferOverhead;
        } else {
            newPayload = "";
            peer = _to;
        }

        if(isEthPool(_srcPoolId)) {
            require(msg.value > _amountLD, "Stargate: msg.value must be > _swapAmount.amountLD");
            IStargateEthVault(stargateEthVaults[_srcPoolId]).deposit{value: _amountLD}();
            IStargateEthVault(stargateEthVaults[_srcPoolId]).approve(address(stargateRouter), _amountLD);
        } else {
            PoolInfo memory poolInfo = _getPoolInfo(_srcPoolId);
            // remove dust
            if (poolInfo.convertRate > 1) _amountLD = _amountLD.div(poolInfo.convertRate).mul(poolInfo.convertRate);
            // transfer token to this contract
            IERC20(poolInfo.token).safeTransferFrom(msg.sender, address(this), _amountLD);
        }

        stargateRouter.swap{value: isEthPool(_srcPoolId) ? msg.value - _amountLD : msg.value}(
            _dstChainId,
            _srcPoolId,
            _dstPoolId,
            _refundAddress,
            _amountLD,
            _minAmountLD,
            _lzTxParams,
            peer, // swap the to address with the peer address
            newPayload
        );
    }

    // @notice compose stargate to swap ETH on the source to ETH on the destination and arbitrary call
    function swapETHAndCall(
        uint16 _dstChainId, // destination Stargate chainId
        address payable _refundAddress, // refund additional messageFee to this address
        bytes calldata _to, // the receiver of the destination ETH
        SwapAmount memory _swapAmount, // the amount and the minimum swap amount
        IStargateRouter.lzTxObj memory _lzTxParams, // the LZ tx params
        bytes calldata _payload // the payload to send to the destination
    ) external payable nonSwapReentrant {
        bytes memory newPayload;
        bytes memory peer;
        if(_payload.length > 0) {
            newPayload = _buildPayload(_to, _payload);
            peer = _getPeer(_dstChainId);

            // overhead for calling composer's sgReceive()
            _lzTxParams.dstGasForCall += dstGasReserve + transferOverhead;
        } else {
            newPayload = "";
            peer = _to;
        }

        {
            require(msg.value > _swapAmount.amountLD, "Stargate: msg.value must be > _swapAmount.amountLD");
            require(stargateEthVaults[wethPoolId] != address(0), "Stargate: Pool does not exist");
            IStargateEthVault(stargateEthVaults[wethPoolId]).deposit{value: _swapAmount.amountLD}();
            IStargateEthVault(stargateEthVaults[wethPoolId]).approve(address(stargateRouter), _swapAmount.amountLD);
        }

        stargateRouter.swap{value: (msg.value - _swapAmount.amountLD)}(
            _dstChainId, // destination Stargate chainId
            wethPoolId, // WETH Stargate poolId on source
            wethPoolId, // WETH Stargate poolId on destination
            _refundAddress, // message refund address if overpaid
            _swapAmount.amountLD, // the amount in Local Decimals to swap()
            _swapAmount.minAmountLD, // the minimum amount swap()er would allow to get out (ie: slippage)
            _lzTxParams, // the LZ tx params
            peer, // address on destination to send to
            newPayload // payload to send to the destination
        );
    }

    function _buildPayload(
        bytes calldata _to,
        bytes calldata _payload
    ) internal view returns (bytes memory) {
        require(_to.length == 20, "Stargate: invalid to address");

        // new payload = to(20) + sender(20) + payload
        // encoding the sender allows the receiver to know who called the Stargate
        return abi.encodePacked(_to, msg.sender, _payload);
    }

    function _getPeer(uint16 _dstChainId) internal view returns(bytes memory) {
        address peerAddr = peers[_dstChainId];
        require(peerAddr != address(0), "Stargate: peer not found");
        return abi.encodePacked(peerAddr);
    }

    function addLiquidityETH() external payable {
        require(msg.value > 0, "Stargate: msg.value is 0");

        // wrap the ETH into WETH
        uint256 amountLD = msg.value;
        require(stargateEthVaults[wethPoolId] != address(0), "Stargate: Pool does not exist");
        IStargateEthVault(stargateEthVaults[wethPoolId]).deposit{value: amountLD}();
        IStargateEthVault(stargateEthVaults[wethPoolId]).approve(address(stargateRouter), amountLD);

        // addLiquidity using the WETH that was just wrapped,
        // and mint the LP token to the msg.sender
        stargateRouter.addLiquidity(wethPoolId, amountLD, msg.sender);
    }

    function sgReceive(
        uint16 _srcChainId,
        bytes memory _srcAddress,
        uint256 _nonce,
        address _token,
        uint256 _amountLD,
        bytes memory _payload
    ) external override {
        require(msg.sender == address(stargateRouter), "Stargate: only router");
        // will just ignore the payload in some invalid configuration
        if (_payload.length <= 40) return; // 20 + 20 + payload

        address intendedReceiver = _payload.toAddress(0);

        (bool success, bytes memory data) = _token.call(abi.encodeWithSelector(SELECTOR, intendedReceiver, _amountLD));
        if (success && (data.length == 0 || abi.decode(data, (bool)))) {
            if (!intendedReceiver.isContract()) return; // ignore

            // use the caller as the srcAddress param (the msg.sender caller the StargateComposer at the source)
            bytes memory callData = abi.encodeWithSelector(
                IStargateReceiver.sgReceive.selector,
                _srcChainId,
                abi.encodePacked(_payload.toAddress(20)),
                _nonce,
                _token,
                _amountLD,
                _payload.slice(40, _payload.length - 40)
            );

            // no point in requires, because it will revert regardless
            uint256 externalGas = gasleft() - dstGasReserve;

            // only return 150 bytes of data
            (bool safeCallSuccess, bytes memory reason) = intendedReceiver.safeCall(externalGas, 0, 150, callData);

            if (!safeCallSuccess) {
                payloadHashes[_srcChainId][_srcAddress][_nonce] = keccak256(abi.encodePacked(intendedReceiver, callData));
                emit CachedSwapSaved(_srcChainId, _srcAddress, _nonce, reason);
            }

        } else {
            // do nothing, token swap failed and can't be delivered, tokens are held inside this contract
            emit ComposedTokenTransferFailed(_token, intendedReceiver, _amountLD);
        }
    }

    function clearCachedSwap(
        uint16 _srcChainId,
        bytes calldata _srcAddress,
        uint64 _nonce,
        address _receiver,
        bytes calldata _sgReceiveCallData
    ) external nonReentrant {
        bytes32 hash = keccak256(abi.encodePacked(_receiver, _sgReceiveCallData));
        require(payloadHashes[_srcChainId][_srcAddress][_nonce] == hash, "Stargate: invalid hash");
        delete payloadHashes[_srcChainId][_srcAddress][_nonce];

        (bool success, bytes memory reason) = _receiver.safeCall(gasleft(), 0, 150, _sgReceiveCallData);
        if (!success) {
            assembly {
                revert(add(32, reason), mload(reason))
            }
        }
    }

    function setDstGasReserve(uint256 _dstGasReserve) onlyOwner external {
        dstGasReserve = _dstGasReserve;
    }

    function setTransferOverhead(uint256 _transferOverhead) onlyOwner external {
        transferOverhead = _transferOverhead;
    }

    function setStargateEthVaults(uint256 _poolId, address _stargateEthVault) onlyOwner public {
        stargateEthVaults[_poolId] = _stargateEthVault;
    }

    function setWethPoolId(uint256 _wethPoolId) onlyOwner external {
        wethPoolId = _wethPoolId;
    }

    function setPeer(uint16 _chainId, address _peer) onlyOwner external {
        require(peers[_chainId] == address(0), "Stargate: peer already set");
        peers[_chainId] = _peer;
    }

    function recoverToken(address _token, address _to, uint256 _amount) external onlyOwner {
        IERC20(_token).safeTransfer(_to, _amount);
    }

    function isSending() external view returns (bool) {
        return _swapStatus == _ENTERED;
    }

    function isEthPool(uint256 _srcPoolId) internal view returns (bool) {
        return stargateEthVaults[_srcPoolId] != address(0);
    }

    function getPoolInfo(uint256 _poolId) external returns (PoolInfo memory poolInfo) {
        return _getPoolInfo(_poolId);
    }

    function _getPoolInfo(uint256 _poolId) internal returns (PoolInfo memory poolInfo) {
        // return early if its already been called
        if (poolIdToInfo[_poolId].poolAddress != address(0)) {
            return poolIdToInfo[_poolId];
        }

        address pool = IStargateFactory(factory).getPool(_poolId);
        require(address(pool) != address(0), "Stargate: pool does not exist");
        IERC20(pool).safeApprove(address(stargateRouter), type(uint256).max);

        address token = IPool(pool).token();
        require(address(token) != address(0), "Stargate: token does not exist");
        IERC20(token).safeApprove(address(stargateRouter), type(uint256).max);

        uint256 convertRate = IPool(pool).convertRate();

        poolInfo = PoolInfo({token: token, poolAddress: pool, convertRate: convertRate});
        poolIdToInfo[_poolId] = poolInfo;
    }
}

File 9 of 13 : IStargateEthVault.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity 0.7.6;

interface IStargateEthVault {
    function deposit() external payable;

    function transfer(address to, uint value) external returns (bool);

    function withdraw(uint) external;

    function approve(address guy, uint wad) external returns (bool);

    function transferFrom(
        address src,
        address dst,
        uint wad
    ) external returns (bool);
}

File 10 of 13 : IStargateReceiver.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity >=0.7.6 <=0.8.4;

interface IStargateReceiver {
    function sgReceive(
        uint16 _chainId,
        bytes memory _srcAddress,
        uint256 _nonce,
        address _token,
        uint256 amountLD,
        bytes memory payload
    ) external;
}

File 11 of 13 : IStargateRouter.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity >=0.7.6 <=0.8.4;
pragma abicoder v2;

interface IStargateRouter {
    struct lzTxObj {
        uint256 dstGasForCall;
        uint256 dstNativeAmount;
        bytes dstNativeAddr;
    }

    function addLiquidity(
        uint256 _poolId,
        uint256 _amountLD,
        address _to
    ) external;

    function swap(
        uint16 _dstChainId,
        uint256 _srcPoolId,
        uint256 _dstPoolId,
        address payable _refundAddress,
        uint256 _amountLD,
        uint256 _minAmountLD,
        lzTxObj memory _lzTxParams,
        bytes calldata _to,
        bytes calldata _payload
    ) external payable;

    function redeemRemote(
        uint16 _dstChainId,
        uint256 _srcPoolId,
        uint256 _dstPoolId,
        address payable _refundAddress,
        uint256 _amountLP,
        uint256 _minAmountLD,
        bytes calldata _to,
        lzTxObj memory _lzTxParams
    ) external payable;

    function instantRedeemLocal(
        uint16 _srcPoolId,
        uint256 _amountLP,
        address _to
    ) external returns (uint256);

    function redeemLocal(
        uint16 _dstChainId,
        uint256 _srcPoolId,
        uint256 _dstPoolId,
        address payable _refundAddress,
        uint256 _amountLP,
        bytes calldata _to,
        lzTxObj memory _lzTxParams
    ) external payable;

    function sendCredits(
        uint16 _dstChainId,
        uint256 _srcPoolId,
        uint256 _dstPoolId,
        address payable _refundAddress
    ) external payable;

    function quoteLayerZeroFee(
        uint16 _dstChainId,
        uint8 _functionType,
        bytes calldata _toAddress,
        bytes calldata _transferAndCallPayload,
        lzTxObj memory _lzTxParams
    ) external view returns (uint256, uint256);
}

File 12 of 13 : BytesLib.sol
// SPDX-License-Identifier: Unlicense
/*
 * @title Solidity Bytes Arrays Utils
 * @author Gonçalo Sá <[email protected]>
 *
 * @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity.
 *      The library lets you concatenate, slice and type cast bytes arrays both in memory and storage.
 */
pragma solidity >=0.7.0 <0.8.0;

import "@openzeppelin/contracts/math/SafeMath.sol";

library BytesLib {
    using SafeMath for uint256;

    function slice(bytes memory _bytes, uint256 _start, uint256 _length) internal pure returns (bytes memory) {
        require(_length.add(31) >= _length, "slice_overflow");
        require(_bytes.length >= _start.add(_length), "slice_outOfBounds");

        bytes memory tempBytes;

        assembly {
            switch iszero(_length)
            case 0 {
                // Get a location of some free memory and store it in tempBytes as
                // Solidity does for memory variables.
                tempBytes := mload(0x40)

                // The first word of the slice result is potentially a partial
                // word read from the original array. To read it, we calculate
                // the length of that partial word and start copying that many
                // bytes into the array. The first word we copy will start with
                // data we don't care about, but the last `lengthmod` bytes will
                // land at the beginning of the contents of the new array. When
                // we're done copying, we overwrite the full first word with
                // the actual length of the slice.
                let lengthmod := and(_length, 31)

                // The multiplication in the next line is necessary
                // because when slicing multiples of 32 bytes (lengthmod == 0)
                // the following copy loop was copying the origin's length
                // and then ending prematurely not copying everything it should.
                let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))
                let end := add(mc, _length)

                for {
                    // The multiplication in the next line has the same exact purpose
                    // as the one above.
                    let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)
                } lt(mc, end) {
                    mc := add(mc, 0x20)
                    cc := add(cc, 0x20)
                } {
                    mstore(mc, mload(cc))
                }

                mstore(tempBytes, _length)

                //update free-memory pointer
                //allocating the array padded to 32 bytes like the compiler does now
                mstore(0x40, and(add(mc, 31), not(31)))
            }
            //if we want a zero-length slice let's just return a zero-length array
            default {
                tempBytes := mload(0x40)
                //zero out the 32 bytes slice we are about to return
                //we need to do it because Solidity does not garbage collect
                mstore(tempBytes, 0)

                mstore(0x40, add(tempBytes, 0x20))
            }
        }

        return tempBytes;
    }

    function toUint16(bytes memory _bytes, uint256 _start) internal pure returns (uint16) {
        require(_bytes.length >= _start.add(2), "toUint16_outOfBounds");
        uint16 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0x2), _start))
        }

        return tempUint;
    }

    function toBytes32(bytes memory _bytes, uint256 _start) internal pure returns (bytes32) {
        require(_bytes.length >= _start.add(32), "toBytes32_outOfBounds");
        bytes32 tempBytes32;

        assembly {
            tempBytes32 := mload(add(add(_bytes, 0x20), _start))
        }

        return tempBytes32;
    }

    function toAddress(bytes memory _bytes, uint256 _start) internal pure returns (address) {
        require(_bytes.length >= _start.add(20), "toAddress_outOfBounds");
        address tempAddress;

        assembly {
            tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)
        }

        return tempAddress;
    }
}

File 13 of 13 : SafeCall.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity 0.7.6;

library SafeCall {
    /// @notice calls a contract with a specified gas limit and value and captures the return data
    /// @dev copied from https://github.com/nomad-xyz/ExcessivelySafeCall/blob/main/src/ExcessivelySafeCall.sol.
    /// @param _target The address to call
    /// @param _gas The amount of gas to forward to the remote contract
    /// @param _value The value in wei to send to the remote contract
    /// @param _maxCopy The maximum number of bytes of returndata to copy
    /// to memory.
    /// @param _calldata The data to send to the remote contract
    /// @return success and returndata, as `.call()`. Returndata is capped to
    /// `_maxCopy` bytes.
    function safeCall(
        address _target,
        uint256 _gas,
        uint256 _value,
        uint16 _maxCopy,
        bytes memory _calldata
    ) internal returns (bool, bytes memory) {
        // set up for assembly call
        uint256 _toCopy;
        bool _success;
        bytes memory _returnData = new bytes(_maxCopy);
        // dispatch message to recipient
        // by assembly calling "handle" function
        // we call via assembly to avoid memcopying a very large returndata
        // returned by a malicious contract
        assembly {
            _success := call(
                _gas, // gas
                _target, // recipient
                _value, // ether value
                add(_calldata, 0x20), // inloc
                mload(_calldata), // inlen
                0, // outloc
                0 // outlen
            )
            // limit our copy to 256 bytes
            _toCopy := returndatasize()
            if gt(_toCopy, _maxCopy) {
                _toCopy := _maxCopy
            }
            // Store the length of the copied bytes
            mstore(_returnData, _toCopy)
            // copy the bytes from returndata[0:_toCopy]
            returndatacopy(add(_returnData, 0x20), 0, _toCopy)
        }
        return (_success, _returnData);
    }
}

Settings
{
  "evmVersion": "istanbul",
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"_stargateBridge","type":"address"},{"internalType":"address","name":"_stargateRouter","type":"address"},{"internalType":"address","name":"_stargateEthVault","type":"address"},{"internalType":"uint256","name":"_wethPoolId","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"chainId","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"srcAddress","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"nonce","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"reason","type":"bytes"}],"name":"CachedSwapSaved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"intendedReceiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountLD","type":"uint256"}],"name":"ComposedTokenTransferFailed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"uint256","name":"_poolId","type":"uint256"},{"internalType":"uint256","name":"_amountLD","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"addLiquidity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"addLiquidityETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"internalType":"uint64","name":"_nonce","type":"uint64"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"bytes","name":"_sgReceiveCallData","type":"bytes"}],"name":"clearCachedSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_poolId","type":"uint256"}],"name":"getPoolInfo","outputs":[{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"poolAddress","type":"address"},{"internalType":"uint256","name":"convertRate","type":"uint256"}],"internalType":"struct StargateComposer.PoolInfo","name":"poolInfo","type":"tuple"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcPoolId","type":"uint16"},{"internalType":"uint256","name":"_amountLP","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"instantRedeemLocal","outputs":[{"internalType":"uint256","name":"amountSD","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isSending","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"payloadHashes","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"peers","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolIdToInfo","outputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"poolAddress","type":"address"},{"internalType":"uint256","name":"convertRate","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"uint8","name":"_functionType","type":"uint8"},{"internalType":"bytes","name":"_toAddress","type":"bytes"},{"internalType":"bytes","name":"_transferAndCallPayload","type":"bytes"},{"components":[{"internalType":"uint256","name":"dstGasForCall","type":"uint256"},{"internalType":"uint256","name":"dstNativeAmount","type":"uint256"},{"internalType":"bytes","name":"dstNativeAddr","type":"bytes"}],"internalType":"struct IStargateRouter.lzTxObj","name":"_lzTxParams","type":"tuple"}],"name":"quoteLayerZeroFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"recoverToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_dstChainId","type":"uint16"},{"internalType":"uint256","name":"_srcPoolId","type":"uint256"},{"internalType":"uint256","name":"_dstPoolId","type":"uint256"},{"internalType":"address payable","name":"_refundAddress","type":"address"},{"internalType":"uint256","name":"_amountLP","type":"uint256"},{"internalType":"bytes","name":"_to","type":"bytes"},{"components":[{"internalType":"uint256","name":"dstGasForCall","type":"uint256"},{"internalType":"uint256","name":"dstNativeAmount","type":"uint256"},{"internalType":"bytes","name":"dstNativeAddr","type":"bytes"}],"internalType":"struct IStargateRouter.lzTxObj","name":"_lzTxParams","type":"tuple"}],"name":"redeemLocal","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_dstChainId","type":"uint16"},{"internalType":"uint256","name":"_srcPoolId","type":"uint256"},{"internalType":"uint256","name":"_dstPoolId","type":"uint256"},{"internalType":"address payable","name":"_refundAddress","type":"address"},{"internalType":"uint256","name":"_amountLP","type":"uint256"},{"internalType":"uint256","name":"_minAmountLD","type":"uint256"},{"internalType":"bytes","name":"_to","type":"bytes"},{"components":[{"internalType":"uint256","name":"dstGasForCall","type":"uint256"},{"internalType":"uint256","name":"dstNativeAmount","type":"uint256"},{"internalType":"bytes","name":"dstNativeAddr","type":"bytes"}],"internalType":"struct IStargateRouter.lzTxObj","name":"_lzTxParams","type":"tuple"}],"name":"redeemRemote","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_dstChainId","type":"uint16"},{"internalType":"uint256","name":"_srcPoolId","type":"uint256"},{"internalType":"uint256","name":"_dstPoolId","type":"uint256"},{"internalType":"address payable","name":"_refundAddress","type":"address"}],"name":"sendCredits","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_dstGasReserve","type":"uint256"}],"name":"setDstGasReserve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"address","name":"_peer","type":"address"}],"name":"setPeer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_poolId","type":"uint256"},{"internalType":"address","name":"_stargateEthVault","type":"address"}],"name":"setStargateEthVaults","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_transferOverhead","type":"uint256"}],"name":"setTransferOverhead","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_wethPoolId","type":"uint256"}],"name":"setWethPoolId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"internalType":"uint256","name":"_nonce","type":"uint256"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amountLD","type":"uint256"},{"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"sgReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stargateBridge","outputs":[{"internalType":"contract IStargateBridge","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"stargateEthVaults","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stargateRouter","outputs":[{"internalType":"contract IStargateRouter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_dstChainId","type":"uint16"},{"internalType":"uint256","name":"_srcPoolId","type":"uint256"},{"internalType":"uint256","name":"_dstPoolId","type":"uint256"},{"internalType":"address payable","name":"_refundAddress","type":"address"},{"internalType":"uint256","name":"_amountLD","type":"uint256"},{"internalType":"uint256","name":"_minAmountLD","type":"uint256"},{"components":[{"internalType":"uint256","name":"dstGasForCall","type":"uint256"},{"internalType":"uint256","name":"dstNativeAmount","type":"uint256"},{"internalType":"bytes","name":"dstNativeAddr","type":"bytes"}],"internalType":"struct IStargateRouter.lzTxObj","name":"_lzTxParams","type":"tuple"},{"internalType":"bytes","name":"_to","type":"bytes"},{"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"swap","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_dstChainId","type":"uint16"},{"internalType":"address payable","name":"_refundAddress","type":"address"},{"internalType":"bytes","name":"_to","type":"bytes"},{"components":[{"internalType":"uint256","name":"amountLD","type":"uint256"},{"internalType":"uint256","name":"minAmountLD","type":"uint256"}],"internalType":"struct StargateComposer.SwapAmount","name":"_swapAmount","type":"tuple"},{"components":[{"internalType":"uint256","name":"dstGasForCall","type":"uint256"},{"internalType":"uint256","name":"dstNativeAmount","type":"uint256"},{"internalType":"bytes","name":"dstNativeAddr","type":"bytes"}],"internalType":"struct IStargateRouter.lzTxObj","name":"_lzTxParams","type":"tuple"},{"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"swapETHAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wethPoolId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

60e0604052619c40600255614e2060035560016004553480156200002257600080fd5b506040516200409838038062004098833981016040819052620000459162000292565b600062000051620001b2565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180556001600160601b0319606085811b821660805284901b1660a0526005819055620000ca8183620001b6565b60408051600481526024810182526020810180516001600160e01b031663c45a015560e01b179052905160009182916001600160a01b038716916200010f91620002eb565b600060405180830381855afa9150503d80600081146200014c576040519150601f19603f3d011682016040523d82523d6000602084013e62000151565b606091505b5091509150816200017f5760405162461bcd60e51b8152600401620001769062000327565b60405180910390fd5b808060200190518101906200019591906200026c565b60601b6001600160601b03191660c0525062000381945050505050565b3390565b620001c0620001b2565b6001600160a01b0316620001d36200025d565b6001600160a01b0316146200022f576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60009182526007602052604090912080546001600160a01b0319166001600160a01b03909216919091179055565b6000546001600160a01b031690565b6000602082840312156200027e578081fd5b81516200028b8162000368565b9392505050565b60008060008060808587031215620002a8578283fd5b8451620002b58162000368565b6020860151909450620002c88162000368565b6040860151909350620002db8162000368565b6060959095015193969295505050565b60008251815b818110156200030d5760208186018101518583015201620002f1565b818111156200031c5782828501525b509190910192915050565b60208082526021908201527f53746172676174653a20696e76616c696420666163746f7279206164647265736040820152607360f81b606082015260800190565b6001600160a01b03811681146200037e57600080fd5b50565b60805160601c60a05160601c60c05160601c613c9162000407600039806116a852806120af5250806109b05280610a9d5280610ba55280610c8d5280610e795280610f46528061109552806110c252806117d85280611b3a5280611bb85280611d635280611dfa528061216b528061223c5250806105db528061197b5250613c916000f3fe6080604052600436106101cd5760003560e01c80639ba3aa74116100f7578063c2362d0d11610095578063e0b63dee11610064578063e0b63dee146104f8578063e62268891461050d578063ed99530714610520578063f2fde38b14610528576101cd565b8063c2362d0d14610483578063c45a0155146104a3578063c4de93a5146104b8578063d9eebbaf146104d8576101cd565b8063a765cd12116100d1578063a765cd121461040e578063a9e56f3c1461042e578063ab8236f314610443578063c0e6ac6c14610463576101cd565b80639ba3aa74146103c85780639fbf10fc146103db578063a7229fd9146103ee576101cd565b80634b60b4251161016f57806384d0dba31161013e57806384d0dba31461036d57806387b21efc146103805780638da5cb5b146103a05780638f2e1d18146103b5576101cd565b80634b60b425146102e75780634fe7009114610309578063715018a614610338578063767954dc1461034d576101cd565b80632127fa72116101ab5780632127fa721461024d5780632902aeb01461027a5780632f380b351461029a578063449180a8146102c7576101cd565b80630a512369146101d25780631ce4bb7f14610209578063205cfe9d1461022b575b600080fd5b3480156101de57600080fd5b506101f26101ed3660046132b6565b610548565b604051610200929190613add565b60405180910390f35b34801561021557600080fd5b5061022961022436600461336d565b610679565b005b34801561023757600080fd5b506102406106e0565b60405161020091906135d2565b34801561025957600080fd5b5061026d61026836600461336d565b6106e6565b6040516102009190613576565b34801561028657600080fd5b50610240610295366004612f11565b610701565b3480156102a657600080fd5b506102ba6102b536600461336d565b610735565b6040516102009190613844565b3480156102d357600080fd5b506102296102e236600461339d565b61074e565b3480156102f357600080fd5b506102fc6107de565b60405161020091906135c7565b34801561031557600080fd5b5061032961032436600461336d565b6107e7565b6040516102009392919061358a565b34801561034457600080fd5b50610229610815565b34801561035957600080fd5b5061022961036836600461336d565b6108c1565b61022961037b366004613127565b610928565b34801561038c57600080fd5b5061022961039b3660046133e4565b610a39565b3480156103ac57600080fd5b5061026d610b0e565b6102296103c3366004613082565b610b1d565b6102296103d636600461303b565b610c2b565b6102296103e93660046131d6565b610d06565b3480156103fa57600080fd5b50610229610409366004612cbb565b610ffd565b34801561041a57600080fd5b5061026d610429366004612d1b565b611078565b34801561043a57600080fd5b5061026d611093565b34801561044f57600080fd5b5061022961045e366004612f65565b6110b7565b34801561046f57600080fd5b5061022961047e366004612e67565b61142b565b34801561048f57600080fd5b5061022961049e366004612d35565b6115d6565b3480156104af57600080fd5b5061026d6116a6565b3480156104c457600080fd5b506102406104d3366004612ffc565b6116ca565b3480156104e457600080fd5b506102296104f336600461336d565b611912565b34801561050457600080fd5b5061026d611979565b61022961051b366004612d6b565b61199d565b610229611c68565b34801561053457600080fd5b50610229610543366004612c83565b611e67565b600080606080851561057f5761056089898989611f69565b915061056b8b611fbd565b6003546002548751910101865290506105c4565b6040805160208082018352600082528251601f8c018290048202810182019093528a83529093508a908a90819084018382808284376000920191909152509293505050505b604051630a51236960e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690630a51236990610618908e908e90869088908c90600401613a85565b604080518083038186803b15801561062f57600080fd5b505afa158015610643573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061066791906133c1565b93509350505097509795505050505050565b610681612022565b6001600160a01b0316610692610b0e565b6001600160a01b0316146106db576040805162461bcd60e51b81526020600482018190526024820152600080516020613bdc833981519152604482015290519081900360640190fd5b600255565b60055481565b6007602052600090815260409020546001600160a01b031681565b6008602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b61073d612b1b565b61074682612026565b90505b919050565b610756612022565b6001600160a01b0316610767610b0e565b6001600160a01b0316146107b0576040805162461bcd60e51b81526020600482018190526024820152600080516020613bdc833981519152604482015290519081900360640190fd5b60009182526007602052604090912080546001600160a01b0319166001600160a01b03909216919091179055565b60045460021490565b6009602052600090815260409020805460018201546002909201546001600160a01b03918216929091169083565b61081d612022565b6001600160a01b031661082e610b0e565b6001600160a01b031614610877576040805162461bcd60e51b81526020600482018190526024820152600080516020613bdc833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6108c9612022565b6001600160a01b03166108da610b0e565b6001600160a01b031614610923576040805162461bcd60e51b81526020600482018190526024820152600080516020613bdc833981519152604482015290519081900360640190fd5b600355565b6002600154141561096e576040805162461bcd60e51b815260206004820152601f6024820152600080516020613b4f833981519152604482015290519081900360640190fd5b6002600155600061097e89612026565b6020015190506109996001600160a01b038216333089612343565b6040516384d0dba360e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906384d0dba39034906109f7908e908e908e908e908e908e908e908e908e906004016139af565b6000604051808303818588803b158015610a1057600080fd5b505af1158015610a24573d6000803e3d6000fd5b50506001805550505050505050505050505050565b6000610a4484612026565b9050600181604001511115610a6f576040810151610a6c90610a6685826123a3565b9061240c565b92505b8051610a86906001600160a01b0316333086612343565b6040516321ec87bf60e21b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906387b21efc90610ad690879087908790600401613aeb565b600060405180830381600087803b158015610af057600080fd5b505af1158015610b04573d6000803e3d6000fd5b5050505050505050565b6000546001600160a01b031690565b60026001541415610b63576040805162461bcd60e51b815260206004820152601f6024820152600080516020613b4f833981519152604482015290519081900360640190fd5b60026001556000610b7388612026565b602001519050610b8e6001600160a01b038216333088612343565b6040516311e5c3a360e31b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690638f2e1d18903490610bea908d908d908d908d908d908d908d908d90600401613950565b6000604051808303818588803b158015610c0357600080fd5b505af1158015610c17573d6000803e3d6000fd5b505060018055505050505050505050505050565b60026001541415610c71576040805162461bcd60e51b815260206004820152601f6024820152600080516020613b4f833981519152604482015290519081900360640190fd5b60026001556040516326e8ea9d60e21b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690639ba3aa74903490610cca908890889088908890600401613926565b6000604051808303818588803b158015610ce357600080fd5b505af1158015610cf7573d6000803e3d6000fd5b50506001805550505050505050565b60026004541415610d325760405162461bcd60e51b8152600401610d29906137d6565b60405180910390fd5b60026004556060808215610d6b57610d4c86868686611f69565b9150610d578d611fbd565b600354600254895191010188529050610db0565b6040805160208082018352600082528251601f890182900482028101820190935287835290935087908790819084018382808284376000920191909152509293505050505b610db98c61246c565b15610efb57883411610ddd5760405162461bcd60e51b8152600401610d2990613784565b60008c815260076020526040808220548151630d0e30db60e41b815291516001600160a01b039091169263d0e30db0928d926004808301939282900301818588803b158015610e2b57600080fd5b505af1158015610e3f573d6000803e3d6000fd5b50505060008e8152600760205260409081902054905163095ea7b360e01b81526001600160a01b03909116925063095ea7b39150610ea3907f0000000000000000000000000000000000000000000000000000000000000000908d906004016135ae565b602060405180830381600087803b158015610ebd57600080fd5b505af1158015610ed1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef59190612cfb565b50610f44565b6000610f068d612026565b9050600181604001511115610f2b576040810151610f2890610a668c826123a3565b99505b8051610f42906001600160a01b031633308d612343565b505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639fbf10fc610f7c8e61246c565b610f865734610f8a565b8a34035b8f8f8f8f8f8f8f8a8c6040518b63ffffffff1660e01b8152600401610fb799989796959493929190613a18565b6000604051808303818588803b158015610fd057600080fd5b505af1158015610fe4573d6000803e3d6000fd5b5050600160045550505050505050505050505050505050565b611005612022565b6001600160a01b0316611016610b0e565b6001600160a01b03161461105f576040805162461bcd60e51b81526020600482018190526024820152600080516020613bdc833981519152604482015290519081900360640190fd5b6110736001600160a01b0384168383612489565b505050565b6006602052600090815260409020546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146110ff5760405162461bcd60e51b8152600401610d2990613755565b602881511161110d57611423565b600061111982826124db565b604080518082018252601981527f7472616e7366657228616464726573732c75696e7432353629000000000000006020909101525190915060009081906001600160a01b038716907fa9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b9061119390869089906024016135ae565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516111d1919061355a565b6000604051808303816000865af19150503d806000811461120e576040519150601f19603f3d011682016040523d82523d6000602084013e611213565b606091505b509150915081801561123d57508051158061123d57508080602001905181019061123d9190612cfb565b156113e357611254836001600160a01b0316612545565b61126057505050611423565b600063ab8236f360e01b8a6112768760146124db565b6040516020016112869190613490565b6040516020818303038152906040528a8a8a6112b16028808d51038d61254b9092919063ffffffff16565b6040516024016112c696959493929190613873565b604051602081830303815290604052906001600160e01b0319166020820180516001600160e01b038381831617835250505050905060006002545a03905060008061131e6001600160a01b0388168483609688612662565b91509150816113da57868460405160200161133a9291906134d9565b60405160208183030381529060405280519060200120600860008f61ffff1661ffff1681526020019081526020016000208d604051611379919061355a565b908152602001604051809103902060008d8152602001908152602001600020819055507f52ee826ce7905614ca74aedf19f7404f1220cd5ee254406a4586eb034a6119498d8d8d846040516113d194939291906138cc565b60405180910390a15b5050505061141f565b7fedf70e267c659b0af90f1e8a3c6aa7db09032c676b46b0a4de8d328f73448cef8684876040516114169392919061358a565b60405180910390a15b5050505b505050505050565b60026001541415611471576040805162461bcd60e51b815260206004820152601f6024820152600080516020613b4f833981519152604482015290519081900360640190fd5b600260015560405160009061148e908590859085906020016134ad565b60408051601f19818403018152828252805160209182012061ffff8c166000908152600890925291902090925082916114ca908a908a90613511565b90815260200160405180910390206000876001600160401b0316815260200190815260200160002054146115105760405162461bcd60e51b8152600401610d2990613612565b61ffff88166000908152600860205260409081902090516115349089908990613511565b90815260200160405180910390206000866001600160401b03168152602001908152602001600020600090556000806115b55a6000609688888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506001600160a01b038d1695949392915050612662565b91509150816115c657805181602001fd5b5050600180555050505050505050565b6115de612022565b6001600160a01b03166115ef610b0e565b6001600160a01b031614611638576040805162461bcd60e51b81526020600482018190526024820152600080516020613bdc833981519152604482015290519081900360640190fd5b61ffff82166000908152600660205260409020546001600160a01b0316156116725760405162461bcd60e51b8152600401610d29906135db565b61ffff91909116600090815260066020526040902080546001600160a01b0319166001600160a01b03909216919091179055565b7f000000000000000000000000000000000000000000000000000000000000000081565b600060026001541415611712576040805162461bcd60e51b815260206004820152601f6024820152600080516020613b4f833981519152604482015290519081900360640190fd5b6002600155600061172661ffff8616612026565b6020015190506000816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161175a9190613576565b60206040518083038186803b15801561177257600080fd5b505afa158015611786573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117aa9190613385565b90506117c16001600160a01b038316333088612343565b60405163c4de93a560e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c4de93a59061181190899089908990600401613901565b602060405180830381600087803b15801561182b57600080fd5b505af115801561183f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118639190613385565b92506000826001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016118939190613576565b60206040518083038186803b1580156118ab57600080fd5b505afa1580156118bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118e39190613385565b90508181038015611902576119026001600160a01b0385163383612489565b5050600180555090949350505050565b61191a612022565b6001600160a01b031661192b610b0e565b6001600160a01b031614611974576040805162461bcd60e51b81526020600482018190526024820152600080516020613bdc833981519152604482015290519081900360640190fd5b600555565b7f000000000000000000000000000000000000000000000000000000000000000081565b600260045414156119c05760405162461bcd60e51b8152600401610d29906137d6565b600260045560608082156119f9576119da88888686611f69565b91506119e58a611fbd565b600354600254875191010186529050611a3e565b6040805160208082018352600082528251601f8b0182900482028101820190935289835290935089908990819084018382808284376000920191909152509293505050505b85513411611a5e5760405162461bcd60e51b8152600401610d2990613784565b6005546000908152600760205260409020546001600160a01b0316611a955760405162461bcd60e51b8152600401610d299061380d565b6005546000908152600760205260408082205488518251630d0e30db60e41b815292516001600160a01b039092169363d0e30db093919260048084019382900301818588803b158015611ae757600080fd5b505af1158015611afb573d6000803e3d6000fd5b505060055460009081526007602052604090819020548a51915163095ea7b360e01b81526001600160a01b03909116945063095ea7b39350611b6392507f000000000000000000000000000000000000000000000000000000000000000091906004016135ae565b602060405180830381600087803b158015611b7d57600080fd5b505af1158015611b91573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bb59190612cfb565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639fbf10fc876000015134038c6005546005548e8c600001518d602001518d8a8c6040518b63ffffffff1660e01b8152600401611c2599989796959493929190613a18565b6000604051808303818588803b158015611c3e57600080fd5b505af1158015611c52573d6000803e3d6000fd5b5050600160045550505050505050505050505050565b60003411611c885760405162461bcd60e51b8152600401610d29906136e7565b60055460009081526007602052604090205434906001600160a01b0316611cc15760405162461bcd60e51b8152600401610d299061380d565b600554600090815260076020526040808220548151630d0e30db60e41b815291516001600160a01b039091169263d0e30db09285926004808301939282900301818588803b158015611d1257600080fd5b505af1158015611d26573d6000803e3d6000fd5b50506005546000908152600760205260409081902054905163095ea7b360e01b81526001600160a01b03909116935063095ea7b39250611d8d91507f00000000000000000000000000000000000000000000000000000000000000009085906004016135ae565b602060405180830381600087803b158015611da757600080fd5b505af1158015611dbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ddf9190612cfb565b506005546040516321ec87bf60e21b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916387b21efc91611e32919085903390600401613aeb565b600060405180830381600087803b158015611e4c57600080fd5b505af1158015611e60573d6000803e3d6000fd5b5050505050565b611e6f612022565b6001600160a01b0316611e80610b0e565b6001600160a01b031614611ec9576040805162461bcd60e51b81526020600482018190526024820152600080516020613bdc833981519152604482015290519081900360640190fd5b6001600160a01b038116611f0e5760405162461bcd60e51b8152600401808060200182810382526026815260200180613b6f6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b606060148414611f8b5760405162461bcd60e51b8152600401610d2990613642565b8484338585604051602001611fa4959493929190613521565b6040516020818303038152906040529050949350505050565b61ffff81166000908152600660205260409020546060906001600160a01b031680611ffa5760405162461bcd60e51b8152600401610d2990613679565b8060405160200161200b9190613490565b604051602081830303815290604052915050919050565b3390565b61202e612b1b565b6000828152600960205260409020600101546001600160a01b0316156120955750600081815260096020908152604091829020825160608101845281546001600160a01b039081168252600183015416928101929092526002015491810191909152610749565b60405163068bcd8d60e01b81526000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063068bcd8d906120e49086906004016135d2565b60206040518083038186803b1580156120fc57600080fd5b505afa158015612110573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121349190612c9f565b90506001600160a01b03811661215c5760405162461bcd60e51b8152600401610d29906136b0565b6121926001600160a01b0382167f00000000000000000000000000000000000000000000000000000000000000006000196126eb565b6000816001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156121cd57600080fd5b505afa1580156121e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122059190612c9f565b90506001600160a01b03811661222d5760405162461bcd60e51b8152600401610d299061371e565b6122636001600160a01b0382167f00000000000000000000000000000000000000000000000000000000000000006000196126eb565b6000826001600160a01b031663feb56b156040518163ffffffff1660e01b815260040160206040518083038186803b15801561229e57600080fd5b505afa1580156122b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122d69190613385565b604080516060810182526001600160a01b03948516815294841660208087019182528683019384526000988952600990529620845181549085166001600160a01b031991821617825596516001820180549190951697169690961790925550516002909301929092555090565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261239d9085906127fa565b50505050565b60008082116123f9576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161240257fe5b0490505b92915050565b60008261241b57506000612406565b8282028284828161242857fe5b04146124655760405162461bcd60e51b8152600401808060200182810382526021815260200180613bbb6021913960400191505060405180910390fd5b9392505050565b6000908152600760205260409020546001600160a01b0316151590565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526110739084906127fa565b60006124e88260146128ab565b83511015612535576040805162461bcd60e51b8152602060048201526015602482015274746f416464726573735f6f75744f66426f756e647360581b604482015290519081900360640190fd5b500160200151600160601b900490565b3b151590565b60608161255981601f6128ab565b101561259d576040805162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b604482015290519081900360640190fd5b6125a783836128ab565b845110156125f0576040805162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b604482015290519081900360640190fd5b60608215801561260f5760405191506000825260208201604052612659565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015612648578051835260209283019201612630565b5050858452601f01601f1916604052505b50949350505050565b6000606060008060008661ffff166001600160401b038111801561268557600080fd5b506040519080825280601f01601f1916602001820160405280156126b0576020820181803683370190505b5090506000808751602089018b8e8ef191503d9250868311156126d1578692505b828152826000602083013e90999098509650505050505050565b801580612771575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b15801561274357600080fd5b505afa158015612757573d6000803e3d6000fd5b505050506040513d602081101561276d57600080fd5b5051155b6127ac5760405162461bcd60e51b8152600401808060200182810382526036815260200180613c266036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526110739084905b600061284f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166129059092919063ffffffff16565b8051909150156110735780806020019051602081101561286e57600080fd5b50516110735760405162461bcd60e51b815260040180806020018281038252602a815260200180613bfc602a913960400191505060405180910390fd5b600082820183811015612465576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6060612914848460008561291c565b949350505050565b60608247101561295d5760405162461bcd60e51b8152600401808060200182810382526026815260200180613b956026913960400191505060405180910390fd5b61296685612545565b6129b7576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106129f55780518252601f1990920191602091820191016129d6565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114612a57576040519150601f19603f3d011682016040523d82523d6000602084013e612a5c565b606091505b5091509150612a6c828286612a77565b979650505050505050565b60608315612a86575081612465565b825115612a965782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612ae0578181015183820152602001612ac8565b50505050905090810190601f168015612b0d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b604080516060810182526000808252602082018190529181019190915290565b803561074981613b36565b60008083601f840112612b57578182fd5b5081356001600160401b03811115612b6d578182fd5b602083019150836020828501011115612b8557600080fd5b9250929050565b600082601f830112612b9c578081fd5b81356001600160401b0380821115612bb057fe5b604051601f8301601f191681016020018281118282101715612bce57fe5b604052828152848301602001861015612be5578384fd5b82602086016020830137918201602001929092529392505050565b600060608284031215612c11578081fd5b604051606081016001600160401b038282108183111715612c2e57fe5b8160405282935084358352602085013560208401526040850135915080821115612c5757600080fd5b50612c6485828601612b8c565b6040830152505092915050565b803561ffff8116811461074957600080fd5b600060208284031215612c94578081fd5b813561246581613b36565b600060208284031215612cb0578081fd5b815161246581613b36565b600080600060608486031215612ccf578182fd5b8335612cda81613b36565b92506020840135612cea81613b36565b929592945050506040919091013590565b600060208284031215612d0c578081fd5b81518015158114612465578182fd5b600060208284031215612d2c578081fd5b61246582612c71565b60008060408385031215612d47578182fd5b612d5083612c71565b91506020830135612d6081613b36565b809150509250929050565b600080600080600080600080888a0360e0811215612d87578485fd5b612d908a612c71565b985060208a0135612da081613b36565b975060408a01356001600160401b0380821115612dbb578687fd5b612dc78d838e01612b46565b90995097508791506040605f1984011215612de0578687fd5b60405192506040830191508282108183111715612df957fe5b8160405260608c0135835260808c0135602084015282965060a08c0135925080831115612e24578586fd5b612e308d848e01612c00565b955060c08c0135925080831115612e45578485fd5b5050612e538b828c01612b46565b999c989b5096995094979396929594505050565b600080600080600080600060a0888a031215612e81578283fd5b612e8a88612c71565b965060208801356001600160401b0380821115612ea5578485fd5b612eb18b838c01612b46565b909850965060408a013591508082168214612eca578485fd5b909450606089013590612edc82613b36565b90935060808901359080821115612ef1578384fd5b50612efe8a828b01612b46565b989b979a50959850939692959293505050565b600080600060608486031215612f25578283fd5b612f2e84612c71565b925060208401356001600160401b03811115612f48578283fd5b612f5486828701612b8c565b925050604084013590509250925092565b60008060008060008060c08789031215612f7d578384fd5b612f8687612c71565b955060208701356001600160401b0380821115612fa1578586fd5b612fad8a838b01612b8c565b96506040890135955060608901359150612fc682613b36565b9093506080880135925060a08801359080821115612fe2578283fd5b50612fef89828a01612b8c565b9150509295509295509295565b600080600060608486031215613010578081fd5b61301984612c71565b925060208401359150604084013561303081613b36565b809150509250925092565b60008060008060808587031215613050578182fd5b61305985612c71565b93506020850135925060408501359150606085013561307781613b36565b939692955090935050565b60008060008060008060008060e0898b03121561309d578182fd5b6130a689612c71565b9750602089013596506040890135955060608901356130c481613b36565b94506080890135935060a08901356001600160401b03808211156130e6578384fd5b6130f28c838d01612b46565b909550935060c08b013591508082111561310a578283fd5b506131178b828c01612c00565b9150509295985092959890939650565b60008060008060008060008060006101008a8c031215613145578283fd5b61314e8a612c71565b985060208a0135975060408a0135965060608a013561316c81613b36565b955060808a0135945060a08a0135935060c08a01356001600160401b0380821115613195578485fd5b6131a18d838e01612b46565b909550935060e08c01359150808211156131b9578283fd5b506131c68c828d01612c00565b9150509295985092959850929598565b60008060008060008060008060008060006101208c8e0312156131f7578485fd5b6132008c612c71565b9a5060208c0135995060408c0135985061321c60608d01612b3b565b975060808c0135965060a08c013595506001600160401b038060c08e01351115613244578586fd5b6132548e60c08f01358f01612c00565b95508060e08e01351115613266578283fd5b6132768e60e08f01358f01612b46565b90955093506101008d013581101561328c578283fd5b5061329e8d6101008e01358e01612b46565b81935080925050509295989b509295989b9093969950565b600080600080600080600060a0888a0312156132d0578081fd5b6132d988612c71565b9650602088013560ff811681146132ee578182fd5b955060408801356001600160401b0380821115613309578283fd5b6133158b838c01612b46565b909750955060608a013591508082111561332d578283fd5b6133398b838c01612b46565b909550935060808a0135915080821115613351578283fd5b5061335e8a828b01612c00565b91505092959891949750929550565b60006020828403121561337e578081fd5b5035919050565b600060208284031215613396578081fd5b5051919050565b600080604083850312156133af578182fd5b823591506020830135612d6081613b36565b600080604083850312156133d3578182fd5b505080516020909101519092909150565b6000806000606084860312156133f8578081fd5b8335925060208401359150604084013561303081613b36565b60008284528282602086013780602084860101526020601f19601f85011685010190509392505050565b60008151808452613453816020860160208601613b0a565b601f01601f19169290920160200192915050565b60008151835260208201516020840152604082015160606040850152612914606085018261343b565b60609190911b6bffffffffffffffffffffffff1916815260140190565b60006bffffffffffffffffffffffff198560601b16825282846014840137910160140190815292915050565b60006bffffffffffffffffffffffff198460601b1682528251613503816014850160208701613b0a565b919091016014019392505050565b6000828483379101908152919050565b600085878337606085901b6bffffffffffffffffffffffff19168287019081528385601483013790920160140191825250949350505050565b6000825161356c818460208701613b0a565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b90815260200190565b6020808252601a908201527f53746172676174653a207065657220616c726561647920736574000000000000604082015260600190565b6020808252601690820152750a6e8c2e4cec2e8ca7440d2dcecc2d8d2c840d0c2e6d60531b604082015260600190565b6020808252601c908201527f53746172676174653a20696e76616c696420746f206164647265737300000000604082015260600190565b60208082526018908201527f53746172676174653a2070656572206e6f7420666f756e640000000000000000604082015260600190565b6020808252601d908201527f53746172676174653a20706f6f6c20646f6573206e6f74206578697374000000604082015260600190565b60208082526018908201527f53746172676174653a206d73672e76616c756520697320300000000000000000604082015260600190565b6020808252601e908201527f53746172676174653a20746f6b656e20646f6573206e6f742065786973740000604082015260600190565b60208082526015908201527429ba30b933b0ba329d1037b7363c903937baba32b960591b604082015260600190565b60208082526032908201527f53746172676174653a206d73672e76616c7565206d757374206265203e205f736040820152711dd85c105b5bdd5b9d0b985b5bdd5b9d131160721b606082015260800190565b60208082526018908201527f53746172676174653a207265656e7472616e742063616c6c0000000000000000604082015260600190565b6020808252601d908201527f53746172676174653a20506f6f6c20646f6573206e6f74206578697374000000604082015260600190565b81516001600160a01b039081168252602080840151909116908201526040918201519181019190915260600190565b600061ffff8816825260c0602083015261389060c083018861343b565b604083018790526001600160a01b03861660608401526080830185905282810360a08401526138bf818561343b565b9998505050505050505050565b600061ffff86168252608060208301526138e9608083018661343b565b8460408401528281036060840152612a6c818561343b565b61ffff93909316835260208301919091526001600160a01b0316604082015260600190565b61ffff949094168452602084019290925260408301526001600160a01b0316606082015260800190565b600061ffff8a16825288602083015287604083015260018060a01b038716606083015285608083015260e060a083015261398e60e083018587613411565b82810360c08401526139a08185613467565b9b9a5050505050505050505050565b600061010061ffff8c1683528a602084015289604084015260018060a01b03891660608401528760808401528660a08401528060c08401526139f48184018688613411565b905082810360e0840152613a088185613467565b9c9b505050505050505050505050565b600061012061ffff8c1683528a602084015289604084015260018060a01b03891660608401528760808401528660a08401528060c0840152613a5c81840187613467565b905082810360e0840152613a70818661343b565b9050828103610100840152613a08818561343b565b600061ffff8716825260ff8616602083015260a06040830152613aab60a083018661343b565b8281036060840152613abd818661343b565b90508281036080840152613ad18185613467565b98975050505050505050565b918252602082015260400190565b92835260208301919091526001600160a01b0316604082015260600190565b60005b83811015613b25578181015183820152602001613b0d565b8381111561239d5750506000910152565b6001600160a01b0381168114613b4b57600080fd5b5056fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c004f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a26469706673582212200efda618ab047856caf8ca3589e042a5276d375c167b96507ce9cac7f9e07fbe64736f6c6343000706003300000000000000000000000045f1a95a4d3f3836523f5c83673c797f4d4d263b0000000000000000000000002f6f07cdcf3588944bf4c42ac74ff24bf56e7590000000000000000000000000808d7c71ad2ba3fa531b068a2417c63106bc0949000000000000000000000000000000000000000000000000000000000000000d

Deployed Bytecode

0x6080604052600436106101cd5760003560e01c80639ba3aa74116100f7578063c2362d0d11610095578063e0b63dee11610064578063e0b63dee146104f8578063e62268891461050d578063ed99530714610520578063f2fde38b14610528576101cd565b8063c2362d0d14610483578063c45a0155146104a3578063c4de93a5146104b8578063d9eebbaf146104d8576101cd565b8063a765cd12116100d1578063a765cd121461040e578063a9e56f3c1461042e578063ab8236f314610443578063c0e6ac6c14610463576101cd565b80639ba3aa74146103c85780639fbf10fc146103db578063a7229fd9146103ee576101cd565b80634b60b4251161016f57806384d0dba31161013e57806384d0dba31461036d57806387b21efc146103805780638da5cb5b146103a05780638f2e1d18146103b5576101cd565b80634b60b425146102e75780634fe7009114610309578063715018a614610338578063767954dc1461034d576101cd565b80632127fa72116101ab5780632127fa721461024d5780632902aeb01461027a5780632f380b351461029a578063449180a8146102c7576101cd565b80630a512369146101d25780631ce4bb7f14610209578063205cfe9d1461022b575b600080fd5b3480156101de57600080fd5b506101f26101ed3660046132b6565b610548565b604051610200929190613add565b60405180910390f35b34801561021557600080fd5b5061022961022436600461336d565b610679565b005b34801561023757600080fd5b506102406106e0565b60405161020091906135d2565b34801561025957600080fd5b5061026d61026836600461336d565b6106e6565b6040516102009190613576565b34801561028657600080fd5b50610240610295366004612f11565b610701565b3480156102a657600080fd5b506102ba6102b536600461336d565b610735565b6040516102009190613844565b3480156102d357600080fd5b506102296102e236600461339d565b61074e565b3480156102f357600080fd5b506102fc6107de565b60405161020091906135c7565b34801561031557600080fd5b5061032961032436600461336d565b6107e7565b6040516102009392919061358a565b34801561034457600080fd5b50610229610815565b34801561035957600080fd5b5061022961036836600461336d565b6108c1565b61022961037b366004613127565b610928565b34801561038c57600080fd5b5061022961039b3660046133e4565b610a39565b3480156103ac57600080fd5b5061026d610b0e565b6102296103c3366004613082565b610b1d565b6102296103d636600461303b565b610c2b565b6102296103e93660046131d6565b610d06565b3480156103fa57600080fd5b50610229610409366004612cbb565b610ffd565b34801561041a57600080fd5b5061026d610429366004612d1b565b611078565b34801561043a57600080fd5b5061026d611093565b34801561044f57600080fd5b5061022961045e366004612f65565b6110b7565b34801561046f57600080fd5b5061022961047e366004612e67565b61142b565b34801561048f57600080fd5b5061022961049e366004612d35565b6115d6565b3480156104af57600080fd5b5061026d6116a6565b3480156104c457600080fd5b506102406104d3366004612ffc565b6116ca565b3480156104e457600080fd5b506102296104f336600461336d565b611912565b34801561050457600080fd5b5061026d611979565b61022961051b366004612d6b565b61199d565b610229611c68565b34801561053457600080fd5b50610229610543366004612c83565b611e67565b600080606080851561057f5761056089898989611f69565b915061056b8b611fbd565b6003546002548751910101865290506105c4565b6040805160208082018352600082528251601f8c018290048202810182019093528a83529093508a908a90819084018382808284376000920191909152509293505050505b604051630a51236960e01b81526001600160a01b037f00000000000000000000000045f1a95a4d3f3836523f5c83673c797f4d4d263b1690630a51236990610618908e908e90869088908c90600401613a85565b604080518083038186803b15801561062f57600080fd5b505afa158015610643573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061066791906133c1565b93509350505097509795505050505050565b610681612022565b6001600160a01b0316610692610b0e565b6001600160a01b0316146106db576040805162461bcd60e51b81526020600482018190526024820152600080516020613bdc833981519152604482015290519081900360640190fd5b600255565b60055481565b6007602052600090815260409020546001600160a01b031681565b6008602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b61073d612b1b565b61074682612026565b90505b919050565b610756612022565b6001600160a01b0316610767610b0e565b6001600160a01b0316146107b0576040805162461bcd60e51b81526020600482018190526024820152600080516020613bdc833981519152604482015290519081900360640190fd5b60009182526007602052604090912080546001600160a01b0319166001600160a01b03909216919091179055565b60045460021490565b6009602052600090815260409020805460018201546002909201546001600160a01b03918216929091169083565b61081d612022565b6001600160a01b031661082e610b0e565b6001600160a01b031614610877576040805162461bcd60e51b81526020600482018190526024820152600080516020613bdc833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6108c9612022565b6001600160a01b03166108da610b0e565b6001600160a01b031614610923576040805162461bcd60e51b81526020600482018190526024820152600080516020613bdc833981519152604482015290519081900360640190fd5b600355565b6002600154141561096e576040805162461bcd60e51b815260206004820152601f6024820152600080516020613b4f833981519152604482015290519081900360640190fd5b6002600155600061097e89612026565b6020015190506109996001600160a01b038216333089612343565b6040516384d0dba360e01b81526001600160a01b037f0000000000000000000000002f6f07cdcf3588944bf4c42ac74ff24bf56e759016906384d0dba39034906109f7908e908e908e908e908e908e908e908e908e906004016139af565b6000604051808303818588803b158015610a1057600080fd5b505af1158015610a24573d6000803e3d6000fd5b50506001805550505050505050505050505050565b6000610a4484612026565b9050600181604001511115610a6f576040810151610a6c90610a6685826123a3565b9061240c565b92505b8051610a86906001600160a01b0316333086612343565b6040516321ec87bf60e21b81526001600160a01b037f0000000000000000000000002f6f07cdcf3588944bf4c42ac74ff24bf56e759016906387b21efc90610ad690879087908790600401613aeb565b600060405180830381600087803b158015610af057600080fd5b505af1158015610b04573d6000803e3d6000fd5b5050505050505050565b6000546001600160a01b031690565b60026001541415610b63576040805162461bcd60e51b815260206004820152601f6024820152600080516020613b4f833981519152604482015290519081900360640190fd5b60026001556000610b7388612026565b602001519050610b8e6001600160a01b038216333088612343565b6040516311e5c3a360e31b81526001600160a01b037f0000000000000000000000002f6f07cdcf3588944bf4c42ac74ff24bf56e75901690638f2e1d18903490610bea908d908d908d908d908d908d908d908d90600401613950565b6000604051808303818588803b158015610c0357600080fd5b505af1158015610c17573d6000803e3d6000fd5b505060018055505050505050505050505050565b60026001541415610c71576040805162461bcd60e51b815260206004820152601f6024820152600080516020613b4f833981519152604482015290519081900360640190fd5b60026001556040516326e8ea9d60e21b81526001600160a01b037f0000000000000000000000002f6f07cdcf3588944bf4c42ac74ff24bf56e75901690639ba3aa74903490610cca908890889088908890600401613926565b6000604051808303818588803b158015610ce357600080fd5b505af1158015610cf7573d6000803e3d6000fd5b50506001805550505050505050565b60026004541415610d325760405162461bcd60e51b8152600401610d29906137d6565b60405180910390fd5b60026004556060808215610d6b57610d4c86868686611f69565b9150610d578d611fbd565b600354600254895191010188529050610db0565b6040805160208082018352600082528251601f890182900482028101820190935287835290935087908790819084018382808284376000920191909152509293505050505b610db98c61246c565b15610efb57883411610ddd5760405162461bcd60e51b8152600401610d2990613784565b60008c815260076020526040808220548151630d0e30db60e41b815291516001600160a01b039091169263d0e30db0928d926004808301939282900301818588803b158015610e2b57600080fd5b505af1158015610e3f573d6000803e3d6000fd5b50505060008e8152600760205260409081902054905163095ea7b360e01b81526001600160a01b03909116925063095ea7b39150610ea3907f0000000000000000000000002f6f07cdcf3588944bf4c42ac74ff24bf56e7590908d906004016135ae565b602060405180830381600087803b158015610ebd57600080fd5b505af1158015610ed1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef59190612cfb565b50610f44565b6000610f068d612026565b9050600181604001511115610f2b576040810151610f2890610a668c826123a3565b99505b8051610f42906001600160a01b031633308d612343565b505b7f0000000000000000000000002f6f07cdcf3588944bf4c42ac74ff24bf56e75906001600160a01b0316639fbf10fc610f7c8e61246c565b610f865734610f8a565b8a34035b8f8f8f8f8f8f8f8a8c6040518b63ffffffff1660e01b8152600401610fb799989796959493929190613a18565b6000604051808303818588803b158015610fd057600080fd5b505af1158015610fe4573d6000803e3d6000fd5b5050600160045550505050505050505050505050505050565b611005612022565b6001600160a01b0316611016610b0e565b6001600160a01b03161461105f576040805162461bcd60e51b81526020600482018190526024820152600080516020613bdc833981519152604482015290519081900360640190fd5b6110736001600160a01b0384168383612489565b505050565b6006602052600090815260409020546001600160a01b031681565b7f0000000000000000000000002f6f07cdcf3588944bf4c42ac74ff24bf56e759081565b336001600160a01b037f0000000000000000000000002f6f07cdcf3588944bf4c42ac74ff24bf56e759016146110ff5760405162461bcd60e51b8152600401610d2990613755565b602881511161110d57611423565b600061111982826124db565b604080518082018252601981527f7472616e7366657228616464726573732c75696e7432353629000000000000006020909101525190915060009081906001600160a01b038716907fa9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b9061119390869089906024016135ae565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516111d1919061355a565b6000604051808303816000865af19150503d806000811461120e576040519150601f19603f3d011682016040523d82523d6000602084013e611213565b606091505b509150915081801561123d57508051158061123d57508080602001905181019061123d9190612cfb565b156113e357611254836001600160a01b0316612545565b61126057505050611423565b600063ab8236f360e01b8a6112768760146124db565b6040516020016112869190613490565b6040516020818303038152906040528a8a8a6112b16028808d51038d61254b9092919063ffffffff16565b6040516024016112c696959493929190613873565b604051602081830303815290604052906001600160e01b0319166020820180516001600160e01b038381831617835250505050905060006002545a03905060008061131e6001600160a01b0388168483609688612662565b91509150816113da57868460405160200161133a9291906134d9565b60405160208183030381529060405280519060200120600860008f61ffff1661ffff1681526020019081526020016000208d604051611379919061355a565b908152602001604051809103902060008d8152602001908152602001600020819055507f52ee826ce7905614ca74aedf19f7404f1220cd5ee254406a4586eb034a6119498d8d8d846040516113d194939291906138cc565b60405180910390a15b5050505061141f565b7fedf70e267c659b0af90f1e8a3c6aa7db09032c676b46b0a4de8d328f73448cef8684876040516114169392919061358a565b60405180910390a15b5050505b505050505050565b60026001541415611471576040805162461bcd60e51b815260206004820152601f6024820152600080516020613b4f833981519152604482015290519081900360640190fd5b600260015560405160009061148e908590859085906020016134ad565b60408051601f19818403018152828252805160209182012061ffff8c166000908152600890925291902090925082916114ca908a908a90613511565b90815260200160405180910390206000876001600160401b0316815260200190815260200160002054146115105760405162461bcd60e51b8152600401610d2990613612565b61ffff88166000908152600860205260409081902090516115349089908990613511565b90815260200160405180910390206000866001600160401b03168152602001908152602001600020600090556000806115b55a6000609688888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506001600160a01b038d1695949392915050612662565b91509150816115c657805181602001fd5b5050600180555050505050505050565b6115de612022565b6001600160a01b03166115ef610b0e565b6001600160a01b031614611638576040805162461bcd60e51b81526020600482018190526024820152600080516020613bdc833981519152604482015290519081900360640190fd5b61ffff82166000908152600660205260409020546001600160a01b0316156116725760405162461bcd60e51b8152600401610d29906135db565b61ffff91909116600090815260066020526040902080546001600160a01b0319166001600160a01b03909216919091179055565b7f000000000000000000000000af54be5b6eec24d6bfacf1cce4eaf680a823939881565b600060026001541415611712576040805162461bcd60e51b815260206004820152601f6024820152600080516020613b4f833981519152604482015290519081900360640190fd5b6002600155600061172661ffff8616612026565b6020015190506000816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161175a9190613576565b60206040518083038186803b15801561177257600080fd5b505afa158015611786573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117aa9190613385565b90506117c16001600160a01b038316333088612343565b60405163c4de93a560e01b81526001600160a01b037f0000000000000000000000002f6f07cdcf3588944bf4c42ac74ff24bf56e7590169063c4de93a59061181190899089908990600401613901565b602060405180830381600087803b15801561182b57600080fd5b505af115801561183f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118639190613385565b92506000826001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016118939190613576565b60206040518083038186803b1580156118ab57600080fd5b505afa1580156118bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118e39190613385565b90508181038015611902576119026001600160a01b0385163383612489565b5050600180555090949350505050565b61191a612022565b6001600160a01b031661192b610b0e565b6001600160a01b031614611974576040805162461bcd60e51b81526020600482018190526024820152600080516020613bdc833981519152604482015290519081900360640190fd5b600555565b7f00000000000000000000000045f1a95a4d3f3836523f5c83673c797f4d4d263b81565b600260045414156119c05760405162461bcd60e51b8152600401610d29906137d6565b600260045560608082156119f9576119da88888686611f69565b91506119e58a611fbd565b600354600254875191010186529050611a3e565b6040805160208082018352600082528251601f8b0182900482028101820190935289835290935089908990819084018382808284376000920191909152509293505050505b85513411611a5e5760405162461bcd60e51b8152600401610d2990613784565b6005546000908152600760205260409020546001600160a01b0316611a955760405162461bcd60e51b8152600401610d299061380d565b6005546000908152600760205260408082205488518251630d0e30db60e41b815292516001600160a01b039092169363d0e30db093919260048084019382900301818588803b158015611ae757600080fd5b505af1158015611afb573d6000803e3d6000fd5b505060055460009081526007602052604090819020548a51915163095ea7b360e01b81526001600160a01b03909116945063095ea7b39350611b6392507f0000000000000000000000002f6f07cdcf3588944bf4c42ac74ff24bf56e759091906004016135ae565b602060405180830381600087803b158015611b7d57600080fd5b505af1158015611b91573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bb59190612cfb565b507f0000000000000000000000002f6f07cdcf3588944bf4c42ac74ff24bf56e75906001600160a01b0316639fbf10fc876000015134038c6005546005548e8c600001518d602001518d8a8c6040518b63ffffffff1660e01b8152600401611c2599989796959493929190613a18565b6000604051808303818588803b158015611c3e57600080fd5b505af1158015611c52573d6000803e3d6000fd5b5050600160045550505050505050505050505050565b60003411611c885760405162461bcd60e51b8152600401610d29906136e7565b60055460009081526007602052604090205434906001600160a01b0316611cc15760405162461bcd60e51b8152600401610d299061380d565b600554600090815260076020526040808220548151630d0e30db60e41b815291516001600160a01b039091169263d0e30db09285926004808301939282900301818588803b158015611d1257600080fd5b505af1158015611d26573d6000803e3d6000fd5b50506005546000908152600760205260409081902054905163095ea7b360e01b81526001600160a01b03909116935063095ea7b39250611d8d91507f0000000000000000000000002f6f07cdcf3588944bf4c42ac74ff24bf56e75909085906004016135ae565b602060405180830381600087803b158015611da757600080fd5b505af1158015611dbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ddf9190612cfb565b506005546040516321ec87bf60e21b81526001600160a01b037f0000000000000000000000002f6f07cdcf3588944bf4c42ac74ff24bf56e759016916387b21efc91611e32919085903390600401613aeb565b600060405180830381600087803b158015611e4c57600080fd5b505af1158015611e60573d6000803e3d6000fd5b5050505050565b611e6f612022565b6001600160a01b0316611e80610b0e565b6001600160a01b031614611ec9576040805162461bcd60e51b81526020600482018190526024820152600080516020613bdc833981519152604482015290519081900360640190fd5b6001600160a01b038116611f0e5760405162461bcd60e51b8152600401808060200182810382526026815260200180613b6f6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b606060148414611f8b5760405162461bcd60e51b8152600401610d2990613642565b8484338585604051602001611fa4959493929190613521565b6040516020818303038152906040529050949350505050565b61ffff81166000908152600660205260409020546060906001600160a01b031680611ffa5760405162461bcd60e51b8152600401610d2990613679565b8060405160200161200b9190613490565b604051602081830303815290604052915050919050565b3390565b61202e612b1b565b6000828152600960205260409020600101546001600160a01b0316156120955750600081815260096020908152604091829020825160608101845281546001600160a01b039081168252600183015416928101929092526002015491810191909152610749565b60405163068bcd8d60e01b81526000906001600160a01b037f000000000000000000000000af54be5b6eec24d6bfacf1cce4eaf680a8239398169063068bcd8d906120e49086906004016135d2565b60206040518083038186803b1580156120fc57600080fd5b505afa158015612110573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121349190612c9f565b90506001600160a01b03811661215c5760405162461bcd60e51b8152600401610d29906136b0565b6121926001600160a01b0382167f0000000000000000000000002f6f07cdcf3588944bf4c42ac74ff24bf56e75906000196126eb565b6000816001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156121cd57600080fd5b505afa1580156121e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122059190612c9f565b90506001600160a01b03811661222d5760405162461bcd60e51b8152600401610d299061371e565b6122636001600160a01b0382167f0000000000000000000000002f6f07cdcf3588944bf4c42ac74ff24bf56e75906000196126eb565b6000826001600160a01b031663feb56b156040518163ffffffff1660e01b815260040160206040518083038186803b15801561229e57600080fd5b505afa1580156122b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122d69190613385565b604080516060810182526001600160a01b03948516815294841660208087019182528683019384526000988952600990529620845181549085166001600160a01b031991821617825596516001820180549190951697169690961790925550516002909301929092555090565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261239d9085906127fa565b50505050565b60008082116123f9576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161240257fe5b0490505b92915050565b60008261241b57506000612406565b8282028284828161242857fe5b04146124655760405162461bcd60e51b8152600401808060200182810382526021815260200180613bbb6021913960400191505060405180910390fd5b9392505050565b6000908152600760205260409020546001600160a01b0316151590565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526110739084906127fa565b60006124e88260146128ab565b83511015612535576040805162461bcd60e51b8152602060048201526015602482015274746f416464726573735f6f75744f66426f756e647360581b604482015290519081900360640190fd5b500160200151600160601b900490565b3b151590565b60608161255981601f6128ab565b101561259d576040805162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b604482015290519081900360640190fd5b6125a783836128ab565b845110156125f0576040805162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b604482015290519081900360640190fd5b60608215801561260f5760405191506000825260208201604052612659565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015612648578051835260209283019201612630565b5050858452601f01601f1916604052505b50949350505050565b6000606060008060008661ffff166001600160401b038111801561268557600080fd5b506040519080825280601f01601f1916602001820160405280156126b0576020820181803683370190505b5090506000808751602089018b8e8ef191503d9250868311156126d1578692505b828152826000602083013e90999098509650505050505050565b801580612771575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b15801561274357600080fd5b505afa158015612757573d6000803e3d6000fd5b505050506040513d602081101561276d57600080fd5b5051155b6127ac5760405162461bcd60e51b8152600401808060200182810382526036815260200180613c266036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526110739084905b600061284f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166129059092919063ffffffff16565b8051909150156110735780806020019051602081101561286e57600080fd5b50516110735760405162461bcd60e51b815260040180806020018281038252602a815260200180613bfc602a913960400191505060405180910390fd5b600082820183811015612465576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6060612914848460008561291c565b949350505050565b60608247101561295d5760405162461bcd60e51b8152600401808060200182810382526026815260200180613b956026913960400191505060405180910390fd5b61296685612545565b6129b7576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106129f55780518252601f1990920191602091820191016129d6565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114612a57576040519150601f19603f3d011682016040523d82523d6000602084013e612a5c565b606091505b5091509150612a6c828286612a77565b979650505050505050565b60608315612a86575081612465565b825115612a965782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612ae0578181015183820152602001612ac8565b50505050905090810190601f168015612b0d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b604080516060810182526000808252602082018190529181019190915290565b803561074981613b36565b60008083601f840112612b57578182fd5b5081356001600160401b03811115612b6d578182fd5b602083019150836020828501011115612b8557600080fd5b9250929050565b600082601f830112612b9c578081fd5b81356001600160401b0380821115612bb057fe5b604051601f8301601f191681016020018281118282101715612bce57fe5b604052828152848301602001861015612be5578384fd5b82602086016020830137918201602001929092529392505050565b600060608284031215612c11578081fd5b604051606081016001600160401b038282108183111715612c2e57fe5b8160405282935084358352602085013560208401526040850135915080821115612c5757600080fd5b50612c6485828601612b8c565b6040830152505092915050565b803561ffff8116811461074957600080fd5b600060208284031215612c94578081fd5b813561246581613b36565b600060208284031215612cb0578081fd5b815161246581613b36565b600080600060608486031215612ccf578182fd5b8335612cda81613b36565b92506020840135612cea81613b36565b929592945050506040919091013590565b600060208284031215612d0c578081fd5b81518015158114612465578182fd5b600060208284031215612d2c578081fd5b61246582612c71565b60008060408385031215612d47578182fd5b612d5083612c71565b91506020830135612d6081613b36565b809150509250929050565b600080600080600080600080888a0360e0811215612d87578485fd5b612d908a612c71565b985060208a0135612da081613b36565b975060408a01356001600160401b0380821115612dbb578687fd5b612dc78d838e01612b46565b90995097508791506040605f1984011215612de0578687fd5b60405192506040830191508282108183111715612df957fe5b8160405260608c0135835260808c0135602084015282965060a08c0135925080831115612e24578586fd5b612e308d848e01612c00565b955060c08c0135925080831115612e45578485fd5b5050612e538b828c01612b46565b999c989b5096995094979396929594505050565b600080600080600080600060a0888a031215612e81578283fd5b612e8a88612c71565b965060208801356001600160401b0380821115612ea5578485fd5b612eb18b838c01612b46565b909850965060408a013591508082168214612eca578485fd5b909450606089013590612edc82613b36565b90935060808901359080821115612ef1578384fd5b50612efe8a828b01612b46565b989b979a50959850939692959293505050565b600080600060608486031215612f25578283fd5b612f2e84612c71565b925060208401356001600160401b03811115612f48578283fd5b612f5486828701612b8c565b925050604084013590509250925092565b60008060008060008060c08789031215612f7d578384fd5b612f8687612c71565b955060208701356001600160401b0380821115612fa1578586fd5b612fad8a838b01612b8c565b96506040890135955060608901359150612fc682613b36565b9093506080880135925060a08801359080821115612fe2578283fd5b50612fef89828a01612b8c565b9150509295509295509295565b600080600060608486031215613010578081fd5b61301984612c71565b925060208401359150604084013561303081613b36565b809150509250925092565b60008060008060808587031215613050578182fd5b61305985612c71565b93506020850135925060408501359150606085013561307781613b36565b939692955090935050565b60008060008060008060008060e0898b03121561309d578182fd5b6130a689612c71565b9750602089013596506040890135955060608901356130c481613b36565b94506080890135935060a08901356001600160401b03808211156130e6578384fd5b6130f28c838d01612b46565b909550935060c08b013591508082111561310a578283fd5b506131178b828c01612c00565b9150509295985092959890939650565b60008060008060008060008060006101008a8c031215613145578283fd5b61314e8a612c71565b985060208a0135975060408a0135965060608a013561316c81613b36565b955060808a0135945060a08a0135935060c08a01356001600160401b0380821115613195578485fd5b6131a18d838e01612b46565b909550935060e08c01359150808211156131b9578283fd5b506131c68c828d01612c00565b9150509295985092959850929598565b60008060008060008060008060008060006101208c8e0312156131f7578485fd5b6132008c612c71565b9a5060208c0135995060408c0135985061321c60608d01612b3b565b975060808c0135965060a08c013595506001600160401b038060c08e01351115613244578586fd5b6132548e60c08f01358f01612c00565b95508060e08e01351115613266578283fd5b6132768e60e08f01358f01612b46565b90955093506101008d013581101561328c578283fd5b5061329e8d6101008e01358e01612b46565b81935080925050509295989b509295989b9093969950565b600080600080600080600060a0888a0312156132d0578081fd5b6132d988612c71565b9650602088013560ff811681146132ee578182fd5b955060408801356001600160401b0380821115613309578283fd5b6133158b838c01612b46565b909750955060608a013591508082111561332d578283fd5b6133398b838c01612b46565b909550935060808a0135915080821115613351578283fd5b5061335e8a828b01612c00565b91505092959891949750929550565b60006020828403121561337e578081fd5b5035919050565b600060208284031215613396578081fd5b5051919050565b600080604083850312156133af578182fd5b823591506020830135612d6081613b36565b600080604083850312156133d3578182fd5b505080516020909101519092909150565b6000806000606084860312156133f8578081fd5b8335925060208401359150604084013561303081613b36565b60008284528282602086013780602084860101526020601f19601f85011685010190509392505050565b60008151808452613453816020860160208601613b0a565b601f01601f19169290920160200192915050565b60008151835260208201516020840152604082015160606040850152612914606085018261343b565b60609190911b6bffffffffffffffffffffffff1916815260140190565b60006bffffffffffffffffffffffff198560601b16825282846014840137910160140190815292915050565b60006bffffffffffffffffffffffff198460601b1682528251613503816014850160208701613b0a565b919091016014019392505050565b6000828483379101908152919050565b600085878337606085901b6bffffffffffffffffffffffff19168287019081528385601483013790920160140191825250949350505050565b6000825161356c818460208701613b0a565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b90815260200190565b6020808252601a908201527f53746172676174653a207065657220616c726561647920736574000000000000604082015260600190565b6020808252601690820152750a6e8c2e4cec2e8ca7440d2dcecc2d8d2c840d0c2e6d60531b604082015260600190565b6020808252601c908201527f53746172676174653a20696e76616c696420746f206164647265737300000000604082015260600190565b60208082526018908201527f53746172676174653a2070656572206e6f7420666f756e640000000000000000604082015260600190565b6020808252601d908201527f53746172676174653a20706f6f6c20646f6573206e6f74206578697374000000604082015260600190565b60208082526018908201527f53746172676174653a206d73672e76616c756520697320300000000000000000604082015260600190565b6020808252601e908201527f53746172676174653a20746f6b656e20646f6573206e6f742065786973740000604082015260600190565b60208082526015908201527429ba30b933b0ba329d1037b7363c903937baba32b960591b604082015260600190565b60208082526032908201527f53746172676174653a206d73672e76616c7565206d757374206265203e205f736040820152711dd85c105b5bdd5b9d0b985b5bdd5b9d131160721b606082015260800190565b60208082526018908201527f53746172676174653a207265656e7472616e742063616c6c0000000000000000604082015260600190565b6020808252601d908201527f53746172676174653a20506f6f6c20646f6573206e6f74206578697374000000604082015260600190565b81516001600160a01b039081168252602080840151909116908201526040918201519181019190915260600190565b600061ffff8816825260c0602083015261389060c083018861343b565b604083018790526001600160a01b03861660608401526080830185905282810360a08401526138bf818561343b565b9998505050505050505050565b600061ffff86168252608060208301526138e9608083018661343b565b8460408401528281036060840152612a6c818561343b565b61ffff93909316835260208301919091526001600160a01b0316604082015260600190565b61ffff949094168452602084019290925260408301526001600160a01b0316606082015260800190565b600061ffff8a16825288602083015287604083015260018060a01b038716606083015285608083015260e060a083015261398e60e083018587613411565b82810360c08401526139a08185613467565b9b9a5050505050505050505050565b600061010061ffff8c1683528a602084015289604084015260018060a01b03891660608401528760808401528660a08401528060c08401526139f48184018688613411565b905082810360e0840152613a088185613467565b9c9b505050505050505050505050565b600061012061ffff8c1683528a602084015289604084015260018060a01b03891660608401528760808401528660a08401528060c0840152613a5c81840187613467565b905082810360e0840152613a70818661343b565b9050828103610100840152613a08818561343b565b600061ffff8716825260ff8616602083015260a06040830152613aab60a083018661343b565b8281036060840152613abd818661343b565b90508281036080840152613ad18185613467565b98975050505050505050565b918252602082015260400190565b92835260208301919091526001600160a01b0316604082015260600190565b60005b83811015613b25578181015183820152602001613b0d565b8381111561239d5750506000910152565b6001600160a01b0381168114613b4b57600080fd5b5056fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c004f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a26469706673582212200efda618ab047856caf8ca3589e042a5276d375c167b96507ce9cac7f9e07fbe64736f6c63430007060033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000045f1a95a4d3f3836523f5c83673c797f4d4d263b0000000000000000000000002f6f07cdcf3588944bf4c42ac74ff24bf56e7590000000000000000000000000808d7c71ad2ba3fa531b068a2417c63106bc0949000000000000000000000000000000000000000000000000000000000000000d

-----Decoded View---------------
Arg [0] : _stargateBridge (address): 0x45f1a95a4d3f3836523f5c83673c797f4d4d263b
Arg [1] : _stargateRouter (address): 0x2f6f07cdcf3588944bf4c42ac74ff24bf56e7590
Arg [2] : _stargateEthVault (address): 0x808d7c71ad2ba3fa531b068a2417c63106bc0949
Arg [3] : _wethPoolId (uint256): 13

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 00000000000000000000000045f1a95a4d3f3836523f5c83673c797f4d4d263b
Arg [1] : 0000000000000000000000002f6f07cdcf3588944bf4c42ac74ff24bf56e7590
Arg [2] : 000000000000000000000000808d7c71ad2ba3fa531b068a2417c63106bc0949
Arg [3] : 000000000000000000000000000000000000000000000000000000000000000d


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.