Contract 0xB50b67AaD53081631137E6823Dc86Ff28098306e 1

 
 
Txn Hash
Method
Block
From
To
Value [Txn Fee]
0xde9308eb40b05c252a2863c0d7fc32fc3b1497f336b7cda7175bc969efd06044Migrate From SGA...205458992021-10-24 3:35:56513 days 17 hrs ago0x584e3c8caa651c2543f184794ef6806e08fdce41 IN  0xb50b67aad53081631137e6823dc86ff28098306e0 MATIC0.0021670230
0x5740062aeab2f1796a47508754d70fa79f18cee1eaefda55343c10b18b9f8789Migrate From SGA...203052882021-10-17 7:54:27520 days 13 hrs ago0x76d930b9daf4199292a87fe84a2df72967fad725 IN  0xb50b67aad53081631137e6823dc86ff28098306e0 MATIC0.0016543830
0xbd6d7fee807c861d9feb7364b9ccfc05c7b04df2fd96ab7aa6829592c0cc1df7Migrate From SGA...201744012021-10-13 13:13:53524 days 7 hrs ago0xd7e3c0ce7767f71254bee434c1e95ef8516378c9 IN  0xb50b67aad53081631137e6823dc86ff28098306e0 MATIC0.0016540230
0xa434d8dfa832c58fea2a03f0402f241c809e1dccaff1d1e78e70edc8daf70282Migrate From SGA...201734982021-10-13 12:36:23524 days 8 hrs ago0x6f1b12a415e035eebdc8559130ea8bdb96add48c IN  0xb50b67aad53081631137e6823dc86ff28098306e0 MATIC0.0021666630
0x843b1a75101ef331b651b0f04c2404efd31c97c08723a3faa01dd1d8a3c679fcMigrate From SGA...201430692021-10-12 16:20:32525 days 4 hrs ago0xc46c70ef6dc410dfd5e45a20759cb83ff2612228 IN  0xb50b67aad53081631137e6823dc86ff28098306e0 MATIC0.002168130
0x15cb5f3683223f174ede4871fd1cf190f8c1a01a7649d20ebbc7cf32fbb05001Migrate From SGA...201248822021-10-12 5:06:16525 days 15 hrs ago0x3c17eb9de55499dc1848e36daf5a7ed6c92d65e1 IN  0xb50b67aad53081631137e6823dc86ff28098306e0 MATIC0.01110879330
0xf95b632926de12c1fcc9bfe90be97d6b65b897f428f563da7104a89297342c47Migrate From SGA...201248812021-10-12 5:06:14525 days 15 hrs ago0x3c17eb9de55499dc1848e36daf5a7ed6c92d65e1 IN  0xb50b67aad53081631137e6823dc86ff28098306e0 MATIC0.0005778728
0xe6e8b0fc44d10dee84e25444e2be6c8155eea140e82f36de6cae24986479cc4aMigrate From SGA...201066522021-10-11 17:37:56526 days 3 hrs ago0x1ccd8ff59612d4108d9bbe5f16add545efc6fdbe IN  0xb50b67aad53081631137e6823dc86ff28098306e0 MATIC0.0021673830
0x6d461078f66152fa38b1d18d96419261b030d3d343f1cabe200a254603e5ccf2Migrate From SGA...200877302021-10-11 5:06:53526 days 15 hrs ago0x3c17eb9de55499dc1848e36daf5a7ed6c92d65e1 IN  0xb50b67aad53081631137e6823dc86ff28098306e0 MATIC0.0013907130
0xd655af00b3f6851ba62b0b514988fd8742f98921b473bb47268c493f537c6936Migrate From SGA...200555972021-10-10 9:01:29527 days 11 hrs ago0x23cf7eb4ed8e21094e5673ef946901cc7923f59e IN  0xb50b67aad53081631137e6823dc86ff28098306e0 MATIC0.0021673830
0x20fb957b5d4cb6e3d5ad76a6b212100b16249b8dfe0e83d29b7d8b1851fcb21cMigrate From SGA...200541662021-10-10 8:07:43527 days 12 hrs ago0x76d930b9daf4199292a87fe84a2df72967fad725 IN  0xb50b67aad53081631137e6823dc86ff28098306e0 MATIC0.00181942233
0xb1b9d1e2cc653f7d4ca3daf9fe99c54a18155d8eb46c15fb4e0cc2506879c311Migrate From SGA...200504022021-10-10 5:49:47527 days 15 hrs ago0x76d930b9daf4199292a87fe84a2df72967fad725 IN  0xb50b67aad53081631137e6823dc86ff28098306e0 MATIC0.0016543830
0xee506a2ee866b31786e5f4bed54477b08ed8a8c89fe112fe33ca8404706db710Migrate From SGA...200494582021-10-10 5:15:09527 days 15 hrs ago0x0ccd9d7d59db8404b289a75d88f834de706cc5c4 IN  0xb50b67aad53081631137e6823dc86ff28098306e0 MATIC0.002168130
0xdc7c2d21c07412826a4a958411c7671c64dd52fc2c26636ecbee3f49cc13dd0aMigrate From SGA...200478232021-10-10 4:16:50527 days 16 hrs ago0x76d930b9daf4199292a87fe84a2df72967fad725 IN  0xb50b67aad53081631137e6823dc86ff28098306e0 MATIC0.0016543830
0x76433eba67b395b1fc05dac5f88e9d9e8218e552f6473fa3c8c2494803dfae4cMigrate From SGA...200474702021-10-10 4:04:40527 days 16 hrs ago0x76d930b9daf4199292a87fe84a2df72967fad725 IN  0xb50b67aad53081631137e6823dc86ff28098306e0 MATIC0.00151429545
0x10d9962a5b5e55e6d9cc56479659f9110d77cba2fb251000106cf07ca4b7ca2fMigrate From SGA...200335562021-10-09 19:31:03528 days 1 hr ago0x76d930b9daf4199292a87fe84a2df72967fad725 IN  0xb50b67aad53081631137e6823dc86ff28098306e0 MATIC0.0015971430
0x27fb43bd886ab356c3e9f29b908b935534aa2b8666605065e0a5c5260841cbb4Migrate From SGA...200334442021-10-09 19:27:11528 days 1 hr ago0x76d930b9daf4199292a87fe84a2df72967fad725 IN  0xb50b67aad53081631137e6823dc86ff28098306e0 MATIC0.0021036630
0x8dae1aedcca68faa13f349160d087f20b4e662118578d3fe18d97fd006c18d40Migrate From SGA...196892792021-09-30 18:23:32537 days 2 hrs ago0x76d930b9daf4199292a87fe84a2df72967fad725 IN  0xb50b67aad53081631137e6823dc86ff28098306e0 MATIC0.00225410970721.178474052
0xa4ea252c2d7c741e33970957e79a6f50a0f57abea7bc7372a50a7842e62ccf490x60e06040196879392021-09-30 17:33:16537 days 3 hrs ago0x6b6bbe41fd3aedd9ff0d52e7668d1f6e5b42258c IN  Create: SGAJtoTAKSHMigrator0 MATIC0.0410434100
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SGAJtoTAKSHMigrator

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 3 : TokenMigration.sol
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.8.0;

import {IERC20} from "./@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {SafeMath} from "./@openzeppelin/contracts/utils/math/SafeMath.sol";

/**
* @title SGAJtoTAKSHMigrator
* @notice This contract implements the migration from SGAJ to TAKSH token
* @author Gajesh 
*/
contract SGAJtoTAKSHMigrator {
    using SafeMath for uint256;

    IERC20 public immutable TAKSH = IERC20(0x80D6180F7AF1E86dfa1241AC363D4dbA82B9CaeC);
    IERC20 public immutable SGAJ = IERC20(0x94c7d657f1c8Be06A4Dc009D2d475Bb559d858cb);
    uint256 public immutable SGAJ_TAKSH_RATIO = 1;
    
    uint256 public _totalSgajMigrated;

    /**
    * @dev emitted on migration
    * @param sender the caller of the migration
    * @param amount the amount being migrated
    */
    event SgajMigrated(address indexed sender, uint256 indexed amount);

    /**
    * @dev executes the migration from SGAJ to TAKSH. Users need to give allowance to this contract to transfer SGAJ before executing
    * this transaction.
    * @param amount the amount of SGAJ to be migrated
    */
    function migrateFromSGAJ(uint256 amount) external {
        _totalSgajMigrated = _totalSgajMigrated.add(amount);
        SGAJ.transferFrom(msg.sender, address(this), amount);
        TAKSH.transfer(msg.sender, amount.div(SGAJ_TAKSH_RATIO));
        emit SgajMigrated(msg.sender, amount);
    }
}

File 2 of 3 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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 `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, 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 `sender` to `recipient` 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 sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @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);
}

File 3 of 3 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"SgajMigrated","type":"event"},{"inputs":[],"name":"SGAJ","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SGAJ_TAKSH_RATIO","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TAKSH","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_totalSgajMigrated","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"migrateFromSGAJ","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60e06040527380d6180f7af1e86dfa1241ac363d4dba82b9caec73ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff1660601b8152507394c7d657f1c8be06a4dc009d2d475bb559d858cb73ffffffffffffffffffffffffffffffffffffffff1660a09073ffffffffffffffffffffffffffffffffffffffff1660601b815250600160c0908152503480156100ac57600080fd5b5060805160601c60a05160601c60c0516106746100f66000396000818160f2015261026f01526000818161011c015261017f015260008181610140015261022f01526106746000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c8063348ca6a21461005c5780633fa991981461007a578063577c6de914610098578063905176f1146100b6578063f49803df146100d4575b600080fd5b6100646100f0565b60405161007191906104a4565b60405180910390f35b610082610114565b60405161008f91906104a4565b60405180910390f35b6100a061011a565b6040516100ad9190610489565b60405180910390f35b6100be61013e565b6040516100cb9190610489565b60405180910390f35b6100ee60048036038101906100e991906103d3565b610162565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b60005481565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b6101778160005461035490919063ffffffff16565b6000819055507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330846040518463ffffffff1660e01b81526004016101da93929190610429565b602060405180830381600087803b1580156101f457600080fd5b505af1158015610208573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061022c91906103aa565b507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb3361029d7f00000000000000000000000000000000000000000000000000000000000000008561036a90919063ffffffff16565b6040518363ffffffff1660e01b81526004016102ba929190610460565b602060405180830381600087803b1580156102d457600080fd5b505af11580156102e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061030c91906103aa565b50803373ffffffffffffffffffffffffffffffffffffffff167f072b9ac098a4a2c70dbdd221a7f85cecfdd07b75d905c941a3f7b5783f7509fe60405160405180910390a350565b6000818361036291906104bf565b905092915050565b600081836103789190610515565b905092915050565b60008151905061038f81610610565b92915050565b6000813590506103a481610627565b92915050565b6000602082840312156103bc57600080fd5b60006103ca84828501610380565b91505092915050565b6000602082840312156103e557600080fd5b60006103f384828501610395565b91505092915050565b61040581610546565b82525050565b6104148161058e565b82525050565b61042381610584565b82525050565b600060608201905061043e60008301866103fc565b61044b60208301856103fc565b610458604083018461041a565b949350505050565b600060408201905061047560008301856103fc565b610482602083018461041a565b9392505050565b600060208201905061049e600083018461040b565b92915050565b60006020820190506104b9600083018461041a565b92915050565b60006104ca82610584565b91506104d583610584565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561050a576105096105b2565b5b828201905092915050565b600061052082610584565b915061052b83610584565b92508261053b5761053a6105e1565b5b828204905092915050565b600061055182610564565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000610599826105a0565b9050919050565b60006105ab82610564565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b61061981610558565b811461062457600080fd5b50565b61063081610584565b811461063b57600080fd5b5056fea264697066735822122042b5e863d72b4e2a209cc382de51dd0ac5905182aeacfc64a8e2cc69254e388564736f6c63430008000033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
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.