Transactions
Token Transfers
Tokens
Internal Transactions
Coin Balance History
Logs
Code
Read Contract
Write Contract
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
- Contract name:
- PulseLitecoin
- Optimization enabled
- true
- Compiler version
- v0.8.19+commit.7dd6d404
- Optimization runs
- 4294967295
- EVM Version
- default
- Verified at
- 2024-10-24T11:39:24.299125Z
contracts/PulseLitecoin.sol
// 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);
}
}
}
@openzeppelin/contracts/security/ReentrancyGuard.sol
// 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;
}
}
@openzeppelin/contracts/token/ERC20/ERC20.sol
// 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 {}
}
@openzeppelin/contracts/token/ERC20/IERC20.sol
// 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);
}
@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol
// 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);
}
@openzeppelin/contracts/utils/Context.sol
// 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;
}
}
contracts/lib/PulseBitcoinMineable.sol
// 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();
}
}
Compiler Settings
{"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"],"":["ast"]}},"optimizer":{"runs":4294967295,"enabled":true},"libraries":{}}
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[]},{"type":"error","name":"CannotEndMinerEarly","inputs":[{"type":"uint256","name":"servedDays","internalType":"uint256"},{"type":"uint256","name":"requiredDays","internalType":"uint256"}]},{"type":"error","name":"InvalidMinerId","inputs":[{"type":"uint256","name":"minerId","internalType":"uint256"}]},{"type":"error","name":"InvalidMinerIndex","inputs":[{"type":"uint256","name":"minerIndex","internalType":"uint256"}]},{"type":"error","name":"UnknownMiner","inputs":[{"type":"tuple[]","name":"minerList","internalType":"struct PulseBitcoinMineable.MinerStore[]","components":[{"type":"uint128","name":"bitoshisMiner","internalType":"uint128"},{"type":"uint128","name":"bitoshisReturned","internalType":"uint128"},{"type":"uint96","name":"pSatoshisMined","internalType":"uint96"},{"type":"uint96","name":"bitoshisBurned","internalType":"uint96"},{"type":"uint40","name":"minerId","internalType":"uint40"},{"type":"uint24","name":"day","internalType":"uint24"}]},{"type":"tuple","name":"miner","internalType":"struct PulseBitcoinMineable.MinerCache","components":[{"type":"uint256","name":"bitoshisMiner","internalType":"uint256"},{"type":"uint256","name":"bitoshisReturned","internalType":"uint256"},{"type":"uint256","name":"pSatoshisMined","internalType":"uint256"},{"type":"uint256","name":"bitoshisBurned","internalType":"uint256"},{"type":"uint256","name":"minerId","internalType":"uint256"},{"type":"uint256","name":"day","internalType":"uint256"}]}]},{"type":"event","name":"Approval","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"spender","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract Asic"}],"name":"ASIC","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"allowance","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"address","name":"spender","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"approve","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"decimals","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"decreaseAllowance","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"subtractedValue","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"increaseAllowance","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"addedValue","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"minerCount","inputs":[{"type":"address","name":"minerAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"minerEnd","inputs":[{"type":"int256","name":"minerIndex","internalType":"int256"},{"type":"uint256","name":"minerOwnerIndex","internalType":"uint256"},{"type":"uint256","name":"minerId","internalType":"uint256"},{"type":"address","name":"minerOwner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint128","name":"bitoshisMiner","internalType":"uint128"},{"type":"uint128","name":"bitoshisReturned","internalType":"uint128"},{"type":"uint96","name":"pSatoshisMined","internalType":"uint96"},{"type":"uint96","name":"bitoshisBurned","internalType":"uint96"},{"type":"uint40","name":"minerId","internalType":"uint40"},{"type":"uint24","name":"day","internalType":"uint24"}],"name":"minerList","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"minerStart","inputs":[{"type":"uint256","name":"bitoshis","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract PulseBitcoin"}],"name":"pBTC","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"symbol","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSupply","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transfer","inputs":[{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]}]
Contract Creation Code
0x60c06040523480156200001157600080fd5b506040518060400160405280600d81526020016c283ab639b2a634ba32b1b7b4b760991b81525060405180604001604052806004815260200163704c544360e01b8152508160039081620000669190620001ca565b506004620000758282620001ca565b5050600160055550735ee84583f67d5ecea5420dbb42b462896e7f8d06608081905273347a96a5bd06d2e15199b032f46fb724d6c7304760a081905260405163095ea7b360e01b8152600481019290925260001960248301529063095ea7b3906044016020604051808303816000875af1158015620000f8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011e919062000296565b50620002c1565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200015057607f821691505b6020821081036200017157634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620001c557600081815260208120601f850160051c81016020861015620001a05750805b601f850160051c820191505b81811015620001c157828155600101620001ac565b5050505b505050565b81516001600160401b03811115620001e657620001e662000125565b620001fe81620001f784546200013b565b8462000177565b602080601f8311600181146200023657600084156200021d5750858301515b600019600386901b1c1916600185901b178555620001c1565b600085815260208120601f198616915b82811015620002675788860151825594840194600190910190840162000246565b5085821015620002865787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060208284031215620002a957600080fd5b81518015158114620002ba57600080fd5b9392505050565b60805160a0516123786200033460003960008181610124015281816104ef015281816107ce015281816108b101526109f301526000818161035b01528181610ab5015281816111070152818161147d0152818161152b0152818161170b015281816118100152611a8001526123786000f3fe608060405234801561001057600080fd5b506004361061011a5760003560e01c806370a08231116100b2578063a9059cbb11610081578063dd62ed3e11610066578063dd62ed3e14610310578063e48a1ef314610356578063e7c5a4251461037d57600080fd5b8063a9059cbb1461028b578063b7af876b1461029e57600080fd5b806370a082311461020457806395d89b411461023a578063a327f4d114610242578063a457c2d71461027857600080fd5b806323b872dd116100ee57806323b872dd146101ba578063313ce567146101cd57806339509351146101dc5780636b7d3b49146101ef57600080fd5b8062d795b11461011f57806306fdde0314610170578063095ea7b31461018557806318160ddd146101a8575b600080fd5b6101467f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b610178610390565b6040516101679190611e45565b610198610193366004611eda565b610422565b6040519015158152602001610167565b6002545b604051908152602001610167565b6101986101c8366004611f04565b61043c565b604051600c8152602001610167565b6101986101ea366004611eda565b610460565b6102026101fd366004611f40565b6104ac565b005b6101ac610212366004611f59565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b610178610589565b6101ac610250366004611f59565b73ffffffffffffffffffffffffffffffffffffffff1660009081526006602052604090205490565b610198610286366004611eda565b610598565b610198610299366004611eda565b61066e565b6102b16102ac366004611eda565b61067c565b604080516fffffffffffffffffffffffffffffffff97881681529690951660208701526bffffffffffffffffffffffff938416948601949094529116606084015264ffffffffff16608083015262ffffff1660a082015260c001610167565b6101ac61031e366004611f7b565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b6101467f000000000000000000000000000000000000000000000000000000000000000081565b61020261038b366004611fae565b610752565b60606003805461039f90611fed565b80601f01602080910402602001604051908101604052809291908181526020018280546103cb90611fed565b80156104185780601f106103ed57610100808354040283529160200191610418565b820191906000526020600020905b8154815290600101906020018083116103fb57829003601f168201915b5050505050905090565b600033610430818585610b39565b60019150505b92915050565b60003361044a858285610cec565b610455858585610dbd565b506001949350505050565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490919061043090829086906104a790879061206f565b610b39565b6104b461102c565b6040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906323b872dd906064016020604051808303816000875af115801561054d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105719190612082565b5061057b8161109f565b506105866001600555565b50565b60606004805461039f90611fed565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490919083811015610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6104558286868403610b39565b600033610430818585610dbd565b6006602052816000526040600020818154811061069857600080fd5b6000918252602090912060029091020180546001909101546fffffffffffffffffffffffffffffffff808316945070010000000000000000000000000000000090920490911691506bffffffffffffffffffffffff808216916c010000000000000000000000008104909116907801000000000000000000000000000000000000000000000000810464ffffffffff16907d010000000000000000000000000000000000000000000000000000000000900462ffffff1686565b61075a61102c565b600061076885858585611336565b905060008160a00151610779611527565b61078391906120a4565b905060006004836040015161079891906120b7565b90506107a26115bd565b821115610997576107bd846107b86002846120ce565b6115ca565b6107cc336107b86002846120ce565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb856002866020015161081a91906120ce565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016020604051808303816000875af115801561088a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ae9190612082565b507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33600286602001516108fd91906120ce565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016020604051808303816000875af115801561096d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109919190612082565b50610b26565b6109a184826115ca565b60208301516040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff868116600483015260248201929092527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016020604051808303816000875af1158015610a3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a629190612082565b5060408381015190517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff868116600483015260248201929092527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016020604051808303816000875af1158015610b00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b249190612082565b505b505050610b336001600555565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8316610bdb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610658565b73ffffffffffffffffffffffffffffffffffffffff8216610c7e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610658565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610b335781811015610db0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610658565b610b338484848403610b39565b73ffffffffffffffffffffffffffffffffffffffff8316610e60576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610658565b73ffffffffffffffffffffffffffffffffffffffff8216610f03576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610658565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205481811015610fb9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610658565b73ffffffffffffffffffffffffffffffffffffffff848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610b33565b600260055403611098576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610658565b6002600555565b6110d86040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b6040517f6b7d3b49000000000000000000000000000000000000000000000000000000008152600481018390527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690636b7d3b4990602401600060405180830381600087803b15801561116057600080fd5b505af1158015611174573d6000803e3d6000fd5b50505050600061118a6111856116c2565b611780565b33600090815260066020526040902090915061043690826040805160c08101825282516fffffffffffffffffffffffffffffffff90811682526020808501518216818401908152858501516bffffffffffffffffffffffff908116958501958652606080880151821690860190815260808089015164ffffffffff90811691880191825260a0998a015162ffffff9081169a89019a8b528b5460018181018e5560009d8e5297909c209851955188167001000000000000000000000000000000000295909716949094176002909a0290960198895595519790920180549551945196519093167d010000000000000000000000000000000000000000000000000000000000027cffffffffffffffffffffffffffffffffffffffffffffffffffffffffff969091167801000000000000000000000000000000000000000000000000029590951677ffffffffffffffffffffffffffffffffffffffffffffffff9382166c01000000000000000000000000027fffffffffffffffff0000000000000000000000000000000000000000000000009095169690911695909517929092171692909217179055565b61136f6040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b600061137b85846118e4565b9050838160800151146113bd576040517fa092962800000000000000000000000000000000000000000000000000000000815260048101859052602401610658565b60008612156113d2576113cf81611a38565b95505b60008612156114415760008160a001516113ea611527565b6113f491906120a4565b9050601e81101561143b576040517fde50ebd900000000000000000000000000000000000000000000000000000000815260048101829052601e6024820152604401610658565b506114ef565b6040517f781137fa00000000000000000000000000000000000000000000000000000000815260048101879052602481018590523060448201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063781137fa90606401600060405180830381600087803b1580156114d657600080fd5b505af11580156114ea573d6000803e3d6000fd5b505050505b73ffffffffffffffffffffffffffffffffffffffff8316600090815260066020526040902061151e9082611b48565b95945050505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16635c9302c96040518163ffffffff1660e01b8152600401602060405180830381865afa158015611594573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115b89190612109565b905090565b60006115b8601e8061206f565b73ffffffffffffffffffffffffffffffffffffffff8216611647576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610658565b8060026000828254611659919061206f565b909155505073ffffffffffffffffffffffffffffffffffffffff8216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b505050565b6040517fa327f4d100000000000000000000000000000000000000000000000000000000815230600482015260009060019073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063a327f4d190602401602060405180830381865afa158015611752573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117769190612109565b6115b891906120a4565b6117b96040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b6040517fb7af876b000000000000000000000000000000000000000000000000000000008152306004820152602481018390526000908190819081908190819073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063b7af876b9060440160c060405180830381865afa158015611857573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061187b919061215e565b6040805160c0810182526fffffffffffffffffffffffffffffffff97881681529690951660208701526bffffffffffffffffffffffff938416948601949094529116606084015264ffffffffff16608083015262ffffff1660a082015298975050505050505050565b61191d6040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600660205260408120805485908110611954576119546121eb565b60009182526020918290206040805160c08101825260029390930290910180546fffffffffffffffffffffffffffffffff808216855270010000000000000000000000000000000090910416938301939093526001909201546bffffffffffffffffffffffff808216938301939093526c01000000000000000000000000810490921660608201527801000000000000000000000000000000000000000000000000820464ffffffffff1660808201527d01000000000000000000000000000000000000000000000000000000000090910462ffffff1660a0820152949350505050565b6040517fa327f4d1000000000000000000000000000000000000000000000000000000008152306004820152600090819073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063a327f4d190602401602060405180830381865afa158015611ac7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aeb9190612109565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60005b82811015611b40578460800151611b2782611780565b6080015103611b3857809150611b40565b600101611b11565b509392505050565b815460005b81811015611e05578260800151848281548110611b6c57611b6c6121eb565b60009182526020909120600290910201600101547801000000000000000000000000000000000000000000000000900464ffffffffff1603611dfd576000611bb56001846120a4565b9050808214611dab57848181548110611bd057611bd06121eb565b9060005260206000209060020201858381548110611bf057611bf06121eb565b60009182526020909120825460029092020180547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff92831690811782558354700100000000000000000000000000000000908190049093169092029091178155600191820180549290910180547fffffffffffffffffffffffffffffffffffffffff00000000000000000000000081166bffffffffffffffffffffffff948516908117835583546c01000000000000000000000000908190049095169094027fffffffffffffffff00000000000000000000000000000000000000000000000090911690931792909217808355815464ffffffffff78010000000000000000000000000000000000000000000000009182900416027fffffff0000000000ffffffffffffffffffffffffffffffffffffffffffffffff821681178455915462ffffff7d0100000000000000000000000000000000000000000000000000000000009182900416027cffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90921677ffffffffffffffffffffffffffffffffffffffffffffffff909116171790555b84805480611dbb57611dbb61221a565b60008281526020812060027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9093019283020181815560010155905550611e05565b600101611b4d565b5082548190036116bd5782826040517fb42f24d0000000000000000000000000000000000000000000000000000000008152600401610658929190612249565b600060208083528351808285015260005b81811015611e7257858101830151858201604001528201611e56565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611ed557600080fd5b919050565b60008060408385031215611eed57600080fd5b611ef683611eb1565b946020939093013593505050565b600080600060608486031215611f1957600080fd5b611f2284611eb1565b9250611f3060208501611eb1565b9150604084013590509250925092565b600060208284031215611f5257600080fd5b5035919050565b600060208284031215611f6b57600080fd5b611f7482611eb1565b9392505050565b60008060408385031215611f8e57600080fd5b611f9783611eb1565b9150611fa560208401611eb1565b90509250929050565b60008060008060808587031215611fc457600080fd5b843593506020850135925060408501359150611fe260608601611eb1565b905092959194509250565b600181811c9082168061200157607f821691505b60208210810361203a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082018082111561043657610436612040565b60006020828403121561209457600080fd5b81518015158114611f7457600080fd5b8181038181111561043657610436612040565b808202811582820484141761043657610436612040565b600082612104577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60006020828403121561211b57600080fd5b5051919050565b80516fffffffffffffffffffffffffffffffff81168114611ed557600080fd5b80516bffffffffffffffffffffffff81168114611ed557600080fd5b60008060008060008060c0878903121561217757600080fd5b61218087612122565b955061218e60208801612122565b945061219c60408801612142565b93506121aa60608801612142565b9250608087015164ffffffffff811681146121c457600080fd5b60a088015190925062ffffff811681146121dd57600080fd5b809150509295509295509295565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600060e0820160e083528085548083526101008501915086600052602092508260002060005b828110156122fa5781546fffffffffffffffffffffffffffffffff81168552608090811c8686015260018301546bffffffffffffffffffffffff8082166040880152606082811c909116908701529060c06122db82880184831c64ffffffffff1664ffffffffff169052565b60e89290921c60a087015250909301926002919091019060010161226f565b50505080925050611b4081840185805182526020810151602083015260408101516040830152606081015160608301526080810151608083015260a081015160a0830152505056fea26469706673582212206ac4e607d36dbdbe36c67785dfa81339923856d65fc410d068e25d0bfb635f8d64736f6c63430008130033
Deployed ByteCode
0x608060405234801561001057600080fd5b506004361061011a5760003560e01c806370a08231116100b2578063a9059cbb11610081578063dd62ed3e11610066578063dd62ed3e14610310578063e48a1ef314610356578063e7c5a4251461037d57600080fd5b8063a9059cbb1461028b578063b7af876b1461029e57600080fd5b806370a082311461020457806395d89b411461023a578063a327f4d114610242578063a457c2d71461027857600080fd5b806323b872dd116100ee57806323b872dd146101ba578063313ce567146101cd57806339509351146101dc5780636b7d3b49146101ef57600080fd5b8062d795b11461011f57806306fdde0314610170578063095ea7b31461018557806318160ddd146101a8575b600080fd5b6101467f000000000000000000000000347a96a5bd06d2e15199b032f46fb724d6c7304781565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b610178610390565b6040516101679190611e45565b610198610193366004611eda565b610422565b6040519015158152602001610167565b6002545b604051908152602001610167565b6101986101c8366004611f04565b61043c565b604051600c8152602001610167565b6101986101ea366004611eda565b610460565b6102026101fd366004611f40565b6104ac565b005b6101ac610212366004611f59565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b610178610589565b6101ac610250366004611f59565b73ffffffffffffffffffffffffffffffffffffffff1660009081526006602052604090205490565b610198610286366004611eda565b610598565b610198610299366004611eda565b61066e565b6102b16102ac366004611eda565b61067c565b604080516fffffffffffffffffffffffffffffffff97881681529690951660208701526bffffffffffffffffffffffff938416948601949094529116606084015264ffffffffff16608083015262ffffff1660a082015260c001610167565b6101ac61031e366004611f7b565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b6101467f0000000000000000000000005ee84583f67d5ecea5420dbb42b462896e7f8d0681565b61020261038b366004611fae565b610752565b60606003805461039f90611fed565b80601f01602080910402602001604051908101604052809291908181526020018280546103cb90611fed565b80156104185780601f106103ed57610100808354040283529160200191610418565b820191906000526020600020905b8154815290600101906020018083116103fb57829003601f168201915b5050505050905090565b600033610430818585610b39565b60019150505b92915050565b60003361044a858285610cec565b610455858585610dbd565b506001949350505050565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490919061043090829086906104a790879061206f565b610b39565b6104b461102c565b6040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018290527f000000000000000000000000347a96a5bd06d2e15199b032f46fb724d6c7304773ffffffffffffffffffffffffffffffffffffffff16906323b872dd906064016020604051808303816000875af115801561054d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105719190612082565b5061057b8161109f565b506105866001600555565b50565b60606004805461039f90611fed565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490919083811015610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6104558286868403610b39565b600033610430818585610dbd565b6006602052816000526040600020818154811061069857600080fd5b6000918252602090912060029091020180546001909101546fffffffffffffffffffffffffffffffff808316945070010000000000000000000000000000000090920490911691506bffffffffffffffffffffffff808216916c010000000000000000000000008104909116907801000000000000000000000000000000000000000000000000810464ffffffffff16907d010000000000000000000000000000000000000000000000000000000000900462ffffff1686565b61075a61102c565b600061076885858585611336565b905060008160a00151610779611527565b61078391906120a4565b905060006004836040015161079891906120b7565b90506107a26115bd565b821115610997576107bd846107b86002846120ce565b6115ca565b6107cc336107b86002846120ce565b7f000000000000000000000000347a96a5bd06d2e15199b032f46fb724d6c7304773ffffffffffffffffffffffffffffffffffffffff1663a9059cbb856002866020015161081a91906120ce565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016020604051808303816000875af115801561088a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ae9190612082565b507f000000000000000000000000347a96a5bd06d2e15199b032f46fb724d6c7304773ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33600286602001516108fd91906120ce565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016020604051808303816000875af115801561096d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109919190612082565b50610b26565b6109a184826115ca565b60208301516040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff868116600483015260248201929092527f000000000000000000000000347a96a5bd06d2e15199b032f46fb724d6c730479091169063a9059cbb906044016020604051808303816000875af1158015610a3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a629190612082565b5060408381015190517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff868116600483015260248201929092527f0000000000000000000000005ee84583f67d5ecea5420dbb42b462896e7f8d069091169063a9059cbb906044016020604051808303816000875af1158015610b00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b249190612082565b505b505050610b336001600555565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8316610bdb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610658565b73ffffffffffffffffffffffffffffffffffffffff8216610c7e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610658565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610b335781811015610db0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610658565b610b338484848403610b39565b73ffffffffffffffffffffffffffffffffffffffff8316610e60576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610658565b73ffffffffffffffffffffffffffffffffffffffff8216610f03576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610658565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205481811015610fb9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610658565b73ffffffffffffffffffffffffffffffffffffffff848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610b33565b600260055403611098576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610658565b6002600555565b6110d86040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b6040517f6b7d3b49000000000000000000000000000000000000000000000000000000008152600481018390527f0000000000000000000000005ee84583f67d5ecea5420dbb42b462896e7f8d0673ffffffffffffffffffffffffffffffffffffffff1690636b7d3b4990602401600060405180830381600087803b15801561116057600080fd5b505af1158015611174573d6000803e3d6000fd5b50505050600061118a6111856116c2565b611780565b33600090815260066020526040902090915061043690826040805160c08101825282516fffffffffffffffffffffffffffffffff90811682526020808501518216818401908152858501516bffffffffffffffffffffffff908116958501958652606080880151821690860190815260808089015164ffffffffff90811691880191825260a0998a015162ffffff9081169a89019a8b528b5460018181018e5560009d8e5297909c209851955188167001000000000000000000000000000000000295909716949094176002909a0290960198895595519790920180549551945196519093167d010000000000000000000000000000000000000000000000000000000000027cffffffffffffffffffffffffffffffffffffffffffffffffffffffffff969091167801000000000000000000000000000000000000000000000000029590951677ffffffffffffffffffffffffffffffffffffffffffffffff9382166c01000000000000000000000000027fffffffffffffffff0000000000000000000000000000000000000000000000009095169690911695909517929092171692909217179055565b61136f6040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b600061137b85846118e4565b9050838160800151146113bd576040517fa092962800000000000000000000000000000000000000000000000000000000815260048101859052602401610658565b60008612156113d2576113cf81611a38565b95505b60008612156114415760008160a001516113ea611527565b6113f491906120a4565b9050601e81101561143b576040517fde50ebd900000000000000000000000000000000000000000000000000000000815260048101829052601e6024820152604401610658565b506114ef565b6040517f781137fa00000000000000000000000000000000000000000000000000000000815260048101879052602481018590523060448201527f0000000000000000000000005ee84583f67d5ecea5420dbb42b462896e7f8d0673ffffffffffffffffffffffffffffffffffffffff169063781137fa90606401600060405180830381600087803b1580156114d657600080fd5b505af11580156114ea573d6000803e3d6000fd5b505050505b73ffffffffffffffffffffffffffffffffffffffff8316600090815260066020526040902061151e9082611b48565b95945050505050565b60007f0000000000000000000000005ee84583f67d5ecea5420dbb42b462896e7f8d0673ffffffffffffffffffffffffffffffffffffffff16635c9302c96040518163ffffffff1660e01b8152600401602060405180830381865afa158015611594573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115b89190612109565b905090565b60006115b8601e8061206f565b73ffffffffffffffffffffffffffffffffffffffff8216611647576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610658565b8060026000828254611659919061206f565b909155505073ffffffffffffffffffffffffffffffffffffffff8216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b505050565b6040517fa327f4d100000000000000000000000000000000000000000000000000000000815230600482015260009060019073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000005ee84583f67d5ecea5420dbb42b462896e7f8d06169063a327f4d190602401602060405180830381865afa158015611752573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117769190612109565b6115b891906120a4565b6117b96040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b6040517fb7af876b000000000000000000000000000000000000000000000000000000008152306004820152602481018390526000908190819081908190819073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000005ee84583f67d5ecea5420dbb42b462896e7f8d06169063b7af876b9060440160c060405180830381865afa158015611857573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061187b919061215e565b6040805160c0810182526fffffffffffffffffffffffffffffffff97881681529690951660208701526bffffffffffffffffffffffff938416948601949094529116606084015264ffffffffff16608083015262ffffff1660a082015298975050505050505050565b61191d6040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600660205260408120805485908110611954576119546121eb565b60009182526020918290206040805160c08101825260029390930290910180546fffffffffffffffffffffffffffffffff808216855270010000000000000000000000000000000090910416938301939093526001909201546bffffffffffffffffffffffff808216938301939093526c01000000000000000000000000810490921660608201527801000000000000000000000000000000000000000000000000820464ffffffffff1660808201527d01000000000000000000000000000000000000000000000000000000000090910462ffffff1660a0820152949350505050565b6040517fa327f4d1000000000000000000000000000000000000000000000000000000008152306004820152600090819073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000005ee84583f67d5ecea5420dbb42b462896e7f8d06169063a327f4d190602401602060405180830381865afa158015611ac7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aeb9190612109565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60005b82811015611b40578460800151611b2782611780565b6080015103611b3857809150611b40565b600101611b11565b509392505050565b815460005b81811015611e05578260800151848281548110611b6c57611b6c6121eb565b60009182526020909120600290910201600101547801000000000000000000000000000000000000000000000000900464ffffffffff1603611dfd576000611bb56001846120a4565b9050808214611dab57848181548110611bd057611bd06121eb565b9060005260206000209060020201858381548110611bf057611bf06121eb565b60009182526020909120825460029092020180547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff92831690811782558354700100000000000000000000000000000000908190049093169092029091178155600191820180549290910180547fffffffffffffffffffffffffffffffffffffffff00000000000000000000000081166bffffffffffffffffffffffff948516908117835583546c01000000000000000000000000908190049095169094027fffffffffffffffff00000000000000000000000000000000000000000000000090911690931792909217808355815464ffffffffff78010000000000000000000000000000000000000000000000009182900416027fffffff0000000000ffffffffffffffffffffffffffffffffffffffffffffffff821681178455915462ffffff7d0100000000000000000000000000000000000000000000000000000000009182900416027cffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90921677ffffffffffffffffffffffffffffffffffffffffffffffff909116171790555b84805480611dbb57611dbb61221a565b60008281526020812060027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9093019283020181815560010155905550611e05565b600101611b4d565b5082548190036116bd5782826040517fb42f24d0000000000000000000000000000000000000000000000000000000008152600401610658929190612249565b600060208083528351808285015260005b81811015611e7257858101830151858201604001528201611e56565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611ed557600080fd5b919050565b60008060408385031215611eed57600080fd5b611ef683611eb1565b946020939093013593505050565b600080600060608486031215611f1957600080fd5b611f2284611eb1565b9250611f3060208501611eb1565b9150604084013590509250925092565b600060208284031215611f5257600080fd5b5035919050565b600060208284031215611f6b57600080fd5b611f7482611eb1565b9392505050565b60008060408385031215611f8e57600080fd5b611f9783611eb1565b9150611fa560208401611eb1565b90509250929050565b60008060008060808587031215611fc457600080fd5b843593506020850135925060408501359150611fe260608601611eb1565b905092959194509250565b600181811c9082168061200157607f821691505b60208210810361203a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082018082111561043657610436612040565b60006020828403121561209457600080fd5b81518015158114611f7457600080fd5b8181038181111561043657610436612040565b808202811582820484141761043657610436612040565b600082612104577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60006020828403121561211b57600080fd5b5051919050565b80516fffffffffffffffffffffffffffffffff81168114611ed557600080fd5b80516bffffffffffffffffffffffff81168114611ed557600080fd5b60008060008060008060c0878903121561217757600080fd5b61218087612122565b955061218e60208801612122565b945061219c60408801612142565b93506121aa60608801612142565b9250608087015164ffffffffff811681146121c457600080fd5b60a088015190925062ffffff811681146121dd57600080fd5b809150509295509295509295565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600060e0820160e083528085548083526101008501915086600052602092508260002060005b828110156122fa5781546fffffffffffffffffffffffffffffffff81168552608090811c8686015260018301546bffffffffffffffffffffffff8082166040880152606082811c909116908701529060c06122db82880184831c64ffffffffff1664ffffffffff169052565b60e89290921c60a087015250909301926002919091019060010161226f565b50505080925050611b4081840185805182526020810151602083015260408101516040830152606081015160608301526080810151608083015260a081015160a0830152505056fea26469706673582212206ac4e607d36dbdbe36c67785dfa81339923856d65fc410d068e25d0bfb635f8d64736f6c63430008130033