Contract 0x24005ec2445103050D2D72F691dE287D9E4672A4 8

 
Txn Hash Method
Block
From
To
Value
0x6aa5d03ad3cd8e3a05c21dd832be30dcdf6470e81c0697c982ddff88f3f10046Migrate1089076252023-08-30 16:47:0728 days 21 hrs ago0x1f9b1b84fe59fce1dba1ac2542c725bf23215f22 IN  0x24005ec2445103050d2d72f691de287d9e4672a40 ETH0.0000376966820.000131085
0x314af4d83b7f726cc5080053210024d5d1b1512d6a9daccca4cdf6cac63b3169Migrate1088366252023-08-29 1:20:2730 days 13 hrs ago0xeb6772188cf10aa563a1cd163f48355d1a949797 IN  0x24005ec2445103050d2d72f691de287d9e4672a40 ETH0.000030823440.000009671
0x9817aea3dfda75c008a704911cbfe8efd7d7ef669d010ebec5a87b405363e6a7Migrate1088252452023-08-28 19:01:0730 days 19 hrs ago0xac8557b877e3fa9e5f21185929e17515fba1c2fb IN  0x24005ec2445103050d2d72f691de287d9e4672a40 ETH0.0000573854220.0626396
0x28ced5f2e1c61f887a442a11e6a524d0c6716210032670c9270d1f3146566816Migrate1088005452023-08-28 5:17:4731 days 9 hrs ago0xa909be1ac709bc08bd8cd69604cee197360b3e33 IN  0x24005ec2445103050d2d72f691de287d9e4672a40 ETH0.0000193888830.000009977
0x2abc330f64357b125f26b39d15fdae62a0e44e240b50935260a784078bcd844fMigrate1087864212023-08-27 21:26:5931 days 17 hrs ago0x4ac4ff89b9d4b3daf54942e3df63751a4a54c735 IN  0x24005ec2445103050d2d72f691de287d9e4672a40 ETH0.000017376270.000000492
0x8849d86637c117706e6d1c47aea60cd8143e2dece68ad2f76e0339466030a21eMigrate1087858252023-08-27 21:07:0731 days 17 hrs ago0x592e1e16016c25651513591b7ebed5ca803ad39e IN  0x24005ec2445103050d2d72f691de287d9e4672a40 ETH0.0000216455820.000000125
0x86cff7c1f359ed753552adbba3735533e21dd2786df6b4c83e544382d3269281Migrate1087855742023-08-27 20:58:4531 days 17 hrs ago0xe48fe6012f97b6a13c0ce5cef314caf66e972deb IN  0x24005ec2445103050d2d72f691de287d9e4672a40 ETH0.0000164981470.000000262
0x4477ad4d833967ce8804da52090ad8589f5d9ac93a99bd1f45378f929a227969Migrate1087822422023-08-27 19:07:4131 days 19 hrs ago0x457dabb2e19837dda2d030b44e63258cd0459844 IN  0x24005ec2445103050d2d72f691de287d9e4672a40 ETH0.0000195126550.001221245
0x678fd73480e5cd826b9eb659086f3f3b624bf318c2c9c99e3783b43f445167abMigrate1087748702023-08-27 15:01:5731 days 23 hrs ago0x4deb56a42fc63650b2f0bfb9abe1850e3a091371 IN  0x24005ec2445103050d2d72f691de287d9e4672a40 ETH0.0000263347550.0000287
0xfeb609d0061096c050d3cfb5c96ea28225762838de5060a803a70e6246c6108eMigrate1087600672023-08-27 6:48:3132 days 7 hrs ago0x43d16ccd581e1d6a8d51768f75ddf09b79f4f856 IN  0x24005ec2445103050d2d72f691de287d9e4672a40 ETH0.0000243528450.100000056
0x76104d79a5823281a341a982d6cdd088c37f7995e5a05bba3c6445eaa451df87Migrate1087579722023-08-27 5:38:4132 days 9 hrs ago0x6f66bf2a5870a5cd06870362788724e3fe23e856 IN  0x24005ec2445103050d2d72f691de287d9e4672a40 ETH0.0000163500610.000001134
0xd011d7a75b2e4cadaac8e0067a752b8044587802efaab276ab1babd93a35b831Migrate1087499852023-08-27 1:12:2732 days 13 hrs ago0x605203fa80fb81b3acdca5b26fa7cbc8f9cacfce IN  0x24005ec2445103050d2d72f691de287d9e4672a40 ETH0.0000161419570.000009407
0x7cc62c18ca2502c2fb7db48180ad70121fb4e4a82b4a174eb1f4e9f8dc76235fMigrate1087369472023-08-26 17:57:5132 days 20 hrs ago0x17f343182b42d6488fc54b6ae73ac5da5ad4e326 IN  0x24005ec2445103050d2d72f691de287d9e4672a40 ETH0.0000171683450.000000368
0x751df22856c4ece6bed4cd752ca0a449598d027e81f38345b4f775fce26ac8f1Migrate1087215372023-08-26 9:24:1133 days 5 hrs ago0x8caef18a4e4c68a1132ae195e628ef68043ccb05 IN  0x24005ec2445103050d2d72f691de287d9e4672a40 ETH0.000018985830.000000062
0x6b5fb3e3b93537c1074d74925e1882631f09c554fae7b1c74cda4e19505de8beMigrate1087120222023-08-26 4:07:0133 days 10 hrs ago0x4a79bd4aa68112ed705f38dfbf3e078e7789fa36 IN  0x24005ec2445103050d2d72f691de287d9e4672a40 ETH0.0000173784250.0000007
0x03562bdd4cb1c00f1151c58a7031a1c79df0d8a8706db93dc7edc8b459448cb7Migrate1087119412023-08-26 4:04:1933 days 10 hrs ago0x473d3a2005499301dc353afa9d0c9c5980b5188c IN  0x24005ec2445103050d2d72f691de287d9e4672a40 ETH0.0000174091890.0005001
0x8337f89154fe2c2d9a38e2c32aed54a7e9cae799bdc9159b9f0ec0c1a0c9647eMigrate1087092912023-08-26 2:35:5933 days 12 hrs ago0x03b0e4a19f357a112be59d658ec4e2834d510f39 IN  0x24005ec2445103050d2d72f691de287d9e4672a40 ETH0.0000264610380.000000508
0x56e2662a2614b7b44e0bce9874aedc422668c3a323e9ed3252710a790e9c3f40Migrate1087004542023-08-25 21:41:2533 days 16 hrs ago 0x393f50d7a6efdae2c6b70bb493728e037714eac5 IN  0x24005ec2445103050d2d72f691de287d9e4672a40 ETH0.000023226330.000049187
0x61dcd6f496ddc58bde550d8f0b842a87b790a4951f0bf686212ea668d881cb2fMigrate1086868042023-08-25 14:06:2534 days 32 mins ago0x9e32643153bb21a77a5a757d6c51a01aebea0fa7 IN  0x24005ec2445103050d2d72f691de287d9e4672a40 ETH0.0000713784460.100000074
0xa3ae03ddd2257f2d89e49f745ebae186ad32d156f95a793cda7c00aada8e6188Migrate1086787902023-08-25 9:39:1734 days 4 hrs ago0x3a2acc5f5cfc976eb517008fec19a506501b3130 IN  0x24005ec2445103050d2d72f691de287d9e4672a40 ETH0.0000245092240.000000068
0xc961b6c0eeba350f1dd94f1254d5e2f40db9ec26994e285a23f62871b122c619Migrate1086744532023-08-25 7:14:4334 days 7 hrs ago0xc00a6614b8030ce216302016e11c6b4140b5e499 IN  0x24005ec2445103050d2d72f691de287d9e4672a40 ETH0.0000260096650.01
0x7d56a0ba35e1b93590f32151b78023818f1a4bb0302051e0c7e78fc16f1f1371Migrate1086687332023-08-25 4:04:0334 days 10 hrs ago0x1989f6a29f406afc7e5643e29f27fb11980cb8e4 IN  0x24005ec2445103050d2d72f691de287d9e4672a40 ETH0.0000281017850.0000019
0x38ba4eed9084040bef01479c77edd0433d4ca02dce6d7e5b79f2c89774d5ccb4Migrate1086635412023-08-25 1:10:5934 days 13 hrs ago0x8a30fe8dd7c1b8ee6fff8892731ed345b9e33b29 IN  0x24005ec2445103050d2d72f691de287d9e4672a40 ETH0.0000209537090.0015808
0xe6c1f627ff873375fdbc9ac69d2de1741a3d590db3ac9c00bf19675c421109bcMigrate1086609292023-08-24 23:43:5534 days 14 hrs ago0x7e1e1c5ac70038a9718431c92a618f01f8dada18 IN  0x24005ec2445103050d2d72f691de287d9e4672a40 ETH0.0000260831330.000009407
0xd273f91f00ab20a92f7e35a3023ff08ee5852003e0139d2d467b9e74e02056ebMigrate1086606752023-08-24 23:35:2734 days 15 hrs ago0x7e1e1c5ac70038a9718431c92a618f01f8dada18 IN  0x24005ec2445103050d2d72f691de287d9e4672a40 ETH0.0000245413780.000003508
[ Download CSV Export 
Latest 12 internal transactions
Parent Txn Hash Block From To Value
0x6745e6372e079b7d72b78710eff90177c9fbc097cd3ed0cff54035c9d4af082a1075410792023-07-30 1:35:3560 days 13 hrs ago 0x24005ec2445103050d2d72f691de287d9e4672a4 0x1f514a61bcde34f94bc39731235690ab9da737f70 ETH
0x6745e6372e079b7d72b78710eff90177c9fbc097cd3ed0cff54035c9d4af082a1075410792023-07-30 1:35:3560 days 13 hrs ago 0x24005ec2445103050d2d72f691de287d9e4672a4 Multichain: TAROT Token0 ETH
0x6745e6372e079b7d72b78710eff90177c9fbc097cd3ed0cff54035c9d4af082a1075410792023-07-30 1:35:3560 days 13 hrs ago 0x24005ec2445103050d2d72f691de287d9e4672a4 Multichain: TAROT Token0 ETH
0x6745e6372e079b7d72b78710eff90177c9fbc097cd3ed0cff54035c9d4af082a1075410792023-07-30 1:35:3560 days 13 hrs ago 0x24005ec2445103050d2d72f691de287d9e4672a4 Multichain: TAROT Token0 ETH
0x6569b5b6d3554cd7f3f8d91c8de5c8a4eba62fc7523398a79883a70f62b70c2c1075403652023-07-30 1:11:4760 days 13 hrs ago 0x24005ec2445103050d2d72f691de287d9e4672a4 0x1f514a61bcde34f94bc39731235690ab9da737f70 ETH
0x6569b5b6d3554cd7f3f8d91c8de5c8a4eba62fc7523398a79883a70f62b70c2c1075403652023-07-30 1:11:4760 days 13 hrs ago 0x24005ec2445103050d2d72f691de287d9e4672a4 Multichain: TAROT Token0 ETH
0x6569b5b6d3554cd7f3f8d91c8de5c8a4eba62fc7523398a79883a70f62b70c2c1075403652023-07-30 1:11:4760 days 13 hrs ago 0x24005ec2445103050d2d72f691de287d9e4672a4 Multichain: TAROT Token0 ETH
0x6569b5b6d3554cd7f3f8d91c8de5c8a4eba62fc7523398a79883a70f62b70c2c1075403652023-07-30 1:11:4760 days 13 hrs ago 0x24005ec2445103050d2d72f691de287d9e4672a4 Multichain: TAROT Token0 ETH
0x060068da45d20b0af65b2103a79a806b703418a2735bc94d48dee06a9b0182f91075396302023-07-30 0:47:1760 days 13 hrs ago 0x24005ec2445103050d2d72f691de287d9e4672a4 0x1f514a61bcde34f94bc39731235690ab9da737f70 ETH
0x060068da45d20b0af65b2103a79a806b703418a2735bc94d48dee06a9b0182f91075396302023-07-30 0:47:1760 days 13 hrs ago 0x24005ec2445103050d2d72f691de287d9e4672a4 Multichain: TAROT Token0 ETH
0x060068da45d20b0af65b2103a79a806b703418a2735bc94d48dee06a9b0182f91075396302023-07-30 0:47:1760 days 13 hrs ago 0x24005ec2445103050d2d72f691de287d9e4672a4 Multichain: TAROT Token0 ETH
0x060068da45d20b0af65b2103a79a806b703418a2735bc94d48dee06a9b0182f91075396302023-07-30 0:47:1760 days 13 hrs ago 0x24005ec2445103050d2d72f691de287d9e4672a4 Multichain: TAROT Token0 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TarotMigrator

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 5 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling 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 2 of 5 : ReentrancyGuard.sol
// 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;
    }
}

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

File 4 of 5 : 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 5 of 5 : TarotMigrator.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { ReentrancyGuard } from "@openzeppelin/contracts/security/ReentrancyGuard.sol";

contract TarotMigrator is Ownable, ReentrancyGuard {
  IERC20 immutable public oldToken;
  IERC20 immutable public wrappedOldToken;
  IERC20 immutable public newToken;
  bool immutable oldTokenIsNative;
  uint256 public expectedBalance;
  uint256 public startTimestamp;
  uint256 public deadline;
  uint256 public amountMigrated;

  event SetExpectedBalance(address indexed from, uint256 oldExpectedBalance, uint256 newExpectedBalance);
  event SetStartTimestamp(address indexed from, uint256 oldStartTimestamp, uint256 newStartTimestamp);
  event SetDeadline(address indexed from, uint256 oldDeadline, uint256 newDeadline);
  event Migrate(address indexed from, uint256 amount, uint256 totalAmountMigrated);
  event Withdraw(address indexed from, address indexed to, uint256 oldAmount, uint256 newAmount);

  constructor(
    IERC20 _oldToken,
    IERC20 _wrappedOldToken,
    IERC20 _newToken,
    bool _oldTokenIsNative,
    uint256 _expectedBalance,
    uint256 _startTimestamp,
    uint256 _deadline
  ) Ownable() ReentrancyGuard() {
    oldToken = _oldToken;
    wrappedOldToken = _wrappedOldToken;
    newToken = _newToken;
    oldTokenIsNative = _oldTokenIsNative;
    expectedBalance = _expectedBalance;
    startTimestamp = _startTimestamp;
    deadline = _deadline;
  }

  function setExpectedBalance(uint256 _expectedBalance) onlyOwner external {
    uint256 oldExpectedBalance = expectedBalance;
    expectedBalance = _expectedBalance;
    emit SetExpectedBalance(msg.sender, oldExpectedBalance, expectedBalance);
  }

  function setStartTimestamp(uint256 _startTimestamp) onlyOwner external {
    uint256 oldStartTimestamp = startTimestamp;
    startTimestamp = _startTimestamp;
    emit SetStartTimestamp(msg.sender, oldStartTimestamp, startTimestamp);
  }

  function setDeadline(uint256 _deadline) onlyOwner external {
    uint256 oldDeadline = deadline;
    deadline = _deadline;
    emit SetDeadline(msg.sender, oldDeadline, deadline);
  }

  function checkExpectedBalance() public view returns (bool) {
    if (oldTokenIsNative) {
      return oldToken.balanceOf(address(wrappedOldToken)) >= expectedBalance;
    } else {
      return oldToken.totalSupply() == expectedBalance;
    }
  }

  function migrate(uint256 amount) nonReentrant external {
    require(checkExpectedBalance(), "TarotMigrator: INVALID_BALANCE");
    require(block.timestamp >= startTimestamp, "TarotMigrator: TOO_SOON");
    require(block.timestamp < deadline, "TarotMigrator: TOO_LATE");
    require(amount > 0 && oldToken.balanceOf(msg.sender) >= amount, "TarotMigrator: INVALID_AMOUNT");
    oldToken.transferFrom(msg.sender, address(this), amount);
    newToken.transfer(msg.sender, amount);
    amountMigrated += amount;
    emit Migrate(msg.sender, amount, amountMigrated);
  }

  function withdraw(address to, uint256 oldAmount, uint256 newAmount) onlyOwner external {
    require(to != address(0), "TarotMigrator: INVALID_TO");
    if (oldAmount > 0) {
      oldToken.transfer(to, oldAmount);
    }
    if (newAmount > 0) {
      newToken.transfer(to, newAmount);
    }
    emit Withdraw(msg.sender, to, oldAmount, newAmount);
  }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"_oldToken","type":"address"},{"internalType":"contract IERC20","name":"_wrappedOldToken","type":"address"},{"internalType":"contract IERC20","name":"_newToken","type":"address"},{"internalType":"bool","name":"_oldTokenIsNative","type":"bool"},{"internalType":"uint256","name":"_expectedBalance","type":"uint256"},{"internalType":"uint256","name":"_startTimestamp","type":"uint256"},{"internalType":"uint256","name":"_deadline","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalAmountMigrated","type":"uint256"}],"name":"Migrate","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":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"oldDeadline","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newDeadline","type":"uint256"}],"name":"SetDeadline","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"oldExpectedBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newExpectedBalance","type":"uint256"}],"name":"SetExpectedBalance","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"oldStartTimestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newStartTimestamp","type":"uint256"}],"name":"SetStartTimestamp","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"oldAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newAmount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"amountMigrated","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"checkExpectedBalance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deadline","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"expectedBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"migrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"newToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oldToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_deadline","type":"uint256"}],"name":"setDeadline","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_expectedBalance","type":"uint256"}],"name":"setExpectedBalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startTimestamp","type":"uint256"}],"name":"setStartTimestamp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"oldAmount","type":"uint256"},{"internalType":"uint256","name":"newAmount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wrappedOldToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

61010060405234801561001157600080fd5b50604051610e7f380380610e7f833981016040819052610030916100dd565b61003933610071565b600180556001600160a01b0396871660805294861660a0529290941660c052151560e052600292909255600391909155600455610157565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146100d857600080fd5b919050565b600080600080600080600060e0888a0312156100f857600080fd5b610101886100c1565b965061010f602089016100c1565b955061011d604089016100c1565b94506060880151801515811461013257600080fd5b809450506080880151925060a0880151915060c0880151905092959891949750929550565b60805160a05160c05160e051610cb76101c860003960006106930152600081816101e90152818161059e015261091b01526000818161022301526106d10152600081816101af015281816104280152818161050c015281816106f90152818161077001526108800152610cb76000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063b31c710a11610097578063cbe87b9b11610066578063cbe87b9b1461021e578063e60c5f9114610245578063e6fd48bc1461024e578063f2fde38b1461025757600080fd5b8063b31c710a146101aa578063b5c5f672146101d1578063c42bd05a146101e4578063c44bef751461020b57600080fd5b8063454b0608116100d3578063454b060814610152578063715018a614610165578063844c2ca41461016d5780638da5cb5b1461018557600080fd5b80631038351714610105578063195199f61461011a57806329dcb0cf1461012d578063329d0fa514610149575b600080fd5b610118610113366004610b96565b61026a565b005b610118610128366004610b96565b6102ba565b61013660045481565b6040519081526020015b60405180910390f35b61013660025481565b610118610160366004610b96565b610302565b61011861067b565b61017561068f565b6040519015158152602001610140565b6000546001600160a01b03165b6040516001600160a01b039091168152602001610140565b6101927f000000000000000000000000000000000000000000000000000000000000000081565b6101186101df366004610bcb565b6107f6565b6101927f000000000000000000000000000000000000000000000000000000000000000081565b610118610219366004610b96565b6109d5565b6101927f000000000000000000000000000000000000000000000000000000000000000081565b61013660055481565b61013660035481565b610118610265366004610bfe565b610a1d565b610272610a93565b6002805490829055604080518281526020810184905233917f04742bd6da3de5cc3c9c82a5e1cb826e9930185b55514a4faf8f3bf57211d9c791015b60405180910390a25050565b6102c2610a93565b6004805490829055604080518281526020810184905233917f88ae37138cbfc0fba3d204da21a9224aed78153f41917a62be1f8cb684e9868d91016102ae565b61030a610aed565b61031261068f565b6103635760405162461bcd60e51b815260206004820152601e60248201527f5461726f744d69677261746f723a20494e56414c49445f42414c414e4345000060448201526064015b60405180910390fd5b6003544210156103b55760405162461bcd60e51b815260206004820152601760248201527f5461726f744d69677261746f723a20544f4f5f534f4f4e000000000000000000604482015260640161035a565b60045442106104065760405162461bcd60e51b815260206004820152601760248201527f5461726f744d69677261746f723a20544f4f5f4c415445000000000000000000604482015260640161035a565b60008111801561049e57506040516370a0823160e01b815233600482015281907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610477573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061049b9190610c20565b10155b6104ea5760405162461bcd60e51b815260206004820152601d60248201527f5461726f744d69677261746f723a20494e56414c49445f414d4f554e54000000604482015260640161035a565b6040516323b872dd60e01b8152336004820152306024820152604481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af115801561055d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105819190610c39565b5060405163a9059cbb60e01b8152336004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb906044016020604051808303816000875af11580156105ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106139190610c39565b5080600560008282546106269190610c5b565b909155505060055460405133917fd44a6dd2bfac4f6bc02d116d96aa12c24e8580626b95cb6a2f543f18cb61bd4c9161066791858252602082015260400190565b60405180910390a261067860018055565b50565b610683610a93565b61068d6000610b46565b565b60007f00000000000000000000000000000000000000000000000000000000000000001561076b576002546040516370a0823160e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301527f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015610740573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107649190610c20565b1015905090565b6002547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f09190610c20565b14905090565b6107fe610a93565b6001600160a01b0383166108545760405162461bcd60e51b815260206004820152601960248201527f5461726f744d69677261746f723a20494e56414c49445f544f00000000000000604482015260640161035a565b81156108ef5760405163a9059cbb60e01b81526001600160a01b038481166004830152602482018490527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af11580156108c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ed9190610c39565b505b801561098a5760405163a9059cbb60e01b81526001600160a01b038481166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015610964573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109889190610c39565b505b60408051838152602081018390526001600160a01b0385169133917ff341246adaac6f497bc2a656f546ab9e182111d630394f0c57c710a59a2cb567910160405180910390a3505050565b6109dd610a93565b6003805490829055604080518281526020810184905233917f97060d30fe794cb0e5c920609f0972524acbea12aca6793258685fc2c4bdb69891016102ae565b610a25610a93565b6001600160a01b038116610a8a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161035a565b61067881610b46565b6000546001600160a01b0316331461068d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161035a565b600260015403610b3f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161035a565b6002600155565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215610ba857600080fd5b5035919050565b80356001600160a01b0381168114610bc657600080fd5b919050565b600080600060608486031215610be057600080fd5b610be984610baf565b95602085013595506040909401359392505050565b600060208284031215610c1057600080fd5b610c1982610baf565b9392505050565b600060208284031215610c3257600080fd5b5051919050565b600060208284031215610c4b57600080fd5b81518015158114610c1957600080fd5b60008219821115610c7c57634e487b7160e01b600052601160045260246000fd5b50019056fea26469706673582212202fbb9f180d9c003447f393de671d6d7c0c476ba715a79652f713631081dcee3764736f6c634300080d0033000000000000000000000000375488f097176507e39b9653b88fdc52cde736bf00000000000000000000000000000000000000000000000000000000000000000000000000000000000000001f514a61bcde34f94bc39731235690ab9da737f700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e9a499d5969b9505e8fe90000000000000000000000000000000000000000000000000000000064c5a8000000000000000000000000000000000000000000000000000000000064ed3500

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

000000000000000000000000375488f097176507e39b9653b88fdc52cde736bf00000000000000000000000000000000000000000000000000000000000000000000000000000000000000001f514a61bcde34f94bc39731235690ab9da737f700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e9a499d5969b9505e8fe90000000000000000000000000000000000000000000000000000000064c5a8000000000000000000000000000000000000000000000000000000000064ed3500

-----Decoded View---------------
Arg [0] : _oldToken (address): 0x375488F097176507e39B9653b88FDc52cDE736Bf
Arg [1] : _wrappedOldToken (address): 0x0000000000000000000000000000000000000000
Arg [2] : _newToken (address): 0x1F514A61bcde34F94Bc39731235690ab9da737F7
Arg [3] : _oldTokenIsNative (bool): False
Arg [4] : _expectedBalance (uint256): 17653563863493896126238697
Arg [5] : _startTimestamp (uint256): 1690675200
Arg [6] : _deadline (uint256): 1693267200

-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 000000000000000000000000375488f097176507e39b9653b88fdc52cde736bf
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [2] : 0000000000000000000000001f514a61bcde34f94bc39731235690ab9da737f7
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [4] : 0000000000000000000000000000000000000000000e9a499d5969b9505e8fe9
Arg [5] : 0000000000000000000000000000000000000000000000000000000064c5a800
Arg [6] : 0000000000000000000000000000000000000000000000000000000064ed3500


Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.