Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x61010060 | 19705017 | 134 days ago | IN | 0 ETH | 0.02522061 |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
ERC20TokenFactory
Compiler Version
v0.8.23+commit.f704f362
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.23; import {BaseFactory, IERC20, IUniswapV2Factory, IUniswapV2Router02} from "../BaseFactory.sol"; import {BaseERC20} from "./BaseERC20.sol"; /// @title ERC20TokenFactory /// @notice A factory contract to create new non-ruggable ERC20 tokens contract ERC20TokenFactory is BaseFactory { // ============================================================================================ // Constructor // ============================================================================================ constructor( IERC20 _wnt, IUniswapV2Router02 _univ2router, IUniswapV2Factory _univ2factory, address _treasury ) BaseFactory(_wnt, _univ2router, _univ2factory, _treasury) {} // ============================================================================================ // External Functions // ============================================================================================ /// @notice Create a new ERC20 token, add liquidity and burn the LP tokens /// @param _name The token name /// @param _symbol The token symbol /// @param _totalSupply The total supply /// @param _tokenLiquidityThreshold_ The token liquidity threshold /// @return The pair address and the token address function createERC20( string memory _name, string memory _symbol, uint256 _totalSupply, uint256 tokenLiquidityThreshold_ ) external payable nonReentrant returns (address, address) { require(tokenLiquidityThreshold_ >= _totalSupply * 2/ 10000 && tokenLiquidityThreshold_ <= _totalSupply / 100, "tokenLiquidityThreshold must 0.02-1% of supply"); BaseERC20 _token = new BaseERC20( wnt, univ2router, treasury, _name, _symbol, _totalSupply, tokenLiquidityThreshold_, univ2factory ); address _pair = _addLiquidityAndBurn(address(_token)); emit TokenCreated(address(_token), _name, _symbol, _totalSupply); return (_pair, address(_token)); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.23; import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import {Address} from "@openzeppelin/contracts/utils/Address.sol"; import {IUniswapV2Router02} from "@uniswap-periphery/interfaces/IUniswapV2Router02.sol"; import {IUniswapV2Factory} from "@uniswap-core/interfaces/IUniswapV2Factory.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; /// @title BaseFactory /// @notice A base factory contract to create new non-ruggable ERC20/ERC404 tokens abstract contract BaseFactory is ReentrancyGuard { using SafeERC20 for IERC20; using Address for address payable; address public immutable treasury; IERC20 public immutable wnt; IUniswapV2Router02 public immutable univ2router; IUniswapV2Factory public immutable univ2factory; uint256 public constant SWAP_TAX = 25; // 0.25% uint256 public constant PRECISION = 10000; // ============================================================================================ // Constructor // ============================================================================================ constructor( IERC20 _wnt, IUniswapV2Router02 _univ2router, IUniswapV2Factory _univ2factory, address _treasury ) { if (_treasury == address(0)) revert InvalidAddress(); wnt = _wnt; univ2router = _univ2router; univ2factory = _univ2factory; treasury = _treasury; if (block.chainid == 252) { // https://docs.frax.com/fraxtal/fraxtal-incentives/fraxtal-incentives-delegation#setting-delegations-for-smart-contracts address _delegationRegistry = 0x4392dC16867D53DBFE227076606455634d4c2795; _delegationRegistry.call( abi.encodeWithSignature( "setDelegationForSelf(address)", _treasury ) ); _delegationRegistry.call( abi.encodeWithSignature("disableSelfManagingDelegations()") ); } } // ============================================================================================ // Internal Functions // ============================================================================================ function _addLiquidityAndBurn( address _token ) internal returns (address _pair) { if (msg.value == 0) revert InvalidAmount(); payable(address(wnt)).functionCallWithValue( abi.encodeWithSignature("deposit()"), msg.value ); uint256 _amountToken = IERC20(_token).balanceOf(address(this)); uint256 _amountWNT = wnt.balanceOf(address(this)); // slither-disable-next-line incorrect-equality if (_amountToken == 0 || _amountWNT == 0) revert InvalidAmount(); _pair = univ2factory.getPair(_token, address(wnt)); (_token, address(wnt)); uint256 _amountTax = (_amountWNT * SWAP_TAX) / PRECISION; wnt.safeTransfer(treasury, _amountTax); _amountWNT -= _amountTax; IERC20(_token).forceApprove(address(univ2router), _amountToken); wnt.forceApprove(address(univ2router), _amountWNT); uint256 _liquidity = 0; (_amountToken, _amountWNT, _liquidity) = univ2router.addLiquidity( _token, // tokenA address(wnt), // tokenB _amountToken, // amountADesired _amountWNT, // amountBDesired _amountToken, // amountAMin _amountWNT, // amountBMin address(0), // to block.timestamp // deadline ); emit AddLiquidityAndBurn( _amountToken, _amountWNT, _amountTax, _liquidity, _pair ); } // ============================================================================================ // Events // ============================================================================================ event AddLiquidityAndBurn( uint256 amountToken, uint256 amountWNT, uint256 amountTax, uint256 liquidity, address pair ); event TokenCreated( address token, string name, string symbol, uint256 totalSupply ); // ============================================================================================ // Errors // ============================================================================================ error InvalidAmount(); error InvalidAddress(); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.23; import {ERC20, ERC20Capped} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Capped.sol"; import {BaseToken, IERC20} from "../BaseToken.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import {IUniswapV2Router02} from "@uniswap-periphery/interfaces/IUniswapV2Router02.sol"; import {IUniswapV2Factory} from "@uniswap-core/interfaces/IUniswapV2Factory.sol"; /// @title BaseERC20 /// @notice A standard ERC20 token contract BaseERC20 is ERC20Capped, BaseToken { using Address for address payable; IUniswapV2Router02 public router; address public pair; address tokenFactory; uint256 private tokenLiquidityThreshold; constructor( IERC20 _wnt, IUniswapV2Router02 _univ2router, address _treasury, string memory name_, string memory symbol_, uint256 totalSupply_, uint256 _tokenLiquidityThreshold, IUniswapV2Factory univ2factory ) ERC20(name_, symbol_) ERC20Capped(totalSupply_) BaseToken(_wnt, _univ2router, _treasury) { _mint( msg.sender, // TokenFactory totalSupply_ // maxSupply ); tokenFactory = msg.sender; pair = univ2factory.createPair(address(this), address(_wnt)); router = _univ2router; tokenLiquidityThreshold = _tokenLiquidityThreshold; _approve(address(this), address(router), type(uint256).max); } function _transfer( address from, address to, uint256 value ) internal override { require(value > 0, "Transfer amount must be greater than zero"); uint256 fee = 0; if (to == pair || from == pair) { if (!(to == address(this) || from == address(this))) { if (from != tokenFactory) { fee = ((value * SWAP_TAX) / PRECISION); handle_fees(); } } } super._transfer(from, to, value - fee); if (fee > 0) { super._transfer(from, address(this), fee); } } function handle_fees() private { uint256 contractBalance = balanceOf(address(this)); if (contractBalance >= tokenLiquidityThreshold) { swapTokensForETH(contractBalance); } } function swapTokensForETH(uint256 tokenAmount) private { address[] memory path = new address[](2); path[0] = address(this); path[1] = router.WETH(); router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, treasury, block.timestamp ); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.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; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.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 * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [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://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.0/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); } } }
pragma solidity >=0.6.2; import './IUniswapV2Router01.sol'; interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; }
pragma solidity >=0.5.0; interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.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.9.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/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; /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.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)); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value)); } /** * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ 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"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value)); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to * 0 before setting it to a non-zero value. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0)); _callOptionalReturn(token, approvalCall); } } /** * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`. * Revert on invalid signature. */ 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"); require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation 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). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Capped.sol) pragma solidity ^0.8.0; import "../ERC20.sol"; /** * @dev Extension of {ERC20} that adds a cap to the supply of tokens. */ abstract contract ERC20Capped is ERC20 { uint256 private immutable _cap; /** * @dev Sets the value of the `cap`. This value is immutable, it can only be * set once during construction. */ constructor(uint256 cap_) { require(cap_ > 0, "ERC20Capped: cap is 0"); _cap = cap_; } /** * @dev Returns the cap on the token's total supply. */ function cap() public view virtual returns (uint256) { return _cap; } /** * @dev See {ERC20-_mint}. */ function _mint(address account, uint256 amount) internal virtual override { require(ERC20.totalSupply() + amount <= cap(), "ERC20Capped: cap exceeded"); super._mint(account, amount); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.23; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import {IUniswapV2Router02} from "@uniswap-periphery/interfaces/IUniswapV2Router02.sol"; /// @title BaseToken /// @notice A base contract for all tokens abstract contract BaseToken is ReentrancyGuard { using SafeERC20 for IERC20; address public immutable treasury; IERC20 public immutable wnt; IUniswapV2Router02 public immutable univ2router; uint256 public constant SWAP_TAX = 25; // 0.25% uint256 public constant PRECISION = 10000; // ============================================================================================ // Constructor // ============================================================================================ constructor( IERC20 _wnt, IUniswapV2Router02 _univ2router, address _treasury ) { wnt = _wnt; univ2router = _univ2router; treasury = _treasury; if (block.chainid == 252) { // https://docs.frax.com/fraxtal/fraxtal-incentives/fraxtal-incentives-delegation#setting-delegations-for-smart-contracts address _delegationRegistry = 0x4392dC16867D53DBFE227076606455634d4c2795; _delegationRegistry.call( abi.encodeWithSignature( "setDelegationForSelf(address)", _treasury ) ); _delegationRegistry.call( abi.encodeWithSignature("disableSelfManagingDelegations()") ); } } // ============================================================================================ // External Functions // ============================================================================================ }
pragma solidity >=0.6.2; interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/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.9.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * The default value of {decimals} is 18. To change this, you should override * this function so it returns a different value. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the default value returned by this function, unless * it's overridden. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, spender) + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer(address from, address to, uint256 amount) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by // decrementing then incrementing. _balances[to] += amount; } emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; unchecked { // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above. _balances[account] += amount; } emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; // Overflow not possible: amount <= accountBalance <= totalSupply. _totalSupply -= amount; } emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// 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": [ "forge-std/=lib/forge-std/src/", "@openzeppelin/=lib/openzeppelin-contracts/", "@vectorized/=lib/dn404/src/", "@uniswap-periphery/=lib/v2-periphery/contracts/", "@uniswap-core/=lib/v2-core/contracts/", "dn404/=lib/dn404/", "ds-test/=lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", "murky/=lib/dn404/lib/murky/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "openzeppelin/=lib/openzeppelin-contracts/contracts/", "solady/=lib/dn404/lib/solady/src/", "v2-core/=lib/v2-core/contracts/", "v2-periphery/=lib/v2-periphery/contracts/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "viaIR": false, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IERC20","name":"_wnt","type":"address"},{"internalType":"contract IUniswapV2Router02","name":"_univ2router","type":"address"},{"internalType":"contract IUniswapV2Factory","name":"_univ2factory","type":"address"},{"internalType":"address","name":"_treasury","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidAddress","type":"error"},{"inputs":[],"name":"InvalidAmount","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amountToken","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountWNT","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountTax","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"liquidity","type":"uint256"},{"indexed":false,"internalType":"address","name":"pair","type":"address"}],"name":"AddLiquidityAndBurn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"string","name":"symbol","type":"string"},{"indexed":false,"internalType":"uint256","name":"totalSupply","type":"uint256"}],"name":"TokenCreated","type":"event"},{"inputs":[],"name":"PRECISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SWAP_TAX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint256","name":"_totalSupply","type":"uint256"},{"internalType":"uint256","name":"tokenLiquidityThreshold_","type":"uint256"}],"name":"createERC20","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"univ2factory","outputs":[{"internalType":"contract IUniswapV2Factory","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"univ2router","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wnt","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
6101006040523480156200001257600080fd5b5060405162002ad138038062002ad18339810160408190526200003591620001ea565b6001600055838383836001600160a01b038116620000665760405163e6c4247b60e01b815260040160405180910390fd5b6001600160a01b0380851660a05283811660c05282811660e05281166080524660fc03620001c3576040516001600160a01b0382166024820152734392dc16867d53dbfe227076606455634d4c279590819060440160408051601f198184030181529181526020820180516001600160e01b03166302b8a21d60e01b17905251620000f2919062000252565b6000604051808303816000865af19150503d806000811462000131576040519150601f19603f3d011682016040523d82523d6000602084013e62000136565b606091505b505060408051600481526024810182526020810180516001600160e01b03166325ce9a3760e01b17905290516001600160a01b03841692506200017a919062000252565b6000604051808303816000865af19150503d8060008114620001b9576040519150601f19603f3d011682016040523d82523d6000602084013e620001be565b606091505b505050505b505050505050505062000283565b6001600160a01b0381168114620001e757600080fd5b50565b600080600080608085870312156200020157600080fd5b84516200020e81620001d1565b60208601519094506200022181620001d1565b60408601519093506200023481620001d1565b60608601519092506200024781620001d1565b939692955090935050565b6000825160005b8181101562000275576020818601810151858301520162000259565b506000920191825250919050565b60805160a05160c05160e0516127ad620003246000396000818161015301528181610302015261061b01526000818160e5015281816102bc0152818161071f01528181610775015261080d01526000818160920152818161029b0152818161047f01528181610539015281816105f3015281816106b90152818161075301526107b9015260008181610189015281816102dd01526106db01526127ad6000f3fe608060405260043610620000795760003560e01c8063342d34f51162000054578063342d34f5146200013f57806361d027b3146200017557806399e37dff14620001ab578063aaf5eb6814620001d157600080fd5b8063126846ec146200007e57806319eff2b914620000d157806327aa3e461462000107575b600080fd5b3480156200008b57600080fd5b50620000b47f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b348015620000de57600080fd5b50620000b47f000000000000000000000000000000000000000000000000000000000000000081565b6200011e6200011836600462000e07565b620001e9565b604080516001600160a01b03938416815292909116602083015201620000c8565b3480156200014c57600080fd5b50620000b47f000000000000000000000000000000000000000000000000000000000000000081565b3480156200018257600080fd5b50620000b47f000000000000000000000000000000000000000000000000000000000000000081565b348015620001b857600080fd5b50620001c2601981565b604051908152602001620000c8565b348015620001de57600080fd5b50620001c261271081565b600080620001f6620003c8565b6127106200020685600262000e98565b62000212919062000eb2565b83101580156200022e57506200022a60648562000eb2565b8311155b620002975760405162461bcd60e51b815260206004820152602e60248201527f746f6b656e4c69717569646974795468726573686f6c64206d75737420302e3060448201526d322d3125206f6620737570706c7960901b60648201526084015b60405180910390fd5b60007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000898989897f00000000000000000000000000000000000000000000000000000000000000006040516200032f9062000d4e565b6200034298979695949392919062000f29565b604051809103906000f0801580156200035f573d6000803e3d6000fd5b50905060006200036f8262000423565b90507f75d1eb2d61d7e210835bc16e78ac4d0e4f905c108a81852a6b68c4d46b4f40f382898989604051620003a8949392919062000f9a565b60405180910390a192509050620003bf6001600055565b94509492505050565b6002600054036200041c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016200028e565b6002600055565b600034600003620004475760405163162908e360e11b815260040160405180910390fd5b6040805160048152602481019091526020810180516001600160e01b0316630d0e30db60e41b179052620004a7906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169034620008e8565b506040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa158015620004f0573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000516919062000fe6565b6040516370a0823160e01b81523060048201529091506000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa15801562000581573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620005a7919062000fe6565b9050811580620005b5575080155b15620005d45760405163162908e360e11b815260040160405180910390fd5b60405163e6a4390560e01b81526001600160a01b0385811660048301527f0000000000000000000000000000000000000000000000000000000000000000811660248301527f0000000000000000000000000000000000000000000000000000000000000000169063e6a4390590604401602060405180830381865afa15801562000663573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000689919062001000565b925060006127106200069d60198462000e98565b620006a9919062000eb2565b9050620007016001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000008362000919565b6200070d818362001032565b9150620007456001600160a01b0386167f00000000000000000000000000000000000000000000000000000000000000008562000983565b6200079b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000008462000983565b60405162e8e33760e81b81526001600160a01b0386811660048301527f00000000000000000000000000000000000000000000000000000000000000008116602483015260448201859052606482018490526084820185905260a48201849052600060c483018190524260e4840152917f00000000000000000000000000000000000000000000000000000000000000009091169063e8e3370090610104016060604051808303816000875af11580156200085a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000880919062001048565b6040805184815260208101849052908101869052606081018290526001600160a01b038916608082015292965090945091507f3b2cc5e4d4fbe2ce615af802b74358f69f1069abf71cb0e15a604b519ac470c59060a00160405180910390a150505050919050565b6060620009118484846040518060600160405280602981526020016200274f6029913962000a1f565b949350505050565b6040516001600160a01b0383166024820152604481018290526200097e90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915262000b02565b505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052620009d6848262000bde565b62000a19576040516001600160a01b03841660248201526000604482015262000a0d90859063095ea7b360e01b9060640162000946565b62000a19848262000b02565b50505050565b60608247101562000a825760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016200028e565b600080866001600160a01b0316858760405162000aa0919062001077565b60006040518083038185875af1925050503d806000811462000adf576040519150601f19603f3d011682016040523d82523d6000602084013e62000ae4565b606091505b509150915062000af78783838762000c90565b979650505050505050565b600062000b59826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031662000d109092919063ffffffff16565b905080516000148062000b7d57508080602001905181019062000b7d919062001095565b6200097e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016200028e565b6000806000846001600160a01b03168460405162000bfd919062001077565b6000604051808303816000865af19150503d806000811462000c3c576040519150601f19603f3d011682016040523d82523d6000602084013e62000c41565b606091505b509150915081801562000c6f57508051158062000c6f57508080602001905181019062000c6f919062001095565b801562000c8557506001600160a01b0385163b15155b925050505b92915050565b6060831562000d0457825160000362000cfc576001600160a01b0385163b62000cfc5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016200028e565b508162000911565b62000911838362000d21565b606062000911848460008562000a1f565b81511562000d325781518083602001fd5b8060405162461bcd60e51b81526004016200028e9190620010b9565b61168080620010cf83390190565b634e487b7160e01b600052604160045260246000fd5b600082601f83011262000d8457600080fd5b813567ffffffffffffffff8082111562000da25762000da262000d5c565b604051601f8301601f19908116603f0116810190828211818310171562000dcd5762000dcd62000d5c565b8160405283815286602085880101111562000de757600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806000806080858703121562000e1e57600080fd5b843567ffffffffffffffff8082111562000e3757600080fd5b62000e458883890162000d72565b9550602087013591508082111562000e5c57600080fd5b5062000e6b8782880162000d72565b949794965050505060408301359260600135919050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141762000c8a5762000c8a62000e82565b60008262000ed057634e487b7160e01b600052601260045260246000fd5b500490565b60005b8381101562000ef257818101518382015260200162000ed8565b50506000910152565b6000815180845262000f1581602086016020860162000ed5565b601f01601f19169290920160200192915050565b6001600160a01b038981168252888116602083015287811660408301526101006060830181905260009162000f618483018a62000efb565b9150838203608085015262000f77828962000efb565b60a085019790975260c08401959095525050911660e09091015295945050505050565b6001600160a01b038516815260806020820181905260009062000fc09083018662000efb565b828103604084015262000fd4818662000efb565b91505082606083015295945050505050565b60006020828403121562000ff957600080fd5b5051919050565b6000602082840312156200101357600080fd5b81516001600160a01b03811681146200102b57600080fd5b9392505050565b8181038181111562000c8a5762000c8a62000e82565b6000806000606084860312156200105e57600080fd5b8351925060208401519150604084015190509250925092565b600082516200108b81846020870162000ed5565b9190910192915050565b600060208284031215620010a857600080fd5b815180151581146200102b57600080fd5b6020815260006200102b602083018462000efb56fe6101006040523480156200001257600080fd5b506040516200168038038062001680833981016040819052620000359162000652565b8787878588886003620000498382620007b7565b506004620000588282620007b7565b50505060008111620000b15760405162461bcd60e51b815260206004820152601560248201527f45524332304361707065643a206361702069732030000000000000000000000060448201526064015b60405180910390fd5b60805260016005556001600160a01b0380841660c05282811660e052811660a0524660fc0362000210576040516001600160a01b0382166024820152734392dc16867d53dbfe227076606455634d4c279590819060440160408051601f198184030181529181526020820180516001600160e01b03166302b8a21d60e01b179052516200013f919062000883565b6000604051808303816000865af19150503d80600081146200017e576040519150601f19603f3d011682016040523d82523d6000602084013e62000183565b606091505b505060408051600481526024810182526020810180516001600160e01b03166325ce9a3760e01b17905290516001600160a01b0384169250620001c7919062000883565b6000604051808303816000865af19150503d806000811462000206576040519150601f19603f3d011682016040523d82523d6000602084013e6200020b565b606091505b505050505b505050620002253384620002fd60201b60201c565b600880546001600160a01b031916331790556040516364e329cb60e11b81523060048201526001600160a01b03898116602483015282169063c9c65396906044016020604051808303816000875af115801562000286573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002ac9190620008a1565b600780546001600160a01b039283166001600160a01b03199182161790915560068054928a1692909116821790556009839055620002ef90309060001962000377565b5050505050505050620008f0565b608051816200030b60025490565b620003179190620008c8565b1115620003675760405162461bcd60e51b815260206004820152601960248201527f45524332304361707065643a20636170206578636565646564000000000000006044820152606401620000a8565b6200037382826200049f565b5050565b6001600160a01b038316620003db5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401620000a8565b6001600160a01b0382166200043e5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401620000a8565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038216620004f75760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401620000a8565b80600260008282546200050b9190620008c8565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a362000373600083835b505050565b6001600160a01b03811681146200058257600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620005b85781810151838201526020016200059e565b50506000910152565b600082601f830112620005d357600080fd5b81516001600160401b0380821115620005f057620005f062000585565b604051601f8301601f19908116603f011681019082821181831017156200061b576200061b62000585565b816040528381528660208588010111156200063557600080fd5b620006488460208301602089016200059b565b9695505050505050565b600080600080600080600080610100898b0312156200067057600080fd5b88516200067d816200056c565b60208a015190985062000690816200056c565b60408a0151909750620006a3816200056c565b60608a01519096506001600160401b0380821115620006c157600080fd5b620006cf8c838d01620005c1565b965060808b0151915080821115620006e657600080fd5b50620006f58b828c01620005c1565b94505060a0890151925060c0890151915060e089015162000716816200056c565b809150509295985092959890939650565b600181811c908216806200073c57607f821691505b6020821081036200075d57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562000567576000816000526020600020601f850160051c810160208610156200078e5750805b601f850160051c820191505b81811015620007af578281556001016200079a565b505050505050565b81516001600160401b03811115620007d357620007d362000585565b620007eb81620007e4845462000727565b8462000763565b602080601f8311600181146200082357600084156200080a5750858301515b600019600386901b1c1916600185901b178555620007af565b600085815260208120601f198616915b82811015620008545788860151825594840194600190910190840162000833565b5085821015620008735787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008251620008978184602087016200059b565b9190910192915050565b600060208284031215620008b457600080fd5b8151620008c1816200056c565b9392505050565b80820180821115620008ea57634e487b7160e01b600052601160045260246000fd5b92915050565b60805160a05160c05160e051610d4f6200093160003960006101bd0152600061016c01526000818161023f0152610a36015260006102030152610d4f6000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c806361d027b3116100ad578063a8aa1b3111610071578063a8aa1b31146102ad578063a9059cbb146102c0578063aaf5eb68146102d3578063dd62ed3e146102dc578063f887ea40146102ef57600080fd5b806361d027b31461023a57806370a082311461026157806395d89b411461028a57806399e37dff14610292578063a457c2d71461029a57600080fd5b806319eff2b9116100f457806319eff2b9146101b857806323b872dd146101df578063313ce567146101f2578063355274ea14610201578063395093511461022757600080fd5b806306fdde0314610126578063095ea7b314610144578063126846ec1461016757806318160ddd146101a6575b600080fd5b61012e610302565b60405161013b9190610a96565b60405180910390f35b610157610152366004610afa565b610394565b604051901515815260200161013b565b61018e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161013b565b6002545b60405190815260200161013b565b61018e7f000000000000000000000000000000000000000000000000000000000000000081565b6101576101ed366004610b26565b6103ae565b6040516012815260200161013b565b7f00000000000000000000000000000000000000000000000000000000000000006101aa565b610157610235366004610afa565b6103d2565b61018e7f000000000000000000000000000000000000000000000000000000000000000081565b6101aa61026f366004610b67565b6001600160a01b031660009081526020819052604090205490565b61012e6103f4565b6101aa601981565b6101576102a8366004610afa565b610403565b60075461018e906001600160a01b031681565b6101576102ce366004610afa565b610483565b6101aa61271081565b6101aa6102ea366004610b8b565b610491565b60065461018e906001600160a01b031681565b60606003805461031190610bc4565b80601f016020809104026020016040519081016040528092919081815260200182805461033d90610bc4565b801561038a5780601f1061035f5761010080835404028352916020019161038a565b820191906000526020600020905b81548152906001019060200180831161036d57829003601f168201915b5050505050905090565b6000336103a28185856104bc565b60019150505b92915050565b6000336103bc8582856105e0565b6103c785858561065a565b506001949350505050565b6000336103a28185856103e58383610491565b6103ef9190610c14565b6104bc565b60606004805461031190610bc4565b600033816104118286610491565b9050838110156104765760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6103c782868684036104bc565b6000336103a281858561065a565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b03831661051e5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161046d565b6001600160a01b03821661057f5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161046d565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006105ec8484610491565b9050600019811461065457818110156106475760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161046d565b61065484848484036104bc565b50505050565b600081116106bc5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161046d565b6007546000906001600160a01b03848116911614806106e857506007546001600160a01b038581169116145b15610747576001600160a01b03831630148061070c57506001600160a01b03841630145b610747576008546001600160a01b0385811691161461074757612710610733601984610c27565b61073d9190610c3e565b905061074761076c565b61075b84846107568486610c60565b610791565b801561065457610654843083610791565b30600090815260208190526040902054600954811061078e5761078e81610935565b50565b6001600160a01b0383166107f55760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161046d565b6001600160a01b0382166108575760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161046d565b6001600160a01b038316600090815260208190526040902054818110156108cf5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161046d565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610654565b604080516002808252606082018352600092602083019080368337019050509050308160008151811061096a5761096a610c73565b6001600160a01b03928316602091820292909201810191909152600654604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa1580156109c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e79190610c89565b816001815181106109fa576109fa610c73565b6001600160a01b03928316602091820292909201015260065460405163791ac94760e01b815291169063791ac94790610a6090859060009086907f0000000000000000000000000000000000000000000000000000000000000000904290600401610ca6565b600060405180830381600087803b158015610a7a57600080fd5b505af1158015610a8e573d6000803e3d6000fd5b505050505050565b60006020808352835180602085015260005b81811015610ac457858101830151858201604001528201610aa8565b506000604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b038116811461078e57600080fd5b60008060408385031215610b0d57600080fd5b8235610b1881610ae5565b946020939093013593505050565b600080600060608486031215610b3b57600080fd5b8335610b4681610ae5565b92506020840135610b5681610ae5565b929592945050506040919091013590565b600060208284031215610b7957600080fd5b8135610b8481610ae5565b9392505050565b60008060408385031215610b9e57600080fd5b8235610ba981610ae5565b91506020830135610bb981610ae5565b809150509250929050565b600181811c90821680610bd857607f821691505b602082108103610bf857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156103a8576103a8610bfe565b80820281158282048414176103a8576103a8610bfe565b600082610c5b57634e487b7160e01b600052601260045260246000fd5b500490565b818103818111156103a8576103a8610bfe565b634e487b7160e01b600052603260045260246000fd5b600060208284031215610c9b57600080fd5b8151610b8481610ae5565b600060a08201878352602087602085015260a0604085015281875180845260c08601915060208901935060005b81811015610cf85784516001600160a01b031683529383019391830191600101610cd3565b50506001600160a01b0396909616606085015250505060800152939250505056fea264697066735822122003bf8f7c31813ddb5e3913df026e6c212134bc08fcec1f4eda22577d6c0d5cdd64736f6c63430008170033416464726573733a206c6f772d6c6576656c2063616c6c20776974682076616c7565206661696c6564a2646970667358221220c1ea590c638452f62e3c5e200f3158c55301a5ba877b4c192b1a48494afa52c564736f6c63430008170033000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d0000000000000000000000005c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f0000000000000000000000008d0847122e1c6909cccfb11e48e811d8608975a9
Deployed Bytecode
0x608060405260043610620000795760003560e01c8063342d34f51162000054578063342d34f5146200013f57806361d027b3146200017557806399e37dff14620001ab578063aaf5eb6814620001d157600080fd5b8063126846ec146200007e57806319eff2b914620000d157806327aa3e461462000107575b600080fd5b3480156200008b57600080fd5b50620000b47f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b6040516001600160a01b0390911681526020015b60405180910390f35b348015620000de57600080fd5b50620000b47f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d81565b6200011e6200011836600462000e07565b620001e9565b604080516001600160a01b03938416815292909116602083015201620000c8565b3480156200014c57600080fd5b50620000b47f0000000000000000000000005c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f81565b3480156200018257600080fd5b50620000b47f0000000000000000000000008d0847122e1c6909cccfb11e48e811d8608975a981565b348015620001b857600080fd5b50620001c2601981565b604051908152602001620000c8565b348015620001de57600080fd5b50620001c261271081565b600080620001f6620003c8565b6127106200020685600262000e98565b62000212919062000eb2565b83101580156200022e57506200022a60648562000eb2565b8311155b620002975760405162461bcd60e51b815260206004820152602e60248201527f746f6b656e4c69717569646974795468726573686f6c64206d75737420302e3060448201526d322d3125206f6620737570706c7960901b60648201526084015b60405180910390fd5b60007f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc27f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d7f0000000000000000000000008d0847122e1c6909cccfb11e48e811d8608975a9898989897f0000000000000000000000005c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f6040516200032f9062000d4e565b6200034298979695949392919062000f29565b604051809103906000f0801580156200035f573d6000803e3d6000fd5b50905060006200036f8262000423565b90507f75d1eb2d61d7e210835bc16e78ac4d0e4f905c108a81852a6b68c4d46b4f40f382898989604051620003a8949392919062000f9a565b60405180910390a192509050620003bf6001600055565b94509492505050565b6002600054036200041c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016200028e565b6002600055565b600034600003620004475760405163162908e360e11b815260040160405180910390fd5b6040805160048152602481019091526020810180516001600160e01b0316630d0e30db60e41b179052620004a7906001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2169034620008e8565b506040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa158015620004f0573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000516919062000fe6565b6040516370a0823160e01b81523060048201529091506000906001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc216906370a0823190602401602060405180830381865afa15801562000581573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620005a7919062000fe6565b9050811580620005b5575080155b15620005d45760405163162908e360e11b815260040160405180910390fd5b60405163e6a4390560e01b81526001600160a01b0385811660048301527f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2811660248301527f0000000000000000000000005c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f169063e6a4390590604401602060405180830381865afa15801562000663573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000689919062001000565b925060006127106200069d60198462000e98565b620006a9919062000eb2565b9050620007016001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2167f0000000000000000000000008d0847122e1c6909cccfb11e48e811d8608975a98362000919565b6200070d818362001032565b9150620007456001600160a01b0386167f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d8562000983565b6200079b6001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2167f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d8462000983565b60405162e8e33760e81b81526001600160a01b0386811660048301527f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc28116602483015260448201859052606482018490526084820185905260a48201849052600060c483018190524260e4840152917f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d9091169063e8e3370090610104016060604051808303816000875af11580156200085a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000880919062001048565b6040805184815260208101849052908101869052606081018290526001600160a01b038916608082015292965090945091507f3b2cc5e4d4fbe2ce615af802b74358f69f1069abf71cb0e15a604b519ac470c59060a00160405180910390a150505050919050565b6060620009118484846040518060600160405280602981526020016200274f6029913962000a1f565b949350505050565b6040516001600160a01b0383166024820152604481018290526200097e90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915262000b02565b505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052620009d6848262000bde565b62000a19576040516001600160a01b03841660248201526000604482015262000a0d90859063095ea7b360e01b9060640162000946565b62000a19848262000b02565b50505050565b60608247101562000a825760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016200028e565b600080866001600160a01b0316858760405162000aa0919062001077565b60006040518083038185875af1925050503d806000811462000adf576040519150601f19603f3d011682016040523d82523d6000602084013e62000ae4565b606091505b509150915062000af78783838762000c90565b979650505050505050565b600062000b59826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031662000d109092919063ffffffff16565b905080516000148062000b7d57508080602001905181019062000b7d919062001095565b6200097e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016200028e565b6000806000846001600160a01b03168460405162000bfd919062001077565b6000604051808303816000865af19150503d806000811462000c3c576040519150601f19603f3d011682016040523d82523d6000602084013e62000c41565b606091505b509150915081801562000c6f57508051158062000c6f57508080602001905181019062000c6f919062001095565b801562000c8557506001600160a01b0385163b15155b925050505b92915050565b6060831562000d0457825160000362000cfc576001600160a01b0385163b62000cfc5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016200028e565b508162000911565b62000911838362000d21565b606062000911848460008562000a1f565b81511562000d325781518083602001fd5b8060405162461bcd60e51b81526004016200028e9190620010b9565b61168080620010cf83390190565b634e487b7160e01b600052604160045260246000fd5b600082601f83011262000d8457600080fd5b813567ffffffffffffffff8082111562000da25762000da262000d5c565b604051601f8301601f19908116603f0116810190828211818310171562000dcd5762000dcd62000d5c565b8160405283815286602085880101111562000de757600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806000806080858703121562000e1e57600080fd5b843567ffffffffffffffff8082111562000e3757600080fd5b62000e458883890162000d72565b9550602087013591508082111562000e5c57600080fd5b5062000e6b8782880162000d72565b949794965050505060408301359260600135919050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141762000c8a5762000c8a62000e82565b60008262000ed057634e487b7160e01b600052601260045260246000fd5b500490565b60005b8381101562000ef257818101518382015260200162000ed8565b50506000910152565b6000815180845262000f1581602086016020860162000ed5565b601f01601f19169290920160200192915050565b6001600160a01b038981168252888116602083015287811660408301526101006060830181905260009162000f618483018a62000efb565b9150838203608085015262000f77828962000efb565b60a085019790975260c08401959095525050911660e09091015295945050505050565b6001600160a01b038516815260806020820181905260009062000fc09083018662000efb565b828103604084015262000fd4818662000efb565b91505082606083015295945050505050565b60006020828403121562000ff957600080fd5b5051919050565b6000602082840312156200101357600080fd5b81516001600160a01b03811681146200102b57600080fd5b9392505050565b8181038181111562000c8a5762000c8a62000e82565b6000806000606084860312156200105e57600080fd5b8351925060208401519150604084015190509250925092565b600082516200108b81846020870162000ed5565b9190910192915050565b600060208284031215620010a857600080fd5b815180151581146200102b57600080fd5b6020815260006200102b602083018462000efb56fe6101006040523480156200001257600080fd5b506040516200168038038062001680833981016040819052620000359162000652565b8787878588886003620000498382620007b7565b506004620000588282620007b7565b50505060008111620000b15760405162461bcd60e51b815260206004820152601560248201527f45524332304361707065643a206361702069732030000000000000000000000060448201526064015b60405180910390fd5b60805260016005556001600160a01b0380841660c05282811660e052811660a0524660fc0362000210576040516001600160a01b0382166024820152734392dc16867d53dbfe227076606455634d4c279590819060440160408051601f198184030181529181526020820180516001600160e01b03166302b8a21d60e01b179052516200013f919062000883565b6000604051808303816000865af19150503d80600081146200017e576040519150601f19603f3d011682016040523d82523d6000602084013e62000183565b606091505b505060408051600481526024810182526020810180516001600160e01b03166325ce9a3760e01b17905290516001600160a01b0384169250620001c7919062000883565b6000604051808303816000865af19150503d806000811462000206576040519150601f19603f3d011682016040523d82523d6000602084013e6200020b565b606091505b505050505b505050620002253384620002fd60201b60201c565b600880546001600160a01b031916331790556040516364e329cb60e11b81523060048201526001600160a01b03898116602483015282169063c9c65396906044016020604051808303816000875af115801562000286573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002ac9190620008a1565b600780546001600160a01b039283166001600160a01b03199182161790915560068054928a1692909116821790556009839055620002ef90309060001962000377565b5050505050505050620008f0565b608051816200030b60025490565b620003179190620008c8565b1115620003675760405162461bcd60e51b815260206004820152601960248201527f45524332304361707065643a20636170206578636565646564000000000000006044820152606401620000a8565b6200037382826200049f565b5050565b6001600160a01b038316620003db5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401620000a8565b6001600160a01b0382166200043e5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401620000a8565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038216620004f75760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401620000a8565b80600260008282546200050b9190620008c8565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a362000373600083835b505050565b6001600160a01b03811681146200058257600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620005b85781810151838201526020016200059e565b50506000910152565b600082601f830112620005d357600080fd5b81516001600160401b0380821115620005f057620005f062000585565b604051601f8301601f19908116603f011681019082821181831017156200061b576200061b62000585565b816040528381528660208588010111156200063557600080fd5b620006488460208301602089016200059b565b9695505050505050565b600080600080600080600080610100898b0312156200067057600080fd5b88516200067d816200056c565b60208a015190985062000690816200056c565b60408a0151909750620006a3816200056c565b60608a01519096506001600160401b0380821115620006c157600080fd5b620006cf8c838d01620005c1565b965060808b0151915080821115620006e657600080fd5b50620006f58b828c01620005c1565b94505060a0890151925060c0890151915060e089015162000716816200056c565b809150509295985092959890939650565b600181811c908216806200073c57607f821691505b6020821081036200075d57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562000567576000816000526020600020601f850160051c810160208610156200078e5750805b601f850160051c820191505b81811015620007af578281556001016200079a565b505050505050565b81516001600160401b03811115620007d357620007d362000585565b620007eb81620007e4845462000727565b8462000763565b602080601f8311600181146200082357600084156200080a5750858301515b600019600386901b1c1916600185901b178555620007af565b600085815260208120601f198616915b82811015620008545788860151825594840194600190910190840162000833565b5085821015620008735787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008251620008978184602087016200059b565b9190910192915050565b600060208284031215620008b457600080fd5b8151620008c1816200056c565b9392505050565b80820180821115620008ea57634e487b7160e01b600052601160045260246000fd5b92915050565b60805160a05160c05160e051610d4f6200093160003960006101bd0152600061016c01526000818161023f0152610a36015260006102030152610d4f6000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c806361d027b3116100ad578063a8aa1b3111610071578063a8aa1b31146102ad578063a9059cbb146102c0578063aaf5eb68146102d3578063dd62ed3e146102dc578063f887ea40146102ef57600080fd5b806361d027b31461023a57806370a082311461026157806395d89b411461028a57806399e37dff14610292578063a457c2d71461029a57600080fd5b806319eff2b9116100f457806319eff2b9146101b857806323b872dd146101df578063313ce567146101f2578063355274ea14610201578063395093511461022757600080fd5b806306fdde0314610126578063095ea7b314610144578063126846ec1461016757806318160ddd146101a6575b600080fd5b61012e610302565b60405161013b9190610a96565b60405180910390f35b610157610152366004610afa565b610394565b604051901515815260200161013b565b61018e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161013b565b6002545b60405190815260200161013b565b61018e7f000000000000000000000000000000000000000000000000000000000000000081565b6101576101ed366004610b26565b6103ae565b6040516012815260200161013b565b7f00000000000000000000000000000000000000000000000000000000000000006101aa565b610157610235366004610afa565b6103d2565b61018e7f000000000000000000000000000000000000000000000000000000000000000081565b6101aa61026f366004610b67565b6001600160a01b031660009081526020819052604090205490565b61012e6103f4565b6101aa601981565b6101576102a8366004610afa565b610403565b60075461018e906001600160a01b031681565b6101576102ce366004610afa565b610483565b6101aa61271081565b6101aa6102ea366004610b8b565b610491565b60065461018e906001600160a01b031681565b60606003805461031190610bc4565b80601f016020809104026020016040519081016040528092919081815260200182805461033d90610bc4565b801561038a5780601f1061035f5761010080835404028352916020019161038a565b820191906000526020600020905b81548152906001019060200180831161036d57829003601f168201915b5050505050905090565b6000336103a28185856104bc565b60019150505b92915050565b6000336103bc8582856105e0565b6103c785858561065a565b506001949350505050565b6000336103a28185856103e58383610491565b6103ef9190610c14565b6104bc565b60606004805461031190610bc4565b600033816104118286610491565b9050838110156104765760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6103c782868684036104bc565b6000336103a281858561065a565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b03831661051e5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161046d565b6001600160a01b03821661057f5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161046d565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006105ec8484610491565b9050600019811461065457818110156106475760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161046d565b61065484848484036104bc565b50505050565b600081116106bc5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161046d565b6007546000906001600160a01b03848116911614806106e857506007546001600160a01b038581169116145b15610747576001600160a01b03831630148061070c57506001600160a01b03841630145b610747576008546001600160a01b0385811691161461074757612710610733601984610c27565b61073d9190610c3e565b905061074761076c565b61075b84846107568486610c60565b610791565b801561065457610654843083610791565b30600090815260208190526040902054600954811061078e5761078e81610935565b50565b6001600160a01b0383166107f55760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161046d565b6001600160a01b0382166108575760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161046d565b6001600160a01b038316600090815260208190526040902054818110156108cf5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161046d565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610654565b604080516002808252606082018352600092602083019080368337019050509050308160008151811061096a5761096a610c73565b6001600160a01b03928316602091820292909201810191909152600654604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa1580156109c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e79190610c89565b816001815181106109fa576109fa610c73565b6001600160a01b03928316602091820292909201015260065460405163791ac94760e01b815291169063791ac94790610a6090859060009086907f0000000000000000000000000000000000000000000000000000000000000000904290600401610ca6565b600060405180830381600087803b158015610a7a57600080fd5b505af1158015610a8e573d6000803e3d6000fd5b505050505050565b60006020808352835180602085015260005b81811015610ac457858101830151858201604001528201610aa8565b506000604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b038116811461078e57600080fd5b60008060408385031215610b0d57600080fd5b8235610b1881610ae5565b946020939093013593505050565b600080600060608486031215610b3b57600080fd5b8335610b4681610ae5565b92506020840135610b5681610ae5565b929592945050506040919091013590565b600060208284031215610b7957600080fd5b8135610b8481610ae5565b9392505050565b60008060408385031215610b9e57600080fd5b8235610ba981610ae5565b91506020830135610bb981610ae5565b809150509250929050565b600181811c90821680610bd857607f821691505b602082108103610bf857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156103a8576103a8610bfe565b80820281158282048414176103a8576103a8610bfe565b600082610c5b57634e487b7160e01b600052601260045260246000fd5b500490565b818103818111156103a8576103a8610bfe565b634e487b7160e01b600052603260045260246000fd5b600060208284031215610c9b57600080fd5b8151610b8481610ae5565b600060a08201878352602087602085015260a0604085015281875180845260c08601915060208901935060005b81811015610cf85784516001600160a01b031683529383019391830191600101610cd3565b50506001600160a01b0396909616606085015250505060800152939250505056fea264697066735822122003bf8f7c31813ddb5e3913df026e6c212134bc08fcec1f4eda22577d6c0d5cdd64736f6c63430008170033416464726573733a206c6f772d6c6576656c2063616c6c20776974682076616c7565206661696c6564a2646970667358221220c1ea590c638452f62e3c5e200f3158c55301a5ba877b4c192b1a48494afa52c564736f6c63430008170033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d0000000000000000000000005c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f0000000000000000000000008d0847122e1c6909cccfb11e48e811d8608975a9
-----Decoded View---------------
Arg [0] : _wnt (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
Arg [1] : _univ2router (address): 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
Arg [2] : _univ2factory (address): 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f
Arg [3] : _treasury (address): 0x8d0847122E1c6909cCcfB11e48e811D8608975A9
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Arg [1] : 0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d
Arg [2] : 0000000000000000000000005c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f
Arg [3] : 0000000000000000000000008d0847122e1c6909cccfb11e48e811d8608975a9
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.