ETH Price: $3,716.47 (-0.44%)
Gas: 15 Gwei

Contract

0x8fB4223b7751243Ae14987D6fc9E71d06AaF6ddf
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
0x88d2d2318322972763476d6de87e935eb73f675af660abcd7347a652ca6bda0eMigrate(pending)2024-05-19 4:28:414 days ago1716092921IN
0x8fB4223b...06AaF6ddf
0 ETH(Pending)(Pending)
Migrate199335192024-05-23 15:36:352 hrs ago1716478595IN
0x8fB4223b...06AaF6ddf
0 ETH0.0026394718.63077336
Migrate199254762024-05-22 12:39:4729 hrs ago1716381587IN
0x8fB4223b...06AaF6ddf
0 ETH0.0015188410.72261108
Migrate199252862024-05-22 12:01:1130 hrs ago1716379271IN
0x8fB4223b...06AaF6ddf
0 ETH0.0015187810.72214934
Migrate199210262024-05-21 21:40:1144 hrs ago1716327611IN
0x8fB4223b...06AaF6ddf
0 ETH0.00119818.45683874
Migrate199184012024-05-21 12:52:112 days ago1716295931IN
0x8fB4223b...06AaF6ddf
0 ETH0.0026898118.98604814
Migrate199174452024-05-21 9:39:352 days ago1716284375IN
0x8fB4223b...06AaF6ddf
0 ETH0.000987057.92351669
Migrate199172732024-05-21 9:05:112 days ago1716282311IN
0x8fB4223b...06AaF6ddf
0 ETH0.001186918.37787693
Migrate199145162024-05-20 23:50:112 days ago1716249011IN
0x8fB4223b...06AaF6ddf
0 ETH0.0023302816.44836086
Migrate199120862024-05-20 15:39:113 days ago1716219551IN
0x8fB4223b...06AaF6ddf
0 ETH0.0020567814.51786239
Migrate199119682024-05-20 15:15:353 days ago1716218135IN
0x8fB4223b...06AaF6ddf
0 ETH0.0015297610.79783663
Migrate199118802024-05-20 14:57:473 days ago1716217067IN
0x8fB4223b...06AaF6ddf
0 ETH0.0015330912.30683359
Migrate199077492024-05-20 1:06:353 days ago1716167195IN
0x8fB4223b...06AaF6ddf
0 ETH0.000382292.69841581
Migrate199062992024-05-19 20:14:353 days ago1716149675IN
0x8fB4223b...06AaF6ddf
0 ETH0.000394492.78433056
Migrate199041972024-05-19 13:11:354 days ago1716124295IN
0x8fB4223b...06AaF6ddf
0 ETH0.000438473.52051346
Migrate199033952024-05-19 10:29:474 days ago1716114587IN
0x8fB4223b...06AaF6ddf
0 ETH0.000722245.09795832
Migrate199033842024-05-19 10:27:354 days ago1716114455IN
0x8fB4223b...06AaF6ddf
0 ETH0.000410012.89407982
Migrate199019232024-05-19 5:33:114 days ago1716096791IN
0x8fB4223b...06AaF6ddf
0 ETH0.000104263.5042648
Migrate199019222024-05-19 5:32:594 days ago1716096779IN
0x8fB4223b...06AaF6ddf
0 ETH0.000100133.36557771
Migrate199019222024-05-19 5:32:594 days ago1716096779IN
0x8fB4223b...06AaF6ddf
0 ETH0.000476813.36557771
Migrate199016142024-05-19 4:30:594 days ago1716093059IN
0x8fB4223b...06AaF6ddf
0 ETH0.000495773.5
Migrate198972622024-05-18 13:55:355 days ago1716040535IN
0x8fB4223b...06AaF6ddf
0 ETH0.000498083.5157196
Migrate198969912024-05-18 13:01:115 days ago1716037271IN
0x8fB4223b...06AaF6ddf
0 ETH0.000495743.49925205
Migrate198935962024-05-18 1:35:475 days ago1715996147IN
0x8fB4223b...06AaF6ddf
0 ETH0.00010793.62685434
Migrate198935962024-05-18 1:35:475 days ago1715996147IN
0x8fB4223b...06AaF6ddf
0 ETH0.00010793.62685434
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Migrator

Compiler Version
v0.8.6+commit.11564f7e

Optimization Enabled:
Yes with 800 runs

Other Settings:
default evmVersion
File 1 of 4 : Migrator.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.6;

import "./interfaces/IBeamToken.sol";

contract Migrator {

    IBeamToken public immutable source;
    IBeamToken public immutable destination;
    uint256 public immutable migrationRate;
    uint256 public constant DECIMAL_PRECISION = 1e18;

    event Migrated(address indexed migrant, uint256 indexed destinationAmount);

    constructor(address _source, address _destination, uint256 _migrationRate) {
        require(address(_source) != address(0), "Source cannot be zero address");
        require(address(_destination) != address(0), "Destination cannot be zero address");
        require(_migrationRate > 0, "Migration rate cannot be zero");
        source = IBeamToken(_source);
        destination = IBeamToken(_destination);
        migrationRate = _migrationRate;
    }

    function migrate(uint256 _sourceAmount) external {
        uint256 destinationAmount = _sourceAmount * migrationRate / DECIMAL_PRECISION;
        source.burn(msg.sender, _sourceAmount);
        destination.mint(msg.sender, destinationAmount);
        emit Migrated(msg.sender, destinationAmount);
    }
}

File 3 of 4 : IBeamToken.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.6;

import "@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IBeamToken is IERC20, IERC20Permit {
    function mint(address _to, uint256 _amount) external;
    function burn(address _from, uint256 _amount) external;
}

File 4 of 4 : draft-IERC20Permit.sol
// SPDX-License-Identifier: MIT

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 5 of 4 : 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);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_source","type":"address"},{"internalType":"address","name":"_destination","type":"address"},{"internalType":"uint256","name":"_migrationRate","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"migrant","type":"address"},{"indexed":true,"internalType":"uint256","name":"destinationAmount","type":"uint256"}],"name":"Migrated","type":"event"},{"inputs":[],"name":"DECIMAL_PRECISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"destination","outputs":[{"internalType":"contract IBeamToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_sourceAmount","type":"uint256"}],"name":"migrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"migrationRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"source","outputs":[{"internalType":"contract IBeamToken","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60e060405234801561001057600080fd5b5060405161053d38038061053d83398101604081905261002f9161017a565b6001600160a01b03831661008a5760405162461bcd60e51b815260206004820152601d60248201527f536f757263652063616e6e6f74206265207a65726f206164647265737300000060448201526064015b60405180910390fd5b6001600160a01b0382166100eb5760405162461bcd60e51b815260206004820152602260248201527f44657374696e6174696f6e2063616e6e6f74206265207a65726f206164647265604482015261737360f01b6064820152608401610081565b6000811161013b5760405162461bcd60e51b815260206004820152601d60248201527f4d6967726174696f6e20726174652063616e6e6f74206265207a65726f0000006044820152606401610081565b6001600160601b0319606093841b81166080529190921b1660a05260c0526101b6565b80516001600160a01b038116811461017557600080fd5b919050565b60008060006060848603121561018f57600080fd5b6101988461015e565b92506101a66020850161015e565b9150604084015190509250925092565b60805160601c60a05160601c60c05161033f6101fe600039600081816071015261014d01526000818161011b015261022601526000818160c0015261019b015261033f6000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c806367e828bf1161005057806367e828bf146100bb578063a20baee614610107578063b269681d1461011657600080fd5b8063091f47121461006c578063454b0608146100a6575b600080fd5b6100937f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b6100b96100b43660046102ca565b61013d565b005b6100e27f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161009d565b610093670de0b6b3a764000081565b6100e27f000000000000000000000000000000000000000000000000000000000000000081565b6000670de0b6b3a76400006101727f000000000000000000000000000000000000000000000000000000000000000084610305565b61017c91906102e3565b604051632770a7eb60e21b8152336004820152602481018490529091507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690639dc29fac90604401600060405180830381600087803b1580156101f457600080fd5b505af1158015610208573d6000803e3d6000fd5b50506040516340c10f1960e01b8152336004820152602481018490527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1692506340c10f199150604401600060405180830381600087803b15801561028157600080fd5b505af1158015610295573d6000803e3d6000fd5b50506040518392503391507f8b80bd19aea7b735bc6d75db8d6adbe18b28c30d62b3555245eb67b2340caedc90600090a35050565b6000602082840312156102dc57600080fd5b5035919050565b60008261030057634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561032d57634e487b7160e01b600052601160045260246000fd5b50029056fea164736f6c6343000806000a000000000000000000000000949d48eca67b17269629c7194f4b727d4ef9e5d600000000000000000000000062d0a8458ed7719fdaf978fe5929c6d342b0bfce0000000000000000000000000000000000000000000000056bc75e2d63100000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100675760003560e01c806367e828bf1161005057806367e828bf146100bb578063a20baee614610107578063b269681d1461011657600080fd5b8063091f47121461006c578063454b0608146100a6575b600080fd5b6100937f0000000000000000000000000000000000000000000000056bc75e2d6310000081565b6040519081526020015b60405180910390f35b6100b96100b43660046102ca565b61013d565b005b6100e27f000000000000000000000000949d48eca67b17269629c7194f4b727d4ef9e5d681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161009d565b610093670de0b6b3a764000081565b6100e27f00000000000000000000000062d0a8458ed7719fdaf978fe5929c6d342b0bfce81565b6000670de0b6b3a76400006101727f0000000000000000000000000000000000000000000000056bc75e2d6310000084610305565b61017c91906102e3565b604051632770a7eb60e21b8152336004820152602481018490529091507f000000000000000000000000949d48eca67b17269629c7194f4b727d4ef9e5d673ffffffffffffffffffffffffffffffffffffffff1690639dc29fac90604401600060405180830381600087803b1580156101f457600080fd5b505af1158015610208573d6000803e3d6000fd5b50506040516340c10f1960e01b8152336004820152602481018490527f00000000000000000000000062d0a8458ed7719fdaf978fe5929c6d342b0bfce73ffffffffffffffffffffffffffffffffffffffff1692506340c10f199150604401600060405180830381600087803b15801561028157600080fd5b505af1158015610295573d6000803e3d6000fd5b50506040518392503391507f8b80bd19aea7b735bc6d75db8d6adbe18b28c30d62b3555245eb67b2340caedc90600090a35050565b6000602082840312156102dc57600080fd5b5035919050565b60008261030057634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561032d57634e487b7160e01b600052601160045260246000fd5b50029056fea164736f6c6343000806000a

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

000000000000000000000000949d48eca67b17269629c7194f4b727d4ef9e5d600000000000000000000000062d0a8458ed7719fdaf978fe5929c6d342b0bfce0000000000000000000000000000000000000000000000056bc75e2d63100000

-----Decoded View---------------
Arg [0] : _source (address): 0x949D48EcA67b17269629c7194F4b727d4Ef9E5d6
Arg [1] : _destination (address): 0x62D0A8458eD7719FDAF978fe5929C6D342B0bFcE
Arg [2] : _migrationRate (uint256): 100000000000000000000

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000949d48eca67b17269629c7194f4b727d4ef9e5d6
Arg [1] : 00000000000000000000000062d0a8458ed7719fdaf978fe5929c6d342b0bfce
Arg [2] : 0000000000000000000000000000000000000000000000056bc75e2d63100000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.