Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Initialize | 13500319 | 1267 days ago | IN | 0 ETH | 0.01904937 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
XTKManagementStakingModule
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 800 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol"; /** * @title XTKManagementStakingModule * @author xToken * */ contract XTKManagementStakingModule is Initializable, ERC20Upgradeable, OwnableUpgradeable { using SafeERC20 for IERC20; /* ============ State Variables ============ */ // Address of xtk token address public constant xtk = 0x7F3EDcdD180Dbe4819Bd98FeE8929b5cEdB3AdEB; // Unstake penalty percentage between 0 and 10% uint256 public unstakePenalty; bool public transferable; uint256 private constant DEC_18 = 1e18; uint256 private constant INITIAL_SUPPLY_MULTIPLIER = 10; /* ============ Events ============ */ event SetUnstakePenalty(uint256 indexed timestamp, uint256 unstakePenalty); event Stake(address indexed sender, uint256 xtkAmount, uint256 xxtkAmount); event UnStake(address indexed receiver, uint256 xxtkAmount, uint256 xtkAmount); /* ============ Functions ============ */ function initialize() external initializer { __Ownable_init(); __ERC20_init_unchained("xXTK-Mgmt", "xXTKa"); transferable = true; } /** * @dev See {ERC20-_beforeTokenTransfer}. * Check if transferable */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual override { super._beforeTokenTransfer(from, to, amount); require(transferable, "token not transferable"); } /** * Governance function that allow/disallow xXTK token transfer */ function setTransferable(bool _transferable) external onlyOwner { require(transferable != _transferable, "Same value"); transferable = _transferable; } /** * Governance function that updates the unstake penalty percentage * @notice penalty == 1e18 means penalty is 0 * @notice penalty to be between 0 and 10% * * @param _unstakePenalty Unstake penalty percentage */ function setUnstakePenalty(uint256 _unstakePenalty) external onlyOwner { require(_unstakePenalty < DEC_18 && _unstakePenalty >= 9e17, "Penalty outside range"); unstakePenalty = _unstakePenalty; emit SetUnstakePenalty(block.timestamp, _unstakePenalty); } /** * Receive xtk token from user and mint propertional Xxtk to the user * @param _xtkAmount xtk token amount to stake */ function stake(uint256 _xtkAmount) external { require(_xtkAmount > 0, "Cannot stake 0"); uint256 mintAmount = calculateXxtkAmountToMint(_xtkAmount); IERC20(xtk).safeTransferFrom(msg.sender, address(this), _xtkAmount); _mint(msg.sender, mintAmount); emit Stake(msg.sender, _xtkAmount, mintAmount); } /** * Burn Xxtk token from user and send propertional xtk token * @dev possible reentrance? * @param _xxtkAmount Xxtk token amount to burn */ function unstake(uint256 _xxtkAmount) external { uint256 xtkWithoutPenalty = calculateProRataXtk(_xxtkAmount); uint256 xtkToDistribute = calculateXtkToDistributeOnUnstake(xtkWithoutPenalty); _burn(msg.sender, _xxtkAmount); IERC20(xtk).safeTransfer(msg.sender, xtkToDistribute); emit UnStake(msg.sender, _xxtkAmount, xtkToDistribute); } function calculateXxtkAmountToMint(uint256 xtkAmount) public view returns (uint256) { uint256 totalSupply = totalSupply(); if (totalSupply == 0) return xtkAmount * INITIAL_SUPPLY_MULTIPLIER; uint256 xtkBalance = IERC20(xtk).balanceOf(address(this)); return (xtkAmount * totalSupply) / xtkBalance; } function calculateProRataXtk(uint256 xxtkAmount) public view returns (uint256) { uint256 xtkBalance = IERC20(xtk).balanceOf(address(this)); return (xxtkAmount * xtkBalance) / totalSupply(); } function calculateXtkToDistributeOnUnstake(uint256 proRataXtk) public view returns (uint256) { return (proRataXtk * unstakePenalty) / DEC_18; } }
// 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); }
// SPDX-License-Identifier: MIT 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' // solhint-disable-next-line max-line-length 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 // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal initializer { __Context_init_unchained(); __Ownable_init_unchained(); } function __Ownable_init_unchained() internal initializer { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), 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 { emit OwnershipTransferred(_owner, address(0)); _owner = 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"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // solhint-disable-next-line compiler-version pragma solidity ^0.8.0; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC20Upgradeable.sol"; import "./extensions/IERC20MetadataUpgradeable.sol"; import "../../utils/ContextUpgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The defaut value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ function __ERC20_init(string memory name_, string memory symbol_) internal initializer { __Context_init_unchained(); __ERC20_init_unchained(name_, symbol_); } function __ERC20_init_unchained(string memory name_, string memory symbol_) internal initializer { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); _approve(sender, _msgSender(), currentAllowance - amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); _approve(_msgSender(), spender, currentAllowance - subtractedValue); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); _balances[sender] = senderBalance - amount; _balances[recipient] += amount; emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); _balances[account] = accountBalance - amount; _totalSupply -= amount; emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } uint256[45] private __gap; }
// SPDX-License-Identifier: MIT 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; // solhint-disable-next-line no-inline-assembly 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"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (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"); // solhint-disable-next-line avoid-low-level-calls (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"); // solhint-disable-next-line avoid-low-level-calls (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"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /* * @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 ContextUpgradeable is Initializable { function __Context_init() internal initializer { __Context_init_unchained(); } function __Context_init_unchained() internal initializer { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @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 pragma solidity ^0.8.0; import "../IERC20Upgradeable.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20MetadataUpgradeable is IERC20Upgradeable { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
{ "metadata": { "bytecodeHash": "none" }, "optimizer": { "enabled": true, "runs": 800 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"unstakePenalty","type":"uint256"}],"name":"SetUnstakePenalty","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"xtkAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"xxtkAmount","type":"uint256"}],"name":"Stake","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"xxtkAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"xtkAmount","type":"uint256"}],"name":"UnStake","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"xxtkAmount","type":"uint256"}],"name":"calculateProRataXtk","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"proRataXtk","type":"uint256"}],"name":"calculateXtkToDistributeOnUnstake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"xtkAmount","type":"uint256"}],"name":"calculateXxtkAmountToMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_transferable","type":"bool"}],"name":"setTransferable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_unstakePenalty","type":"uint256"}],"name":"setUnstakePenalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_xtkAmount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"transferable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_xxtkAmount","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unstakePenalty","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"xtk","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50611d17806100206000396000f3fe608060405234801561001057600080fd5b50600436106101a35760003560e01c8063715018a6116100ee5780639cd2370711610097578063a9059cbb11610071578063a9059cbb14610352578063af0a61c314610365578063dd62ed3e14610378578063f2fde38b146103b157600080fd5b80639cd2370714610319578063a457c2d71461032c578063a694fc3a1461033f57600080fd5b806392ff0d31116100c857806392ff0d31146102fb578063942bcdef1461030857806395d89b411461031157600080fd5b8063715018a6146102da5780638129fc1c146102e25780638da5cb5b146102ea57600080fd5b80632e17de7811610150578063395093511161012a578063395093511461028b57806359934a7d1461029e57806370a08231146102b157600080fd5b80632e17de7814610234578063313ce5671461024957806338bd2b341461025857600080fd5b80631c8d6c9f116101815780631c8d6c9f146101fb57806323b872dd1461020e5780632c1730971461022157600080fd5b806306fdde03146101a8578063095ea7b3146101c657806318160ddd146101e9575b600080fd5b6101b06103c4565b6040516101bd9190611bde565b60405180910390f35b6101d96101d4366004611b31565b610456565b60405190151581526020016101bd565b6035545b6040519081526020016101bd565b6101ed610209366004611b92565b61046c565b6101d961021c366004611af6565b610535565b6101ed61022f366004611b92565b610600565b610247610242366004611b92565b610629565b005b604051601281526020016101bd565b610273737f3edcdd180dbe4819bd98fee8929b5cedb3adeb81565b6040516001600160a01b0390911681526020016101bd565b6101d9610299366004611b31565b6106ac565b6101ed6102ac366004611b92565b6106e3565b6101ed6102bf366004611aaa565b6001600160a01b031660009081526033602052604090205490565b610247610789565b61024761083a565b6065546001600160a01b0316610273565b6098546101d99060ff1681565b6101ed60975481565b6101b0610976565b610247610327366004611b5a565b610985565b6101d961033a366004611b31565b610a4b565b61024761034d366004611b92565b610afe565b6101d9610360366004611b31565b610bc4565b610247610373366004611b92565b610bd1565b6101ed610386366004611ac4565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b6102476103bf366004611aaa565b610cd3565b6060603680546103d390611cab565b80601f01602080910402602001604051908101604052809291908181526020018280546103ff90611cab565b801561044c5780601f106104215761010080835404028352916020019161044c565b820191906000526020600020905b81548152906001019060200180831161042f57829003601f168201915b5050505050905090565b6000610463338484610e12565b50600192915050565b60008061047860355490565b9050806104915761048a600a84611c49565b9392505050565b6040516370a0823160e01b8152306004820152600090737f3edcdd180dbe4819bd98fee8929b5cedb3adeb906370a082319060240160206040518083038186803b1580156104de57600080fd5b505afa1580156104f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105169190611baa565b9050806105238386611c49565b61052d9190611c29565b949350505050565b6000610542848484610f37565b6001600160a01b0384166000908152603460209081526040808320338452909152902054828110156105e15760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6105f585336105f08685611c68565b610e12565b506001949350505050565b6000670de0b6b3a7640000609754836106199190611c49565b6106239190611c29565b92915050565b6000610634826106e3565b9050600061064182610600565b905061064d3384611149565b61066c737f3edcdd180dbe4819bd98fee8929b5cedb3adeb33836112a4565b604080518481526020810183905233917f54a9763035584fc4fcad1bc4e0e7a83f93e016f50ae32bd527530a77257393ee910160405180910390a2505050565b3360008181526034602090815260408083206001600160a01b038716845290915281205490916104639185906105f0908690611c11565b6040516370a0823160e01b81523060048201526000908190737f3edcdd180dbe4819bd98fee8929b5cedb3adeb906370a082319060240160206040518083038186803b15801561073257600080fd5b505afa158015610746573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076a9190611baa565b905061077560355490565b61077f8285611c49565b61048a9190611c29565b6065546001600160a01b031633146107e35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105d8565b6065546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36065805473ffffffffffffffffffffffffffffffffffffffff19169055565b600054610100900460ff1680610853575060005460ff16155b6108b65760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105d8565b600054610100900460ff161580156108d8576000805461ffff19166101011790555b6108e0611339565b6109546040518060400160405280600981526020017f7858544b2d4d676d7400000000000000000000000000000000000000000000008152506040518060400160405280600581526020017f7858544b610000000000000000000000000000000000000000000000000000008152506113fb565b6098805460ff191660011790558015610973576000805461ff00191690555b50565b6060603780546103d390611cab565b6065546001600160a01b031633146109df5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105d8565b60985460ff1615158115151415610a385760405162461bcd60e51b815260206004820152600a60248201527f53616d652076616c75650000000000000000000000000000000000000000000060448201526064016105d8565b6098805460ff1916911515919091179055565b3360009081526034602090815260408083206001600160a01b038616845290915281205482811015610ae55760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084016105d8565b610af433856105f08685611c68565b5060019392505050565b60008111610b4e5760405162461bcd60e51b815260206004820152600e60248201527f43616e6e6f74207374616b65203000000000000000000000000000000000000060448201526064016105d8565b6000610b598261046c565b9050610b7b737f3edcdd180dbe4819bd98fee8929b5cedb3adeb3330856114d7565b610b853382611515565b604080518381526020810183905233917f5af417134f72a9d41143ace85b0a26dce6f550f894f2cbc1eeee8810603d91b6910160405180910390a25050565b6000610463338484610f37565b6065546001600160a01b03163314610c2b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105d8565b670de0b6b3a764000081108015610c4a5750670c7d713b49da00008110155b610c965760405162461bcd60e51b815260206004820152601560248201527f50656e616c7479206f7574736964652072616e6765000000000000000000000060448201526064016105d8565b609781905560405181815242907f131f535ea2b15b7f1b83c12ffb561edde99a51f6a95bee72794d4be51295b9bb9060200160405180910390a250565b6065546001600160a01b03163314610d2d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105d8565b6001600160a01b038116610da95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016105d8565b6065546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36065805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6001600160a01b038316610e745760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105d8565b6001600160a01b038216610ed55760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105d8565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b038316610fb35760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016105d8565b6001600160a01b0382166110155760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105d8565b611020838383611600565b6001600160a01b038316600090815260336020526040902054818110156110af5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016105d8565b6110b98282611c68565b6001600160a01b0380861660009081526033602052604080822093909355908516815290812080548492906110ef908490611c11565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161113b91815260200190565b60405180910390a350505050565b6001600160a01b0382166111a95760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016105d8565b6111b582600083611600565b6001600160a01b038216600090815260336020526040902054818110156112295760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016105d8565b6112338282611c68565b6001600160a01b03841660009081526033602052604081209190915560358054849290611261908490611c68565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610f2a565b6040516001600160a01b03831660248201526044810182905261133490849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611652565b505050565b600054610100900460ff1680611352575060005460ff16155b6113b55760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105d8565b600054610100900460ff161580156113d7576000805461ffff19166101011790555b6113df611737565b6113e76117e8565b8015610973576000805461ff001916905550565b600054610100900460ff1680611414575060005460ff16155b6114775760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105d8565b600054610100900460ff16158015611499576000805461ffff19166101011790555b82516114ac9060369060208601906119f5565b5081516114c09060379060208501906119f5565b508015611334576000805461ff0019169055505050565b6040516001600160a01b038085166024830152831660448201526064810182905261150f9085906323b872dd60e01b906084016112d0565b50505050565b6001600160a01b03821661156b5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016105d8565b61157760008383611600565b80603560008282546115899190611c11565b90915550506001600160a01b038216600090815260336020526040812080548392906115b6908490611c11565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60985460ff166113345760405162461bcd60e51b815260206004820152601660248201527f746f6b656e206e6f74207472616e7366657261626c650000000000000000000060448201526064016105d8565b60006116a7826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166118ea9092919063ffffffff16565b80519091501561133457808060200190518101906116c59190611b76565b6113345760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016105d8565b600054610100900460ff1680611750575060005460ff16155b6117b35760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105d8565b600054610100900460ff161580156113e7576000805461ffff19166101011790558015610973576000805461ff001916905550565b600054610100900460ff1680611801575060005460ff16155b6118645760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105d8565b600054610100900460ff16158015611886576000805461ffff19166101011790555b6065805473ffffffffffffffffffffffffffffffffffffffff19163390811790915560405181906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508015610973576000805461ff001916905550565b606061052d848460008585843b6119435760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105d8565b600080866001600160a01b0316858760405161195f9190611bc2565b60006040518083038185875af1925050503d806000811461199c576040519150601f19603f3d011682016040523d82523d6000602084013e6119a1565b606091505b50915091506119b18282866119bc565b979650505050505050565b606083156119cb57508161048a565b8251156119db5782518084602001fd5b8160405162461bcd60e51b81526004016105d89190611bde565b828054611a0190611cab565b90600052602060002090601f016020900481019282611a235760008555611a69565b82601f10611a3c57805160ff1916838001178555611a69565b82800160010185558215611a69579182015b82811115611a69578251825591602001919060010190611a4e565b50611a75929150611a79565b5090565b5b80821115611a755760008155600101611a7a565b80356001600160a01b0381168114611aa557600080fd5b919050565b600060208284031215611abb578081fd5b61048a82611a8e565b60008060408385031215611ad6578081fd5b611adf83611a8e565b9150611aed60208401611a8e565b90509250929050565b600080600060608486031215611b0a578081fd5b611b1384611a8e565b9250611b2160208501611a8e565b9150604084013590509250925092565b60008060408385031215611b43578182fd5b611b4c83611a8e565b946020939093013593505050565b600060208284031215611b6b578081fd5b813561048a81611cfc565b600060208284031215611b87578081fd5b815161048a81611cfc565b600060208284031215611ba3578081fd5b5035919050565b600060208284031215611bbb578081fd5b5051919050565b60008251611bd4818460208701611c7f565b9190910192915050565b6020815260008251806020840152611bfd816040850160208701611c7f565b601f01601f19169190910160400192915050565b60008219821115611c2457611c24611ce6565b500190565b600082611c4457634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611c6357611c63611ce6565b500290565b600082821015611c7a57611c7a611ce6565b500390565b60005b83811015611c9a578181015183820152602001611c82565b8381111561150f5750506000910152565b600181811c90821680611cbf57607f821691505b60208210811415611ce057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b801515811461097357600080fdfea164736f6c6343000804000a
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101a35760003560e01c8063715018a6116100ee5780639cd2370711610097578063a9059cbb11610071578063a9059cbb14610352578063af0a61c314610365578063dd62ed3e14610378578063f2fde38b146103b157600080fd5b80639cd2370714610319578063a457c2d71461032c578063a694fc3a1461033f57600080fd5b806392ff0d31116100c857806392ff0d31146102fb578063942bcdef1461030857806395d89b411461031157600080fd5b8063715018a6146102da5780638129fc1c146102e25780638da5cb5b146102ea57600080fd5b80632e17de7811610150578063395093511161012a578063395093511461028b57806359934a7d1461029e57806370a08231146102b157600080fd5b80632e17de7814610234578063313ce5671461024957806338bd2b341461025857600080fd5b80631c8d6c9f116101815780631c8d6c9f146101fb57806323b872dd1461020e5780632c1730971461022157600080fd5b806306fdde03146101a8578063095ea7b3146101c657806318160ddd146101e9575b600080fd5b6101b06103c4565b6040516101bd9190611bde565b60405180910390f35b6101d96101d4366004611b31565b610456565b60405190151581526020016101bd565b6035545b6040519081526020016101bd565b6101ed610209366004611b92565b61046c565b6101d961021c366004611af6565b610535565b6101ed61022f366004611b92565b610600565b610247610242366004611b92565b610629565b005b604051601281526020016101bd565b610273737f3edcdd180dbe4819bd98fee8929b5cedb3adeb81565b6040516001600160a01b0390911681526020016101bd565b6101d9610299366004611b31565b6106ac565b6101ed6102ac366004611b92565b6106e3565b6101ed6102bf366004611aaa565b6001600160a01b031660009081526033602052604090205490565b610247610789565b61024761083a565b6065546001600160a01b0316610273565b6098546101d99060ff1681565b6101ed60975481565b6101b0610976565b610247610327366004611b5a565b610985565b6101d961033a366004611b31565b610a4b565b61024761034d366004611b92565b610afe565b6101d9610360366004611b31565b610bc4565b610247610373366004611b92565b610bd1565b6101ed610386366004611ac4565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b6102476103bf366004611aaa565b610cd3565b6060603680546103d390611cab565b80601f01602080910402602001604051908101604052809291908181526020018280546103ff90611cab565b801561044c5780601f106104215761010080835404028352916020019161044c565b820191906000526020600020905b81548152906001019060200180831161042f57829003601f168201915b5050505050905090565b6000610463338484610e12565b50600192915050565b60008061047860355490565b9050806104915761048a600a84611c49565b9392505050565b6040516370a0823160e01b8152306004820152600090737f3edcdd180dbe4819bd98fee8929b5cedb3adeb906370a082319060240160206040518083038186803b1580156104de57600080fd5b505afa1580156104f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105169190611baa565b9050806105238386611c49565b61052d9190611c29565b949350505050565b6000610542848484610f37565b6001600160a01b0384166000908152603460209081526040808320338452909152902054828110156105e15760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6105f585336105f08685611c68565b610e12565b506001949350505050565b6000670de0b6b3a7640000609754836106199190611c49565b6106239190611c29565b92915050565b6000610634826106e3565b9050600061064182610600565b905061064d3384611149565b61066c737f3edcdd180dbe4819bd98fee8929b5cedb3adeb33836112a4565b604080518481526020810183905233917f54a9763035584fc4fcad1bc4e0e7a83f93e016f50ae32bd527530a77257393ee910160405180910390a2505050565b3360008181526034602090815260408083206001600160a01b038716845290915281205490916104639185906105f0908690611c11565b6040516370a0823160e01b81523060048201526000908190737f3edcdd180dbe4819bd98fee8929b5cedb3adeb906370a082319060240160206040518083038186803b15801561073257600080fd5b505afa158015610746573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076a9190611baa565b905061077560355490565b61077f8285611c49565b61048a9190611c29565b6065546001600160a01b031633146107e35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105d8565b6065546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36065805473ffffffffffffffffffffffffffffffffffffffff19169055565b600054610100900460ff1680610853575060005460ff16155b6108b65760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105d8565b600054610100900460ff161580156108d8576000805461ffff19166101011790555b6108e0611339565b6109546040518060400160405280600981526020017f7858544b2d4d676d7400000000000000000000000000000000000000000000008152506040518060400160405280600581526020017f7858544b610000000000000000000000000000000000000000000000000000008152506113fb565b6098805460ff191660011790558015610973576000805461ff00191690555b50565b6060603780546103d390611cab565b6065546001600160a01b031633146109df5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105d8565b60985460ff1615158115151415610a385760405162461bcd60e51b815260206004820152600a60248201527f53616d652076616c75650000000000000000000000000000000000000000000060448201526064016105d8565b6098805460ff1916911515919091179055565b3360009081526034602090815260408083206001600160a01b038616845290915281205482811015610ae55760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084016105d8565b610af433856105f08685611c68565b5060019392505050565b60008111610b4e5760405162461bcd60e51b815260206004820152600e60248201527f43616e6e6f74207374616b65203000000000000000000000000000000000000060448201526064016105d8565b6000610b598261046c565b9050610b7b737f3edcdd180dbe4819bd98fee8929b5cedb3adeb3330856114d7565b610b853382611515565b604080518381526020810183905233917f5af417134f72a9d41143ace85b0a26dce6f550f894f2cbc1eeee8810603d91b6910160405180910390a25050565b6000610463338484610f37565b6065546001600160a01b03163314610c2b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105d8565b670de0b6b3a764000081108015610c4a5750670c7d713b49da00008110155b610c965760405162461bcd60e51b815260206004820152601560248201527f50656e616c7479206f7574736964652072616e6765000000000000000000000060448201526064016105d8565b609781905560405181815242907f131f535ea2b15b7f1b83c12ffb561edde99a51f6a95bee72794d4be51295b9bb9060200160405180910390a250565b6065546001600160a01b03163314610d2d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105d8565b6001600160a01b038116610da95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016105d8565b6065546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36065805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6001600160a01b038316610e745760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105d8565b6001600160a01b038216610ed55760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105d8565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b038316610fb35760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016105d8565b6001600160a01b0382166110155760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105d8565b611020838383611600565b6001600160a01b038316600090815260336020526040902054818110156110af5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016105d8565b6110b98282611c68565b6001600160a01b0380861660009081526033602052604080822093909355908516815290812080548492906110ef908490611c11565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161113b91815260200190565b60405180910390a350505050565b6001600160a01b0382166111a95760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016105d8565b6111b582600083611600565b6001600160a01b038216600090815260336020526040902054818110156112295760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016105d8565b6112338282611c68565b6001600160a01b03841660009081526033602052604081209190915560358054849290611261908490611c68565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610f2a565b6040516001600160a01b03831660248201526044810182905261133490849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611652565b505050565b600054610100900460ff1680611352575060005460ff16155b6113b55760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105d8565b600054610100900460ff161580156113d7576000805461ffff19166101011790555b6113df611737565b6113e76117e8565b8015610973576000805461ff001916905550565b600054610100900460ff1680611414575060005460ff16155b6114775760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105d8565b600054610100900460ff16158015611499576000805461ffff19166101011790555b82516114ac9060369060208601906119f5565b5081516114c09060379060208501906119f5565b508015611334576000805461ff0019169055505050565b6040516001600160a01b038085166024830152831660448201526064810182905261150f9085906323b872dd60e01b906084016112d0565b50505050565b6001600160a01b03821661156b5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016105d8565b61157760008383611600565b80603560008282546115899190611c11565b90915550506001600160a01b038216600090815260336020526040812080548392906115b6908490611c11565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60985460ff166113345760405162461bcd60e51b815260206004820152601660248201527f746f6b656e206e6f74207472616e7366657261626c650000000000000000000060448201526064016105d8565b60006116a7826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166118ea9092919063ffffffff16565b80519091501561133457808060200190518101906116c59190611b76565b6113345760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016105d8565b600054610100900460ff1680611750575060005460ff16155b6117b35760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105d8565b600054610100900460ff161580156113e7576000805461ffff19166101011790558015610973576000805461ff001916905550565b600054610100900460ff1680611801575060005460ff16155b6118645760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105d8565b600054610100900460ff16158015611886576000805461ffff19166101011790555b6065805473ffffffffffffffffffffffffffffffffffffffff19163390811790915560405181906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508015610973576000805461ff001916905550565b606061052d848460008585843b6119435760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105d8565b600080866001600160a01b0316858760405161195f9190611bc2565b60006040518083038185875af1925050503d806000811461199c576040519150601f19603f3d011682016040523d82523d6000602084013e6119a1565b606091505b50915091506119b18282866119bc565b979650505050505050565b606083156119cb57508161048a565b8251156119db5782518084602001fd5b8160405162461bcd60e51b81526004016105d89190611bde565b828054611a0190611cab565b90600052602060002090601f016020900481019282611a235760008555611a69565b82601f10611a3c57805160ff1916838001178555611a69565b82800160010185558215611a69579182015b82811115611a69578251825591602001919060010190611a4e565b50611a75929150611a79565b5090565b5b80821115611a755760008155600101611a7a565b80356001600160a01b0381168114611aa557600080fd5b919050565b600060208284031215611abb578081fd5b61048a82611a8e565b60008060408385031215611ad6578081fd5b611adf83611a8e565b9150611aed60208401611a8e565b90509250929050565b600080600060608486031215611b0a578081fd5b611b1384611a8e565b9250611b2160208501611a8e565b9150604084013590509250925092565b60008060408385031215611b43578182fd5b611b4c83611a8e565b946020939093013593505050565b600060208284031215611b6b578081fd5b813561048a81611cfc565b600060208284031215611b87578081fd5b815161048a81611cfc565b600060208284031215611ba3578081fd5b5035919050565b600060208284031215611bbb578081fd5b5051919050565b60008251611bd4818460208701611c7f565b9190910192915050565b6020815260008251806020840152611bfd816040850160208701611c7f565b601f01601f19169190910160400192915050565b60008219821115611c2457611c24611ce6565b500190565b600082611c4457634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611c6357611c63611ce6565b500290565b600082821015611c7a57611c7a611ce6565b500390565b60005b83811015611c9a578181015183820152602001611c82565b8381111561150f5750506000910152565b600181811c90821680611cbf57607f821691505b60208210811415611ce057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b801515811461097357600080fdfea164736f6c6343000804000a
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
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.