Contract 0x3A40C8D175b1a389BE6744e54FC61cdaBf11c13e

 

Contract Overview

Balance:
0 ETH

ETH Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x69262c9e99adfd727ba4469fe0ae8f0f29d762f437f6ab632e140a12d5b84a37Purchase247449702022-09-15 13:15:2415 days 2 hrs ago0xa5acffba0b62f67cb129c4302e4f18ab7fe5648b IN  0x3a40c8d175b1a389be6744e54fc61cdabf11c13e0 ETH0.00001797
0xb227cd37f6ebc3f3598438d35afa9270b152be851f046f197daf787378c71839Purchase247440842022-09-15 13:05:2115 days 2 hrs ago0xa5acffba0b62f67cb129c4302e4f18ab7fe5648b IN  0x3a40c8d175b1a389be6744e54fc61cdabf11c13e0 ETH0.00001907
0xde977224a756f1ec4b1b84811402d4b1cdb723b2876a6c82a9e7d1a67759fac2Purchase245864772022-09-14 10:44:0016 days 4 hrs ago0xa5acffba0b62f67cb129c4302e4f18ab7fe5648b IN  0x3a40c8d175b1a389be6744e54fc61cdabf11c13e0 ETH0.00001597
0x5d0cd97a6f3c31128655ffef64ace310394a65fead7544eea2eabdeda4b9db16Purchase245863782022-09-14 10:43:0316 days 4 hrs ago0xa5acffba0b62f67cb129c4302e4f18ab7fe5648b IN  0x3a40c8d175b1a389be6744e54fc61cdabf11c13e0 ETH0.00001597
0x1c7eb6c4b54e035e5e534b75a05af7a2c65b6ceaf7e103c7f65c6dc9d408233fPurchase245862142022-09-14 10:41:1316 days 4 hrs ago0xa5acffba0b62f67cb129c4302e4f18ab7fe5648b IN  0x3a40c8d175b1a389be6744e54fc61cdabf11c13e0 ETH0.00001597
0x609653549b252000ac176bfb736405f4d8732747548430d406ad612177a85b83Purchase245858682022-09-14 10:37:1816 days 4 hrs ago0xa5acffba0b62f67cb129c4302e4f18ab7fe5648b IN  0x3a40c8d175b1a389be6744e54fc61cdabf11c13e0 ETH0.00001617
0x875913df44f1ecd727e04ddcca694b8805c26db3d1c27419ac7dceea77d76695Purchase245854742022-09-14 10:33:3216 days 5 hrs ago0xa5acffba0b62f67cb129c4302e4f18ab7fe5648b IN  0x3a40c8d175b1a389be6744e54fc61cdabf11c13e0 ETH0.00001617
0x38cd8e9825db37e558f0d0f0530200b09ee6274a786883d74f6b256c70cc777cPurchase242093382022-09-12 7:54:4318 days 7 hrs ago0xa5acffba0b62f67cb129c4302e4f18ab7fe5648b IN  0x3a40c8d175b1a389be6744e54fc61cdabf11c13e0 ETH0.00001427
0x97540f0e5fded48f24782484f3716dce6199ee0550a4536202e5303386df2ca5Purchase221331662022-08-31 7:27:3830 days 8 hrs ago0xa5acffba0b62f67cb129c4302e4f18ab7fe5648b IN  0x3a40c8d175b1a389be6744e54fc61cdabf11c13e0 ETH0.000085914569 ETH
0x92a2f99487e52499567e2953beeec12d943b3547970ba74f64aabdca2cca6e82Purchase221184372022-08-31 6:04:2730 days 9 hrs ago0xa5acffba0b62f67cb129c4302e4f18ab7fe5648b IN  0x3a40c8d175b1a389be6744e54fc61cdabf11c13e0 ETH0.000085684722 ETH
0x1b9cf1aa4149fbde7dcae55e62e99828d31e101bb6cc82c056b1d57801c76a4fPurchase219695632022-08-30 10:50:0831 days 4 hrs ago0x28212898ce91acd1e644edd480724ce8d311bc84 IN  0x3a40c8d175b1a389be6744e54fc61cdabf11c13e0 ETH0.000077688702 ETH
0xb42ed946363f6704d25dbe24b772b66ed6af24d0f08a5a89c778dee556089f44Purchase219689222022-08-30 10:45:2231 days 4 hrs ago0x28212898ce91acd1e644edd480724ce8d311bc84 IN  0x3a40c8d175b1a389be6744e54fc61cdabf11c13e0 ETH0.000085245598 ETH
0x3b407be916f1e2f5f9a5dd1f32a8d6e2f176ed3e7d3caf1f9ec11669e1bedc0ePurchase219685762022-08-30 10:42:2731 days 4 hrs ago0xa5acffba0b62f67cb129c4302e4f18ab7fe5648b IN  0x3a40c8d175b1a389be6744e54fc61cdabf11c13e0 ETH0.000077269797 ETH
0x26623ef84384b94d3560a51a0f00661941a9f7fe3f615244304891acb503e92aPurchase219384692022-08-30 6:04:2931 days 9 hrs ago0xa5acffba0b62f67cb129c4302e4f18ab7fe5648b IN  0x3a40c8d175b1a389be6744e54fc61cdabf11c13e0 ETH0.000086222538 ETH
0x2facc73f25976e9adaec1d1265c69c25f35fd58490db5bc4f4c2b522389425b2Purchase218825422022-08-29 17:34:3131 days 22 hrs ago0xa5acffba0b62f67cb129c4302e4f18ab7fe5648b IN  0x3a40c8d175b1a389be6744e54fc61cdabf11c13e0 ETH0.000086415046 ETH
0xef1d8c01cfbac76c4d3d5c3d87887ae19dd3ace803fedd3ba82e06a73ea93e3cPurchase218822742022-08-29 17:31:0631 days 22 hrs ago0xa5acffba0b62f67cb129c4302e4f18ab7fe5648b IN  0x3a40c8d175b1a389be6744e54fc61cdabf11c13e0 ETH0.000086415046 ETH
0x31f0c05ec9ea9601ab0b2e63f6ce7e767cc6ee9eaa56f1973aae8fae74f75ee1Purchase218530042022-08-29 13:09:4832 days 2 hrs ago0x592fc854c43fca05971eec366871393e5522cfc9 IN  0x3a40c8d175b1a389be6744e54fc61cdabf11c13e0 ETH0.000067708622 ETH
0x32b4fe6418d601f1d8720ad2c33c283397fdda0ac876ffcf174103bade84be42Purchase218044272022-08-29 6:58:2332 days 8 hrs ago0xa5acffba0b62f67cb129c4302e4f18ab7fe5648b IN  0x3a40c8d175b1a389be6744e54fc61cdabf11c13e0 ETH0.000075764628 ETH
0xe85f109b189c545fa7c7a55a2948d58c57835057f8e35f30dbf769fdecb392e6Purchase217992612022-08-29 6:12:4332 days 9 hrs ago0xa5acffba0b62f67cb129c4302e4f18ab7fe5648b IN  0x3a40c8d175b1a389be6744e54fc61cdabf11c13e0 ETH0.000075764628 ETH
0xee024229f0745fd2de26d685e959c721cbf78dd2d1ea0fc7d91f596596e91f12Purchase217988602022-08-29 6:09:3732 days 9 hrs ago0xa5acffba0b62f67cb129c4302e4f18ab7fe5648b IN  0x3a40c8d175b1a389be6744e54fc61cdabf11c13e0 ETH0.000075561389 ETH
0xe581ab53e67dcba7ebcf9eb1c7687dbe393c76e50b9f8b4e2f402c2e5fd1417aPurchase213851452022-08-26 9:04:5835 days 6 hrs ago0xa5acffba0b62f67cb129c4302e4f18ab7fe5648b IN  0x3a40c8d175b1a389be6744e54fc61cdabf11c13e0 ETH0.000058146764 ETH
0xa63ff8f8816dccce9e32afca140c2ac3f66b987656319fec5ed172350bb38e8ePurchase213703852022-08-26 6:39:2635 days 8 hrs ago0xa5acffba0b62f67cb129c4302e4f18ab7fe5648b IN  0x3a40c8d175b1a389be6744e54fc61cdabf11c13e0 ETH0.000066171292 ETH
0x31f7e10b56396b2f362aadef77b22d415652b26d62fe4e1fbf9413e3c65bee68Purchase213700782022-08-26 6:35:1635 days 9 hrs ago0xa5acffba0b62f67cb129c4302e4f18ab7fe5648b IN  0x3a40c8d175b1a389be6744e54fc61cdabf11c13e0 ETH0.000065993787 ETH
0x2ee9c0b2ed26a72da7731333fdf0c223af8fc378ab68c2d6ab67d48d5d716281Purchase213557332022-08-26 4:40:3035 days 10 hrs ago0xa5acffba0b62f67cb129c4302e4f18ab7fe5648b IN  0x3a40c8d175b1a389be6744e54fc61cdabf11c13e0 ETH0.000066171292 ETH
0xe2b09ad7960502498a957076e949a8d2877c82c2d31d9c6cbab5acbfa0935122Purchase213512742022-08-26 4:04:2035 days 11 hrs ago0xa5acffba0b62f67cb129c4302e4f18ab7fe5648b IN  0x3a40c8d175b1a389be6744e54fc61cdabf11c13e0 ETH0.000072222819 ETH
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x69262c9e99adfd727ba4469fe0ae8f0f29d762f437f6ab632e140a12d5b84a37247449702022-09-15 13:15:2415 days 2 hrs ago 0x3a40c8d175b1a389be6744e54fc61cdabf11c13e 0xb1ca6cd88a0604912d1f51a8d6627f2ee7b272f40 ETH
0x69262c9e99adfd727ba4469fe0ae8f0f29d762f437f6ab632e140a12d5b84a37247449702022-09-15 13:15:2415 days 2 hrs ago 0x3a40c8d175b1a389be6744e54fc61cdabf11c13e 0xf34df0e81aa107f7c015965673735b31e82be1780 ETH
0x69262c9e99adfd727ba4469fe0ae8f0f29d762f437f6ab632e140a12d5b84a37247449702022-09-15 13:15:2415 days 2 hrs ago 0x3a40c8d175b1a389be6744e54fc61cdabf11c13e 0xe6d6ec29907e08adfff3e4cf3b5de7350e84e96e0 ETH
0xb227cd37f6ebc3f3598438d35afa9270b152be851f046f197daf787378c71839247440842022-09-15 13:05:2115 days 2 hrs ago 0x3a40c8d175b1a389be6744e54fc61cdabf11c13e 0xb1ca6cd88a0604912d1f51a8d6627f2ee7b272f40 ETH
0xb227cd37f6ebc3f3598438d35afa9270b152be851f046f197daf787378c71839247440842022-09-15 13:05:2115 days 2 hrs ago 0x3a40c8d175b1a389be6744e54fc61cdabf11c13e 0xf34df0e81aa107f7c015965673735b31e82be1780 ETH
0xb227cd37f6ebc3f3598438d35afa9270b152be851f046f197daf787378c71839247440842022-09-15 13:05:2115 days 2 hrs ago 0x3a40c8d175b1a389be6744e54fc61cdabf11c13e 0xe6d6ec29907e08adfff3e4cf3b5de7350e84e96e0 ETH
0xde977224a756f1ec4b1b84811402d4b1cdb723b2876a6c82a9e7d1a67759fac2245864772022-09-14 10:44:0016 days 4 hrs ago 0x3a40c8d175b1a389be6744e54fc61cdabf11c13e 0xb1ca6cd88a0604912d1f51a8d6627f2ee7b272f40 ETH
0xde977224a756f1ec4b1b84811402d4b1cdb723b2876a6c82a9e7d1a67759fac2245864772022-09-14 10:44:0016 days 4 hrs ago 0x3a40c8d175b1a389be6744e54fc61cdabf11c13e 0xf34df0e81aa107f7c015965673735b31e82be1780 ETH
0xde977224a756f1ec4b1b84811402d4b1cdb723b2876a6c82a9e7d1a67759fac2245864772022-09-14 10:44:0016 days 4 hrs ago 0x3a40c8d175b1a389be6744e54fc61cdabf11c13e 0xe6d6ec29907e08adfff3e4cf3b5de7350e84e96e0 ETH
0x5d0cd97a6f3c31128655ffef64ace310394a65fead7544eea2eabdeda4b9db16245863782022-09-14 10:43:0316 days 4 hrs ago 0x3a40c8d175b1a389be6744e54fc61cdabf11c13e 0xb1ca6cd88a0604912d1f51a8d6627f2ee7b272f40 ETH
0x5d0cd97a6f3c31128655ffef64ace310394a65fead7544eea2eabdeda4b9db16245863782022-09-14 10:43:0316 days 4 hrs ago 0x3a40c8d175b1a389be6744e54fc61cdabf11c13e 0xf34df0e81aa107f7c015965673735b31e82be1780 ETH
0x5d0cd97a6f3c31128655ffef64ace310394a65fead7544eea2eabdeda4b9db16245863782022-09-14 10:43:0316 days 4 hrs ago 0x3a40c8d175b1a389be6744e54fc61cdabf11c13e 0xe6d6ec29907e08adfff3e4cf3b5de7350e84e96e0 ETH
0x1c7eb6c4b54e035e5e534b75a05af7a2c65b6ceaf7e103c7f65c6dc9d408233f245862142022-09-14 10:41:1316 days 4 hrs ago 0x3a40c8d175b1a389be6744e54fc61cdabf11c13e 0xb1ca6cd88a0604912d1f51a8d6627f2ee7b272f40 ETH
0x1c7eb6c4b54e035e5e534b75a05af7a2c65b6ceaf7e103c7f65c6dc9d408233f245862142022-09-14 10:41:1316 days 4 hrs ago 0x3a40c8d175b1a389be6744e54fc61cdabf11c13e 0xf34df0e81aa107f7c015965673735b31e82be1780 ETH
0x1c7eb6c4b54e035e5e534b75a05af7a2c65b6ceaf7e103c7f65c6dc9d408233f245862142022-09-14 10:41:1316 days 4 hrs ago 0x3a40c8d175b1a389be6744e54fc61cdabf11c13e 0xe6d6ec29907e08adfff3e4cf3b5de7350e84e96e0 ETH
0x609653549b252000ac176bfb736405f4d8732747548430d406ad612177a85b83245858682022-09-14 10:37:1816 days 4 hrs ago 0x3a40c8d175b1a389be6744e54fc61cdabf11c13e 0xb1ca6cd88a0604912d1f51a8d6627f2ee7b272f40 ETH
0x609653549b252000ac176bfb736405f4d8732747548430d406ad612177a85b83245858682022-09-14 10:37:1816 days 4 hrs ago 0x3a40c8d175b1a389be6744e54fc61cdabf11c13e 0xf34df0e81aa107f7c015965673735b31e82be1780 ETH
0x609653549b252000ac176bfb736405f4d8732747548430d406ad612177a85b83245858682022-09-14 10:37:1816 days 4 hrs ago 0x3a40c8d175b1a389be6744e54fc61cdabf11c13e 0xe6d6ec29907e08adfff3e4cf3b5de7350e84e96e0 ETH
0x875913df44f1ecd727e04ddcca694b8805c26db3d1c27419ac7dceea77d76695245854742022-09-14 10:33:3216 days 5 hrs ago 0x3a40c8d175b1a389be6744e54fc61cdabf11c13e 0xb1ca6cd88a0604912d1f51a8d6627f2ee7b272f40 ETH
0x875913df44f1ecd727e04ddcca694b8805c26db3d1c27419ac7dceea77d76695245854742022-09-14 10:33:3216 days 5 hrs ago 0x3a40c8d175b1a389be6744e54fc61cdabf11c13e 0xf34df0e81aa107f7c015965673735b31e82be1780 ETH
0x875913df44f1ecd727e04ddcca694b8805c26db3d1c27419ac7dceea77d76695245854742022-09-14 10:33:3216 days 5 hrs ago 0x3a40c8d175b1a389be6744e54fc61cdabf11c13e 0xe6d6ec29907e08adfff3e4cf3b5de7350e84e96e0 ETH
0x38cd8e9825db37e558f0d0f0530200b09ee6274a786883d74f6b256c70cc777c242093382022-09-12 7:54:4318 days 7 hrs ago 0x3a40c8d175b1a389be6744e54fc61cdabf11c13e 0xb1ca6cd88a0604912d1f51a8d6627f2ee7b272f40 ETH
0x38cd8e9825db37e558f0d0f0530200b09ee6274a786883d74f6b256c70cc777c242093382022-09-12 7:54:4318 days 7 hrs ago 0x3a40c8d175b1a389be6744e54fc61cdabf11c13e 0xf34df0e81aa107f7c015965673735b31e82be1780 ETH
0x38cd8e9825db37e558f0d0f0530200b09ee6274a786883d74f6b256c70cc777c242093382022-09-12 7:54:4318 days 7 hrs ago 0x3a40c8d175b1a389be6744e54fc61cdabf11c13e 0xe6d6ec29907e08adfff3e4cf3b5de7350e84e96e0 ETH
0x97540f0e5fded48f24782484f3716dce6199ee0550a4536202e5303386df2ca5221331662022-08-31 7:27:3830 days 8 hrs ago 0x3a40c8d175b1a389be6744e54fc61cdabf11c13e 0xb1ca6cd88a0604912d1f51a8d6627f2ee7b272f40 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MiniSales

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 25000 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 15 : MiniSales.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity =0.8.7;

import "./interfaces/IMiniSales.sol";
import "prepo-shared-contracts/contracts/WithdrawERC20.sol";

contract MiniSales is IMiniSales, WithdrawERC20 {
  IERC20Metadata private immutable _saleToken;
  IERC20Metadata private immutable _paymentToken;
  uint256 private immutable _saleTokenDecimals;
  uint256 private _price;
  IPurchaseHook private _purchaseHook;

  constructor(
    address _newSaleToken,
    address _newPaymentToken,
    uint256 _newSaleTokenDecimals,
    address _nominatedOwner
  ) {
    _saleToken = IERC20Metadata(_newSaleToken);
    _paymentToken = IERC20Metadata(_newPaymentToken);
    // TODO add to natspec that this assumes decimals will not change
    _saleTokenDecimals = 10**_newSaleTokenDecimals;
    transferOwnership(_nominatedOwner);
  }

  function purchase(
    address _recipient,
    uint256 _saleTokenAmount,
    uint256 _purchasePrice
  ) external override nonReentrant {
    require(_purchasePrice == _price, "Price mismatch");
    if (address(_purchaseHook) != address(0)) {
      _purchaseHook.hook(_msgSender(), _recipient, _saleTokenAmount, _purchasePrice);
    }
    uint256 _paymentTokenAmount = (_saleTokenAmount * _price) / _saleTokenDecimals;
    _paymentToken.transferFrom(_msgSender(), address(this), _paymentTokenAmount);
    _saleToken.transfer(_recipient, _saleTokenAmount);
    emit Purchase(_msgSender(), _recipient, _saleTokenAmount, _price);
  }

  function setPrice(uint256 _newPrice) external override onlyOwner {
    _price = _newPrice;
    emit PriceChange(_newPrice);
  }

  function setPurchaseHook(IPurchaseHook _newPurchaseHook) external override onlyOwner {
    _purchaseHook = _newPurchaseHook;
    emit PurchaseHookChange(_newPurchaseHook);
  }

  function getSaleToken() external view override returns (IERC20Metadata) {
    return _saleToken;
  }

  function getPaymentToken() external view override returns (IERC20Metadata) {
    return _paymentToken;
  }

  function getPrice() external view override returns (uint256) {
    return _price;
  }

  function getPurchaseHook() external view override returns (IPurchaseHook) {
    return _purchaseHook;
  }

  function getSaleTokenDecimals() external view override returns (uint256) {
    return _saleTokenDecimals;
  }
}

File 2 of 15 : IMiniSales.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity =0.8.7;

import "./IPurchaseHook.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";

//TODO natspec
interface IMiniSales {
  event Purchase(
    address indexed purchaser,
    address indexed recipient,
    uint256 amount,
    uint256 price
  );

  event PriceChange(uint256 newPrice);

  event PurchaseHookChange(IPurchaseHook newPurchaseHook);

  function purchase(
    address recipient,
    uint256 amount,
    uint256 price
  ) external;

  function setPrice(uint256 newPrice) external;

  function setPurchaseHook(IPurchaseHook newPurchaseHook) external;

  function getSaleToken() external view returns (IERC20Metadata);

  function getPaymentToken() external view returns (IERC20Metadata);

  function getPrice() external view returns (uint256);

  function getPurchaseHook() external view returns (IPurchaseHook);

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

File 3 of 15 : WithdrawERC20.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity =0.8.7;

import "./interfaces/IWithdrawERC20.sol";
import "./SafeOwnable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

contract WithdrawERC20 is IWithdrawERC20, SafeOwnable, ReentrancyGuard {
  using SafeERC20 for IERC20;

  constructor() {}

  function withdrawERC20(address[] calldata _erc20Tokens, uint256[] calldata _amounts)
    external
    override
    onlyOwner
    nonReentrant
  {
    require(_erc20Tokens.length == _amounts.length, "Array length mismatch");
    for (uint256 i; i < _erc20Tokens.length; ++i) {
      IERC20(_erc20Tokens[i]).safeTransfer(owner(), _amounts[i]);
    }
  }
}

File 4 of 15 : IPurchaseHook.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity =0.8.7;

//TODO natspec
interface IPurchaseHook {
  function hook(
    address purchaser,
    address recipient,
    uint256 amount,
    uint256 price
  ) external;
}

File 5 of 15 : IERC20Metadata.sol
// 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);
}

File 6 of 15 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);
}

File 7 of 15 : IWithdrawERC20.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity =0.8.7;

// TODO: add natspec comments
interface IWithdrawERC20 {
  function withdrawERC20(address[] calldata erc20Tokens, uint256[] calldata amounts) external;
}

File 8 of 15 : SafeOwnable.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity =0.8.7;

import "@openzeppelin/contracts/access/Ownable.sol";
import "./interfaces/ISafeOwnable.sol";

contract SafeOwnable is ISafeOwnable, Ownable {
  address private _nominee;

  modifier onlyNominee() {
    require(_msgSender() == _nominee, "SafeOwnable: sender must be nominee");
    _;
  }

  function transferOwnership(address _nominee)
    public
    virtual
    override(ISafeOwnable, Ownable)
    onlyOwner
  {
    _setNominee(_nominee);
  }

  function acceptOwnership() public virtual override onlyNominee {
    _transferOwnership(_nominee);
    _setNominee(address(0));
  }

  function getNominee() public view virtual override returns (address) {
    return _nominee;
  }

  function _setNominee(address _newNominee) internal virtual {
    address _oldNominee = _nominee;
    _nominee = _newNominee;
    emit NomineeUpdate(_oldNominee, _newNominee);
  }
}

File 9 of 15 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 10 of 15 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 11 of 15 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 12 of 15 : ISafeOwnable.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity =0.8.7;

// TODO: add natspec comments
interface ISafeOwnable {
  event NomineeUpdate(address indexed previousNominee, address indexed newNominee);

  function transferOwnership(address nominee) external;

  function acceptOwnership() external;

  function getNominee() external view returns (address);
}

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

File 14 of 15 : draft-IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 15 of 15 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason 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 {
            // 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);
            }
        }
    }
}

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

Contract ABI

[{"inputs":[{"internalType":"address","name":"_newSaleToken","type":"address"},{"internalType":"address","name":"_newPaymentToken","type":"address"},{"internalType":"uint256","name":"_newSaleTokenDecimals","type":"uint256"},{"internalType":"address","name":"_nominatedOwner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousNominee","type":"address"},{"indexed":true,"internalType":"address","name":"newNominee","type":"address"}],"name":"NomineeUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"PriceChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"purchaser","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"Purchase","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IPurchaseHook","name":"newPurchaseHook","type":"address"}],"name":"PurchaseHookChange","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getNominee","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPaymentToken","outputs":[{"internalType":"contract IERC20Metadata","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPurchaseHook","outputs":[{"internalType":"contract IPurchaseHook","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSaleToken","outputs":[{"internalType":"contract IERC20Metadata","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSaleTokenDecimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_saleTokenAmount","type":"uint256"},{"internalType":"uint256","name":"_purchasePrice","type":"uint256"}],"name":"purchase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newPrice","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IPurchaseHook","name":"_newPurchaseHook","type":"address"}],"name":"setPurchaseHook","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_nominee","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_erc20Tokens","type":"address[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"}],"name":"withdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60e06040523480156200001157600080fd5b5060405162001597380380620015978339810160408190526200003491620001bb565b6200003f3362000083565b60016002556001600160601b0319606085811b821660805284901b1660a0526200006b82600a62000258565b60c0526200007981620000d3565b5050505062000339565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b620000dd620000eb565b620000e8816200014c565b50565b6000546001600160a01b031633146200014a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640160405180910390fd5b565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907fe7624d724357e317f51579affee5050a97c60b060e513e69aa8a1a35fb3315a790600090a35050565b80516001600160a01b0381168114620001b657600080fd5b919050565b60008060008060808587031215620001d257600080fd5b620001dd856200019e565b9350620001ed602086016200019e565b92506040850151915062000204606086016200019e565b905092959194509250565b600181815b808511156200025057816000190482111562000234576200023462000323565b808516156200024257918102915b93841c939080029062000214565b509250929050565b60006200026683836200026d565b9392505050565b6000826200027e575060016200031d565b816200028d575060006200031d565b8160018114620002a65760028114620002b157620002d1565b60019150506200031d565b60ff841115620002c557620002c562000323565b50506001821b6200031d565b5060208310610133831016604e8410600b8410161715620002f6575081810a6200031d565b6200030283836200020f565b806000190482111562000319576200031962000323565b0290505b92915050565b634e487b7160e01b600052601160045260246000fd5b60805160601c60a05160601c60c051611214620003836000396000818160f101526106e2015260008181610207015261073201526000818161022d015261085001526112146000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c806398d5fdca1161008c578063c1867b4e11610066578063c1867b4e146101e7578063d41c3a6514610205578063ec3dd1161461022b578063f2fde38b1461025157600080fd5b806398d5fdca146101ae578063b45acd2f146101b6578063b6ca0b63146101c957600080fd5b806379ba5097116100c857806379ba5097146101415780638da5cb5b1461014957806391b7f5ed1461018857806398968f151461019b57600080fd5b8063081a1d8c146100ef5780631881902214610124578063715018a614610139575b600080fd5b7f00000000000000000000000000000000000000000000000000000000000000005b6040519081526020015b60405180910390f35b610137610132366004610f69565b610264565b005b6101376103f0565b610137610404565b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161011b565b610137610196366004610ff7565b6104ed565b6101376101a9366004610f34565b610531565b600354610111565b6101376101c4366004610f17565b61092f565b60015473ffffffffffffffffffffffffffffffffffffffff16610163565b60045473ffffffffffffffffffffffffffffffffffffffff16610163565b7f0000000000000000000000000000000000000000000000000000000000000000610163565b7f0000000000000000000000000000000000000000000000000000000000000000610163565b61013761025f366004610f17565b6109aa565b61026c6109be565b6002805414156102dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b6002805582811461034a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4172726179206c656e677468206d69736d61746368000000000000000000000060448201526064016102d4565b60005b838110156103e4576103d461037760005473ffffffffffffffffffffffffffffffffffffffff1690565b8484848181106103895761038961118d565b905060200201358787858181106103a2576103a261118d565b90506020020160208101906103b79190610f17565b73ffffffffffffffffffffffffffffffffffffffff169190610a3f565b6103dd81611125565b905061034d565b50506001600255505050565b6103f86109be565b6104026000610ad1565b565b60015473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f536166654f776e61626c653a2073656e646572206d757374206265206e6f6d6960448201527f6e6565000000000000000000000000000000000000000000000000000000000060648201526084016102d4565b6001546104e39073ffffffffffffffffffffffffffffffffffffffff16610ad1565b6104026000610b46565b6104f56109be565b60038190556040518181527ff347ee99503bf19c028bd6b18f3c676e82a9bb5b2bb5225aebe0fd62fd6a0d19906020015b60405180910390a150565b60028054141561059d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016102d4565b60028055600354811461060c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f5072696365206d69736d6174636800000000000000000000000000000000000060448201526064016102d4565b60045473ffffffffffffffffffffffffffffffffffffffff16156106de5760045473ffffffffffffffffffffffffffffffffffffffff16636d14bd1f336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff918216600482015290861660248201526044810185905260648101849052608401600060405180830381600087803b1580156106c557600080fd5b505af11580156106d9573d6000803e3d6000fd5b505050505b60007f00000000000000000000000000000000000000000000000000000000000000006003548461070f91906110b8565b610719919061107d565b905073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166323b872dd336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff909116600482015230602482015260448101849052606401602060405180830381600087803b1580156107cb57600080fd5b505af11580156107df573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108039190610fd5565b506040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018590527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb90604401602060405180830381600087803b15801561089457600080fd5b505af11580156108a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108cc9190610fd5565b5060035460408051858152602081019290925273ffffffffffffffffffffffffffffffffffffffff86169133917f46661dab58311a6838247afecbee792192b4f27fc8b3e7168c66bc55ec2e404e910160405180910390a3505060016002555050565b6109376109be565b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f53d4d39686c76b484b85af8483df1f79dc1f95a60ea908543e5ef4c3a6d0bdaa90602001610526565b6109b26109be565b6109bb81610b46565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314610402576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102d4565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610acc908490610bbd565b505050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907fe7624d724357e317f51579affee5050a97c60b060e513e69aa8a1a35fb3315a790600090a35050565b6000610c1f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610cc99092919063ffffffff16565b805190915015610acc5780806020019051810190610c3d9190610fd5565b610acc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016102d4565b6060610cd88484600085610ce2565b90505b9392505050565b606082471015610d74576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016102d4565b73ffffffffffffffffffffffffffffffffffffffff85163b610df2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102d4565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610e1b9190611010565b60006040518083038185875af1925050503d8060008114610e58576040519150601f19603f3d011682016040523d82523d6000602084013e610e5d565b606091505b5091509150610e6d828286610e78565b979650505050505050565b60608315610e87575081610cdb565b825115610e975782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102d4919061102c565b60008083601f840112610edd57600080fd5b50813567ffffffffffffffff811115610ef557600080fd5b6020830191508360208260051b8501011115610f1057600080fd5b9250929050565b600060208284031215610f2957600080fd5b8135610cdb816111bc565b600080600060608486031215610f4957600080fd5b8335610f54816111bc565b95602085013595506040909401359392505050565b60008060008060408587031215610f7f57600080fd5b843567ffffffffffffffff80821115610f9757600080fd5b610fa388838901610ecb565b90965094506020870135915080821115610fbc57600080fd5b50610fc987828801610ecb565b95989497509550505050565b600060208284031215610fe757600080fd5b81518015158114610cdb57600080fd5b60006020828403121561100957600080fd5b5035919050565b600082516110228184602087016110f5565b9190910192915050565b602081526000825180602084015261104b8160408501602087016110f5565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b6000826110b3577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156110f0576110f061115e565b500290565b60005b838110156111105781810151838201526020016110f8565b8381111561111f576000848401525b50505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156111575761115761115e565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff811681146109bb57600080fdfea2646970667358221220d3fea828a2faef904d50d9ea7ec6c69bffed71650478bb7535b54e46d573cdb264736f6c63430008070033000000000000000000000000b1ca6cd88a0604912d1f51a8d6627f2ee7b272f4000000000000000000000000f34df0e81aa107f7c015965673735b31e82be1780000000000000000000000000000000000000000000000000000000000000012000000000000000000000000596e5940a47169f244fdd2dc269bcea735635b53

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

000000000000000000000000b1ca6cd88a0604912d1f51a8d6627f2ee7b272f4000000000000000000000000f34df0e81aa107f7c015965673735b31e82be1780000000000000000000000000000000000000000000000000000000000000012000000000000000000000000596e5940a47169f244fdd2dc269bcea735635b53

-----Decoded View---------------
Arg [0] : _newSaleToken (address): 0xb1ca6cd88a0604912d1f51a8d6627f2ee7b272f4
Arg [1] : _newPaymentToken (address): 0xf34df0e81aa107f7c015965673735b31e82be178
Arg [2] : _newSaleTokenDecimals (uint256): 18
Arg [3] : _nominatedOwner (address): 0x596e5940a47169f244fdd2dc269bcea735635b53

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000b1ca6cd88a0604912d1f51a8d6627f2ee7b272f4
Arg [1] : 000000000000000000000000f34df0e81aa107f7c015965673735b31e82be178
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000012
Arg [3] : 000000000000000000000000596e5940a47169f244fdd2dc269bcea735635b53


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