More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 578 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Migrate | 19019565 | 407 days ago | IN | 0 ETH | 0.00509289 | ||||
Migrate | 19018447 | 407 days ago | IN | 0 ETH | 0.0045838 | ||||
Migrate | 19015100 | 408 days ago | IN | 0 ETH | 0.0035345 | ||||
Migrate | 19014830 | 408 days ago | IN | 0 ETH | 0.00381577 | ||||
Migrate | 19009597 | 408 days ago | IN | 0 ETH | 0.00310922 | ||||
Migrate | 19000951 | 410 days ago | IN | 0 ETH | 0.00271212 | ||||
Migrate | 18998550 | 410 days ago | IN | 0 ETH | 0.00332796 | ||||
Migrate | 18998472 | 410 days ago | IN | 0 ETH | 0.00446752 | ||||
Migrate | 18998222 | 410 days ago | IN | 0 ETH | 0.00298495 | ||||
Migrate | 18991253 | 411 days ago | IN | 0 ETH | 0.00511261 | ||||
Migrate | 18991187 | 411 days ago | IN | 0 ETH | 0.00438228 | ||||
Migrate | 18990999 | 411 days ago | IN | 0 ETH | 0.00454781 | ||||
Migrate | 18990659 | 411 days ago | IN | 0 ETH | 0.00354217 | ||||
Migrate | 18989824 | 411 days ago | IN | 0 ETH | 0.00356631 | ||||
Migrate | 18989478 | 411 days ago | IN | 0 ETH | 0.00300654 | ||||
Migrate | 18981205 | 412 days ago | IN | 0 ETH | 0.00579053 | ||||
Migrate | 18981200 | 412 days ago | IN | 0 ETH | 0.00526158 | ||||
Migrate | 18980535 | 412 days ago | IN | 0 ETH | 0.00679092 | ||||
Migrate | 18972876 | 414 days ago | IN | 0 ETH | 0.00347163 | ||||
Migrate | 18967955 | 414 days ago | IN | 0 ETH | 0.00247916 | ||||
Migrate | 18956128 | 416 days ago | IN | 0 ETH | 0.00620138 | ||||
Migrate | 18955566 | 416 days ago | IN | 0 ETH | 0.00541331 | ||||
Migrate | 18946285 | 417 days ago | IN | 0 ETH | 0.00205457 | ||||
Migrate | 18945099 | 417 days ago | IN | 0 ETH | 0.00195225 | ||||
Migrate | 18943929 | 418 days ago | IN | 0 ETH | 0.00283222 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
MigrateHelper
Compiler Version
v0.8.21+commit.d9974bed
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.20; import "@openzeppelin/contracts/access/Ownable.sol"; interface IERC20 { function mint(address user, uint256 amount) external returns(bool); function burn(address user, uint256 amount) external returns(bool); function transferFrom(address from, address to, uint256 amount) external returns (bool); } contract MigrateHelper is Ownable { IERC20 public immutable esLBR; IERC20 public immutable LBR; IERC20 public immutable oldLBR; uint256 public deadline; uint256 public totalAmount = 2_065_967 * 1e18; event Migrate(address indexed user, uint256 oldTokenAmount, uint256 esLBRAmount, uint256 time); constructor(address _esLBR, address _LBR, address _oldLBR, uint256 _deadline) Ownable(msg.sender) { esLBR = IERC20(_esLBR); LBR = IERC20(_LBR); oldLBR = IERC20(_oldLBR); deadline = _deadline; } function migrate(uint256 amount) external { require(block.timestamp <= deadline && totalAmount >= amount); oldLBR.transferFrom(msg.sender, address(this), amount); uint256 realAmount = amount * 970 / 1000; esLBR.mint(msg.sender, realAmount); LBR.mint(owner(), amount * 30 / 1000); totalAmount -= amount; emit Migrate(msg.sender, amount, realAmount, block.timestamp); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../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. * * The initial owner is set to the address provided by the deployer. 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; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @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 { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @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 { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol) pragma solidity ^0.8.20; /** * @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; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_esLBR","type":"address"},{"internalType":"address","name":"_LBR","type":"address"},{"internalType":"address","name":"_oldLBR","type":"address"},{"internalType":"uint256","name":"_deadline","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"oldTokenAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"esLBRAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","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"},{"inputs":[],"name":"LBR","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deadline","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"esLBR","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"migrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"oldLBR","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":[],"name":"totalAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60e06040526a01b57c4ba4d9b6135c000060025534801561001e575f80fd5b5060405161074e38038061074e83398101604081905261003d916100f8565b338061006257604051631e4fbdf760e01b81525f600482015260240160405180910390fd5b61006b8161008e565b506001600160a01b0393841660805291831660a05290911660c052600155610140565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146100f3575f80fd5b919050565b5f805f806080858703121561010b575f80fd5b610114856100dd565b9350610122602086016100dd565b9250610130604086016100dd565b6060959095015193969295505050565b60805160a05160c0516105d061017e5f395f818160d301526101c401525f818161011a01526102e501525f8181610151015261027001526105d05ff3fe608060405234801561000f575f80fd5b5060043610610090575f3560e01c8063715018a611610063578063715018a61461010d5780638afe540c146101155780638da5cb5b1461013c578063973087531461014c578063f2fde38b14610173575f80fd5b80631a39d8ef1461009457806329dcb0cf146100b0578063454b0608146100b95780635fa396a7146100ce575b5f80fd5b61009d60025481565b6040519081526020015b60405180910390f35b61009d60015481565b6100cc6100c73660046104d4565b610186565b005b6100f57f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100a7565b6100cc610404565b6100f57f000000000000000000000000000000000000000000000000000000000000000081565b5f546001600160a01b03166100f5565b6100f57f000000000000000000000000000000000000000000000000000000000000000081565b6100cc6101813660046104eb565b610417565b600154421115801561019a57508060025410155b6101a2575f80fd5b6040516323b872dd60e01b8152336004820152306024820152604481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303815f875af1158015610212573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102369190610518565b505f6103e8610247836103ca61054b565b6102519190610568565b6040516340c10f1960e01b8152336004820152602481018290529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906340c10f19906044016020604051808303815f875af11580156102be573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102e29190610518565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166340c10f196103235f546001600160a01b031690565b6103e861033186601e61054b565b61033b9190610568565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303815f875af1158015610383573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103a79190610518565b508160025f8282546103b99190610587565b909155505060408051838152602081018390524281830152905133917fc47a839c70aa320457c80c5abd38ce8b516c72e37be119b7962f67f1f8eb7ac2919081900360600190a25050565b61040c610459565b6104155f610485565b565b61041f610459565b6001600160a01b03811661044d57604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b61045681610485565b50565b5f546001600160a01b031633146104155760405163118cdaa760e01b8152336004820152602401610444565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f602082840312156104e4575f80fd5b5035919050565b5f602082840312156104fb575f80fd5b81356001600160a01b0381168114610511575f80fd5b9392505050565b5f60208284031215610528575f80fd5b81518015158114610511575f80fd5b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761056257610562610537565b92915050565b5f8261058257634e487b7160e01b5f52601260045260245ffd5b500490565b818103818111156105625761056261053756fea2646970667358221220fb42e67ce3afd9c19355d8302402e57b2eb5b167c457270f47eba5f0a935357064736f6c6343000815003300000000000000000000000073b1988a3336208e55275c52fac7f5d3a7dfb89f000000000000000000000000ed1167b6dc64e8a366db86f2e952a482d0981ebd000000000000000000000000f1182229b71e79e504b1d2bf076c15a277311e050000000000000000000000000000000000000000000000000000000065a67dd0
Deployed Bytecode
0x608060405234801561000f575f80fd5b5060043610610090575f3560e01c8063715018a611610063578063715018a61461010d5780638afe540c146101155780638da5cb5b1461013c578063973087531461014c578063f2fde38b14610173575f80fd5b80631a39d8ef1461009457806329dcb0cf146100b0578063454b0608146100b95780635fa396a7146100ce575b5f80fd5b61009d60025481565b6040519081526020015b60405180910390f35b61009d60015481565b6100cc6100c73660046104d4565b610186565b005b6100f57f000000000000000000000000f1182229b71e79e504b1d2bf076c15a277311e0581565b6040516001600160a01b0390911681526020016100a7565b6100cc610404565b6100f57f000000000000000000000000ed1167b6dc64e8a366db86f2e952a482d0981ebd81565b5f546001600160a01b03166100f5565b6100f57f00000000000000000000000073b1988a3336208e55275c52fac7f5d3a7dfb89f81565b6100cc6101813660046104eb565b610417565b600154421115801561019a57508060025410155b6101a2575f80fd5b6040516323b872dd60e01b8152336004820152306024820152604481018290527f000000000000000000000000f1182229b71e79e504b1d2bf076c15a277311e056001600160a01b0316906323b872dd906064016020604051808303815f875af1158015610212573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102369190610518565b505f6103e8610247836103ca61054b565b6102519190610568565b6040516340c10f1960e01b8152336004820152602481018290529091507f00000000000000000000000073b1988a3336208e55275c52fac7f5d3a7dfb89f6001600160a01b0316906340c10f19906044016020604051808303815f875af11580156102be573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102e29190610518565b507f000000000000000000000000ed1167b6dc64e8a366db86f2e952a482d0981ebd6001600160a01b03166340c10f196103235f546001600160a01b031690565b6103e861033186601e61054b565b61033b9190610568565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303815f875af1158015610383573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103a79190610518565b508160025f8282546103b99190610587565b909155505060408051838152602081018390524281830152905133917fc47a839c70aa320457c80c5abd38ce8b516c72e37be119b7962f67f1f8eb7ac2919081900360600190a25050565b61040c610459565b6104155f610485565b565b61041f610459565b6001600160a01b03811661044d57604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b61045681610485565b50565b5f546001600160a01b031633146104155760405163118cdaa760e01b8152336004820152602401610444565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f602082840312156104e4575f80fd5b5035919050565b5f602082840312156104fb575f80fd5b81356001600160a01b0381168114610511575f80fd5b9392505050565b5f60208284031215610528575f80fd5b81518015158114610511575f80fd5b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761056257610562610537565b92915050565b5f8261058257634e487b7160e01b5f52601260045260245ffd5b500490565b818103818111156105625761056261053756fea2646970667358221220fb42e67ce3afd9c19355d8302402e57b2eb5b167c457270f47eba5f0a935357064736f6c63430008150033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000073b1988a3336208e55275c52fac7f5d3a7dfb89f000000000000000000000000ed1167b6dc64e8a366db86f2e952a482d0981ebd000000000000000000000000f1182229b71e79e504b1d2bf076c15a277311e050000000000000000000000000000000000000000000000000000000065a67dd0
-----Decoded View---------------
Arg [0] : _esLBR (address): 0x73b1988a3336208e55275C52faC7F5d3A7DFb89f
Arg [1] : _LBR (address): 0xed1167b6Dc64E8a366DB86F2E952A482D0981ebd
Arg [2] : _oldLBR (address): 0xF1182229B71E79E504b1d2bF076C15a277311e05
Arg [3] : _deadline (uint256): 1705410000
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 00000000000000000000000073b1988a3336208e55275c52fac7f5d3a7dfb89f
Arg [1] : 000000000000000000000000ed1167b6dc64e8a366db86f2e952a482d0981ebd
Arg [2] : 000000000000000000000000f1182229b71e79e504b1d2bf076c15a277311e05
Arg [3] : 0000000000000000000000000000000000000000000000000000000065a67dd0
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.