Overview
APE Balance
0 APE
APE Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 9 from a total of 9 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Execute | 6529056 | 38 days ago | IN | 2,000 APE | 0.00430601 | ||||
Execute | 6529028 | 38 days ago | IN | 2,000 APE | 0.00430603 | ||||
Execute | 6244706 | 44 days ago | IN | 1.04900065 APE | 0.00540326 | ||||
Execute | 6243644 | 44 days ago | IN | 0.001 APE | 0.0047601 | ||||
Execute | 6243601 | 44 days ago | IN | 0.05 APE | 0.00475984 | ||||
Execute | 6242064 | 44 days ago | IN | 0 APE | 0.00609875 | ||||
Execute | 6240633 | 44 days ago | IN | 0 APE | 0.00667392 | ||||
Execute | 6239039 | 44 days ago | IN | 0 APE | 0.00743799 | ||||
Execute | 6225277 | 44 days ago | IN | 0.5 APE | 0.00639965 |
Latest 13 internal transactions
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
6529056 | 38 days ago | 2,000 APE | ||||
6529028 | 38 days ago | 2,000 APE | ||||
6244706 | 44 days ago | 0.99999999 APE | ||||
6244706 | 44 days ago | 0.04900065 APE | ||||
6243644 | 44 days ago | 0.001 APE | ||||
6243601 | 44 days ago | 0.05 APE | ||||
6242064 | 44 days ago | 0.4000001 APE | ||||
6242064 | 44 days ago | 0.4000001 APE | ||||
6240633 | 44 days ago | 0.1 APE | ||||
6240633 | 44 days ago | 0.1 APE | ||||
6239039 | 44 days ago | 0.1 APE | ||||
6239039 | 44 days ago | 0.1 APE | ||||
6225277 | 44 days ago | 0.5 APE |
Loading...
Loading
Contract Name:
TxBuilderExtension
Compiler Version
v0.8.10+commit.fc410830
Optimization Enabled:
Yes with 200 runs
Other Settings:
london EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "openzeppelin-contracts/contracts/access/Ownable2Step.sol"; import "openzeppelin-contracts/contracts/security/ReentrancyGuard.sol"; import "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; import "openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol"; import "../interfaces/IDeferLiquidityCheck.sol"; import "../interfaces/IApeFinance.sol"; import "../interfaces/IPToken.sol"; import "../interfaces/IWeth.sol"; contract TxBuilderExtension is ReentrancyGuard, Ownable2Step, IDeferLiquidityCheck { using SafeERC20 for IERC20; /// @notice The action for deferring liquidity check bytes32 public constant ACTION_DEFER_LIQUIDITY_CHECK = "ACTION_DEFER_LIQUIDITY_CHECK"; /// @notice The action for supplying asset bytes32 public constant ACTION_SUPPLY = "ACTION_SUPPLY"; /// @notice The action for borrowing asset bytes32 public constant ACTION_BORROW = "ACTION_BORROW"; /// @notice The action for redeeming asset bytes32 public constant ACTION_REDEEM = "ACTION_REDEEM"; /// @notice The action for repaying asset bytes32 public constant ACTION_REPAY = "ACTION_REPAY"; /// @notice The action for supplying native token bytes32 public constant ACTION_SUPPLY_NATIVE_TOKEN = "ACTION_SUPPLY_NATIVE_TOKEN"; /// @notice The action for borrowing native token bytes32 public constant ACTION_BORROW_NATIVE_TOKEN = "ACTION_BORROW_NATIVE_TOKEN"; /// @notice The action for redeeming native token bytes32 public constant ACTION_REDEEM_NATIVE_TOKEN = "ACTION_REDEEM_NATIVE_TOKEN"; /// @notice The action for repaying native token bytes32 public constant ACTION_REPAY_NATIVE_TOKEN = "ACTION_REPAY_NATIVE_TOKEN"; /// @notice The action for supplying stEth bytes32 public constant ACTION_SUPPLY_STETH = "ACTION_SUPPLY_STETH"; /// @notice The action for borrowing stEth bytes32 public constant ACTION_BORROW_STETH = "ACTION_BORROW_STETH"; /// @notice The action for redeeming stEth bytes32 public constant ACTION_REDEEM_STETH = "ACTION_REDEEM_STETH"; /// @notice The action for repaying stEth bytes32 public constant ACTION_REPAY_STETH = "ACTION_REPAY_STETH"; /// @notice The action for supplying pToken bytes32 public constant ACTION_SUPPLY_PTOKEN = "ACTION_SUPPLY_PTOKEN"; /// @notice The action for redeeming pToken bytes32 public constant ACTION_REDEEM_PTOKEN = "ACTION_REDEEM_PTOKEN"; /// @dev Transient storage variable used for native token amount uint256 private unusedNativeToken; /// @notice The address of ApeFinance IApeFinance public immutable apeFinance; /// @notice The address of WAPE address public immutable wape; /** * @notice Construct a new TxBuilderExtension contract * @param apeFinance_ The ApeFinance contract * @param wape_ The WAPE contract */ constructor(address apeFinance_, address wape_) { apeFinance = IApeFinance(apeFinance_); wape = wape_; } /* ========== MUTATIVE FUNCTIONS ========== */ struct Action { bytes32 name; bytes data; } /** * @notice Execute a list of actions in order * @param actions The list of actions */ function execute(Action[] calldata actions) external payable { unusedNativeToken = msg.value; executeInternal(msg.sender, actions, 0); } /// @inheritdoc IDeferLiquidityCheck function onDeferredLiquidityCheck(bytes memory encodedData) external override { require(msg.sender == address(apeFinance), "untrusted message sender"); (address initiator, Action[] memory actions, uint256 index) = abi.decode(encodedData, (address, Action[], uint256)); executeInternal(initiator, actions, index); } /* ========== RESTRICTED FUNCTIONS ========== */ /** * @notice Admin seizes the asset from the contract. * @param recipient The recipient of the seized asset. * @param asset The asset to seize. */ function seize(address recipient, address asset) external onlyOwner { IERC20(asset).safeTransfer(recipient, IERC20(asset).balanceOf(address(this))); } /** * @notice Admin seizes the native token from the contract. * @param recipient The recipient of the seized native token. */ function seizeNative(address recipient) external onlyOwner { (bool sent,) = recipient.call{value: address(this).balance}(""); require(sent, "failed to send native token"); } /* ========== INTERNAL FUNCTIONS ========== */ /** * @dev Execute a list of actions for user in order. * @param user The address of the user * @param actions The list of actions * @param index The index of the action to start with */ function executeInternal(address user, Action[] memory actions, uint256 index) internal { uint256 i = index; while (i < actions.length) { Action memory action = actions[i]; if (action.name == ACTION_DEFER_LIQUIDITY_CHECK) { deferLiquidityCheck(user, abi.encode(user, actions, i + 1)); // Break the loop as we will re-enter the loop after the liquidity check is deferred. break; } else if (action.name == ACTION_SUPPLY) { (address asset, uint256 amount) = abi.decode(action.data, (address, uint256)); supply(user, asset, amount); } else if (action.name == ACTION_BORROW) { (address asset, uint256 amount) = abi.decode(action.data, (address, uint256)); borrow(user, asset, amount); } else if (action.name == ACTION_REDEEM) { (address asset, uint256 amount) = abi.decode(action.data, (address, uint256)); redeem(user, asset, amount); } else if (action.name == ACTION_REPAY) { (address asset, uint256 amount) = abi.decode(action.data, (address, uint256)); repay(user, asset, amount); } else if (action.name == ACTION_SUPPLY_NATIVE_TOKEN) { uint256 supplyAmount = abi.decode(action.data, (uint256)); supplyNativeToken(user, supplyAmount); unusedNativeToken -= supplyAmount; } else if (action.name == ACTION_BORROW_NATIVE_TOKEN) { uint256 borrowAmount = abi.decode(action.data, (uint256)); borrowNativeToken(user, borrowAmount); } else if (action.name == ACTION_REDEEM_NATIVE_TOKEN) { uint256 redeemAmount = abi.decode(action.data, (uint256)); redeemNativeToken(user, redeemAmount); } else if (action.name == ACTION_REPAY_NATIVE_TOKEN) { uint256 repayAmount = abi.decode(action.data, (uint256)); repayAmount = repayNativeToken(user, repayAmount); unusedNativeToken -= repayAmount; } else if (action.name == ACTION_SUPPLY_PTOKEN) { (address pToken, uint256 amount) = abi.decode(action.data, (address, uint256)); supplyPToken(user, pToken, amount); } else if (action.name == ACTION_REDEEM_PTOKEN) { (address pToken, uint256 amount) = abi.decode(action.data, (address, uint256)); redeemPToken(user, pToken, amount); } else { revert("invalid action"); } unchecked { i++; } } // Refund unused native token back to user if the action list is fully executed. if (i == actions.length && unusedNativeToken > 0) { (bool sent,) = user.call{value: unusedNativeToken}(""); require(sent, "failed to send native token"); unusedNativeToken = 0; } } /** * @dev Defers the liquidity check. * @param user The address of the user * @param data The encoded data */ function deferLiquidityCheck(address user, bytes memory data) internal { apeFinance.deferLiquidityCheck(user, data); } /** * @dev Supplies the asset to ApeFinance. * @param user The address of the user * @param asset The address of the asset to supply * @param amount The amount of the asset to supply */ function supply(address user, address asset, uint256 amount) internal nonReentrant { apeFinance.supply(user, user, asset, amount); } /** * @dev Borrows the asset from ApeFinance. * @param user The address of the user * @param asset The address of the asset to borrow * @param amount The amount of the asset to borrow */ function borrow(address user, address asset, uint256 amount) internal nonReentrant { apeFinance.borrow(user, user, asset, amount); } /** * @dev Redeems the asset to ApeFinance. * @param user The address of the user * @param asset The address of the asset to redeem * @param amount The amount of the asset to redeem */ function redeem(address user, address asset, uint256 amount) internal nonReentrant { apeFinance.redeem(user, user, asset, amount); } /** * @dev Repays the asset to ApeFinance. * @param user The address of the user * @param asset The address of the asset to repay * @param amount The amount of the asset to repay */ function repay(address user, address asset, uint256 amount) internal nonReentrant { apeFinance.repay(user, user, asset, amount); } /** * @dev Wraps the native token and supplies it to ApeFinance. * @param user The address of the user * @param supplyAmount The amount of the wrapped native token to supply */ function supplyNativeToken(address user, uint256 supplyAmount) internal nonReentrant { IWeth(wape).deposit{value: supplyAmount}(); IERC20(wape).safeIncreaseAllowance(address(apeFinance), supplyAmount); apeFinance.supply(address(this), user, wape, supplyAmount); } /** * @dev Borrows the wrapped native token and unwraps it to the user. * @param user The address of the user * @param borrowAmount The amount of the wrapped native token to borrow */ function borrowNativeToken(address user, uint256 borrowAmount) internal nonReentrant { apeFinance.borrow(user, address(this), wape, borrowAmount); IWeth(wape).withdraw(borrowAmount); (bool sent,) = user.call{value: borrowAmount}(""); require(sent, "failed to send native token"); } /** * @dev Redeems the wrapped native token and unwraps it to the user. * @param user The address of the user * @param redeemAmount The amount of the wrapped native token to redeem, -1 means redeem all */ function redeemNativeToken(address user, uint256 redeemAmount) internal nonReentrant { redeemAmount = apeFinance.redeem(user, address(this), wape, redeemAmount); IWeth(wape).withdraw(redeemAmount); (bool sent,) = user.call{value: redeemAmount}(""); require(sent, "failed to send native token"); } /** * @dev Wraps the native token and repays it to ApeFinance. * @param user The address of the user * @param repayAmount The amount of the wrapped native token to repay, -1 means repay all */ function repayNativeToken(address user, uint256 repayAmount) internal nonReentrant returns (uint256) { if (repayAmount == type(uint256).max) { apeFinance.accrueInterest(wape); repayAmount = apeFinance.getBorrowBalance(user, wape); } IWeth(wape).deposit{value: repayAmount}(); IERC20(wape).safeIncreaseAllowance(address(apeFinance), repayAmount); apeFinance.repay(address(this), user, wape, repayAmount); return repayAmount; } /** * @dev Wraps the underlying and supplies the pToken to ApeFinance. * @param user The address of the user * @param pToken The address of the pToken * @param amount The amount of the pToken to supply */ function supplyPToken(address user, address pToken, uint256 amount) internal nonReentrant { address underlying = IPToken(pToken).getUnderlying(); IERC20(underlying).safeTransferFrom(user, pToken, amount); IPToken(pToken).absorb(address(this)); IERC20(pToken).safeIncreaseAllowance(address(apeFinance), amount); apeFinance.supply(address(this), user, pToken, amount); } /** * @dev Redeems the pToken and unwraps the underlying to the user. * @param user The address of the user * @param pToken The address of the pToken * @param amount The amount of the pToken to redeem */ function redeemPToken(address user, address pToken, uint256 amount) internal nonReentrant { amount = apeFinance.redeem(user, address(this), pToken, amount); IPToken(pToken).unwrap(amount); address underlying = IPToken(pToken).getUnderlying(); IERC20(underlying).safeTransfer(user, amount); } receive() external payable {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (access/Ownable2Step.sol) pragma solidity ^0.8.0; import "./Ownable.sol"; /** * @dev Contract module which provides 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} and {acceptOwnership}. * * This module is used through inheritance. It will make available all functions * from parent (Ownable). */ abstract contract Ownable2Step is Ownable { address private _pendingOwner; event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner); /** * @dev Returns the address of the pending owner. */ function pendingOwner() public view virtual returns (address) { return _pendingOwner; } /** * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual override onlyOwner { _pendingOwner = newOwner; emit OwnershipTransferStarted(owner(), newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner. * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual override { delete _pendingOwner; super._transferOwnership(newOwner); } /** * @dev The new owner accepts the ownership transfer. */ function acceptOwnership() external { address sender = _msgSender(); require(pendingOwner() == sender, "Ownable2Step: caller is not the new owner"); _transferOwnership(sender); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the 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 `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.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 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' 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) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @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 require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IDeferLiquidityCheck { /** * @dev The callback function that deferLiquidityCheck will invoke. * @param data The arbitrary data that was passed in by the caller */ function onDeferredLiquidityCheck(bytes memory data) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../libraries/DataTypes.sol"; interface IApeFinance { /* ========== USER INTERFACES ========== */ function accrueInterest(address market) external; function supply(address from, address to, address market, uint256 amount) external; function borrow(address from, address to, address asset, uint256 amount) external; function redeem(address from, address to, address asset, uint256 amount) external returns (uint256); function repay(address from, address to, address asset, uint256 amount) external returns (uint256); function liquidate( address liquidator, address borrower, address marketBorrow, address marketCollateral, uint256 repayAmount ) external returns (uint256, uint256); function deferLiquidityCheck(address user, bytes memory data) external; function getBorrowBalance(address user, address market) external view returns (uint256); function getATokenBalance(address user, address market) external view returns (uint256); function getSupplyBalance(address user, address market) external view returns (uint256); function isMarketListed(address market) external view returns (bool); function getExchangeRate(address market) external view returns (uint256); function getTotalSupply(address market) external view returns (uint256); function getTotalBorrow(address market) external view returns (uint256); function getTotalCash(address market) external view returns (uint256); function getTotalReserves(address market) external view returns (uint256); function getAccountLiquidity(address user) external view returns (uint256, uint256, uint256); function isAllowedExtension(address user, address extension) external view returns (bool); function transferAToken(address market, address from, address to, uint256 amount) external; function setSubAccountExtension(address primary, uint256 subAccountId, bool allowed) external; /* ========== MARKET CONFIGURATOR INTERFACES ========== */ function getMarketConfiguration(address market) external view returns (DataTypes.MarketConfig memory); function listMarket(address market, DataTypes.MarketConfig calldata config) external; function delistMarket(address market) external; function setMarketConfiguration(address market, DataTypes.MarketConfig calldata config) external; /* ========== CREDIT LIMIT MANAGER INTERFACES ========== */ function getCreditLimit(address user, address market) external view returns (uint256); function getUserCreditMarkets(address user) external view returns (address[] memory); function isCreditAccount(address user) external view returns (bool); function setCreditLimit(address user, address market, uint256 credit) external; /* ========== RESERVE MANAGER INTERFACES ========== */ function absorbToReserves(address market) external; function reduceReserves(address market, uint256 aTokenAmount, address recipient) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; interface IPToken is IERC20 { function getUnderlying() external view returns (address); function wrap(uint256 amount) external; function unwrap(uint256 amount) external; function absorb(address user) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IWeth { function deposit() external payable; function withdraw(uint256 wad) external; function balanceOf(address) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { 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 { _transferOwnership(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"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @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 * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 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"); (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 functionCallWithValue(target, data, 0, "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"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; library DataTypes { struct UserBorrow { uint256 borrowBalance; uint256 borrowIndex; } struct MarketConfig { // 1 + 1 + 2 + 2 + 2 + 2 + 1 + 1 = 12 bool isListed; uint8 pauseFlags; uint16 collateralFactor; uint16 liquidationThreshold; uint16 liquidationBonus; uint16 reserveFactor; bool isPToken; bool isDelisted; // 20 + 20 + 20 + 32 + 32 + 32 address aTokenAddress; address debtTokenAddress; address interestRateModelAddress; uint256 supplyCap; uint256 borrowCap; uint256 initialExchangeRate; } struct Market { MarketConfig config; uint40 lastUpdateTimestamp; uint256 totalCash; uint256 totalBorrow; uint256 totalSupply; uint256 totalReserves; uint256 borrowIndex; mapping(address => UserBorrow) userBorrows; mapping(address => uint256) userSupplies; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^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 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; } }
{ "remappings": [ "ds-test/=lib/forge-std/lib/ds-test/src/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/", "openzeppelin-contracts/=lib/openzeppelin-contracts/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "viaIR": false, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"apeFinance_","type":"address"},{"internalType":"address","name":"wape_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","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":[],"name":"ACTION_BORROW","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ACTION_BORROW_NATIVE_TOKEN","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ACTION_BORROW_STETH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ACTION_DEFER_LIQUIDITY_CHECK","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ACTION_REDEEM","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ACTION_REDEEM_NATIVE_TOKEN","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ACTION_REDEEM_PTOKEN","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ACTION_REDEEM_STETH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ACTION_REPAY","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ACTION_REPAY_NATIVE_TOKEN","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ACTION_REPAY_STETH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ACTION_SUPPLY","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ACTION_SUPPLY_NATIVE_TOKEN","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ACTION_SUPPLY_PTOKEN","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ACTION_SUPPLY_STETH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"apeFinance","outputs":[{"internalType":"contract IApeFinance","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"name","type":"bytes32"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct TxBuilderExtension.Action[]","name":"actions","type":"tuple[]"}],"name":"execute","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes","name":"encodedData","type":"bytes"}],"name":"onDeferredLiquidityCheck","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"asset","type":"address"}],"name":"seize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"}],"name":"seizeNative","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wape","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60c06040523480156200001157600080fd5b5060405162002765380380620027658339810160408190526200003491620000f5565b600160005562000044336200005c565b6001600160a01b039182166080521660a0526200012d565b600280546001600160a01b0319169055620000838162000086602090811b6200087617901c565b50565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b0381168114620000f057600080fd5b919050565b600080604083850312156200010957600080fd5b6200011483620000d8565b91506200012460208401620000d8565b90509250929050565b60805160a0516125476200021e6000396000818161025d015281816110a201528181611120015281816111b301528181611269015281816112d90152818161140e01528181611494015281816114f60152818161159701528181611631015281816116af01526117420152600081816103a00152818161064901528181610e3901528181610ec501528181610f5b01528181610fb50152818161105d015281816111440152818161118201528181611238015281816113dd0152818161151e015281816115bf015281816116d301528181611711015281816118a7015281816118e3015261197a01526125476000f3fe6080604052600436106101855760003560e01c8063a15db5c5116100d1578063dec7b7a81161008a578063e9df786011610064578063e9df786014610513578063f2fde38b14610547578063fcc0c68014610567578063fccd74111461058757600080fd5b8063dec7b7a8146104b8578063e1a16e79146104cb578063e30c3978146104f557600080fd5b8063a15db5c5146103c2578063b58efa5f146103e2578063b69d341514610402578063cc1579051461042c578063d14b66b314610460578063daf4008d1461049457600080fd5b8063715018a61161013e5780638da5cb5b116101185780638da5cb5b14610318578063953b67f114610336578063956974851461035a5780639b6899db1461038e57600080fd5b8063715018a6146102c257806379ba5097146102d957806388d0900d146102ee57600080fd5b8063106407fc1461019157806312d6e606146101cd578063268a35c2146101f05780632b7a7f711461021b5780633cfffcb61461024b5780635898e4d41461029757600080fd5b3661018c57005b600080fd5b34801561019d57600080fd5b506101ba7108286a8929e9cbea48aa082b2bea6a88aa8960731b81565b6040519081526020015b60405180910390f35b3480156101d957600080fd5b506101ba6b414354494f4e5f524550415960a01b81565b3480156101fc57600080fd5b506101ba7320a1aa24a7a72fa9aaa828262cafa82a27a5a2a760611b81565b34801561022757600080fd5b506101ba7820a1aa24a7a72fa922a820acafa720aa24ab22afaa27a5a2a760391b81565b34801561025757600080fd5b5061027f7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016101c4565b3480156102a357600080fd5b506101ba7320a1aa24a7a72fa922a222a2a6afa82a27a5a2a760611b81565b3480156102ce57600080fd5b506102d76105ab565b005b3480156102e557600080fd5b506102d76105bf565b3480156102fa57600080fd5b506101ba7208286a8929e9cbea48a888a8a9abea6a88aa89606b1b81565b34801561032457600080fd5b506001546001600160a01b031661027f565b34801561034257600080fd5b506101ba6c414354494f4e5f535550504c5960981b81565b34801561036657600080fd5b506101ba7f414354494f4e5f424f52524f575f4e41544956455f544f4b454e00000000000081565b34801561039a57600080fd5b5061027f7f000000000000000000000000000000000000000000000000000000000000000081565b3480156103ce57600080fd5b506102d76103dd366004611f60565b61063e565b3480156103ee57600080fd5b506102d76103fd366004611faa565b6106e6565b34801561040e57600080fd5b506101ba7208286a8929e9cbea6aaa0a098b2bea6a88aa89606b1b81565b34801561043857600080fd5b506101ba7f414354494f4e5f535550504c595f4e41544956455f544f4b454e00000000000081565b34801561046c57600080fd5b506101ba7f414354494f4e5f52454445454d5f4e41544956455f544f4b454e00000000000081565b3480156104a057600080fd5b506101ba6c414354494f4e5f52454445454d60981b81565b6102d76104c6366004611fce565b610765565b3480156104d757600080fd5b506101ba7208286a8929e9cbe849ea4a49eaebea6a88aa89606b1b81565b34801561050157600080fd5b506002546001600160a01b031661027f565b34801561051f57600080fd5b506101ba7f414354494f4e5f44454645525f4c49515549444954595f434845434b0000000081565b34801561055357600080fd5b506102d7610562366004611faa565b61077e565b34801561057357600080fd5b506102d7610582366004612043565b6107ef565b34801561059357600080fd5b506101ba6c414354494f4e5f424f52524f5760981b81565b6105b36108c8565b6105bd6000610922565b565b60025433906001600160a01b031681146106325760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b60648201526084015b60405180910390fd5b61063b81610922565b50565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106b65760405162461bcd60e51b815260206004820152601860248201527f756e74727573746564206d6573736167652073656e64657200000000000000006044820152606401610629565b6000806000838060200190518101906106cf91906120cc565b9250925092506106e083838361093b565b50505050565b6106ee6108c8565b6000816001600160a01b03164760405160006040518083038185875af1925050503d806000811461073b576040519150601f19603f3d011682016040523d82523d6000602084013e610740565b606091505b50509050806107615760405162461bcd60e51b815260040161062990612213565b5050565b3460035561076133610777838561224a565b600061093b565b6107866108c8565b600280546001600160a01b0383166001600160a01b031990911681179091556107b76001546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6107f76108c8565b6040516370a0823160e01b81523060048201526107619083906001600160a01b038416906370a0823190602401602060405180830381865afa158015610841573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086591906122f9565b6001600160a01b0384169190610dba565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001546001600160a01b031633146105bd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610629565b600280546001600160a01b031916905561063b81610876565b805b8251811015610d2557600083828151811061095a5761095a612312565b602002602001015190507f414354494f4e5f44454645525f4c49515549444954595f434845434b00000000816000015114156109cd576109c78580866109a186600161233e565b6040516020016109b393929190612382565b604051602081830303815290604052610e22565b50610d25565b80516c414354494f4e5f535550504c5960981b1415610a17576000808260200151806020019051810190610a019190612410565b91509150610a10878383610ea6565b5050610d1c565b80516c414354494f4e5f424f52524f5760981b1415610a5a576000808260200151806020019051810190610a4b9190612410565b91509150610a10878383610f3c565b80516c414354494f4e5f52454445454d60981b1415610a9d576000808260200151806020019051810190610a8e9190612410565b91509150610a10878383610f96565b80516b414354494f4e5f524550415960a01b1415610adf576000808260200151806020019051810190610ad09190612410565b91509150610a1087838361103e565b80517f414354494f4e5f535550504c595f4e41544956455f544f4b454e0000000000001415610b4c5760008160200151806020019051810190610b2291906122f9565b9050610b2e8682611098565b8060036000828254610b40919061243e565b90915550610d1c915050565b80517f414354494f4e5f424f52524f575f4e41544956455f544f4b454e0000000000001415610ba15760008160200151806020019051810190610b8f91906122f9565b9050610b9b8682611219565b50610d1c565b80517f414354494f4e5f52454445454d5f4e41544956455f544f4b454e0000000000001415610bf05760008160200151806020019051810190610be491906122f9565b9050610b9b86826113be565b80517820a1aa24a7a72fa922a820acafa720aa24ab22afaa27a5a2a760391b1415610c4f5760008160200151806020019051810190610c2f91906122f9565b9050610c3b86826114cb565b90508060036000828254610b40919061243e565b80517320a1aa24a7a72fa9aaa828262cafa82a27a5a2a760611b1415610c99576000808260200151806020019051810190610c8a9190612410565b91509150610a108783836117bb565b80517320a1aa24a7a72fa922a222a2a6afa82a27a5a2a760611b1415610ce3576000808260200151806020019051810190610cd49190612410565b91509150610a1087838361195b565b60405162461bcd60e51b815260206004820152600e60248201526d34b73b30b634b21030b1ba34b7b760911b6044820152606401610629565b5060010161093d565b825181148015610d3757506000600354115b156106e0576003546040516000916001600160a01b038716918381818185875af1925050503d8060008114610d88576040519150601f19603f3d011682016040523d82523d6000602084013e610d8d565b606091505b5050905080610dae5760405162461bcd60e51b815260040161062990612213565b50600060035550505050565b6040516001600160a01b038316602482015260448101829052610e1d90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611acf565b505050565b6040516344dbdbd360e11b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906389b7b7a690610e709085908590600401612455565b600060405180830381600087803b158015610e8a57600080fd5b505af1158015610e9e573d6000803e3d6000fd5b505050505050565b610eae611ba1565b60405163107c8ed760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063107c8ed790610f00908690819087908790600401612479565b600060405180830381600087803b158015610f1a57600080fd5b505af1158015610f2e573d6000803e3d6000fd5b50505050610e1d6001600055565b610f44611ba1565b60405163afef7efd60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063afef7efd90610f00908690819087908790600401612479565b610f9e611ba1565b6040516302e80dad60e61b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ba036b4090610ff0908690819087908790600401612479565b6020604051808303816000875af115801561100f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061103391906122f9565b50610e1d6001600055565b611046611ba1565b60405163c035bd2160e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c035bd2190610ff0908690819087908790600401612479565b6110a0611ba1565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b1580156110fb57600080fd5b505af115801561110f573d6000803e3d6000fd5b5061116b9350506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691507f0000000000000000000000000000000000000000000000000000000000000000905083611bfb565b60405163107c8ed760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063107c8ed7906111dd90309086907f0000000000000000000000000000000000000000000000000000000000000000908790600401612479565b600060405180830381600087803b1580156111f757600080fd5b505af115801561120b573d6000803e3d6000fd5b505050506107616001600055565b611221611ba1565b60405163afef7efd60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063afef7efd9061129390859030907f0000000000000000000000000000000000000000000000000000000000000000908790600401612479565b600060405180830381600087803b1580156112ad57600080fd5b505af11580156112c1573d6000803e3d6000fd5b5050604051632e1a7d4d60e01b8152600481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169250632e1a7d4d91506024015b600060405180830381600087803b15801561132857600080fd5b505af115801561133c573d6000803e3d6000fd5b505050506000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461138d576040519150601f19603f3d011682016040523d82523d6000602084013e611392565b606091505b50509050806113b35760405162461bcd60e51b815260040161062990612213565b506107616001600055565b6113c6611ba1565b6040516302e80dad60e61b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ba036b409061143890859030907f0000000000000000000000000000000000000000000000000000000000000000908790600401612479565b6020604051808303816000875af1158015611457573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061147b91906122f9565b604051632e1a7d4d60e01b8152600481018290529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d9060240161130e565b60006114d5611ba1565b60001982141561162f57604051639198e51560e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301527f00000000000000000000000000000000000000000000000000000000000000001690639198e51590602401600060405180830381600087803b15801561156257600080fd5b505af1158015611576573d6000803e3d6000fd5b505060405163118e31b760e01b81526001600160a01b0386811660048301527f0000000000000000000000000000000000000000000000000000000000000000811660248301527f000000000000000000000000000000000000000000000000000000000000000016925063118e31b79150604401602060405180830381865afa158015611608573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061162c91906122f9565b91505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b15801561168a57600080fd5b505af115801561169e573d6000803e3d6000fd5b506116fa9350506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691507f0000000000000000000000000000000000000000000000000000000000000000905084611bfb565b60405163c035bd2160e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c035bd219061176c90309087907f0000000000000000000000000000000000000000000000000000000000000000908890600401612479565b6020604051808303816000875af115801561178b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117af91906122f9565b50506001600055919050565b6117c3611ba1565b6000826001600160a01b0316639816f4736040518163ffffffff1660e01b8152600401602060405180830381865afa158015611803573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061182791906124a3565b905061183e6001600160a01b038216858585611cad565b60405163ba1b244760e01b81523060048201526001600160a01b0384169063ba1b244790602401600060405180830381600087803b15801561187f57600080fd5b505af1158015611893573d6000803e3d6000fd5b506118cc925050506001600160a01b0384167f000000000000000000000000000000000000000000000000000000000000000084611bfb565b60405163107c8ed760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063107c8ed79061191e903090889088908890600401612479565b600060405180830381600087803b15801561193857600080fd5b505af115801561194c573d6000803e3d6000fd5b5050505050610e1d6001600055565b611963611ba1565b6040516302e80dad60e61b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ba036b40906119b5908690309087908790600401612479565b6020604051808303816000875af11580156119d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119f891906122f9565b604051636f074d1f60e11b8152600481018290529091506001600160a01b0383169063de0e9a3e90602401600060405180830381600087803b158015611a3d57600080fd5b505af1158015611a51573d6000803e3d6000fd5b505050506000826001600160a01b0316639816f4736040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a95573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab991906124a3565b90506110336001600160a01b0382168584610dba565b6000611b24826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611ce59092919063ffffffff16565b805190915015610e1d5780806020019051810190611b4291906124c0565b610e1d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610629565b60026000541415611bf45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610629565b6002600055565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015611c4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c7091906122f9565b611c7a919061233e565b6040516001600160a01b0385166024820152604481018290529091506106e090859063095ea7b360e01b90606401610de6565b6040516001600160a01b03808516602483015283166044820152606481018290526106e09085906323b872dd60e01b90608401610de6565b6060611cf48484600085611cfc565b949350505050565b606082471015611d5d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610629565b600080866001600160a01b03168587604051611d7991906124e2565b60006040518083038185875af1925050503d8060008114611db6576040519150601f19603f3d011682016040523d82523d6000602084013e611dbb565b606091505b5091509150611dcc87838387611dd7565b979650505050505050565b60608315611e43578251611e3c576001600160a01b0385163b611e3c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610629565b5081611cf4565b611cf48383815115611e585781518083602001fd5b8060405162461bcd60e51b815260040161062991906124fe565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715611eab57611eab611e72565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715611eda57611eda611e72565b604052919050565b600067ffffffffffffffff821115611efc57611efc611e72565b50601f01601f191660200190565b600082601f830112611f1b57600080fd5b8135611f2e611f2982611ee2565b611eb1565b818152846020838601011115611f4357600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215611f7257600080fd5b813567ffffffffffffffff811115611f8957600080fd5b611cf484828501611f0a565b6001600160a01b038116811461063b57600080fd5b600060208284031215611fbc57600080fd5b8135611fc781611f95565b9392505050565b60008060208385031215611fe157600080fd5b823567ffffffffffffffff80821115611ff957600080fd5b818501915085601f83011261200d57600080fd5b81358181111561201c57600080fd5b8660208260051b850101111561203157600080fd5b60209290920196919550909350505050565b6000806040838503121561205657600080fd5b823561206181611f95565b9150602083013561207181611f95565b809150509250929050565b600067ffffffffffffffff82111561209657612096611e72565b5060051b60200190565b60005b838110156120bb5781810151838201526020016120a3565b838111156106e05750506000910152565b6000806000606084860312156120e157600080fd5b83516120ec81611f95565b8093505060208085015167ffffffffffffffff8082111561210c57600080fd5b818701915087601f83011261212057600080fd5b815161212e611f298261207c565b81815260059190911b8301840190848101908a83111561214d57600080fd5b8585015b838110156121fb5780518581111561216857600080fd5b86016040818e03601f1901121561217e57600080fd5b612186611e88565b88820151815260408201518781111561219e57600080fd5b8083019250508d603f8301126121b357600080fd5b888201516121c3611f2982611ee2565b8181528f60408386010111156121d857600080fd5b6121e8828c8301604087016120a0565b828b015250845250918601918601612151565b50809750505050505050604084015190509250925092565b6020808252601b908201527f6661696c656420746f2073656e64206e617469766520746f6b656e0000000000604082015260600190565b6000612258611f298461207c565b80848252602080830192508560051b85013681111561227657600080fd5b855b818110156122ed57803567ffffffffffffffff808211156122995760008081fd5b8189019150604082360312156122af5760008081fd5b6122b7611e88565b8235815285830135828111156122cd5760008081fd5b6122d936828601611f0a565b828801525087525050938201938201612278565b50919695505050505050565b60006020828403121561230b57600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000821982111561235157612351612328565b500190565b6000815180845261236e8160208601602086016120a0565b601f01601f19169290920160200192915050565b60006060820160018060a01b0386168352602060608185015281865180845260808601915060808160051b870101935082880160005b828110156123fa57878603607f1901845281518051875285015160408688018190526123e681890183612356565b9750505092840192908401906001016123b8565b5050505050604092909201929092529392505050565b6000806040838503121561242357600080fd5b825161242e81611f95565b6020939093015192949293505050565b60008282101561245057612450612328565b500390565b6001600160a01b0383168152604060208201819052600090611cf490830184612356565b6001600160a01b039485168152928416602084015292166040820152606081019190915260800190565b6000602082840312156124b557600080fd5b8151611fc781611f95565b6000602082840312156124d257600080fd5b81518015158114611fc757600080fd5b600082516124f48184602087016120a0565b9190910192915050565b602081526000611fc7602083018461235656fea2646970667358221220581f66a44418942ea8dce309c977c5cad1f6ec0241f1f70f087a092147c4813764736f6c634300080a00330000000000000000000000009cf2c7dd1bb947e398f9e12000f81656e4d65adb00000000000000000000000048b62137edfa95a428d35c09e44256a739f6b557
Deployed Bytecode
0x6080604052600436106101855760003560e01c8063a15db5c5116100d1578063dec7b7a81161008a578063e9df786011610064578063e9df786014610513578063f2fde38b14610547578063fcc0c68014610567578063fccd74111461058757600080fd5b8063dec7b7a8146104b8578063e1a16e79146104cb578063e30c3978146104f557600080fd5b8063a15db5c5146103c2578063b58efa5f146103e2578063b69d341514610402578063cc1579051461042c578063d14b66b314610460578063daf4008d1461049457600080fd5b8063715018a61161013e5780638da5cb5b116101185780638da5cb5b14610318578063953b67f114610336578063956974851461035a5780639b6899db1461038e57600080fd5b8063715018a6146102c257806379ba5097146102d957806388d0900d146102ee57600080fd5b8063106407fc1461019157806312d6e606146101cd578063268a35c2146101f05780632b7a7f711461021b5780633cfffcb61461024b5780635898e4d41461029757600080fd5b3661018c57005b600080fd5b34801561019d57600080fd5b506101ba7108286a8929e9cbea48aa082b2bea6a88aa8960731b81565b6040519081526020015b60405180910390f35b3480156101d957600080fd5b506101ba6b414354494f4e5f524550415960a01b81565b3480156101fc57600080fd5b506101ba7320a1aa24a7a72fa9aaa828262cafa82a27a5a2a760611b81565b34801561022757600080fd5b506101ba7820a1aa24a7a72fa922a820acafa720aa24ab22afaa27a5a2a760391b81565b34801561025757600080fd5b5061027f7f00000000000000000000000048b62137edfa95a428d35c09e44256a739f6b55781565b6040516001600160a01b0390911681526020016101c4565b3480156102a357600080fd5b506101ba7320a1aa24a7a72fa922a222a2a6afa82a27a5a2a760611b81565b3480156102ce57600080fd5b506102d76105ab565b005b3480156102e557600080fd5b506102d76105bf565b3480156102fa57600080fd5b506101ba7208286a8929e9cbea48a888a8a9abea6a88aa89606b1b81565b34801561032457600080fd5b506001546001600160a01b031661027f565b34801561034257600080fd5b506101ba6c414354494f4e5f535550504c5960981b81565b34801561036657600080fd5b506101ba7f414354494f4e5f424f52524f575f4e41544956455f544f4b454e00000000000081565b34801561039a57600080fd5b5061027f7f0000000000000000000000009cf2c7dd1bb947e398f9e12000f81656e4d65adb81565b3480156103ce57600080fd5b506102d76103dd366004611f60565b61063e565b3480156103ee57600080fd5b506102d76103fd366004611faa565b6106e6565b34801561040e57600080fd5b506101ba7208286a8929e9cbea6aaa0a098b2bea6a88aa89606b1b81565b34801561043857600080fd5b506101ba7f414354494f4e5f535550504c595f4e41544956455f544f4b454e00000000000081565b34801561046c57600080fd5b506101ba7f414354494f4e5f52454445454d5f4e41544956455f544f4b454e00000000000081565b3480156104a057600080fd5b506101ba6c414354494f4e5f52454445454d60981b81565b6102d76104c6366004611fce565b610765565b3480156104d757600080fd5b506101ba7208286a8929e9cbe849ea4a49eaebea6a88aa89606b1b81565b34801561050157600080fd5b506002546001600160a01b031661027f565b34801561051f57600080fd5b506101ba7f414354494f4e5f44454645525f4c49515549444954595f434845434b0000000081565b34801561055357600080fd5b506102d7610562366004611faa565b61077e565b34801561057357600080fd5b506102d7610582366004612043565b6107ef565b34801561059357600080fd5b506101ba6c414354494f4e5f424f52524f5760981b81565b6105b36108c8565b6105bd6000610922565b565b60025433906001600160a01b031681146106325760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b60648201526084015b60405180910390fd5b61063b81610922565b50565b336001600160a01b037f0000000000000000000000009cf2c7dd1bb947e398f9e12000f81656e4d65adb16146106b65760405162461bcd60e51b815260206004820152601860248201527f756e74727573746564206d6573736167652073656e64657200000000000000006044820152606401610629565b6000806000838060200190518101906106cf91906120cc565b9250925092506106e083838361093b565b50505050565b6106ee6108c8565b6000816001600160a01b03164760405160006040518083038185875af1925050503d806000811461073b576040519150601f19603f3d011682016040523d82523d6000602084013e610740565b606091505b50509050806107615760405162461bcd60e51b815260040161062990612213565b5050565b3460035561076133610777838561224a565b600061093b565b6107866108c8565b600280546001600160a01b0383166001600160a01b031990911681179091556107b76001546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6107f76108c8565b6040516370a0823160e01b81523060048201526107619083906001600160a01b038416906370a0823190602401602060405180830381865afa158015610841573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086591906122f9565b6001600160a01b0384169190610dba565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001546001600160a01b031633146105bd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610629565b600280546001600160a01b031916905561063b81610876565b805b8251811015610d2557600083828151811061095a5761095a612312565b602002602001015190507f414354494f4e5f44454645525f4c49515549444954595f434845434b00000000816000015114156109cd576109c78580866109a186600161233e565b6040516020016109b393929190612382565b604051602081830303815290604052610e22565b50610d25565b80516c414354494f4e5f535550504c5960981b1415610a17576000808260200151806020019051810190610a019190612410565b91509150610a10878383610ea6565b5050610d1c565b80516c414354494f4e5f424f52524f5760981b1415610a5a576000808260200151806020019051810190610a4b9190612410565b91509150610a10878383610f3c565b80516c414354494f4e5f52454445454d60981b1415610a9d576000808260200151806020019051810190610a8e9190612410565b91509150610a10878383610f96565b80516b414354494f4e5f524550415960a01b1415610adf576000808260200151806020019051810190610ad09190612410565b91509150610a1087838361103e565b80517f414354494f4e5f535550504c595f4e41544956455f544f4b454e0000000000001415610b4c5760008160200151806020019051810190610b2291906122f9565b9050610b2e8682611098565b8060036000828254610b40919061243e565b90915550610d1c915050565b80517f414354494f4e5f424f52524f575f4e41544956455f544f4b454e0000000000001415610ba15760008160200151806020019051810190610b8f91906122f9565b9050610b9b8682611219565b50610d1c565b80517f414354494f4e5f52454445454d5f4e41544956455f544f4b454e0000000000001415610bf05760008160200151806020019051810190610be491906122f9565b9050610b9b86826113be565b80517820a1aa24a7a72fa922a820acafa720aa24ab22afaa27a5a2a760391b1415610c4f5760008160200151806020019051810190610c2f91906122f9565b9050610c3b86826114cb565b90508060036000828254610b40919061243e565b80517320a1aa24a7a72fa9aaa828262cafa82a27a5a2a760611b1415610c99576000808260200151806020019051810190610c8a9190612410565b91509150610a108783836117bb565b80517320a1aa24a7a72fa922a222a2a6afa82a27a5a2a760611b1415610ce3576000808260200151806020019051810190610cd49190612410565b91509150610a1087838361195b565b60405162461bcd60e51b815260206004820152600e60248201526d34b73b30b634b21030b1ba34b7b760911b6044820152606401610629565b5060010161093d565b825181148015610d3757506000600354115b156106e0576003546040516000916001600160a01b038716918381818185875af1925050503d8060008114610d88576040519150601f19603f3d011682016040523d82523d6000602084013e610d8d565b606091505b5050905080610dae5760405162461bcd60e51b815260040161062990612213565b50600060035550505050565b6040516001600160a01b038316602482015260448101829052610e1d90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611acf565b505050565b6040516344dbdbd360e11b81526001600160a01b037f0000000000000000000000009cf2c7dd1bb947e398f9e12000f81656e4d65adb16906389b7b7a690610e709085908590600401612455565b600060405180830381600087803b158015610e8a57600080fd5b505af1158015610e9e573d6000803e3d6000fd5b505050505050565b610eae611ba1565b60405163107c8ed760e01b81526001600160a01b037f0000000000000000000000009cf2c7dd1bb947e398f9e12000f81656e4d65adb169063107c8ed790610f00908690819087908790600401612479565b600060405180830381600087803b158015610f1a57600080fd5b505af1158015610f2e573d6000803e3d6000fd5b50505050610e1d6001600055565b610f44611ba1565b60405163afef7efd60e01b81526001600160a01b037f0000000000000000000000009cf2c7dd1bb947e398f9e12000f81656e4d65adb169063afef7efd90610f00908690819087908790600401612479565b610f9e611ba1565b6040516302e80dad60e61b81526001600160a01b037f0000000000000000000000009cf2c7dd1bb947e398f9e12000f81656e4d65adb169063ba036b4090610ff0908690819087908790600401612479565b6020604051808303816000875af115801561100f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061103391906122f9565b50610e1d6001600055565b611046611ba1565b60405163c035bd2160e01b81526001600160a01b037f0000000000000000000000009cf2c7dd1bb947e398f9e12000f81656e4d65adb169063c035bd2190610ff0908690819087908790600401612479565b6110a0611ba1565b7f00000000000000000000000048b62137edfa95a428d35c09e44256a739f6b5576001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b1580156110fb57600080fd5b505af115801561110f573d6000803e3d6000fd5b5061116b9350506001600160a01b037f00000000000000000000000048b62137edfa95a428d35c09e44256a739f6b5571691507f0000000000000000000000009cf2c7dd1bb947e398f9e12000f81656e4d65adb905083611bfb565b60405163107c8ed760e01b81526001600160a01b037f0000000000000000000000009cf2c7dd1bb947e398f9e12000f81656e4d65adb169063107c8ed7906111dd90309086907f00000000000000000000000048b62137edfa95a428d35c09e44256a739f6b557908790600401612479565b600060405180830381600087803b1580156111f757600080fd5b505af115801561120b573d6000803e3d6000fd5b505050506107616001600055565b611221611ba1565b60405163afef7efd60e01b81526001600160a01b037f0000000000000000000000009cf2c7dd1bb947e398f9e12000f81656e4d65adb169063afef7efd9061129390859030907f00000000000000000000000048b62137edfa95a428d35c09e44256a739f6b557908790600401612479565b600060405180830381600087803b1580156112ad57600080fd5b505af11580156112c1573d6000803e3d6000fd5b5050604051632e1a7d4d60e01b8152600481018490527f00000000000000000000000048b62137edfa95a428d35c09e44256a739f6b5576001600160a01b03169250632e1a7d4d91506024015b600060405180830381600087803b15801561132857600080fd5b505af115801561133c573d6000803e3d6000fd5b505050506000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461138d576040519150601f19603f3d011682016040523d82523d6000602084013e611392565b606091505b50509050806113b35760405162461bcd60e51b815260040161062990612213565b506107616001600055565b6113c6611ba1565b6040516302e80dad60e61b81526001600160a01b037f0000000000000000000000009cf2c7dd1bb947e398f9e12000f81656e4d65adb169063ba036b409061143890859030907f00000000000000000000000048b62137edfa95a428d35c09e44256a739f6b557908790600401612479565b6020604051808303816000875af1158015611457573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061147b91906122f9565b604051632e1a7d4d60e01b8152600481018290529091507f00000000000000000000000048b62137edfa95a428d35c09e44256a739f6b5576001600160a01b031690632e1a7d4d9060240161130e565b60006114d5611ba1565b60001982141561162f57604051639198e51560e01b81526001600160a01b037f00000000000000000000000048b62137edfa95a428d35c09e44256a739f6b557811660048301527f0000000000000000000000009cf2c7dd1bb947e398f9e12000f81656e4d65adb1690639198e51590602401600060405180830381600087803b15801561156257600080fd5b505af1158015611576573d6000803e3d6000fd5b505060405163118e31b760e01b81526001600160a01b0386811660048301527f00000000000000000000000048b62137edfa95a428d35c09e44256a739f6b557811660248301527f0000000000000000000000009cf2c7dd1bb947e398f9e12000f81656e4d65adb16925063118e31b79150604401602060405180830381865afa158015611608573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061162c91906122f9565b91505b7f00000000000000000000000048b62137edfa95a428d35c09e44256a739f6b5576001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b15801561168a57600080fd5b505af115801561169e573d6000803e3d6000fd5b506116fa9350506001600160a01b037f00000000000000000000000048b62137edfa95a428d35c09e44256a739f6b5571691507f0000000000000000000000009cf2c7dd1bb947e398f9e12000f81656e4d65adb905084611bfb565b60405163c035bd2160e01b81526001600160a01b037f0000000000000000000000009cf2c7dd1bb947e398f9e12000f81656e4d65adb169063c035bd219061176c90309087907f00000000000000000000000048b62137edfa95a428d35c09e44256a739f6b557908890600401612479565b6020604051808303816000875af115801561178b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117af91906122f9565b50506001600055919050565b6117c3611ba1565b6000826001600160a01b0316639816f4736040518163ffffffff1660e01b8152600401602060405180830381865afa158015611803573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061182791906124a3565b905061183e6001600160a01b038216858585611cad565b60405163ba1b244760e01b81523060048201526001600160a01b0384169063ba1b244790602401600060405180830381600087803b15801561187f57600080fd5b505af1158015611893573d6000803e3d6000fd5b506118cc925050506001600160a01b0384167f0000000000000000000000009cf2c7dd1bb947e398f9e12000f81656e4d65adb84611bfb565b60405163107c8ed760e01b81526001600160a01b037f0000000000000000000000009cf2c7dd1bb947e398f9e12000f81656e4d65adb169063107c8ed79061191e903090889088908890600401612479565b600060405180830381600087803b15801561193857600080fd5b505af115801561194c573d6000803e3d6000fd5b5050505050610e1d6001600055565b611963611ba1565b6040516302e80dad60e61b81526001600160a01b037f0000000000000000000000009cf2c7dd1bb947e398f9e12000f81656e4d65adb169063ba036b40906119b5908690309087908790600401612479565b6020604051808303816000875af11580156119d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119f891906122f9565b604051636f074d1f60e11b8152600481018290529091506001600160a01b0383169063de0e9a3e90602401600060405180830381600087803b158015611a3d57600080fd5b505af1158015611a51573d6000803e3d6000fd5b505050506000826001600160a01b0316639816f4736040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a95573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab991906124a3565b90506110336001600160a01b0382168584610dba565b6000611b24826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611ce59092919063ffffffff16565b805190915015610e1d5780806020019051810190611b4291906124c0565b610e1d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610629565b60026000541415611bf45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610629565b6002600055565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015611c4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c7091906122f9565b611c7a919061233e565b6040516001600160a01b0385166024820152604481018290529091506106e090859063095ea7b360e01b90606401610de6565b6040516001600160a01b03808516602483015283166044820152606481018290526106e09085906323b872dd60e01b90608401610de6565b6060611cf48484600085611cfc565b949350505050565b606082471015611d5d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610629565b600080866001600160a01b03168587604051611d7991906124e2565b60006040518083038185875af1925050503d8060008114611db6576040519150601f19603f3d011682016040523d82523d6000602084013e611dbb565b606091505b5091509150611dcc87838387611dd7565b979650505050505050565b60608315611e43578251611e3c576001600160a01b0385163b611e3c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610629565b5081611cf4565b611cf48383815115611e585781518083602001fd5b8060405162461bcd60e51b815260040161062991906124fe565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715611eab57611eab611e72565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715611eda57611eda611e72565b604052919050565b600067ffffffffffffffff821115611efc57611efc611e72565b50601f01601f191660200190565b600082601f830112611f1b57600080fd5b8135611f2e611f2982611ee2565b611eb1565b818152846020838601011115611f4357600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215611f7257600080fd5b813567ffffffffffffffff811115611f8957600080fd5b611cf484828501611f0a565b6001600160a01b038116811461063b57600080fd5b600060208284031215611fbc57600080fd5b8135611fc781611f95565b9392505050565b60008060208385031215611fe157600080fd5b823567ffffffffffffffff80821115611ff957600080fd5b818501915085601f83011261200d57600080fd5b81358181111561201c57600080fd5b8660208260051b850101111561203157600080fd5b60209290920196919550909350505050565b6000806040838503121561205657600080fd5b823561206181611f95565b9150602083013561207181611f95565b809150509250929050565b600067ffffffffffffffff82111561209657612096611e72565b5060051b60200190565b60005b838110156120bb5781810151838201526020016120a3565b838111156106e05750506000910152565b6000806000606084860312156120e157600080fd5b83516120ec81611f95565b8093505060208085015167ffffffffffffffff8082111561210c57600080fd5b818701915087601f83011261212057600080fd5b815161212e611f298261207c565b81815260059190911b8301840190848101908a83111561214d57600080fd5b8585015b838110156121fb5780518581111561216857600080fd5b86016040818e03601f1901121561217e57600080fd5b612186611e88565b88820151815260408201518781111561219e57600080fd5b8083019250508d603f8301126121b357600080fd5b888201516121c3611f2982611ee2565b8181528f60408386010111156121d857600080fd5b6121e8828c8301604087016120a0565b828b015250845250918601918601612151565b50809750505050505050604084015190509250925092565b6020808252601b908201527f6661696c656420746f2073656e64206e617469766520746f6b656e0000000000604082015260600190565b6000612258611f298461207c565b80848252602080830192508560051b85013681111561227657600080fd5b855b818110156122ed57803567ffffffffffffffff808211156122995760008081fd5b8189019150604082360312156122af5760008081fd5b6122b7611e88565b8235815285830135828111156122cd5760008081fd5b6122d936828601611f0a565b828801525087525050938201938201612278565b50919695505050505050565b60006020828403121561230b57600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000821982111561235157612351612328565b500190565b6000815180845261236e8160208601602086016120a0565b601f01601f19169290920160200192915050565b60006060820160018060a01b0386168352602060608185015281865180845260808601915060808160051b870101935082880160005b828110156123fa57878603607f1901845281518051875285015160408688018190526123e681890183612356565b9750505092840192908401906001016123b8565b5050505050604092909201929092529392505050565b6000806040838503121561242357600080fd5b825161242e81611f95565b6020939093015192949293505050565b60008282101561245057612450612328565b500390565b6001600160a01b0383168152604060208201819052600090611cf490830184612356565b6001600160a01b039485168152928416602084015292166040820152606081019190915260800190565b6000602082840312156124b557600080fd5b8151611fc781611f95565b6000602082840312156124d257600080fd5b81518015158114611fc757600080fd5b600082516124f48184602087016120a0565b9190910192915050565b602081526000611fc7602083018461235656fea2646970667358221220581f66a44418942ea8dce309c977c5cad1f6ec0241f1f70f087a092147c4813764736f6c634300080a0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000009cf2c7dd1bb947e398f9e12000f81656e4d65adb00000000000000000000000048b62137edfa95a428d35c09e44256a739f6b557
-----Decoded View---------------
Arg [0] : apeFinance_ (address): 0x9Cf2c7dD1bB947e398f9e12000f81656e4d65adB
Arg [1] : wape_ (address): 0x48b62137EdfA95a428D35C09E44256a739F6B557
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000009cf2c7dd1bb947e398f9e12000f81656e4d65adb
Arg [1] : 00000000000000000000000048b62137edfa95a428d35c09e44256a739f6b557
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.