More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 7,802 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Deposit | 17989225 | 492 days ago | IN | 0 ETH | 0.00613763 | ||||
Claim | 17955261 | 497 days ago | IN | 0 ETH | 0.00378348 | ||||
Deposit | 17955253 | 497 days ago | IN | 0 ETH | 0.00411489 | ||||
Claim | 17916219 | 502 days ago | IN | 0 ETH | 0.00599512 | ||||
Deposit | 17915915 | 502 days ago | IN | 0 ETH | 0.0062112 | ||||
Claim | 17631739 | 542 days ago | IN | 0 ETH | 0.01441576 | ||||
Deposit | 17631717 | 542 days ago | IN | 0 ETH | 0.01762552 | ||||
Claim | 17566990 | 551 days ago | IN | 0 ETH | 0.00387843 | ||||
Deposit | 17566983 | 551 days ago | IN | 0 ETH | 0.00443721 | ||||
Claim | 17463729 | 565 days ago | IN | 0 ETH | 0.00395926 | ||||
Deposit | 17463723 | 565 days ago | IN | 0 ETH | 0.00464511 | ||||
Claim | 17294418 | 589 days ago | IN | 0 ETH | 0.01804195 | ||||
Deposit | 17294413 | 589 days ago | IN | 0 ETH | 0.0192134 | ||||
Claim | 17046615 | 624 days ago | IN | 0 ETH | 0.00817923 | ||||
Deposit | 17046610 | 624 days ago | IN | 0 ETH | 0.00898301 | ||||
Claim | 17031328 | 627 days ago | IN | 0 ETH | 0.00661941 | ||||
Deposit | 17031307 | 627 days ago | IN | 0 ETH | 0.00620771 | ||||
Claim | 16929909 | 641 days ago | IN | 0 ETH | 0.00627956 | ||||
Deposit | 16929905 | 641 days ago | IN | 0 ETH | 0.00679176 | ||||
Deposit | 16928479 | 641 days ago | IN | 0 ETH | 0.00118229 | ||||
Deposit | 16928476 | 641 days ago | IN | 0 ETH | 0.00801212 | ||||
Deposit | 16730897 | 669 days ago | IN | 0 ETH | 0.00594854 | ||||
Claim | 16724093 | 670 days ago | IN | 0 ETH | 0.00444727 | ||||
Deposit | 16723865 | 670 days ago | IN | 0 ETH | 0.00583609 | ||||
Claim | 16684717 | 675 days ago | IN | 0 ETH | 0.00113318 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
ImpactXPMigration
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 100 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /** * @author Brewlabs * This contract has been developed by brewlabs.info */ import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract ImpactXPMigration is Ownable, ReentrancyGuard { using SafeERC20 for IERC20; uint256 public constant MIGRATION_PRECISION = 10**20; uint256 public constant PERCENT_PRECISION = 10000; IERC20 public oldToken; IERC20 public newToken; uint256 public migrationRate; uint256 public taxOfOldToken = 1100; uint256 public bonusRate = 1000; bytes32 private merkleRoot; uint256 private totalStaked; uint256 private totalClaimed; bool public claimable = false; struct UserInfo { uint256 amount; uint256 claimed; uint256 paidAmount; } mapping(address => UserInfo) public userInfo; event Deposit(address user, uint256 amount); event Claim(address user, uint256 amount); event claimEnabled(); event HarvestOldToken(uint256 amount); event SetMigrationToken(address token); event SetBonusRate(uint256 rate); event SetSnapShot(bytes32 merkleRoot); modifier canClaim() { require(claimable, "cannot claim"); _; } /** * @notice Initialize the contract * @param _oldToken: token address * @param _newToken: reflection token address */ constructor(address _oldToken, address _newToken) { oldToken = IERC20(_oldToken); newToken = IERC20(_newToken); migrationRate = (newToken.totalSupply() * MIGRATION_PRECISION) / oldToken.totalSupply(); } function deposit( uint256 _amount, uint256 _max, bytes32[] memory _merkleProof ) external nonReentrant { require(merkleRoot != "", "Migration not enabled"); // check if total deposits exceed snapshot uint256 prevAmt = (userInfo[msg.sender].amount * PERCENT_PRECISION) / (PERCENT_PRECISION - taxOfOldToken); require(_amount + prevAmt <= _max, "migration amount cannot exceed max"); // Verify the merkle proof. bytes32 leaf = keccak256(abi.encodePacked(msg.sender, _max)); require(MerkleProof.verify(_merkleProof, merkleRoot, leaf), "Invalid merkle proof."); uint256 beforeAmt = oldToken.balanceOf(address(this)); oldToken.safeTransferFrom(msg.sender, address(this), _amount); uint256 afterAmt = oldToken.balanceOf(address(this)); uint256 realAmt = afterAmt - beforeAmt; UserInfo storage user = userInfo[msg.sender]; user.amount += realAmt; totalStaked += realAmt; emit Deposit(msg.sender, realAmt); } function claim() external nonReentrant { UserInfo storage user = userInfo[msg.sender]; require(claimable, "claim not enabled"); require(user.amount - user.claimed > 0, "not available to claim"); uint256 pending = pendingClaim(msg.sender); if (pending > 0) { newToken.safeTransfer(msg.sender, pending); } user.claimed = user.amount; user.paidAmount += pending; totalClaimed += pending; emit Claim(msg.sender, pending); } function pendingClaim(address _user) public view returns (uint256) { UserInfo memory user = userInfo[_user]; uint256 amount = user.amount - user.claimed; uint256 expectedAmt = (amount * (10000 + bonusRate)) / (10000 - taxOfOldToken); return (expectedAmt * migrationRate) / MIGRATION_PRECISION; } function insufficientClaims() external view returns (uint256) { uint256 tokenBal = newToken.balanceOf(address(this)); uint256 expectedAmt = (totalStaked * (10000 + bonusRate)) / (10000 - taxOfOldToken); expectedAmt = (expectedAmt * migrationRate) / MIGRATION_PRECISION - totalClaimed; if (tokenBal > expectedAmt) return 0; return expectedAmt - tokenBal; } function setMigrationToken(address _newToken) external onlyOwner { require(!claimable, "claim was enabled"); require(_newToken != address(0x0) && _newToken != address(newToken), "invalid new token"); require(_newToken != address(oldToken), "cannot set old token address"); newToken = IERC20(_newToken); migrationRate = (newToken.totalSupply() * MIGRATION_PRECISION) / oldToken.totalSupply(); emit SetMigrationToken(_newToken); } function setBonusRate(uint256 _bonus) external onlyOwner { require(!claimable, "claim was enabled"); require(_bonus < PERCENT_PRECISION, "invalid percent"); bonusRate = _bonus; emit SetBonusRate(_bonus); } function setSnapShotMerkleRoot(bytes32 _merkleRoot) external onlyOwner { merkleRoot = _merkleRoot; emit SetSnapShot(_merkleRoot); } function enableClaim() external onlyOwner { require(!claimable, "already enabled"); claimable = true; emit claimEnabled(); } function harvestOldToken() external onlyOwner { uint256 amount = oldToken.balanceOf(address(this)); oldToken.safeTransfer(msg.sender, amount); emit HarvestOldToken(amount); } /** * @notice It allows the admin to recover wrong tokens sent to the contract * @param _token: the address of the token to withdraw * @param _amount: the amount to withdraw, if amount is zero, all tokens will be withdrawn * @dev This function is only callable by admin. */ function rescueTokens(address _token, uint256 _amount) external onlyOwner { if (_token == address(0x0)) { if (_amount > 0) { payable(msg.sender).transfer(_amount); } else { uint256 _tokenAmount = address(this).balance; payable(msg.sender).transfer(_tokenAmount); } } else { if (_amount > 0) { IERC20(_token).safeTransfer(msg.sender, _amount); } else { uint256 _tokenAmount = IERC20(_token).balanceOf(address(this)); IERC20(_token).safeTransfer(msg.sender, _tokenAmount); } } } receive() external payable {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Trees proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merklee tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) computedHash = keccak256(abi.encodePacked(computedHash, proofElement)); } else { // Hash(current element of the proof + current computed hash) computedHash = keccak256(abi.encodePacked(proofElement, computedHash)); } } return computedHash; } }
// 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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol) 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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
{ "optimizer": { "enabled": true, "runs": 100 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_oldToken","type":"address"},{"internalType":"address","name":"_newToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"HarvestOldToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"rate","type":"uint256"}],"name":"SetBonusRate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"}],"name":"SetMigrationToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"name":"SetSnapShot","type":"event"},{"anonymous":false,"inputs":[],"name":"claimEnabled","type":"event"},{"inputs":[],"name":"MIGRATION_PRECISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PERCENT_PRECISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bonusRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_max","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enableClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"harvestOldToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"insufficientClaims","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"migrationRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":[{"internalType":"address","name":"_user","type":"address"}],"name":"pendingClaim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"rescueTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_bonus","type":"uint256"}],"name":"setBonusRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newToken","type":"address"}],"name":"setMigrationToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setSnapShotMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"taxOfOldToken","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":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"claimed","type":"uint256"},{"internalType":"uint256","name":"paidAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405261044c6005556103e8600655600a805460ff191690553480156200002757600080fd5b5060405162001ca238038062001ca28339810160408190526200004a9162000213565b6200005533620001a6565b60018055600280546001600160a01b038085166001600160a01b031992831681179093556003805491851691909216179055604080516318160ddd60e01b815290516318160ddd91600480820192602092909190829003018186803b158015620000be57600080fd5b505afa158015620000d3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000f991906200024a565b600354604080516318160ddd60e01b8152905168056bc75e2d63100000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b1580156200014757600080fd5b505afa1580156200015c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200018291906200024a565b6200018e919062000284565b6200019a919062000263565b60045550620002b09050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146200020e57600080fd5b919050565b6000806040838503121562000226578182fd5b6200023183620001f6565b91506200024160208401620001f6565b90509250929050565b6000602082840312156200025c578081fd5b5051919050565b6000826200027f57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615620002ab57634e487b7160e01b81526011600452602481fd5b500290565b6119e280620002c06000396000f3fe6080604052600436106101395760003560e01c80638544b380116100ab578063b31c710a1161006f578063b31c710a14610345578063c42bd05a14610365578063cc5b977814610385578063e4fcf329146103a5578063f2fde38b146103c5578063ffe8e372146103e557600080fd5b80638544b380146102b15780638da5cb5b146102c65780638f6ee815146102e857806394d9a542146102fe578063af38d7571461031b57600080fd5b80634e71d92d116100fd5780634e71d92d1461021c57806357376198146102315780635af123f414610251578063715018a6146102675780637f1c17851461027c57806384eb77311461029157600080fd5b8063091f4712146101455780630d3cbda71461016e5780630ef4b248146101905780631959a002146101b057806328dae6e31461020757600080fd5b3661014057005b600080fd5b34801561015157600080fd5b5061015b60045481565b6040519081526020015b60405180910390f35b34801561017a57600080fd5b5061018e610189366004611650565b6103fb565b005b34801561019c57600080fd5b5061015b6101ab366004611650565b610686565b3480156101bc57600080fd5b506101ec6101cb366004611650565b600b6020526000908152604090208054600182015460029092015490919083565b60408051938452602084019290925290820152606001610165565b34801561021357600080fd5b5061018e610738565b34801561022857600080fd5b5061018e6107e4565b34801561023d57600080fd5b5061018e61024c36600461166a565b610962565b34801561025d57600080fd5b5061015b60065481565b34801561027357600080fd5b5061018e610abf565b34801561028857600080fd5b5061015b610afa565b34801561029d57600080fd5b5061018e6102ac3660046116e3565b610c0e565b3480156102bd57600080fd5b5061018e610f63565b3480156102d257600080fd5b506102db61105d565b60405161016591906117d4565b3480156102f457600080fd5b5061015b60055481565b34801561030a57600080fd5b5061015b68056bc75e2d6310000081565b34801561032757600080fd5b50600a546103359060ff1681565b6040519015158152602001610165565b34801561035157600080fd5b506002546102db906001600160a01b031681565b34801561037157600080fd5b506003546102db906001600160a01b031681565b34801561039157600080fd5b5061018e6103a03660046116b3565b61106c565b3480156103b157600080fd5b5061018e6103c03660046116b3565b6110d0565b3480156103d157600080fd5b5061018e6103e0366004611650565b61119a565b3480156103f157600080fd5b5061015b61271081565b3361040461105d565b6001600160a01b0316146104335760405162461bcd60e51b815260040161042a9061185f565b60405180910390fd5b600a5460ff16156104565760405162461bcd60e51b815260040161042a90611834565b6001600160a01b0381161580159061047c57506003546001600160a01b03828116911614155b6104bc5760405162461bcd60e51b815260206004820152601160248201527034b73b30b634b2103732bb903a37b5b2b760791b604482015260640161042a565b6002546001600160a01b038281169116141561051a5760405162461bcd60e51b815260206004820152601c60248201527f63616e6e6f7420736574206f6c6420746f6b656e206164647265737300000000604482015260640161042a565b600380546001600160a01b0319166001600160a01b0383811691909117909155600254604080516318160ddd60e01b8152905191909216916318160ddd916004808301926020929190829003018186803b15801561057757600080fd5b505afa15801561058b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105af91906116cb565b600354604080516318160ddd60e01b8152905168056bc75e2d63100000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b1580156105fc57600080fd5b505afa158015610610573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061063491906116cb565b61063e9190611903565b61064891906118e3565b6004556040517f9b862d05c5e02d23a5cb824b573bfa7adfbc1a3494c5ad611f1cc51ee9880d069061067b9083906117d4565b60405180910390a150565b6001600160a01b0381166000908152600b6020908152604080832081516060810183528154808252600183015494820185905260029092015492810192909252909183916106d49190611922565b905060006005546127106106e89190611922565b6006546106f7906127106118cb565b6107019084611903565b61070b91906118e3565b905068056bc75e2d63100000600454826107259190611903565b61072f91906118e3565b95945050505050565b3361074161105d565b6001600160a01b0316146107675760405162461bcd60e51b815260040161042a9061185f565b600a5460ff16156107ac5760405162461bcd60e51b815260206004820152600f60248201526e185b1c9958591e48195b98589b1959608a1b604482015260640161042a565b600a805460ff191660011790556040517f2866ed215053f357fabf1a6d6f70f6eeb400ecd24327253218f8690191e6de5090600090a1565b600260015414156108075760405162461bcd60e51b815260040161042a90611894565b6002600155336000908152600b60205260409020600a5460ff166108615760405162461bcd60e51b815260206004820152601160248201527018db185a5b481b9bdd08195b98589b1959607a1b604482015260640161042a565b6001810154815460009161087491611922565b116108ba5760405162461bcd60e51b81526020600482015260166024820152756e6f7420617661696c61626c6520746f20636c61696d60501b604482015260640161042a565b60006108c533610686565b905080156108e4576003546108e4906001600160a01b0316338361123a565b815460018301556002820180548291906000906109029084906118cb565b92505081905550806009600082825461091b91906118cb565b90915550506040517f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d49061095290339084906117e8565b60405180910390a1505060018055565b3361096b61105d565b6001600160a01b0316146109915760405162461bcd60e51b815260040161042a9061185f565b6001600160a01b038216610a0c5780156109d757604051339082156108fc029083906000818181858888f193505050501580156109d2573d6000803e3d6000fd5b505050565b6040514790339082156108fc029083906000818181858888f19350505050158015610a06573d6000803e3d6000fd5b50505050565b8015610a2a57610a266001600160a01b038316338361123a565b5050565b6040516370a0823160e01b81526000906001600160a01b038416906370a0823190610a599030906004016117d4565b60206040518083038186803b158015610a7157600080fd5b505afa158015610a85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aa991906116cb565b90506109d26001600160a01b038416338361123a565b33610ac861105d565b6001600160a01b031614610aee5760405162461bcd60e51b815260040161042a9061185f565b610af86000611290565b565b6003546040516370a0823160e01b815260009182916001600160a01b03909116906370a0823190610b2f9030906004016117d4565b60206040518083038186803b158015610b4757600080fd5b505afa158015610b5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7f91906116cb565b90506000600554612710610b939190611922565b600654610ba2906127106118cb565b600854610baf9190611903565b610bb991906118e3565b905060095468056bc75e2d6310000060045483610bd69190611903565b610be091906118e3565b610bea9190611922565b905080821115610bfd5760009250505090565b610c078282611922565b9250505090565b60026001541415610c315760405162461bcd60e51b815260040161042a90611894565b6002600155600754610c7d5760405162461bcd60e51b8152602060048201526015602482015274135a59dc985d1a5bdb881b9bdd08195b98589b1959605a1b604482015260640161042a565b6000600554612710610c8f9190611922565b336000908152600b6020526040902054610cac9061271090611903565b610cb691906118e3565b905082610cc382866118cb565b1115610d1c5760405162461bcd60e51b815260206004820152602260248201527f6d6967726174696f6e20616d6f756e742063616e6e6f7420657863656564206d6044820152610c2f60f31b606482015260840161042a565b6040516bffffffffffffffffffffffff193360601b16602082015260348101849052600090605401604051602081830303815290604052805190602001209050610d6983600754836112e0565b610dad5760405162461bcd60e51b815260206004820152601560248201527424b73b30b634b21036b2b935b63290383937b7b31760591b604482015260640161042a565b6002546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610dde9030906004016117d4565b60206040518083038186803b158015610df657600080fd5b505afa158015610e0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2e91906116cb565b600254909150610e49906001600160a01b03163330896112f8565b6002546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610e7a9030906004016117d4565b60206040518083038186803b158015610e9257600080fd5b505afa158015610ea6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eca91906116cb565b90506000610ed88383611922565b336000908152600b6020526040812080549293509183918391610efc9084906118cb565b925050819055508160086000828254610f1591906118cb565b90915550506040517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c90610f4c90339085906117e8565b60405180910390a150506001805550505050505050565b33610f6c61105d565b6001600160a01b031614610f925760405162461bcd60e51b815260040161042a9061185f565b6002546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610fc39030906004016117d4565b60206040518083038186803b158015610fdb57600080fd5b505afa158015610fef573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061101391906116cb565b60025490915061102d906001600160a01b0316338361123a565b6040518181527f648560a7694eab2a990a613221f49c908d693a9f6d3ddfca99dd1af52db8660e9060200161067b565b6000546001600160a01b031690565b3361107561105d565b6001600160a01b03161461109b5760405162461bcd60e51b815260040161042a9061185f565b60078190556040518181527f8912dcb71250e196adbad56d9bf7a8a444ee6449cd6592f67ad2569d363aebf29060200161067b565b336110d961105d565b6001600160a01b0316146110ff5760405162461bcd60e51b815260040161042a9061185f565b600a5460ff16156111225760405162461bcd60e51b815260040161042a90611834565b61271081106111655760405162461bcd60e51b815260206004820152600f60248201526e1a5b9d985b1a59081c195c98d95b9d608a1b604482015260640161042a565b60068190556040518181527ffa9bb8ddbba5a4b3f5218ed49bc724d44fee053c7663ff8ec634ba3ebc75ef269060200161067b565b336111a361105d565b6001600160a01b0316146111c95760405162461bcd60e51b815260040161042a9061185f565b6001600160a01b03811661122e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161042a565b61123781611290565b50565b6109d28363a9059cbb60e01b84846040516024016112599291906117e8565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611330565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000826112ed8584611402565b1490505b9392505050565b6040516001600160a01b0380851660248301528316604482015260648101829052610a069085906323b872dd60e01b90608401611259565b6000611385826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166114bc9092919063ffffffff16565b8051909150156109d257808060200190518101906113a39190611693565b6109d25760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161042a565b600081815b84518110156114b457600085828151811061143257634e487b7160e01b600052603260045260246000fd5b602002602001015190508083116114745760408051602081018590529081018290526060016040516020818303038152906040528051906020012092506114a1565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b50806114ac81611965565b915050611407565b509392505050565b60606114cb84846000856114d3565b949350505050565b6060824710156115345760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161042a565b843b6115825760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161042a565b600080866001600160a01b0316858760405161159e91906117b8565b60006040518083038185875af1925050503d80600081146115db576040519150601f19603f3d011682016040523d82523d6000602084013e6115e0565b606091505b50915091506115f08282866115fb565b979650505050505050565b6060831561160a5750816112f1565b82511561161a5782518084602001fd5b8160405162461bcd60e51b815260040161042a9190611801565b80356001600160a01b038116811461164b57600080fd5b919050565b600060208284031215611661578081fd5b6112f182611634565b6000806040838503121561167c578081fd5b61168583611634565b946020939093013593505050565b6000602082840312156116a4578081fd5b815180151581146112f1578182fd5b6000602082840312156116c4578081fd5b5035919050565b6000602082840312156116dc578081fd5b5051919050565b6000806000606084860312156116f7578081fd5b833592506020808501359250604085013567ffffffffffffffff8082111561171d578384fd5b818701915087601f830112611730578384fd5b81358181111561174257611742611996565b8060051b604051601f19603f8301168101818110858211171561176757611767611996565b604052828152858101935084860182860187018c1015611785578788fd5b8795505b838610156117a7578035855260019590950194938601938601611789565b508096505050505050509250925092565b600082516117ca818460208701611939565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6020815260008251806020840152611820816040850160208701611939565b601f01601f19169190910160400192915050565b60208082526011908201527018db185a5b481dd85cc8195b98589b1959607a1b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b600082198211156118de576118de611980565b500190565b6000826118fe57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561191d5761191d611980565b500290565b60008282101561193457611934611980565b500390565b60005b8381101561195457818101518382015260200161193c565b83811115610a065750506000910152565b600060001982141561197957611979611980565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfea264697066735822122069e1ef35d32b75bcd0faebeef5f8b1f980be6a6ce26e2b6b6498c78832679a9e64736f6c63430008040033000000000000000000000000b12494c8824fc069757f47d177e666c571cd49ae00000000000000000000000054cb643ab007f47882e8120a8c57b639005c2688
Deployed Bytecode
0x6080604052600436106101395760003560e01c80638544b380116100ab578063b31c710a1161006f578063b31c710a14610345578063c42bd05a14610365578063cc5b977814610385578063e4fcf329146103a5578063f2fde38b146103c5578063ffe8e372146103e557600080fd5b80638544b380146102b15780638da5cb5b146102c65780638f6ee815146102e857806394d9a542146102fe578063af38d7571461031b57600080fd5b80634e71d92d116100fd5780634e71d92d1461021c57806357376198146102315780635af123f414610251578063715018a6146102675780637f1c17851461027c57806384eb77311461029157600080fd5b8063091f4712146101455780630d3cbda71461016e5780630ef4b248146101905780631959a002146101b057806328dae6e31461020757600080fd5b3661014057005b600080fd5b34801561015157600080fd5b5061015b60045481565b6040519081526020015b60405180910390f35b34801561017a57600080fd5b5061018e610189366004611650565b6103fb565b005b34801561019c57600080fd5b5061015b6101ab366004611650565b610686565b3480156101bc57600080fd5b506101ec6101cb366004611650565b600b6020526000908152604090208054600182015460029092015490919083565b60408051938452602084019290925290820152606001610165565b34801561021357600080fd5b5061018e610738565b34801561022857600080fd5b5061018e6107e4565b34801561023d57600080fd5b5061018e61024c36600461166a565b610962565b34801561025d57600080fd5b5061015b60065481565b34801561027357600080fd5b5061018e610abf565b34801561028857600080fd5b5061015b610afa565b34801561029d57600080fd5b5061018e6102ac3660046116e3565b610c0e565b3480156102bd57600080fd5b5061018e610f63565b3480156102d257600080fd5b506102db61105d565b60405161016591906117d4565b3480156102f457600080fd5b5061015b60055481565b34801561030a57600080fd5b5061015b68056bc75e2d6310000081565b34801561032757600080fd5b50600a546103359060ff1681565b6040519015158152602001610165565b34801561035157600080fd5b506002546102db906001600160a01b031681565b34801561037157600080fd5b506003546102db906001600160a01b031681565b34801561039157600080fd5b5061018e6103a03660046116b3565b61106c565b3480156103b157600080fd5b5061018e6103c03660046116b3565b6110d0565b3480156103d157600080fd5b5061018e6103e0366004611650565b61119a565b3480156103f157600080fd5b5061015b61271081565b3361040461105d565b6001600160a01b0316146104335760405162461bcd60e51b815260040161042a9061185f565b60405180910390fd5b600a5460ff16156104565760405162461bcd60e51b815260040161042a90611834565b6001600160a01b0381161580159061047c57506003546001600160a01b03828116911614155b6104bc5760405162461bcd60e51b815260206004820152601160248201527034b73b30b634b2103732bb903a37b5b2b760791b604482015260640161042a565b6002546001600160a01b038281169116141561051a5760405162461bcd60e51b815260206004820152601c60248201527f63616e6e6f7420736574206f6c6420746f6b656e206164647265737300000000604482015260640161042a565b600380546001600160a01b0319166001600160a01b0383811691909117909155600254604080516318160ddd60e01b8152905191909216916318160ddd916004808301926020929190829003018186803b15801561057757600080fd5b505afa15801561058b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105af91906116cb565b600354604080516318160ddd60e01b8152905168056bc75e2d63100000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b1580156105fc57600080fd5b505afa158015610610573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061063491906116cb565b61063e9190611903565b61064891906118e3565b6004556040517f9b862d05c5e02d23a5cb824b573bfa7adfbc1a3494c5ad611f1cc51ee9880d069061067b9083906117d4565b60405180910390a150565b6001600160a01b0381166000908152600b6020908152604080832081516060810183528154808252600183015494820185905260029092015492810192909252909183916106d49190611922565b905060006005546127106106e89190611922565b6006546106f7906127106118cb565b6107019084611903565b61070b91906118e3565b905068056bc75e2d63100000600454826107259190611903565b61072f91906118e3565b95945050505050565b3361074161105d565b6001600160a01b0316146107675760405162461bcd60e51b815260040161042a9061185f565b600a5460ff16156107ac5760405162461bcd60e51b815260206004820152600f60248201526e185b1c9958591e48195b98589b1959608a1b604482015260640161042a565b600a805460ff191660011790556040517f2866ed215053f357fabf1a6d6f70f6eeb400ecd24327253218f8690191e6de5090600090a1565b600260015414156108075760405162461bcd60e51b815260040161042a90611894565b6002600155336000908152600b60205260409020600a5460ff166108615760405162461bcd60e51b815260206004820152601160248201527018db185a5b481b9bdd08195b98589b1959607a1b604482015260640161042a565b6001810154815460009161087491611922565b116108ba5760405162461bcd60e51b81526020600482015260166024820152756e6f7420617661696c61626c6520746f20636c61696d60501b604482015260640161042a565b60006108c533610686565b905080156108e4576003546108e4906001600160a01b0316338361123a565b815460018301556002820180548291906000906109029084906118cb565b92505081905550806009600082825461091b91906118cb565b90915550506040517f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d49061095290339084906117e8565b60405180910390a1505060018055565b3361096b61105d565b6001600160a01b0316146109915760405162461bcd60e51b815260040161042a9061185f565b6001600160a01b038216610a0c5780156109d757604051339082156108fc029083906000818181858888f193505050501580156109d2573d6000803e3d6000fd5b505050565b6040514790339082156108fc029083906000818181858888f19350505050158015610a06573d6000803e3d6000fd5b50505050565b8015610a2a57610a266001600160a01b038316338361123a565b5050565b6040516370a0823160e01b81526000906001600160a01b038416906370a0823190610a599030906004016117d4565b60206040518083038186803b158015610a7157600080fd5b505afa158015610a85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aa991906116cb565b90506109d26001600160a01b038416338361123a565b33610ac861105d565b6001600160a01b031614610aee5760405162461bcd60e51b815260040161042a9061185f565b610af86000611290565b565b6003546040516370a0823160e01b815260009182916001600160a01b03909116906370a0823190610b2f9030906004016117d4565b60206040518083038186803b158015610b4757600080fd5b505afa158015610b5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7f91906116cb565b90506000600554612710610b939190611922565b600654610ba2906127106118cb565b600854610baf9190611903565b610bb991906118e3565b905060095468056bc75e2d6310000060045483610bd69190611903565b610be091906118e3565b610bea9190611922565b905080821115610bfd5760009250505090565b610c078282611922565b9250505090565b60026001541415610c315760405162461bcd60e51b815260040161042a90611894565b6002600155600754610c7d5760405162461bcd60e51b8152602060048201526015602482015274135a59dc985d1a5bdb881b9bdd08195b98589b1959605a1b604482015260640161042a565b6000600554612710610c8f9190611922565b336000908152600b6020526040902054610cac9061271090611903565b610cb691906118e3565b905082610cc382866118cb565b1115610d1c5760405162461bcd60e51b815260206004820152602260248201527f6d6967726174696f6e20616d6f756e742063616e6e6f7420657863656564206d6044820152610c2f60f31b606482015260840161042a565b6040516bffffffffffffffffffffffff193360601b16602082015260348101849052600090605401604051602081830303815290604052805190602001209050610d6983600754836112e0565b610dad5760405162461bcd60e51b815260206004820152601560248201527424b73b30b634b21036b2b935b63290383937b7b31760591b604482015260640161042a565b6002546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610dde9030906004016117d4565b60206040518083038186803b158015610df657600080fd5b505afa158015610e0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2e91906116cb565b600254909150610e49906001600160a01b03163330896112f8565b6002546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610e7a9030906004016117d4565b60206040518083038186803b158015610e9257600080fd5b505afa158015610ea6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eca91906116cb565b90506000610ed88383611922565b336000908152600b6020526040812080549293509183918391610efc9084906118cb565b925050819055508160086000828254610f1591906118cb565b90915550506040517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c90610f4c90339085906117e8565b60405180910390a150506001805550505050505050565b33610f6c61105d565b6001600160a01b031614610f925760405162461bcd60e51b815260040161042a9061185f565b6002546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610fc39030906004016117d4565b60206040518083038186803b158015610fdb57600080fd5b505afa158015610fef573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061101391906116cb565b60025490915061102d906001600160a01b0316338361123a565b6040518181527f648560a7694eab2a990a613221f49c908d693a9f6d3ddfca99dd1af52db8660e9060200161067b565b6000546001600160a01b031690565b3361107561105d565b6001600160a01b03161461109b5760405162461bcd60e51b815260040161042a9061185f565b60078190556040518181527f8912dcb71250e196adbad56d9bf7a8a444ee6449cd6592f67ad2569d363aebf29060200161067b565b336110d961105d565b6001600160a01b0316146110ff5760405162461bcd60e51b815260040161042a9061185f565b600a5460ff16156111225760405162461bcd60e51b815260040161042a90611834565b61271081106111655760405162461bcd60e51b815260206004820152600f60248201526e1a5b9d985b1a59081c195c98d95b9d608a1b604482015260640161042a565b60068190556040518181527ffa9bb8ddbba5a4b3f5218ed49bc724d44fee053c7663ff8ec634ba3ebc75ef269060200161067b565b336111a361105d565b6001600160a01b0316146111c95760405162461bcd60e51b815260040161042a9061185f565b6001600160a01b03811661122e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161042a565b61123781611290565b50565b6109d28363a9059cbb60e01b84846040516024016112599291906117e8565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611330565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000826112ed8584611402565b1490505b9392505050565b6040516001600160a01b0380851660248301528316604482015260648101829052610a069085906323b872dd60e01b90608401611259565b6000611385826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166114bc9092919063ffffffff16565b8051909150156109d257808060200190518101906113a39190611693565b6109d25760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161042a565b600081815b84518110156114b457600085828151811061143257634e487b7160e01b600052603260045260246000fd5b602002602001015190508083116114745760408051602081018590529081018290526060016040516020818303038152906040528051906020012092506114a1565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b50806114ac81611965565b915050611407565b509392505050565b60606114cb84846000856114d3565b949350505050565b6060824710156115345760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161042a565b843b6115825760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161042a565b600080866001600160a01b0316858760405161159e91906117b8565b60006040518083038185875af1925050503d80600081146115db576040519150601f19603f3d011682016040523d82523d6000602084013e6115e0565b606091505b50915091506115f08282866115fb565b979650505050505050565b6060831561160a5750816112f1565b82511561161a5782518084602001fd5b8160405162461bcd60e51b815260040161042a9190611801565b80356001600160a01b038116811461164b57600080fd5b919050565b600060208284031215611661578081fd5b6112f182611634565b6000806040838503121561167c578081fd5b61168583611634565b946020939093013593505050565b6000602082840312156116a4578081fd5b815180151581146112f1578182fd5b6000602082840312156116c4578081fd5b5035919050565b6000602082840312156116dc578081fd5b5051919050565b6000806000606084860312156116f7578081fd5b833592506020808501359250604085013567ffffffffffffffff8082111561171d578384fd5b818701915087601f830112611730578384fd5b81358181111561174257611742611996565b8060051b604051601f19603f8301168101818110858211171561176757611767611996565b604052828152858101935084860182860187018c1015611785578788fd5b8795505b838610156117a7578035855260019590950194938601938601611789565b508096505050505050509250925092565b600082516117ca818460208701611939565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6020815260008251806020840152611820816040850160208701611939565b601f01601f19169190910160400192915050565b60208082526011908201527018db185a5b481dd85cc8195b98589b1959607a1b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b600082198211156118de576118de611980565b500190565b6000826118fe57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561191d5761191d611980565b500290565b60008282101561193457611934611980565b500390565b60005b8381101561195457818101518382015260200161193c565b83811115610a065750506000910152565b600060001982141561197957611979611980565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfea264697066735822122069e1ef35d32b75bcd0faebeef5f8b1f980be6a6ce26e2b6b6498c78832679a9e64736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000b12494c8824fc069757f47d177e666c571cd49ae00000000000000000000000054cb643ab007f47882e8120a8c57b639005c2688
-----Decoded View---------------
Arg [0] : _oldToken (address): 0xb12494C8824fc069757F47d177E666c571Cd49aE
Arg [1] : _newToken (address): 0x54Cb643ab007f47882E8120A8c57B639005c2688
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000b12494c8824fc069757f47d177e666c571cd49ae
Arg [1] : 00000000000000000000000054cb643ab007f47882e8120a8c57b639005c2688
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 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.