Feature Tip: Add private address tag to any address under My Name Tag !
ERC-20
Overview
Max Total Supply
129,556.392947639508 pLTC
Holders
30
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 12 Decimals)
Balance
4,740.046925005244 pLTCValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
PulseLitecoin
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.19; // _ _____ ____ // _ __ | | |_ _/ ___| // | '_ \| | | || | // | |_) | |___| || |___ // | .__/|_____|_| \____| // |_| // // t.me/pulselitecoin // x.com/pulselitecoin import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./lib/PulseBitcoinMineable.sol"; contract PulseLitecoin is ERC20, ReentrancyGuard, PulseBitcoinMineable { uint256 private constant SCALE_FACTOR = 4; constructor() ERC20("PulseLitecoin", "pLTC") {} function decimals() public view virtual override returns (uint8) { return 12; } // @notice Start your miner // @param bitoshis The amount in ASIC to mine with function minerStart(uint256 bitoshis) external nonReentrant { ASIC.transferFrom(msg.sender, address(this), bitoshis); _minerStart(bitoshis); } // @notice End your miner // @param minerIndex The index of the miner on the pLTC contract // @param minerOwnerIndex The index of the miner on the minerOwner // @param minerId The minerId for the miner to end. Duh. // @param minerOwner The owner of the miner to end. Also Duh. function minerEnd(int256 minerIndex, uint256 minerOwnerIndex, uint256 minerId, address minerOwner) external nonReentrant { MinerCache memory miner = _minerEnd(minerIndex, minerOwnerIndex, minerId, minerOwner); uint256 servedDays = _currentDay() - miner.day; uint256 pltcMined = miner.pSatoshisMined * SCALE_FACTOR; // Any time after you end the miner, you can still mint pLTC. // If servedDays > _daysForPenalty(), The miner will lose all plsb and half asic as per the PulseBitcoin mining contract. // Added for pLTC, the miner loses half of the pLTC yield to the caller if (servedDays > _daysForPenalty()) { _mint(minerOwner, pltcMined / 2); _mint(msg.sender, pltcMined / 2); ASIC.transfer(minerOwner, miner.bitoshisReturned / 2); ASIC.transfer(msg.sender, miner.bitoshisReturned / 2); } else { _mint(minerOwner, pltcMined); ASIC.transfer(minerOwner, miner.bitoshisReturned); pBTC.transfer(minerOwner, miner.pSatoshisMined); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (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() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.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.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * The default value of {decimals} is 18. To change this, you should override * this function so it returns a different value. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead 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 ERC20 is Context, IERC20, IERC20Metadata { 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}. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _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 default value returned by this function, unless * it's 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: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, 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}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, 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}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, 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) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, 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) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `from` to `to`. * * This 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: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer(address from, address to, uint256 amount) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by // decrementing then incrementing. _balances[to] += amount; } emit Transfer(from, to, amount); _afterTokenTransfer(from, to, 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: * * - `account` 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; unchecked { // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above. _balances[account] += amount; } emit Transfer(address(0), account, amount); _afterTokenTransfer(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"); unchecked { _balances[account] = accountBalance - amount; // Overflow not possible: amount <= accountBalance <= totalSupply. _totalSupply -= amount; } emit Transfer(account, address(0), amount); _afterTokenTransfer(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 Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - 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 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 {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been 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 _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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); /** * @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 `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.4) (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; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; // ____ _____ ____ __ __ _ _ _ // _ __ | __ )_ _/ ___| \/ (_)_ __ ___ __ _| |__ | | ___ // | '_ \| _ \ | || | | |\/| | | '_ \ / _ \/ _` | '_ \| |/ _ \ // | |_) | |_) || || |___| | | | | | | | __/ (_| | |_) | | __/ // | .__/|____/ |_| \____|_| |_|_|_| |_|\___|\__,_|_.__/|_|\___| // |_| // // This contract allows any contract that inherits it to mine PulseBitcoin. // Supports recovering miners that are ended on the PulseBitcoin contract directly. abstract contract Asic { event Transfer(address indexed from, address indexed to, uint256 value); function approve(address spender, uint256 amount) public virtual returns (bool); function balanceOf(address account) public view virtual returns (uint256); function transfer(address to, uint256 amount) public virtual returns (bool); function transferFrom(address sender, address recipient, uint256 amount) public virtual returns(bool); } abstract contract PulseBitcoin { uint256 public miningRate; uint256 public miningFee; uint256 public totalpSatoshisMined; uint256 public previousHalvingThresold; uint256 public currentHalvingThreshold; uint256 public numOfHalvings; uint256 public atmMultiplier; struct MinerStore { uint128 bitoshisMiner; uint128 bitoshisReturned; uint96 pSatoshisMined; uint96 bitoshisBurned; uint40 minerId; uint24 day; } mapping(address => MinerStore[]) public minerList; event Transfer(address indexed from, address indexed to, uint256 value); function minerCount(address minerAddress) public virtual view returns (uint256); function minerStart(uint256 bitoshisMiner) public virtual; function minerEnd(uint256 minerIndex, uint256 minerId, address minerAddr) public virtual; function currentDay() public virtual view returns (uint256); function approve(address spender, uint256 amount) public virtual returns (bool); function balanceOf(address account) public view virtual returns (uint256); function transfer(address to, uint256 amount) public virtual returns (bool); function transferFrom(address sender, address recipient, uint256 amount) public virtual returns(bool); } abstract contract PulseBitcoinMineable { PulseBitcoin public immutable pBTC; Asic public immutable ASIC; struct MinerStore { uint128 bitoshisMiner; uint128 bitoshisReturned; uint96 pSatoshisMined; uint96 bitoshisBurned; uint40 minerId; uint24 day; } struct MinerCache { uint256 bitoshisMiner; uint256 bitoshisReturned; uint256 pSatoshisMined; uint256 bitoshisBurned; uint256 minerId; uint256 day; } mapping(address => MinerStore[]) public minerList; error UnknownMiner(MinerStore[] minerList, MinerCache miner); error InvalidMinerId(uint256 minerId); error InvalidMinerIndex(uint256 minerIndex); error CannotEndMinerEarly(uint256 servedDays, uint256 requiredDays); constructor() { pBTC = PulseBitcoin(address(0x5EE84583f67D5EcEa5420dBb42b462896E7f8D06)); ASIC = Asic(address(0x347a96a5BD06D2E15199b032F46fB724d6c73047)); // Approve the pBTC contract to spend our ASIC so this contract can mine. ASIC.approve(address(pBTC), type(uint256).max); } // @remark -1 Is magic. It makes your function call less efficient! // a minerIndex of -1 triggers the _minerEnd function to run _minerIndexSearch to find the minerIndex // (which could loop quite a lot!) // If you can call this function with the minerIndex, do that. // Otherwise, pass -1 & it'll do it. Just cost more. // Could potentially run into out of gas errors. // @notice Start the PLSB Miner. // @dev We store this miner as {msg.sender -> MinerCache instance} // On the PLSB contract, our miners are stored as {pLTCContract -> MinerCache instance} // We're duping this as {msg.sender -> MinerCache instance} so we can look it up later. // See @remark -1 for details. function _minerStart( uint256 bitoshis ) internal returns ( MinerCache memory ) { pBTC.minerStart(bitoshis); MinerCache memory miner = _minerAt(_lastMinerIndex()); _minerAdd(minerList[msg.sender], miner); return miner; } // @notice End the PLSB miner // @param minerIndex The index of the pLTC contract miner's address on the PLSB contract // This would be the miner's specific index on pLTC address. If you DON'T KNOW, specify -1. See @remark on -1 // @param minerOwnerIndex The index of the miner's address using the pBTCMineable's address. // This is the miner's ACTUAL miner. Like "who's mining"? The index above is just for saving unnessecary gas. // @param minerId collected from the PLSB contract // @param minerOwner The owner of the miner // @return miner a instance of MinerCache function _minerEnd( int minerIndex, uint256 minerOwnerIndex, uint256 minerId, address minerOwner ) internal returns ( MinerCache memory ) { MinerCache memory miner = _minerLoad(minerOwnerIndex, minerOwner); // Do we have the correct miner? if(miner.minerId != minerId) { revert InvalidMinerId(minerId); } // Try to find the miner index (This is what -1 triggers) if(minerIndex < 0) { minerIndex = _minerIndexSearch(miner); } // The miner index still wasn't found. Must've been ended already? if(minerIndex < 0) { // Make sure the miner is old enough. // pBTC.minerEnd does this for us with it's minerEnd function. uint256 servedDays = _currentDay() - miner.day; if (servedDays < _miningDuration()) { revert CannotEndMinerEarly(servedDays, _miningDuration()); } } else { // End the miner as per usual pBTC.minerEnd(uint256(minerIndex), minerId, address(this)); } _minerRemove(minerList[minerOwner], miner); return miner; } function _minerAt(uint256 index) internal view returns (MinerCache memory) { ( uint128 bitoshisMiner, uint128 bitoshisReturned, uint96 pSatoshisMined, uint96 bitoshisBurned, uint40 minerId, uint24 day ) = pBTC.minerList(address(this), index); return MinerCache({ minerId: minerId, bitoshisMiner: bitoshisMiner, pSatoshisMined: pSatoshisMined, bitoshisBurned: bitoshisBurned, bitoshisReturned: bitoshisReturned, day: day }); } function _minerLoad( uint256 minerIndex, address minerOwner ) internal view returns ( MinerCache memory miner ) { MinerStore storage _miner = minerList[minerOwner][minerIndex]; return MinerCache({ minerId: _miner.minerId, bitoshisMiner: _miner.bitoshisMiner, pSatoshisMined: _miner.pSatoshisMined, bitoshisBurned: _miner.bitoshisBurned, bitoshisReturned: _miner.bitoshisReturned, day: _miner.day }); } function _minerAdd( MinerStore[] storage minerListRef, MinerCache memory miner ) internal { minerListRef.push(MinerStore( uint128(miner.bitoshisMiner), uint128(miner.bitoshisReturned), uint96(miner.pSatoshisMined), uint96(miner.bitoshisBurned), uint40(miner.minerId), uint24(miner.day) )); } function _minerRemove( MinerStore[] storage minerListRef, MinerCache memory miner ) internal { uint256 minerListLength = minerListRef.length; for(uint256 i=0; i < minerListLength;) { if(minerListRef[i].minerId == miner.minerId) { uint256 lastIndex = minerListLength - 1; if(i != lastIndex) { minerListRef[i] = minerListRef[lastIndex]; } minerListRef.pop(); break; } unchecked { i++; } } // Did it remove anything? if(minerListRef.length == minerListLength) { revert UnknownMiner(minerListRef, miner); } } // @notice Find the minerIndex of a miner. // @dev Only accessible by passing -1 as the minerIndex. function _minerIndexSearch( MinerCache memory miner ) internal view returns (int) { uint256 minerListLength = pBTC.minerCount(address(this)); int foundMinerIndex = -1; for(uint256 i=0; i < minerListLength;) { if(_minerAt(i).minerId == miner.minerId) { foundMinerIndex = int(i); break; } unchecked { i++; } } return foundMinerIndex; } function minerCount(address minerAddress) external view returns (uint256) { return minerList[minerAddress].length; } function _miningDuration() internal pure returns (uint256) { return 30; } function _withdrawGracePeriod() internal pure returns (uint256) { return 30; } function _daysForPenalty() internal pure returns (uint256) { return _miningDuration() + _withdrawGracePeriod(); } function _lastMinerIndex() internal view returns (uint256) { return pBTC.minerCount(address(this)) - 1; } function _currentDay() internal view returns (uint256) { return pBTC.currentDay(); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"servedDays","type":"uint256"},{"internalType":"uint256","name":"requiredDays","type":"uint256"}],"name":"CannotEndMinerEarly","type":"error"},{"inputs":[{"internalType":"uint256","name":"minerId","type":"uint256"}],"name":"InvalidMinerId","type":"error"},{"inputs":[{"internalType":"uint256","name":"minerIndex","type":"uint256"}],"name":"InvalidMinerIndex","type":"error"},{"inputs":[{"components":[{"internalType":"uint128","name":"bitoshisMiner","type":"uint128"},{"internalType":"uint128","name":"bitoshisReturned","type":"uint128"},{"internalType":"uint96","name":"pSatoshisMined","type":"uint96"},{"internalType":"uint96","name":"bitoshisBurned","type":"uint96"},{"internalType":"uint40","name":"minerId","type":"uint40"},{"internalType":"uint24","name":"day","type":"uint24"}],"internalType":"struct PulseBitcoinMineable.MinerStore[]","name":"minerList","type":"tuple[]"},{"components":[{"internalType":"uint256","name":"bitoshisMiner","type":"uint256"},{"internalType":"uint256","name":"bitoshisReturned","type":"uint256"},{"internalType":"uint256","name":"pSatoshisMined","type":"uint256"},{"internalType":"uint256","name":"bitoshisBurned","type":"uint256"},{"internalType":"uint256","name":"minerId","type":"uint256"},{"internalType":"uint256","name":"day","type":"uint256"}],"internalType":"struct PulseBitcoinMineable.MinerCache","name":"miner","type":"tuple"}],"name":"UnknownMiner","type":"error"},{"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":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"ASIC","outputs":[{"internalType":"contract Asic","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"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":[],"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":[{"internalType":"address","name":"minerAddress","type":"address"}],"name":"minerCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"int256","name":"minerIndex","type":"int256"},{"internalType":"uint256","name":"minerOwnerIndex","type":"uint256"},{"internalType":"uint256","name":"minerId","type":"uint256"},{"internalType":"address","name":"minerOwner","type":"address"}],"name":"minerEnd","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"minerList","outputs":[{"internalType":"uint128","name":"bitoshisMiner","type":"uint128"},{"internalType":"uint128","name":"bitoshisReturned","type":"uint128"},{"internalType":"uint96","name":"pSatoshisMined","type":"uint96"},{"internalType":"uint96","name":"bitoshisBurned","type":"uint96"},{"internalType":"uint40","name":"minerId","type":"uint40"},{"internalType":"uint24","name":"day","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"bitoshis","type":"uint256"}],"name":"minerStart","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pBTC","outputs":[{"internalType":"contract PulseBitcoin","name":"","type":"address"}],"stateMutability":"view","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":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c06040523480156200001157600080fd5b506040518060400160405280600d81526020016c283ab639b2a634ba32b1b7b4b760991b81525060405180604001604052806004815260200163704c544360e01b8152508160039081620000669190620001ca565b506004620000758282620001ca565b5050600160055550735ee84583f67d5ecea5420dbb42b462896e7f8d06608081905273347a96a5bd06d2e15199b032f46fb724d6c7304760a081905260405163095ea7b360e01b8152600481019290925260001960248301529063095ea7b3906044016020604051808303816000875af1158015620000f8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011e919062000296565b50620002c1565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200015057607f821691505b6020821081036200017157634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620001c557600081815260208120601f850160051c81016020861015620001a05750805b601f850160051c820191505b81811015620001c157828155600101620001ac565b5050505b505050565b81516001600160401b03811115620001e657620001e662000125565b620001fe81620001f784546200013b565b8462000177565b602080601f8311600181146200023657600084156200021d5750858301515b600019600386901b1c1916600185901b178555620001c1565b600085815260208120601f198616915b82811015620002675788860151825594840194600190910190840162000246565b5085821015620002865787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060208284031215620002a957600080fd5b81518015158114620002ba57600080fd5b9392505050565b60805160a051611aec620003346000396000818161011401528181610434015281816106880152818161073901526108230152600081816102e3015281816108bf01528181610cf601528181610f5101528181610fe50152818161115e0152818161120c01526113b70152611aec6000f3fe608060405234801561001057600080fd5b506004361061010a5760003560e01c806370a08231116100a2578063a9059cbb11610071578063a9059cbb14610254578063b7af876b14610267578063dd62ed3e146102cb578063e48a1ef3146102de578063e7c5a4251461030557600080fd5b806370a08231146101e757806395d89b4114610210578063a327f4d114610218578063a457c2d71461024157600080fd5b806323b872dd116100de57806323b872dd1461019d578063313ce567146101b057806339509351146101bf5780636b7d3b49146101d257600080fd5b8062d795b11461010f57806306fdde0314610153578063095ea7b31461016857806318160ddd1461018b575b600080fd5b6101367f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b61015b610318565b60405161014a919061167d565b61017b6101763660046116e7565b6103aa565b604051901515815260200161014a565b6002545b60405190815260200161014a565b61017b6101ab366004611711565b6103c4565b604051600c815260200161014a565b61017b6101cd3660046116e7565b6103e8565b6101e56101e036600461174d565b61040a565b005b61018f6101f5366004611766565b6001600160a01b031660009081526020819052604090205490565b61015b6104c1565b61018f610226366004611766565b6001600160a01b031660009081526006602052604090205490565b61017b61024f3660046116e7565b6104d0565b61017b6102623660046116e7565b610550565b61027a6102753660046116e7565b61055e565b604080516001600160801b0397881681529690951660208701526001600160601b03938416948601949094529116606084015264ffffffffff16608083015262ffffff1660a082015260c00161014a565b61018f6102d9366004611788565b6105e1565b6101367f000000000000000000000000000000000000000000000000000000000000000081565b6101e56103133660046117bb565b61060c565b606060038054610327906117fa565b80601f0160208091040260200160405190810160405280929190818152602001828054610353906117fa565b80156103a05780601f10610375576101008083540402835291602001916103a0565b820191906000526020600020905b81548152906001019060200180831161038357829003601f168201915b5050505050905090565b6000336103b8818585610943565b60019150505b92915050565b6000336103d2858285610a67565b6103dd858585610adb565b506001949350505050565b6000336103b88185856103fb83836105e1565b610405919061184a565b610943565b610412610c7f565b6040516323b872dd60e01b8152336004820152306024820152604481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610485573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104a9919061185d565b506104b381610cd8565b506104be6001600555565b50565b606060048054610327906117fa565b600033816104de82866105e1565b9050838110156105435760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6103dd8286868403610943565b6000336103b8818585610adb565b6006602052816000526040600020818154811061057a57600080fd5b6000918252602090912060029091020180546001909101546001600160801b038083169450600160801b90920490911691506001600160601b0380821691600160601b810490911690600160c01b810464ffffffffff1690600160e81b900462ffffff1686565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b610614610c7f565b600061062285858585610e86565b905060008160a00151610633610fe1565b61063d919061187f565b90506000600483604001516106529190611892565b905061065c61106a565b8211156107ed57610677846106726002846118a9565b611077565b610686336106726002846118a9565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb85600286602001516106c791906118a9565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610712573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610736919061185d565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb336002866020015161077891906118a9565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af11580156107c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107e7919061185d565b50610930565b6107f78482611077565b602083015160405163a9059cbb60e01b81526001600160a01b03868116600483015260248201929092527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016020604051808303816000875af115801561086e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610892919061185d565b50604083810151905163a9059cbb60e01b81526001600160a01b03868116600483015260248201929092527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016020604051808303816000875af115801561090a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092e919061185d565b505b50505061093d6001600555565b50505050565b6001600160a01b0383166109a55760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161053a565b6001600160a01b038216610a065760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161053a565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610a7384846105e1565b9050600019811461093d5781811015610ace5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161053a565b61093d8484848403610943565b6001600160a01b038316610b3f5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161053a565b6001600160a01b038216610ba15760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161053a565b6001600160a01b03831660009081526020819052604090205481811015610c195760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161053a565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a361093d565b600260055403610cd15760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161053a565b6002600555565b610ce0611647565b604051636b7d3b4960e01b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636b7d3b4990602401600060405180830381600087803b158015610d4257600080fd5b505af1158015610d56573d6000803e3d6000fd5b505050506000610d6c610d6761113b565b6111d3565b3360009081526006602052604090209091506103be90826040805160c08101825282516001600160801b0390811682526020808501518216818401908152858501516001600160601b03908116958501958652606080880151821690860190815260808089015164ffffffffff90811691880191825260a0998a015162ffffff9081169a89019a8b528b5460018181018e5560009d8e5297909c20985195518816600160801b0295909716949094176002909a029096019889559551979092018054955194519651909316600160e81b026001600160e81b0396909116600160c01b02959095166001600160c01b03938216600160601b026001600160c01b03199095169690911695909517929092171692909217179055565b610e8e611647565b6000610e9a85846112d2565b905083816080015114610ec35760405163141252c560e31b81526004810185905260240161053a565b6000861215610ed857610ed581611395565b95505b6000861215610f2e5760008160a00151610ef0610fe1565b610efa919061187f565b9050601e811015610f285760405163de50ebd960e01b815260048101829052601e602482015260440161053a565b50610fb6565b604051633c089bfd60e11b815260048101879052602481018590523060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063781137fa90606401600060405180830381600087803b158015610f9d57600080fd5b505af1158015610fb1573d6000803e3d6000fd5b505050505b6001600160a01b0383166000908152600660205260409020610fd89082611461565b95945050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316635c9302c96040518163ffffffff1660e01b8152600401602060405180830381865afa158015611041573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106591906118cb565b905090565b6000611065601e8061184a565b6001600160a01b0382166110cd5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161053a565b80600260008282546110df919061184a565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b505050565b60405163a327f4d160e01b81523060048201526000906001906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a327f4d190602401602060405180830381865afa1580156111a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111c991906118cb565b611065919061187f565b6111db611647565b60405163b7af876b60e01b815230600482015260248101839052600090819081908190819081906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063b7af876b9060440160c060405180830381865afa158015611253573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112779190611912565b6040805160c0810182526001600160801b0397881681529690951660208701526001600160601b03938416948601949094529116606084015264ffffffffff16608083015262ffffff1660a082015298975050505050505050565b6112da611647565b6001600160a01b03821660009081526006602052604081208054859081106113045761130461199f565b60009182526020918290206040805160c08101825260029390930290910180546001600160801b038082168552600160801b90910416938301939093526001909201546001600160601b0380821693830193909352600160601b81049092166060820152600160c01b820464ffffffffff166080820152600160e81b90910462ffffff1660a0820152949350505050565b60405163a327f4d160e01b815230600482015260009081906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a327f4d190602401602060405180830381865afa1580156113fe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061142291906118cb565b905060001960005b82811015611459578460800151611440826111d3565b608001510361145157809150611459565b60010161142a565b509392505050565b815460005b818110156116205782608001518482815481106114855761148561199f565b6000918252602090912060029091020160010154600160c01b900464ffffffffff16036116185760006114b960018461187f565b90508082146115e4578481815481106114d4576114d461199f565b90600052602060002090600202018583815481106114f4576114f461199f565b60009182526020909120825460029092020180546fffffffffffffffffffffffffffffffff19166001600160801b0392831690811782558354600160801b908190049093169092029091178155600191820180549290910180546bffffffffffffffffffffffff1981166001600160601b0394851690811783558354600160601b908190049095169094026001600160c01b031990911690931792909217808355815464ffffffffff600160c01b91829004160264ffffffffff60c01b19821681178455915462ffffff600160e81b9182900416026001600160e81b039092166001600160c01b03909116171790555b848054806115f4576115f46119b5565b60008281526020812060026000199093019283020181815560010155905550611620565b600101611466565b508254819003611136578282604051630b42f24d60e41b815260040161053a9291906119cb565b6040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b600060208083528351808285015260005b818110156116aa5785810183015185820160400152820161168e565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b03811681146116e257600080fd5b919050565b600080604083850312156116fa57600080fd5b611703836116cb565b946020939093013593505050565b60008060006060848603121561172657600080fd5b61172f846116cb565b925061173d602085016116cb565b9150604084013590509250925092565b60006020828403121561175f57600080fd5b5035919050565b60006020828403121561177857600080fd5b611781826116cb565b9392505050565b6000806040838503121561179b57600080fd5b6117a4836116cb565b91506117b2602084016116cb565b90509250929050565b600080600080608085870312156117d157600080fd5b8435935060208501359250604085013591506117ef606086016116cb565b905092959194509250565b600181811c9082168061180e57607f821691505b60208210810361182e57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156103be576103be611834565b60006020828403121561186f57600080fd5b8151801515811461178157600080fd5b818103818111156103be576103be611834565b80820281158282048414176103be576103be611834565b6000826118c657634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156118dd57600080fd5b5051919050565b80516001600160801b03811681146116e257600080fd5b80516001600160601b03811681146116e257600080fd5b60008060008060008060c0878903121561192b57600080fd5b611934876118e4565b9550611942602088016118e4565b9450611950604088016118fb565b935061195e606088016118fb565b9250608087015164ffffffffff8116811461197857600080fd5b60a088015190925062ffffff8116811461199157600080fd5b809150509295509295509295565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b600060e0820160e083528085548083526101008501915086600052602092508260002060005b82811015611a6e5781546001600160801b0381168552608090811c8686015260018301546001600160601b038082166040880152606082811c909116908701529060c0611a4f82880184831c64ffffffffff1664ffffffffff169052565b60e89290921c60a08701525090930192600291909101906001016119f1565b5050508092505061145981840185805182526020810151602083015260408101516040830152606081015160608301526080810151608083015260a081015160a0830152505056fea26469706673582212209a58e56c011dcb0d436dc18fe1e890819d0b69a7ace77693efb6c0fa21952d6c64736f6c63430008130033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061010a5760003560e01c806370a08231116100a2578063a9059cbb11610071578063a9059cbb14610254578063b7af876b14610267578063dd62ed3e146102cb578063e48a1ef3146102de578063e7c5a4251461030557600080fd5b806370a08231146101e757806395d89b4114610210578063a327f4d114610218578063a457c2d71461024157600080fd5b806323b872dd116100de57806323b872dd1461019d578063313ce567146101b057806339509351146101bf5780636b7d3b49146101d257600080fd5b8062d795b11461010f57806306fdde0314610153578063095ea7b31461016857806318160ddd1461018b575b600080fd5b6101367f000000000000000000000000347a96a5bd06d2e15199b032f46fb724d6c7304781565b6040516001600160a01b0390911681526020015b60405180910390f35b61015b610318565b60405161014a919061167d565b61017b6101763660046116e7565b6103aa565b604051901515815260200161014a565b6002545b60405190815260200161014a565b61017b6101ab366004611711565b6103c4565b604051600c815260200161014a565b61017b6101cd3660046116e7565b6103e8565b6101e56101e036600461174d565b61040a565b005b61018f6101f5366004611766565b6001600160a01b031660009081526020819052604090205490565b61015b6104c1565b61018f610226366004611766565b6001600160a01b031660009081526006602052604090205490565b61017b61024f3660046116e7565b6104d0565b61017b6102623660046116e7565b610550565b61027a6102753660046116e7565b61055e565b604080516001600160801b0397881681529690951660208701526001600160601b03938416948601949094529116606084015264ffffffffff16608083015262ffffff1660a082015260c00161014a565b61018f6102d9366004611788565b6105e1565b6101367f0000000000000000000000005ee84583f67d5ecea5420dbb42b462896e7f8d0681565b6101e56103133660046117bb565b61060c565b606060038054610327906117fa565b80601f0160208091040260200160405190810160405280929190818152602001828054610353906117fa565b80156103a05780601f10610375576101008083540402835291602001916103a0565b820191906000526020600020905b81548152906001019060200180831161038357829003601f168201915b5050505050905090565b6000336103b8818585610943565b60019150505b92915050565b6000336103d2858285610a67565b6103dd858585610adb565b506001949350505050565b6000336103b88185856103fb83836105e1565b610405919061184a565b610943565b610412610c7f565b6040516323b872dd60e01b8152336004820152306024820152604481018290527f000000000000000000000000347a96a5bd06d2e15199b032f46fb724d6c730476001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610485573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104a9919061185d565b506104b381610cd8565b506104be6001600555565b50565b606060048054610327906117fa565b600033816104de82866105e1565b9050838110156105435760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6103dd8286868403610943565b6000336103b8818585610adb565b6006602052816000526040600020818154811061057a57600080fd5b6000918252602090912060029091020180546001909101546001600160801b038083169450600160801b90920490911691506001600160601b0380821691600160601b810490911690600160c01b810464ffffffffff1690600160e81b900462ffffff1686565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b610614610c7f565b600061062285858585610e86565b905060008160a00151610633610fe1565b61063d919061187f565b90506000600483604001516106529190611892565b905061065c61106a565b8211156107ed57610677846106726002846118a9565b611077565b610686336106726002846118a9565b7f000000000000000000000000347a96a5bd06d2e15199b032f46fb724d6c730476001600160a01b031663a9059cbb85600286602001516106c791906118a9565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610712573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610736919061185d565b507f000000000000000000000000347a96a5bd06d2e15199b032f46fb724d6c730476001600160a01b031663a9059cbb336002866020015161077891906118a9565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af11580156107c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107e7919061185d565b50610930565b6107f78482611077565b602083015160405163a9059cbb60e01b81526001600160a01b03868116600483015260248201929092527f000000000000000000000000347a96a5bd06d2e15199b032f46fb724d6c730479091169063a9059cbb906044016020604051808303816000875af115801561086e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610892919061185d565b50604083810151905163a9059cbb60e01b81526001600160a01b03868116600483015260248201929092527f0000000000000000000000005ee84583f67d5ecea5420dbb42b462896e7f8d069091169063a9059cbb906044016020604051808303816000875af115801561090a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092e919061185d565b505b50505061093d6001600555565b50505050565b6001600160a01b0383166109a55760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161053a565b6001600160a01b038216610a065760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161053a565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610a7384846105e1565b9050600019811461093d5781811015610ace5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161053a565b61093d8484848403610943565b6001600160a01b038316610b3f5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161053a565b6001600160a01b038216610ba15760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161053a565b6001600160a01b03831660009081526020819052604090205481811015610c195760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161053a565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a361093d565b600260055403610cd15760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161053a565b6002600555565b610ce0611647565b604051636b7d3b4960e01b8152600481018390527f0000000000000000000000005ee84583f67d5ecea5420dbb42b462896e7f8d066001600160a01b031690636b7d3b4990602401600060405180830381600087803b158015610d4257600080fd5b505af1158015610d56573d6000803e3d6000fd5b505050506000610d6c610d6761113b565b6111d3565b3360009081526006602052604090209091506103be90826040805160c08101825282516001600160801b0390811682526020808501518216818401908152858501516001600160601b03908116958501958652606080880151821690860190815260808089015164ffffffffff90811691880191825260a0998a015162ffffff9081169a89019a8b528b5460018181018e5560009d8e5297909c20985195518816600160801b0295909716949094176002909a029096019889559551979092018054955194519651909316600160e81b026001600160e81b0396909116600160c01b02959095166001600160c01b03938216600160601b026001600160c01b03199095169690911695909517929092171692909217179055565b610e8e611647565b6000610e9a85846112d2565b905083816080015114610ec35760405163141252c560e31b81526004810185905260240161053a565b6000861215610ed857610ed581611395565b95505b6000861215610f2e5760008160a00151610ef0610fe1565b610efa919061187f565b9050601e811015610f285760405163de50ebd960e01b815260048101829052601e602482015260440161053a565b50610fb6565b604051633c089bfd60e11b815260048101879052602481018590523060448201527f0000000000000000000000005ee84583f67d5ecea5420dbb42b462896e7f8d066001600160a01b03169063781137fa90606401600060405180830381600087803b158015610f9d57600080fd5b505af1158015610fb1573d6000803e3d6000fd5b505050505b6001600160a01b0383166000908152600660205260409020610fd89082611461565b95945050505050565b60007f0000000000000000000000005ee84583f67d5ecea5420dbb42b462896e7f8d066001600160a01b0316635c9302c96040518163ffffffff1660e01b8152600401602060405180830381865afa158015611041573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106591906118cb565b905090565b6000611065601e8061184a565b6001600160a01b0382166110cd5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161053a565b80600260008282546110df919061184a565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b505050565b60405163a327f4d160e01b81523060048201526000906001906001600160a01b037f0000000000000000000000005ee84583f67d5ecea5420dbb42b462896e7f8d06169063a327f4d190602401602060405180830381865afa1580156111a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111c991906118cb565b611065919061187f565b6111db611647565b60405163b7af876b60e01b815230600482015260248101839052600090819081908190819081906001600160a01b037f0000000000000000000000005ee84583f67d5ecea5420dbb42b462896e7f8d06169063b7af876b9060440160c060405180830381865afa158015611253573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112779190611912565b6040805160c0810182526001600160801b0397881681529690951660208701526001600160601b03938416948601949094529116606084015264ffffffffff16608083015262ffffff1660a082015298975050505050505050565b6112da611647565b6001600160a01b03821660009081526006602052604081208054859081106113045761130461199f565b60009182526020918290206040805160c08101825260029390930290910180546001600160801b038082168552600160801b90910416938301939093526001909201546001600160601b0380821693830193909352600160601b81049092166060820152600160c01b820464ffffffffff166080820152600160e81b90910462ffffff1660a0820152949350505050565b60405163a327f4d160e01b815230600482015260009081906001600160a01b037f0000000000000000000000005ee84583f67d5ecea5420dbb42b462896e7f8d06169063a327f4d190602401602060405180830381865afa1580156113fe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061142291906118cb565b905060001960005b82811015611459578460800151611440826111d3565b608001510361145157809150611459565b60010161142a565b509392505050565b815460005b818110156116205782608001518482815481106114855761148561199f565b6000918252602090912060029091020160010154600160c01b900464ffffffffff16036116185760006114b960018461187f565b90508082146115e4578481815481106114d4576114d461199f565b90600052602060002090600202018583815481106114f4576114f461199f565b60009182526020909120825460029092020180546fffffffffffffffffffffffffffffffff19166001600160801b0392831690811782558354600160801b908190049093169092029091178155600191820180549290910180546bffffffffffffffffffffffff1981166001600160601b0394851690811783558354600160601b908190049095169094026001600160c01b031990911690931792909217808355815464ffffffffff600160c01b91829004160264ffffffffff60c01b19821681178455915462ffffff600160e81b9182900416026001600160e81b039092166001600160c01b03909116171790555b848054806115f4576115f46119b5565b60008281526020812060026000199093019283020181815560010155905550611620565b600101611466565b508254819003611136578282604051630b42f24d60e41b815260040161053a9291906119cb565b6040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b600060208083528351808285015260005b818110156116aa5785810183015185820160400152820161168e565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b03811681146116e257600080fd5b919050565b600080604083850312156116fa57600080fd5b611703836116cb565b946020939093013593505050565b60008060006060848603121561172657600080fd5b61172f846116cb565b925061173d602085016116cb565b9150604084013590509250925092565b60006020828403121561175f57600080fd5b5035919050565b60006020828403121561177857600080fd5b611781826116cb565b9392505050565b6000806040838503121561179b57600080fd5b6117a4836116cb565b91506117b2602084016116cb565b90509250929050565b600080600080608085870312156117d157600080fd5b8435935060208501359250604085013591506117ef606086016116cb565b905092959194509250565b600181811c9082168061180e57607f821691505b60208210810361182e57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156103be576103be611834565b60006020828403121561186f57600080fd5b8151801515811461178157600080fd5b818103818111156103be576103be611834565b80820281158282048414176103be576103be611834565b6000826118c657634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156118dd57600080fd5b5051919050565b80516001600160801b03811681146116e257600080fd5b80516001600160601b03811681146116e257600080fd5b60008060008060008060c0878903121561192b57600080fd5b611934876118e4565b9550611942602088016118e4565b9450611950604088016118fb565b935061195e606088016118fb565b9250608087015164ffffffffff8116811461197857600080fd5b60a088015190925062ffffff8116811461199157600080fd5b809150509295509295509295565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b600060e0820160e083528085548083526101008501915086600052602092508260002060005b82811015611a6e5781546001600160801b0381168552608090811c8686015260018301546001600160601b038082166040880152606082811c909116908701529060c0611a4f82880184831c64ffffffffff1664ffffffffff169052565b60e89290921c60a08701525090930192600291909101906001016119f1565b5050508092505061145981840185805182526020810151602083015260408101516040830152606081015160608301526080810151608083015260a081015160a0830152505056fea26469706673582212209a58e56c011dcb0d436dc18fe1e890819d0b69a7ace77693efb6c0fa21952d6c64736f6c63430008130033
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.