APE Price: $1.15 (+4.38%)

Contract

0x52117F1B96f661Fd1059b3d2a2e8041f3A77B62b

Overview

APE Balance

Apechain LogoApechain LogoApechain Logo0 APE

APE Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60a0604043224642024-11-15 10:56:153 days ago1731668175IN
 Create: CamelotAdapter
0 APE0.0325761325.42069

Parent Transaction Hash Block From To
View All Internal Transactions

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CamelotAdapter

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 10 : CamelotAdapter.sol
// SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.0;

import "../interface/IERC20.sol";
import "../lib/SafeERC20.sol";
import "../ApeAdapter.sol";


interface IFactory {
    function getPair(address,address) external view returns (address);
}

interface IPair {
    function getAmountOut(uint256, address) external view returns (uint256);
    function swap(
        uint256 amount0Out,
        uint256 amount1Out,
        address to,
        bytes calldata data,
        address referrer
    ) external;
}

contract CamelotAdapter is ApeAdapter {
    using SafeERC20 for IERC20;

    address immutable FACTORY;
    address referrer;

    constructor(
        string memory _name,
        address _factory,
        uint256 _swapGasEstimate
    ) ApeAdapter(_name, _swapGasEstimate) {
        FACTORY = _factory;
    }

    function setReferrer(address _referrer) public onlyMaintainer {
        referrer = _referrer;
    } 

    function getQuoteAndPair(
        uint256 _amountIn,
        address _tokenIn,
        address _tokenOut
    ) internal view returns (uint256 amountOut, address pair) {
        pair = IFactory(FACTORY).getPair(_tokenIn, _tokenOut);
        if (pair != address(0))
            amountOut = IPair(pair).getAmountOut(_amountIn, _tokenIn);
    }

    function _query(
        uint256 _amountIn,
        address _tokenIn,
        address _tokenOut
    ) internal view override returns (uint256 amountOut) {
        if (_tokenIn != _tokenOut && _amountIn != 0)
            (amountOut, ) = getQuoteAndPair(_amountIn, _tokenIn, _tokenOut);
    }

    function _swap(
        uint256 _amountIn,
        uint256 _amountOut,
        address _tokenIn,
        address _tokenOut,
        address to
    ) internal override {
        (uint256 amountOut, address pair) = getQuoteAndPair(_amountIn, _tokenIn, _tokenOut);
        require(amountOut >= _amountOut, "Insufficent amount out");
        (uint256 amount0Out, uint256 amount1Out) = (_tokenIn < _tokenOut)
            ? (uint256(0), amountOut)
            : (amountOut, uint256(0));
        IERC20(_tokenIn).safeTransfer(pair, _amountIn);
        IPair(pair).swap(amount0Out, amount1Out, to, new bytes(0), referrer);
    }
}

File 2 of 10 : IERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IERC20 {
    event Approval(address, address, uint256);
    event Transfer(address, address, uint256);

    function name() external view returns (string memory);

    function decimals() external view returns (uint8);

    function transferFrom(
        address,
        address,
        uint256
    ) external returns (bool);

    function allowance(address, address) external view returns (uint256);

    function approve(address, uint256) external returns (bool);

    function transfer(address, uint256) external returns (bool);

    function balanceOf(address) external view returns (uint256);

    function nonces(address) external view returns (uint256); // Only tokens that support permit

    function permit(
        address,
        address,
        uint256,
        uint256,
        uint8,
        bytes32,
        bytes32
    ) external; // Only tokens that support permit

    function swap(address, uint256) external; // Only Avalanche bridge tokens

    function swapSupply(address) external view returns (uint256); // Only Avalanche bridge tokens

    function totalSupply() external view returns (uint256);
}

File 3 of 10 : SafeERC20.sol
// This is a simplified version of OpenZepplin's SafeERC20 library
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma experimental ABIEncoderV2;

import "../interface/IERC20.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 ERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    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));
    }

    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));
    }

    /**
     * @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.

        // A Solidity high level call has three parts:
        //  1. The target address is checked to verify it contains contract code
        //  2. The call itself is made, and success asserted
        //  3. The return value is decoded, which in turn checks the size of the returned data.
        // solhint-disable-next-line max-line-length

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = address(token).call(data);
        require(success, "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 4 of 10 : ApeAdapter.sol
// SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.0;

import "./interface/IERC20.sol";
import "./lib/SafeERC20.sol";
import "./lib/Maintainable.sol";

abstract contract ApeAdapter is Maintainable {
    using SafeERC20 for IERC20;

    event ApeAdapterSwap(address indexed _tokenFrom, address indexed _tokenTo, uint256 _amountIn, uint256 _amountOut);
    event UpdatedGasEstimate(address indexed _adapter, uint256 _newEstimate);
    event Recovered(address indexed _asset, uint256 amount);

    uint256 internal constant UINT_MAX = type(uint256).max;
    uint256 public swapGasEstimate;
    string public name;

    constructor(string memory _name, uint256 _gasEstimate) {
        setName(_name);
        setSwapGasEstimate(_gasEstimate);
    }

    function setName(string memory _name) internal {
        require(bytes(_name).length != 0, "Invalid adapter name");
        name = _name;
    }

    function setSwapGasEstimate(uint256 _estimate) public onlyMaintainer {
        require(_estimate != 0, "Invalid gas-estimate");
        swapGasEstimate = _estimate;
        emit UpdatedGasEstimate(address(this), _estimate);
    }

    function revokeAllowance(address _token, address _spender) external onlyMaintainer {
        IERC20(_token).safeApprove(_spender, 0);
    }

    function recoverERC20(address _tokenAddress, uint256 _tokenAmount) external onlyMaintainer {
        require(_tokenAmount > 0, "ApeAdapter: Nothing to recover");
        IERC20(_tokenAddress).safeTransfer(msg.sender, _tokenAmount);
        emit Recovered(_tokenAddress, _tokenAmount);
    }

    function recoverAPE(uint256 _amount) external onlyMaintainer {
        require(_amount > 0, "ApeAdapter: Nothing to recover");
        payable(msg.sender).transfer(_amount);
        emit Recovered(address(0), _amount);
    }

    function query(
        uint256 _amountIn,
        address _tokenIn,
        address _tokenOut
    ) external view returns (uint256) {
        return _query(_amountIn, _tokenIn, _tokenOut);
    }

    function swap(
        uint256 _amountIn,
        uint256 _amountOut,
        address _fromToken,
        address _toToken,
        address _to
    ) external virtual {
        uint256 toBal0 = IERC20(_toToken).balanceOf(_to);
        _swap(_amountIn, _amountOut, _fromToken, _toToken, _to);
        uint256 diff = IERC20(_toToken).balanceOf(_to) - toBal0;
        require(diff >= _amountOut, "Insufficient amount-out");
        emit ApeAdapterSwap(_fromToken, _toToken, _amountIn, _amountOut);
    }

    function _returnTo(
        address _token,
        uint256 _amount,
        address _to
    ) internal {
        if (address(this) != _to) IERC20(_token).safeTransfer(_to, _amount);
    }

    function _swap(
        uint256 _amountIn,
        uint256 _amountOut,
        address _fromToken,
        address _toToken,
        address _to
    ) internal virtual;

    function _query(
        uint256 _amountIn,
        address _tokenIn,
        address _tokenOut
    ) internal view virtual returns (uint256);

    receive() external payable {}
}

File 5 of 10 : Maintainable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/AccessControl.sol";

/**
 * @dev Contract module which extends the basic access control mechanism of Ownable
 * to include many maintainers, whom only the owner (DEFAULT_ADMIN_ROLE) may add and
 * remove.
 *
 * 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 this modifier:
 * `onlyMaintainer`, which can be applied to your functions to restrict their use to
 * the accounts with the role of maintainer.
 */

abstract contract Maintainable is Context, AccessControl {
    bytes32 public constant MAINTAINER_ROLE = keccak256("MAINTAINER_ROLE");

    constructor() {
        address msgSender = _msgSender();
        // Grant the admin role and maintainer role to the deployer
        _grantRole(DEFAULT_ADMIN_ROLE, msgSender);
        _grantRole(MAINTAINER_ROLE, msgSender);
    }

    function addMaintainer(address addedMaintainer) public virtual {
        grantRole(MAINTAINER_ROLE, addedMaintainer);
    }

    function removeMaintainer(address removedMaintainer) public virtual {
        revokeRole(MAINTAINER_ROLE, removedMaintainer);
    }

    function transferOwnership(address newOwner) public virtual {
        grantRole(DEFAULT_ADMIN_ROLE, newOwner);
        renounceRole(DEFAULT_ADMIN_ROLE, _msgSender());
    }

    modifier onlyMaintainer() {
        require(hasRole(MAINTAINER_ROLE, _msgSender()), "Maintainable: Caller is not a maintainer");
        _;
    }
}

File 6 of 10 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol)

pragma solidity ^0.8.20;

import {IAccessControl} from "./IAccessControl.sol";
import {Context} from "../utils/Context.sol";
import {ERC165} from "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```solidity
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```solidity
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}
 * to enforce additional security measures for this role.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address account => bool) hasRole;
        bytes32 adminRole;
    }

    mapping(bytes32 role => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with an {AccessControlUnauthorizedAccount} error including the required role.
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual returns (bool) {
        return _roles[role].hasRole[account];
    }

    /**
     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()`
     * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account`
     * is missing `role`.
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert AccessControlUnauthorizedAccount(account, role);
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleGranted} event.
     */
    function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleRevoked} event.
     */
    function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `callerConfirmation`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address callerConfirmation) public virtual {
        if (callerConfirmation != _msgSender()) {
            revert AccessControlBadConfirmation();
        }

        _revokeRole(role, callerConfirmation);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual returns (bool) {
        if (!hasRole(role, account)) {
            _roles[role].hasRole[account] = true;
            emit RoleGranted(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual returns (bool) {
        if (hasRole(role, account)) {
            _roles[role].hasRole[account] = false;
            emit RoleRevoked(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }
}

File 7 of 10 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (access/IAccessControl.sol)

pragma solidity ^0.8.20;

/**
 * @dev External interface of AccessControl declared to support ERC-165 detection.
 */
interface IAccessControl {
    /**
     * @dev The `account` is missing a role.
     */
    error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);

    /**
     * @dev The caller of a function is not the expected one.
     *
     * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.
     */
    error AccessControlBadConfirmation();

    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call. This account bears the admin role (for the granted role).
     * Expected in cases where the role was granted using the internal {AccessControl-_grantRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `callerConfirmation`.
     */
    function renounceRole(bytes32 role, address callerConfirmation) external;
}

File 8 of 10 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

File 9 of 10 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/ERC165.sol)

pragma solidity ^0.8.20;

import {IERC165} from "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC-165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 10 of 10 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[ERC].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"address","name":"_factory","type":"address"},{"internalType":"uint256","name":"_swapGasEstimate","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_tokenFrom","type":"address"},{"indexed":true,"internalType":"address","name":"_tokenTo","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amountIn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_amountOut","type":"uint256"}],"name":"ApeAdapterSwap","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Recovered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_adapter","type":"address"},{"indexed":false,"internalType":"uint256","name":"_newEstimate","type":"uint256"}],"name":"UpdatedGasEstimate","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAINTAINER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addedMaintainer","type":"address"}],"name":"addMaintainer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountIn","type":"uint256"},{"internalType":"address","name":"_tokenIn","type":"address"},{"internalType":"address","name":"_tokenOut","type":"address"}],"name":"query","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"recoverAPE","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"uint256","name":"_tokenAmount","type":"uint256"}],"name":"recoverERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"removedMaintainer","type":"address"}],"name":"removeMaintainer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_spender","type":"address"}],"name":"revokeAllowance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_referrer","type":"address"}],"name":"setReferrer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_estimate","type":"uint256"}],"name":"setSwapGasEstimate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountIn","type":"uint256"},{"internalType":"uint256","name":"_amountOut","type":"uint256"},{"internalType":"address","name":"_fromToken","type":"address"},{"internalType":"address","name":"_toToken","type":"address"},{"internalType":"address","name":"_to","type":"address"}],"name":"swap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swapGasEstimate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60a060405234801562000010575f80fd5b506040516200196538038062001965833981016040819052620000339162000300565b828133620000425f826200009e565b506200006f7f339759585899103d2ace64958e37e18ccb0504652c81d4a1b8aa80fe2126ab95826200009e565b506200007d9050826200014a565b6200008881620001b2565b5050506001600160a01b0316608052506200053d565b5f828152602081815260408083206001600160a01b038516845290915281205460ff1662000141575f838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055620000f83390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600162000144565b505f5b92915050565b80515f03620001a05760405162461bcd60e51b815260206004820152601460248201527f496e76616c69642061646170746572206e616d6500000000000000000000000060448201526064015b60405180910390fd5b6002620001ae828262000475565b5050565b335f9081527fa54247010af6b3693b80aceddfad12e077c5de3571e6243fada502635f0d7d39602052604090205460ff16620002425760405162461bcd60e51b815260206004820152602860248201527f4d61696e7461696e61626c653a2043616c6c6572206973206e6f742061206d6160448201526734b73a30b4b732b960c11b606482015260840162000197565b805f03620002935760405162461bcd60e51b815260206004820152601460248201527f496e76616c6964206761732d657374696d617465000000000000000000000000604482015260640162000197565b600181905560405181815230907ff43f23b7a28e6f8ce6843a21bd7b48bce778aa913b8c8cf459edf7d770e8d38a9060200160405180910390a250565b634e487b7160e01b5f52604160045260245ffd5b80516001600160a01b0381168114620002fb575f80fd5b919050565b5f805f6060848603121562000313575f80fd5b83516001600160401b03808211156200032a575f80fd5b818601915086601f8301126200033e575f80fd5b815181811115620003535762000353620002d0565b604051601f8201601f19908116603f011681019083821181831017156200037e576200037e620002d0565b816040528281526020935089848487010111156200039a575f80fd5b5f91505b82821015620003bd57848201840151818301850152908301906200039e565b5f848483010152809750505050620003d7818701620002e4565b93505050604084015190509250925092565b600181811c90821680620003fe57607f821691505b6020821081036200041d57634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111562000470575f81815260208120601f850160051c810160208610156200044b5750805b601f850160051c820191505b818110156200046c5782815560010162000457565b5050505b505050565b81516001600160401b03811115620004915762000491620002d0565b620004a981620004a28454620003e9565b8462000423565b602080601f831160018114620004df575f8415620004c75750858301515b5f19600386901b1c1916600185901b1785556200046c565b5f85815260208120601f198616915b828110156200050f57888601518255948401946001909101908401620004ee565b50858210156200052d57878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b60805161140f620005565f395f610f8e015261140f5ff3fe60806040526004361061011e575f3560e01c806391d148541161009d578063d8baf7cf11610062578063d8baf7cf1461031a578063eab90da614610339578063ef99893a14610358578063f2fde38b14610377578063f874225414610396575f80fd5b806391d148541461028b578063a18a7bfc146102aa578063a217fddf146102c9578063ba79db10146102dc578063d547741f146102fb575f80fd5b806369cff80d116100e357806369cff80d146101fa5780636b453c1f1461020f5780637ae267731461022e57806384a33e631461024d5780638980f11f1461026c575f80fd5b806301ffc9a71461012957806306fdde031461015d578063248a9ca31461017e5780632f2ff15d146101ba57806336568abe146101db575f80fd5b3661012557005b5f80fd5b348015610134575f80fd5b50610148610143366004611082565b6103b6565b60405190151581526020015b60405180910390f35b348015610168575f80fd5b506101716103ec565b60405161015491906110f6565b348015610189575f80fd5b506101ac610198366004611108565b5f9081526020819052604090206001015490565b604051908152602001610154565b3480156101c5575f80fd5b506101d96101d4366004611133565b610478565b005b3480156101e6575f80fd5b506101d96101f5366004611133565b6104a2565b348015610205575f80fd5b506101ac60015481565b34801561021a575f80fd5b506101d9610229366004611161565b6104da565b348015610239575f80fd5b506101d961024836600461117c565b6104f4565b348015610258575f80fd5b506101d9610267366004611108565b610548565b348015610277575f80fd5b506101d96102863660046111a8565b6105ff565b348015610296575f80fd5b506101486102a5366004611133565b6106dc565b3480156102b5575f80fd5b506101d96102c4366004611161565b610704565b3480156102d4575f80fd5b506101ac5f81565b3480156102e7575f80fd5b506101d96102f6366004611108565b610759565b348015610306575f80fd5b506101d9610315366004611133565b610838565b348015610325575f80fd5b506101d9610334366004611161565b61085c565b348015610344575f80fd5b506101d96103533660046111d2565b610873565b348015610363575f80fd5b506101ac61037236600461122d565b610a14565b348015610382575f80fd5b506101d9610391366004611161565b610a2a565b3480156103a1575f80fd5b506101ac5f805160206113ba83398151915281565b5f6001600160e01b03198216637965db0b60e01b14806103e657506301ffc9a760e01b6001600160e01b03198316145b92915050565b600280546103f99061126c565b80601f01602080910402602001604051908101604052809291908181526020018280546104259061126c565b80156104705780601f1061044757610100808354040283529160200191610470565b820191905f5260205f20905b81548152906001019060200180831161045357829003601f168201915b505050505081565b5f8281526020819052604090206001015461049281610a3e565b61049c8383610a48565b50505050565b6001600160a01b03811633146104cb5760405163334bd91960e11b815260040160405180910390fd5b6104d58282610ad7565b505050565b6104f15f805160206113ba83398151915282610478565b50565b61050b5f805160206113ba833981519152336106dc565b6105305760405162461bcd60e51b8152600401610527906112a4565b60405180910390fd5b6105446001600160a01b038316825f610b40565b5050565b61055f5f805160206113ba833981519152336106dc565b61057b5760405162461bcd60e51b8152600401610527906112a4565b805f036105c15760405162461bcd60e51b8152602060048201526014602482015273496e76616c6964206761732d657374696d61746560601b6044820152606401610527565b600181905560405181815230907ff43f23b7a28e6f8ce6843a21bd7b48bce778aa913b8c8cf459edf7d770e8d38a906020015b60405180910390a250565b6106165f805160206113ba833981519152336106dc565b6106325760405162461bcd60e51b8152600401610527906112a4565b5f81116106815760405162461bcd60e51b815260206004820152601e60248201527f417065416461707465723a204e6f7468696e6720746f207265636f76657200006044820152606401610527565b6106956001600160a01b0383163383610c86565b816001600160a01b03167f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa28826040516106d091815260200190565b60405180910390a25050565b5f918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b61071b5f805160206113ba833981519152336106dc565b6107375760405162461bcd60e51b8152600401610527906112a4565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6107705f805160206113ba833981519152336106dc565b61078c5760405162461bcd60e51b8152600401610527906112a4565b5f81116107db5760405162461bcd60e51b815260206004820152601e60248201527f417065416461707465723a204e6f7468696e6720746f207265636f76657200006044820152606401610527565b604051339082156108fc029083905f818181858888f19350505050158015610805573d5f803e3d5ffd5b506040518181525f907f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa28906020016105f4565b5f8281526020819052604090206001015461085281610a3e565b61049c8383610ad7565b6104f15f805160206113ba83398151915282610838565b6040516370a0823160e01b81526001600160a01b0382811660048301525f91908416906370a0823190602401602060405180830381865afa1580156108ba573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108de91906112ec565b90506108ed8686868686610cb6565b6040516370a0823160e01b81526001600160a01b0383811660048301525f9183918616906370a0823190602401602060405180830381865afa158015610935573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061095991906112ec565b6109639190611303565b9050858110156109b55760405162461bcd60e51b815260206004820152601760248201527f496e73756666696369656e7420616d6f756e742d6f75740000000000000000006044820152606401610527565b836001600160a01b0316856001600160a01b03167f98c26b10c4376160b60cb525fc4b5d8402725762ac2159928900b3d6658ebf9a8989604051610a03929190918252602082015260400190565b60405180910390a350505050505050565b5f610a20848484610dcb565b90505b9392505050565b610a345f82610478565b6104f15f336104a2565b6104f18133610e06565b5f610a5383836106dc565b610ad0575f838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055610a883390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016103e6565b505f6103e6565b5f610ae283836106dc565b15610ad0575f838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016103e6565b801580610bb85750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa158015610b92573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610bb691906112ec565b155b610c235760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610527565b6040516001600160a01b0383166024820152604481018290526104d590849063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610e3f565b6040516001600160a01b0383166024820152604481018290526104d590849063a9059cbb60e01b90606401610c4f565b5f80610cc3878686610f63565b9150915085821015610d105760405162461bcd60e51b8152602060048201526016602482015275125b9cdd59999a58d95b9d08185b5bdd5b9d081bdd5d60521b6044820152606401610527565b5f80856001600160a01b0316876001600160a01b031610610d3257835f610d35565b5f845b9092509050610d4e6001600160a01b038816848b610c86565b604080515f81526020810191829052600354636e1fdd7f60e01b9092526001600160a01b0385811692636e1fdd7f92610d9392879287928c9290911660248201611322565b5f604051808303815f87803b158015610daa575f80fd5b505af1158015610dbc573d5f803e3d5ffd5b50505050505050505050505050565b5f816001600160a01b0316836001600160a01b031614158015610ded57508315155b15610a2357610dfd848484610f63565b50949350505050565b610e1082826106dc565b6105445760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610527565b5f80836001600160a01b031683604051610e599190611364565b5f604051808303815f865af19150503d805f8114610e92576040519150601f19603f3d011682016040523d82523d5f602084013e610e97565b606091505b509150915081610ee95760405162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65646044820152606401610527565b80511561049c5780806020019051810190610f04919061137f565b61049c5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610527565b60405163e6a4390560e01b81526001600160a01b03838116600483015282811660248301525f9182917f0000000000000000000000000000000000000000000000000000000000000000169063e6a4390590604401602060405180830381865afa158015610fd3573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ff7919061139e565b90506001600160a01b0381161561107a576040516378a051ad60e11b8152600481018690526001600160a01b03858116602483015282169063f140a35a90604401602060405180830381865afa158015611053573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061107791906112ec565b91505b935093915050565b5f60208284031215611092575f80fd5b81356001600160e01b031981168114610a23575f80fd5b5f5b838110156110c35781810151838201526020016110ab565b50505f910152565b5f81518084526110e28160208601602086016110a9565b601f01601f19169290920160200192915050565b602081525f610a2360208301846110cb565b5f60208284031215611118575f80fd5b5035919050565b6001600160a01b03811681146104f1575f80fd5b5f8060408385031215611144575f80fd5b8235915060208301356111568161111f565b809150509250929050565b5f60208284031215611171575f80fd5b8135610a238161111f565b5f806040838503121561118d575f80fd5b82356111988161111f565b915060208301356111568161111f565b5f80604083850312156111b9575f80fd5b82356111c48161111f565b946020939093013593505050565b5f805f805f60a086880312156111e6575f80fd5b853594506020860135935060408601356111ff8161111f565b9250606086013561120f8161111f565b9150608086013561121f8161111f565b809150509295509295909350565b5f805f6060848603121561123f575f80fd5b8335925060208401356112518161111f565b915060408401356112618161111f565b809150509250925092565b600181811c9082168061128057607f821691505b60208210810361129e57634e487b7160e01b5f52602260045260245ffd5b50919050565b60208082526028908201527f4d61696e7461696e61626c653a2043616c6c6572206973206e6f742061206d6160408201526734b73a30b4b732b960c11b606082015260800190565b5f602082840312156112fc575f80fd5b5051919050565b818103818111156103e657634e487b7160e01b5f52601160045260245ffd5b8581528460208201525f60018060a01b03808616604084015260a0606084015261134f60a08401866110cb565b91508084166080840152509695505050505050565b5f82516113758184602087016110a9565b9190910192915050565b5f6020828403121561138f575f80fd5b81518015158114610a23575f80fd5b5f602082840312156113ae575f80fd5b8151610a238161111f56fe339759585899103d2ace64958e37e18ccb0504652c81d4a1b8aa80fe2126ab95a264697066735822122029210dac92d021db32a1731bb33fd5367423d59749fad6dcd877af6e8990a8ae64736f6c6343000814003300000000000000000000000000000000000000000000000000000000000000600000000000000000000000007d8c6b58ba2d40fc6e34c25f9a488067fe0d2db40000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000e43616d656c6f7441646170746572000000000000000000000000000000000000

Deployed Bytecode

0x60806040526004361061011e575f3560e01c806391d148541161009d578063d8baf7cf11610062578063d8baf7cf1461031a578063eab90da614610339578063ef99893a14610358578063f2fde38b14610377578063f874225414610396575f80fd5b806391d148541461028b578063a18a7bfc146102aa578063a217fddf146102c9578063ba79db10146102dc578063d547741f146102fb575f80fd5b806369cff80d116100e357806369cff80d146101fa5780636b453c1f1461020f5780637ae267731461022e57806384a33e631461024d5780638980f11f1461026c575f80fd5b806301ffc9a71461012957806306fdde031461015d578063248a9ca31461017e5780632f2ff15d146101ba57806336568abe146101db575f80fd5b3661012557005b5f80fd5b348015610134575f80fd5b50610148610143366004611082565b6103b6565b60405190151581526020015b60405180910390f35b348015610168575f80fd5b506101716103ec565b60405161015491906110f6565b348015610189575f80fd5b506101ac610198366004611108565b5f9081526020819052604090206001015490565b604051908152602001610154565b3480156101c5575f80fd5b506101d96101d4366004611133565b610478565b005b3480156101e6575f80fd5b506101d96101f5366004611133565b6104a2565b348015610205575f80fd5b506101ac60015481565b34801561021a575f80fd5b506101d9610229366004611161565b6104da565b348015610239575f80fd5b506101d961024836600461117c565b6104f4565b348015610258575f80fd5b506101d9610267366004611108565b610548565b348015610277575f80fd5b506101d96102863660046111a8565b6105ff565b348015610296575f80fd5b506101486102a5366004611133565b6106dc565b3480156102b5575f80fd5b506101d96102c4366004611161565b610704565b3480156102d4575f80fd5b506101ac5f81565b3480156102e7575f80fd5b506101d96102f6366004611108565b610759565b348015610306575f80fd5b506101d9610315366004611133565b610838565b348015610325575f80fd5b506101d9610334366004611161565b61085c565b348015610344575f80fd5b506101d96103533660046111d2565b610873565b348015610363575f80fd5b506101ac61037236600461122d565b610a14565b348015610382575f80fd5b506101d9610391366004611161565b610a2a565b3480156103a1575f80fd5b506101ac5f805160206113ba83398151915281565b5f6001600160e01b03198216637965db0b60e01b14806103e657506301ffc9a760e01b6001600160e01b03198316145b92915050565b600280546103f99061126c565b80601f01602080910402602001604051908101604052809291908181526020018280546104259061126c565b80156104705780601f1061044757610100808354040283529160200191610470565b820191905f5260205f20905b81548152906001019060200180831161045357829003601f168201915b505050505081565b5f8281526020819052604090206001015461049281610a3e565b61049c8383610a48565b50505050565b6001600160a01b03811633146104cb5760405163334bd91960e11b815260040160405180910390fd5b6104d58282610ad7565b505050565b6104f15f805160206113ba83398151915282610478565b50565b61050b5f805160206113ba833981519152336106dc565b6105305760405162461bcd60e51b8152600401610527906112a4565b60405180910390fd5b6105446001600160a01b038316825f610b40565b5050565b61055f5f805160206113ba833981519152336106dc565b61057b5760405162461bcd60e51b8152600401610527906112a4565b805f036105c15760405162461bcd60e51b8152602060048201526014602482015273496e76616c6964206761732d657374696d61746560601b6044820152606401610527565b600181905560405181815230907ff43f23b7a28e6f8ce6843a21bd7b48bce778aa913b8c8cf459edf7d770e8d38a906020015b60405180910390a250565b6106165f805160206113ba833981519152336106dc565b6106325760405162461bcd60e51b8152600401610527906112a4565b5f81116106815760405162461bcd60e51b815260206004820152601e60248201527f417065416461707465723a204e6f7468696e6720746f207265636f76657200006044820152606401610527565b6106956001600160a01b0383163383610c86565b816001600160a01b03167f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa28826040516106d091815260200190565b60405180910390a25050565b5f918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b61071b5f805160206113ba833981519152336106dc565b6107375760405162461bcd60e51b8152600401610527906112a4565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6107705f805160206113ba833981519152336106dc565b61078c5760405162461bcd60e51b8152600401610527906112a4565b5f81116107db5760405162461bcd60e51b815260206004820152601e60248201527f417065416461707465723a204e6f7468696e6720746f207265636f76657200006044820152606401610527565b604051339082156108fc029083905f818181858888f19350505050158015610805573d5f803e3d5ffd5b506040518181525f907f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa28906020016105f4565b5f8281526020819052604090206001015461085281610a3e565b61049c8383610ad7565b6104f15f805160206113ba83398151915282610838565b6040516370a0823160e01b81526001600160a01b0382811660048301525f91908416906370a0823190602401602060405180830381865afa1580156108ba573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108de91906112ec565b90506108ed8686868686610cb6565b6040516370a0823160e01b81526001600160a01b0383811660048301525f9183918616906370a0823190602401602060405180830381865afa158015610935573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061095991906112ec565b6109639190611303565b9050858110156109b55760405162461bcd60e51b815260206004820152601760248201527f496e73756666696369656e7420616d6f756e742d6f75740000000000000000006044820152606401610527565b836001600160a01b0316856001600160a01b03167f98c26b10c4376160b60cb525fc4b5d8402725762ac2159928900b3d6658ebf9a8989604051610a03929190918252602082015260400190565b60405180910390a350505050505050565b5f610a20848484610dcb565b90505b9392505050565b610a345f82610478565b6104f15f336104a2565b6104f18133610e06565b5f610a5383836106dc565b610ad0575f838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055610a883390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016103e6565b505f6103e6565b5f610ae283836106dc565b15610ad0575f838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016103e6565b801580610bb85750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa158015610b92573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610bb691906112ec565b155b610c235760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610527565b6040516001600160a01b0383166024820152604481018290526104d590849063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610e3f565b6040516001600160a01b0383166024820152604481018290526104d590849063a9059cbb60e01b90606401610c4f565b5f80610cc3878686610f63565b9150915085821015610d105760405162461bcd60e51b8152602060048201526016602482015275125b9cdd59999a58d95b9d08185b5bdd5b9d081bdd5d60521b6044820152606401610527565b5f80856001600160a01b0316876001600160a01b031610610d3257835f610d35565b5f845b9092509050610d4e6001600160a01b038816848b610c86565b604080515f81526020810191829052600354636e1fdd7f60e01b9092526001600160a01b0385811692636e1fdd7f92610d9392879287928c9290911660248201611322565b5f604051808303815f87803b158015610daa575f80fd5b505af1158015610dbc573d5f803e3d5ffd5b50505050505050505050505050565b5f816001600160a01b0316836001600160a01b031614158015610ded57508315155b15610a2357610dfd848484610f63565b50949350505050565b610e1082826106dc565b6105445760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610527565b5f80836001600160a01b031683604051610e599190611364565b5f604051808303815f865af19150503d805f8114610e92576040519150601f19603f3d011682016040523d82523d5f602084013e610e97565b606091505b509150915081610ee95760405162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65646044820152606401610527565b80511561049c5780806020019051810190610f04919061137f565b61049c5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610527565b60405163e6a4390560e01b81526001600160a01b03838116600483015282811660248301525f9182917f0000000000000000000000007d8c6b58ba2d40fc6e34c25f9a488067fe0d2db4169063e6a4390590604401602060405180830381865afa158015610fd3573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ff7919061139e565b90506001600160a01b0381161561107a576040516378a051ad60e11b8152600481018690526001600160a01b03858116602483015282169063f140a35a90604401602060405180830381865afa158015611053573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061107791906112ec565b91505b935093915050565b5f60208284031215611092575f80fd5b81356001600160e01b031981168114610a23575f80fd5b5f5b838110156110c35781810151838201526020016110ab565b50505f910152565b5f81518084526110e28160208601602086016110a9565b601f01601f19169290920160200192915050565b602081525f610a2360208301846110cb565b5f60208284031215611118575f80fd5b5035919050565b6001600160a01b03811681146104f1575f80fd5b5f8060408385031215611144575f80fd5b8235915060208301356111568161111f565b809150509250929050565b5f60208284031215611171575f80fd5b8135610a238161111f565b5f806040838503121561118d575f80fd5b82356111988161111f565b915060208301356111568161111f565b5f80604083850312156111b9575f80fd5b82356111c48161111f565b946020939093013593505050565b5f805f805f60a086880312156111e6575f80fd5b853594506020860135935060408601356111ff8161111f565b9250606086013561120f8161111f565b9150608086013561121f8161111f565b809150509295509295909350565b5f805f6060848603121561123f575f80fd5b8335925060208401356112518161111f565b915060408401356112618161111f565b809150509250925092565b600181811c9082168061128057607f821691505b60208210810361129e57634e487b7160e01b5f52602260045260245ffd5b50919050565b60208082526028908201527f4d61696e7461696e61626c653a2043616c6c6572206973206e6f742061206d6160408201526734b73a30b4b732b960c11b606082015260800190565b5f602082840312156112fc575f80fd5b5051919050565b818103818111156103e657634e487b7160e01b5f52601160045260245ffd5b8581528460208201525f60018060a01b03808616604084015260a0606084015261134f60a08401866110cb565b91508084166080840152509695505050505050565b5f82516113758184602087016110a9565b9190910192915050565b5f6020828403121561138f575f80fd5b81518015158114610a23575f80fd5b5f602082840312156113ae575f80fd5b8151610a238161111f56fe339759585899103d2ace64958e37e18ccb0504652c81d4a1b8aa80fe2126ab95a264697066735822122029210dac92d021db32a1731bb33fd5367423d59749fad6dcd877af6e8990a8ae64736f6c63430008140033

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

00000000000000000000000000000000000000000000000000000000000000600000000000000000000000007d8c6b58ba2d40fc6e34c25f9a488067fe0d2db40000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000e43616d656c6f7441646170746572000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _name (string): CamelotAdapter
Arg [1] : _factory (address): 0x7d8c6B58BA2d40FC6E34C25f9A488067Fe0D2dB4
Arg [2] : _swapGasEstimate (uint256): 1

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 0000000000000000000000007d8c6b58ba2d40fc6e34c25f9a488067fe0d2db4
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [3] : 000000000000000000000000000000000000000000000000000000000000000e
Arg [4] : 43616d656c6f7441646170746572000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.