编译器
0.8.11+commit.d7f03943
文件 1 的 14:AccessControl.sol
pragma solidity ^0.8.0;
import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";
abstract contract AccessControl is Context, IAccessControl, ERC165 {
struct RoleData {
mapping(address => bool) members;
bytes32 adminRole;
}
mapping(bytes32 => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
modifier onlyRole(bytes32 role) {
_checkRole(role, _msgSender());
_;
}
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
}
function hasRole(bytes32 role, address account) public view override returns (bool) {
return _roles[role].members[account];
}
function _checkRole(bytes32 role, address account) internal view {
if (!hasRole(role, account)) {
revert(
string(
abi.encodePacked(
"AccessControl: account ",
Strings.toHexString(uint160(account), 20),
" is missing role ",
Strings.toHexString(uint256(role), 32)
)
)
);
}
}
function getRoleAdmin(bytes32 role) public view override returns (bytes32) {
return _roles[role].adminRole;
}
function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
_grantRole(role, account);
}
function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
_revokeRole(role, account);
}
function renounceRole(bytes32 role, address account) public virtual override {
require(account == _msgSender(), "AccessControl: can only renounce roles for self");
_revokeRole(role, account);
}
function _setupRole(bytes32 role, address account) internal virtual {
_grantRole(role, account);
}
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
bytes32 previousAdminRole = getRoleAdmin(role);
_roles[role].adminRole = adminRole;
emit RoleAdminChanged(role, previousAdminRole, adminRole);
}
function _grantRole(bytes32 role, address account) internal virtual {
if (!hasRole(role, account)) {
_roles[role].members[account] = true;
emit RoleGranted(role, account, _msgSender());
}
}
function _revokeRole(bytes32 role, address account) internal virtual {
if (hasRole(role, account)) {
_roles[role].members[account] = false;
emit RoleRevoked(role, account, _msgSender());
}
}
}
文件 2 的 14:Context.sol
pragma solidity ^0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
文件 3 的 14:ECDSA.sol
pragma solidity ^0.8.0;
import "../Strings.sol";
library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return;
} else if (error == RecoverError.InvalidSignature) {
revert("ECDSA: invalid signature");
} else if (error == RecoverError.InvalidSignatureLength) {
revert("ECDSA: invalid signature length");
} else if (error == RecoverError.InvalidSignatureS) {
revert("ECDSA: invalid signature 's' value");
} else if (error == RecoverError.InvalidSignatureV) {
revert("ECDSA: invalid signature 'v' value");
}
}
function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
if (signature.length == 65) {
bytes32 r;
bytes32 s;
uint8 v;
assembly {
r := mload(add(signature, 0x20))
s := mload(add(signature, 0x40))
v := byte(0, mload(add(signature, 0x60)))
}
return tryRecover(hash, v, r, s);
} else if (signature.length == 64) {
bytes32 r;
bytes32 vs;
assembly {
r := mload(add(signature, 0x20))
vs := mload(add(signature, 0x40))
}
return tryRecover(hash, r, vs);
} else {
return (address(0), RecoverError.InvalidSignatureLength);
}
}
function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, signature);
_throwError(error);
return recovered;
}
function tryRecover(
bytes32 hash,
bytes32 r,
bytes32 vs
) internal pure returns (address, RecoverError) {
bytes32 s;
uint8 v;
assembly {
s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
v := add(shr(255, vs), 27)
}
return tryRecover(hash, v, r, s);
}
function recover(
bytes32 hash,
bytes32 r,
bytes32 vs
) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, r, vs);
_throwError(error);
return recovered;
}
function tryRecover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address, RecoverError) {
if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
return (address(0), RecoverError.InvalidSignatureS);
}
if (v != 27 && v != 28) {
return (address(0), RecoverError.InvalidSignatureV);
}
address signer = ecrecover(hash, v, r, s);
if (signer == address(0)) {
return (address(0), RecoverError.InvalidSignature);
}
return (signer, RecoverError.NoError);
}
function recover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, v, r, s);
_throwError(error);
return recovered;
}
function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
}
function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
}
function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
}
}
文件 4 的 14:ERC165.sol
pragma solidity ^0.8.0;
import "./IERC165.sol";
abstract contract ERC165 is IERC165 {
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}
文件 5 的 14:ERC20.sol
pragma solidity ^0.8.0;
import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";
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;
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
function name() public view virtual override returns (string memory) {
return _name;
}
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
function decimals() public view virtual override returns (uint8) {
return 18;
}
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
uint256 currentAllowance = _allowances[sender][_msgSender()];
require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
unchecked {
_approve(sender, _msgSender(), currentAllowance - amount);
}
return true;
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
return true;
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
uint256 currentAllowance = _allowances[_msgSender()][spender];
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(_msgSender(), spender, currentAllowance - subtractedValue);
}
return true;
}
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
uint256 senderBalance = _balances[sender];
require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
unchecked {
_balances[sender] = senderBalance - amount;
}
_balances[recipient] += amount;
emit Transfer(sender, recipient, amount);
_afterTokenTransfer(sender, recipient, amount);
}
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += amount;
_balances[account] += amount;
emit Transfer(address(0), account, amount);
_afterTokenTransfer(address(0), account, amount);
}
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;
}
_totalSupply -= amount;
emit Transfer(account, address(0), amount);
_afterTokenTransfer(account, address(0), amount);
}
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);
}
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}
文件 6 的 14:IAccessControl.sol
pragma solidity ^0.8.0;
interface IAccessControl {
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
function hasRole(bytes32 role, address account) external view returns (bool);
function getRoleAdmin(bytes32 role) external view returns (bytes32);
function grantRole(bytes32 role, address account) external;
function revokeRole(bytes32 role, address account) external;
function renounceRole(bytes32 role, address account) external;
}
文件 7 的 14:IERC165.sol
pragma solidity ^0.8.0;
interface IERC165 {
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
文件 8 的 14:IERC20.sol
pragma solidity ^0.8.0;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
文件 9 的 14:IERC20Metadata.sol
pragma solidity ^0.8.0;
import "../IERC20.sol";
interface IERC20Metadata is IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
}
文件 10 的 14:IERC721.sol
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
interface IERC721 is IERC165 {
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
function balanceOf(address owner) external view returns (uint256 balance);
function ownerOf(uint256 tokenId) external view returns (address owner);
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
function approve(address to, uint256 tokenId) external;
function getApproved(uint256 tokenId) external view returns (address operator);
function setApprovalForAll(address operator, bool _approved) external;
function isApprovedForAll(address owner, address operator) external view returns (bool);
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
}
文件 11 的 14:MerkleProof.sol
pragma solidity ^0.8.0;
library MerkleProof {
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
return processProof(proof, leaf) == root;
}
function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
bytes32 proofElement = proof[i];
if (computedHash <= proofElement) {
computedHash = keccak256(abi.encodePacked(computedHash, proofElement));
} else {
computedHash = keccak256(abi.encodePacked(proofElement, computedHash));
}
}
return computedHash;
}
}
文件 12 的 14:Ownable.sol
pragma solidity ^0.8.0;
import "../utils/Context.sol";
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
_transferOwnership(_msgSender());
}
function owner() public view virtual returns (address) {
return _owner;
}
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
文件 13 的 14:Strings.sol
pragma solidity ^0.8.0;
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
function toString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
}
文件 14 的 14:WATTS.sol
pragma solidity 0.8.11;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import { MerkleProof } from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract WATTS is AccessControl, Ownable, ERC20 {
using ECDSA for bytes32;
IERC721 public slotieNFT;
IERC721 public slotieJrNFT;
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
bytes32 public constant BURNER_ROLE = keccak256("BURNER_ROLE");
uint256 public deployedTime = block.timestamp;
uint256 public lockPeriod = 90 days;
event setLockPeriodEvent(uint256 indexed lockperiod);
event setDeployTimeEvent(uint256 indexed deployTime);
mapping(address => uint256) private _claimableBalances;
uint256 private _claimableTotalSupply;
uint256 public slotieIssuanceRate = 10 * 10**18;
uint256 public slotieIssuancePeriod = 1 days;
uint256 public slotieClaimStart = 1644624000;
uint256 public slotieDeployTime = 1638877989;
uint256 public slotieEarnPeriod = lockPeriod - (deployedTime - slotieDeployTime);
uint256 public slotieClaimEndTime = deployedTime + slotieEarnPeriod;
mapping(address => uint256) slotieAddressToAccumulatedWATTs;
mapping(address => uint256) slotieAddressToLastClaimedTimeStamp;
bytes32 public slotiePreClaimMerkleProof = "";
bytes32 public slotieEHRMerkleProof = "";
mapping(address => uint256) public slotieAddressToPreClaim;
mapping(address => uint256) public slotieAddressToEHRNonce;
event ClaimedRewardFromSlotie(address indexed user, uint256 reward, uint256 timestamp);
event AccumulatedRewardFromSlotie(address indexed user, uint256 reward, uint256 timestamp);
event setSlotieNFTEvent(address indexed slotieNFT);
event setSlotieIssuanceRateEvent(uint256 indexed issuanceRate);
event setSlotieIssuancePeriodEvent(uint256 indexed issuancePeriod);
event setSlotieClaimStartEvent(uint256 indexed slotieClaimStart);
event setSlotieEarnPeriodEvent(uint256 indexed slotieEarnPeriod);
event setSlotieClaimEndTimeEvent(uint256 indexed slotieClaimEndTime);
event setSlotiePreClaimMerkleProofEvent(bytes32 indexed slotiePreClaimMerkleProof);
event setSlotieEHRMerkleProofEvent(bytes32 indexed slotieEHRMerkleProof);
uint256 public slotieJrIssuanceRate = 10 * 10**18;
uint256 public slotieJrIssuancePeriod = 1 days;
uint256 public slotieJrDeployTime;
uint256 public slotieJrEarnPeriod = lockPeriod;
uint256 public slotieJrClaimEndTime;
mapping(address => uint256) slotieJrAddressToLastClaimedTimeStamp;
bytes32 public slotieJrEHRMerkleProof = "";
mapping(address => uint256) public slotieJrAddressToEHRNonce;
event ClaimedRewardFromSlotieJr(address indexed user, uint256 reward, uint256 timestamp);
event setSlotieJrNFTEvent(address indexed slotieJrNFT);
event setSlotieJrIssuanceRateEvent(uint256 indexed issuanceRate);
event setSlotieJrIssuancePeriodEvent(uint256 indexed issuancePeriod);
event setSlotieJrDeployTimeEvent(uint256 indexed slotieJrDeployTime);
event setSlotieJrEarnPeriodEvent(uint256 indexed slotieJrEarnPeriod);
event setSlotieJrClaimEndTimeEvent(uint256 indexed slotieJrClaimEndTime);
event setSlotieJrEHRMerkleProofEvent(bytes32 indexed slotieEHRMerkleProof);
uint256 public blackListPeriod = 15 minutes;
uint256 public blackListPeriodStart;
mapping(address => bool) public isBlackListed;
mapping(address=> bool) public isDex;
modifier slotieCanClaim() {
require(slotieNFT.balanceOf(msg.sender) > 0, "NOT A SLOTIE HOLDER");
require(block.timestamp >= slotieClaimStart, "SLOTIE CLAIM LOCKED");
require(address(slotieNFT) != address(0), "SLOTIE NFT NOT SET");
_;
}
modifier slotieJrCanClaim() {
require(slotieJrNFT.balanceOf(msg.sender) > 0, "NOT A SLOTIE JR HOLDER");
require(address(slotieJrNFT) != address(0), "SLOTIE JR NFT NOT SET");
_;
}
modifier notBlackListed(address from) {
require(!isBlackListed[from], "ACCOUNT BLACKLISTED");
_;
}
constructor(
address _slotieNFT
) ERC20("WATTS", "$WATTS") Ownable() {
_setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
_setupRole(MINTER_ROLE, msg.sender);
_setupRole(BURNER_ROLE, msg.sender);
slotieNFT = IERC721(_slotieNFT);
}
function balanceOf(address account) public view override returns (uint256) {
return super.balanceOf(account) + _claimableBalances[account];
}
function totalSupply() public view override returns (uint256) {
return super.totalSupply() + _claimableTotalSupply;
}
function _slotieClaim(address recipient, uint256 preClaimAmount, uint256 ehrAmount, uint256 nonce, bytes32[] memory preClaimProof, bytes32[] memory ehrProof) internal {
uint256 preClaimApplicable;
uint256 ehrApplicable;
if (preClaimProof.length > 0 && preClaimAmount != 0) {
bytes32 leaf = keccak256(abi.encodePacked(recipient, preClaimAmount));
require(MerkleProof.verify(preClaimProof, slotiePreClaimMerkleProof, leaf), "SLOTIE INVALID PRE CLAIM PROOF");
require(slotieAddressToPreClaim[recipient] == 0, "SLOTIE PRE CLAIM ALREADY DONE");
slotieAddressToPreClaim[recipient] = 1;
preClaimApplicable = 1;
}
if (ehrProof.length > 0 && ehrAmount != 0) {
bytes32 leaf = keccak256(abi.encodePacked(recipient, ehrAmount, nonce));
require(nonce == slotieAddressToEHRNonce[recipient], "SLOTIE INCORRECT NONCE");
require(MerkleProof.verify(ehrProof, slotieEHRMerkleProof, leaf), "SLOTIE INVALID EHR PROOF");
slotieAddressToEHRNonce[recipient] = slotieAddressToEHRNonce[recipient] + 1;
ehrApplicable = 1;
}
uint256 balance = slotieNFT.balanceOf(recipient);
uint256 lastClaimed = slotieAddressToLastClaimedTimeStamp[recipient];
uint256 accumulatedWatts = slotieAddressToAccumulatedWATTs[recipient];
uint256 currentTime = block.timestamp;
if (currentTime >= slotieClaimEndTime) {
currentTime = slotieClaimEndTime;
}
if (deployedTime > lastClaimed) {
lastClaimed = deployedTime;
} else if (lastClaimed == slotieClaimEndTime) {
lastClaimed = currentTime;
}
uint256 reward = (currentTime - lastClaimed) * slotieIssuanceRate * balance / slotieIssuancePeriod;
if (currentTime >= slotieClaimStart && accumulatedWatts != 0) {
reward = reward + accumulatedWatts;
delete slotieAddressToAccumulatedWATTs[recipient];
}
if (preClaimApplicable != 0) {
reward = reward + preClaimAmount;
}
if (ehrApplicable != 0) {
reward = reward + ehrAmount;
}
slotieAddressToLastClaimedTimeStamp[recipient] = currentTime;
if (reward > 0) {
if (currentTime < slotieClaimStart) {
slotieAddressToAccumulatedWATTs[recipient] = slotieAddressToAccumulatedWATTs[recipient] + reward;
emit AccumulatedRewardFromSlotie(recipient, reward, currentTime);
} else {
_mintClaimable(recipient, reward);
emit ClaimedRewardFromSlotie(recipient, reward, currentTime);
}
}
}
function _slotieJrClaim(address recipient, uint256 giftAmount, uint256 nonce, bytes32[] memory proof) internal {
uint256 giftApplicable;
if (proof.length > 0) {
bytes32 leaf = keccak256(abi.encodePacked(recipient, giftAmount, nonce));
require(nonce == slotieJrAddressToEHRNonce[recipient], "SLOTIE JR INCORRECT NONCE");
require(MerkleProof.verify(proof, slotieJrEHRMerkleProof, leaf), "SLOTIE JR INVALID EHR PROOF");
slotieJrAddressToEHRNonce[recipient] = slotieJrAddressToEHRNonce[recipient] + 1;
giftApplicable = 1;
}
uint256 balance = slotieJrNFT.balanceOf(recipient);
uint256 lastClaimed = slotieJrAddressToLastClaimedTimeStamp[recipient];
uint256 currentTime = block.timestamp;
if (currentTime >= slotieJrClaimEndTime) {
currentTime = slotieJrClaimEndTime;
}
if (slotieJrDeployTime > lastClaimed) {
lastClaimed = slotieJrDeployTime;
} else if (lastClaimed == slotieJrClaimEndTime) {
lastClaimed = currentTime;
}
uint256 reward = (currentTime - lastClaimed) * slotieJrIssuanceRate * balance / slotieJrIssuancePeriod;
if (giftApplicable != 0) {
reward = reward + giftApplicable;
}
slotieJrAddressToLastClaimedTimeStamp[recipient] = currentTime;
if (reward > 0) {
_mintClaimable(recipient, reward);
emit ClaimedRewardFromSlotieJr(recipient, reward, currentTime);
}
}
function slotieGetClaimableBalance(address recipient, uint256 preClaimAmount, uint256 ehrAmount, uint256 nonce, bytes32[] memory preClaimProof, bytes32[] memory ehrProof) external view returns (uint256) {
require(address(slotieNFT) != address(0), "SLOTIE NFT NOT SET");
uint256 preClaimApplicable;
uint256 ehrApplicable;
if (preClaimProof.length > 0 && preClaimAmount != 0) {
bytes32 leaf = keccak256(abi.encodePacked(recipient, preClaimAmount));
preClaimApplicable = MerkleProof.verify(preClaimProof, slotiePreClaimMerkleProof, leaf) && slotieAddressToPreClaim[recipient] == 0 ? 1 : 0;
}
if (ehrProof.length > 0 && ehrAmount != 0) {
bytes32 leaf = keccak256(abi.encodePacked(recipient, ehrAmount, nonce));
ehrApplicable = MerkleProof.verify(ehrProof, slotieEHRMerkleProof, leaf) && nonce == slotieAddressToEHRNonce[recipient] ? 1 : 0;
}
uint256 balance = slotieNFT.balanceOf(recipient);
uint256 lastClaimed = slotieAddressToLastClaimedTimeStamp[recipient];
uint256 accumulatedWatts = slotieAddressToAccumulatedWATTs[recipient];
uint256 currentTime = block.timestamp;
if (currentTime >= slotieClaimEndTime) {
currentTime = slotieClaimEndTime;
}
if (deployedTime > lastClaimed) {
lastClaimed = deployedTime;
} else if (lastClaimed == slotieClaimEndTime) {
lastClaimed = currentTime;
}
uint256 reward = (currentTime - lastClaimed) * slotieIssuanceRate * balance / slotieIssuancePeriod;
if (accumulatedWatts != 0) {
reward = reward + accumulatedWatts;
}
if (preClaimApplicable != 0) {
reward = reward + preClaimAmount;
}
if (ehrApplicable != 0) {
reward = reward + ehrAmount;
}
return reward;
}
function slotieJrGetClaimableBalance(address recipient, uint256 giftAmount, uint256 nonce, bytes32[] memory proof) external view returns (uint256) {
require(address(slotieJrNFT) != address(0), "SLOTIE JR NFT NOT SET");
uint256 giftApplicable;
if (proof.length > 0) {
bytes32 leaf = keccak256(abi.encodePacked(recipient, giftAmount, nonce));
giftApplicable = MerkleProof.verify(proof, slotieJrEHRMerkleProof, leaf) && nonce == slotieJrAddressToEHRNonce[recipient] ? 1 : 0;
}
uint256 balance = slotieJrNFT.balanceOf(recipient);
uint256 lastClaimed = slotieJrAddressToLastClaimedTimeStamp[recipient];
uint256 currentTime = block.timestamp;
if (currentTime >= slotieJrClaimEndTime) {
currentTime = slotieJrClaimEndTime;
}
if (slotieJrDeployTime > lastClaimed) {
lastClaimed = slotieJrDeployTime;
} else if (lastClaimed == slotieJrClaimEndTime) {
lastClaimed = currentTime;
}
uint256 reward = (currentTime - lastClaimed) * slotieJrIssuanceRate * balance / slotieJrIssuancePeriod;
if (giftApplicable != 0) {
reward = reward + giftApplicable;
}
return reward;
}
function slotieClaim(uint256 preClaimAmount, uint256 ehrAmount, uint256 nonce, bytes32[] memory preClaimProof, bytes32[] memory ehrProof) external slotieCanClaim {
_slotieClaim(msg.sender, preClaimAmount, ehrAmount, nonce, preClaimProof, ehrProof);
}
function slotieJrClaim(uint256 giftAmount, uint256 nonce, bytes32[] calldata proof) external slotieJrCanClaim {
_slotieJrClaim(msg.sender, giftAmount, nonce, proof);
}
function updateReward(address from, address to) external {
require(msg.sender == address(slotieNFT), "ONLY CALLABLE FROM SLOTIE");
bytes32[] memory empty;
if (from != address(0)) {
_slotieClaim(from, 0, 0, 0, empty, empty);
}
if (to != address(0)) {
_slotieClaim(to, 0, 0, 0, empty, empty);
}
}
function slotieJrUpdateReward(address from, address to) external {
require(msg.sender == address(slotieJrNFT), "ONLY CALLABLE FROM SLOTIE JR");
bytes32[] memory empty;
if (from != address(0)) {
_slotieJrClaim(from, 0, 0, empty);
}
if (to != address(0)) {
_slotieJrClaim(to, 0, 0, empty);
}
}
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal override notBlackListed(from) {
if (from != address(0)) {
uint256 claimableBalanceSender = _claimableBalances[from];
if (block.timestamp >= deployedTime + lockPeriod && claimableBalanceSender != 0) {
_burnClaimable(from, claimableBalanceSender);
_mint(from, claimableBalanceSender);
}
}
super._beforeTokenTransfer(from, to, amount);
}
function _transfer(
address sender,
address recipient,
uint256 amount
) internal override notBlackListed(sender) notBlackListed(recipient) {
if(
block.timestamp >= blackListPeriodStart &&
block.timestamp < blackListPeriodStart + blackListPeriod &&
!isDex[recipient] &&
recipient != address(0)) {
isBlackListed[recipient] = true;
} else {
super._transfer(sender, recipient, amount);
}
}
function seeClaimableBalanceOfUser(address user) external view onlyOwner returns(uint256) {
return _claimableBalances[user];
}
function seeClaimableTotalSupply() external view onlyOwner returns(uint256) {
return _claimableTotalSupply;
}
function mint(address _to, uint256 _amount) public onlyRole(MINTER_ROLE) {
_mint(_to, _amount);
}
function burn(address _from, uint256 _amount) external onlyRole(BURNER_ROLE) {
_burn(_from, _amount);
}
function _mintClaimable(address _to, uint256 _amount) internal {
require(_to != address(0), "ERC20-claimable: mint to the zero address");
_claimableBalances[_to] += _amount;
_claimableTotalSupply += _amount;
}
function mintClaimable(address _to, uint256 _amount) public onlyRole(MINTER_ROLE) {
_mintClaimable(_to, _amount);
}
function _burnClaimable(address _from, uint256 _amount) internal {
require(_from != address(0), "ERC20-claimable: burn from the zero address");
uint256 accountBalance = _claimableBalances[_from];
require(accountBalance >= _amount, "ERC20-claimable: burn amount exceeds balance");
unchecked {
_claimableBalances[_from] = accountBalance - _amount;
}
_claimableTotalSupply -= _amount;
}
function burnClaimable(address _from, uint256 _amount) public onlyRole(BURNER_ROLE) {
_burnClaimable(_from, _amount);
}
function setSlotieNFT(address newSlotieNFT) external onlyOwner {
slotieNFT = IERC721(newSlotieNFT);
emit setSlotieNFTEvent(newSlotieNFT);
}
function setSlotieJrNFT(address newSlotieJrNFT) external onlyOwner {
slotieJrNFT = IERC721(newSlotieJrNFT);
emit setSlotieJrNFTEvent(newSlotieJrNFT);
}
function setDeployTime(uint256 newDeployTime) external onlyOwner {
deployedTime = newDeployTime;
emit setDeployTimeEvent(newDeployTime);
}
function setLockPeriod(uint256 newLockPeriod) external onlyOwner {
lockPeriod = newLockPeriod;
emit setLockPeriodEvent(newLockPeriod);
}
function setSlotieIssuanceRate(uint256 newSlotieIssuanceRate) external onlyOwner {
slotieIssuanceRate = newSlotieIssuanceRate;
emit setSlotieIssuanceRateEvent(newSlotieIssuanceRate);
}
function setSlotieIssuancePeriod(uint256 newSlotieIssuancePeriod) external onlyOwner {
slotieIssuancePeriod = newSlotieIssuancePeriod;
emit setSlotieIssuancePeriodEvent(newSlotieIssuancePeriod);
}
function setSlotieClaimStart(uint256 newSlotieClaimStart) external onlyOwner {
slotieClaimStart = newSlotieClaimStart;
emit setSlotieClaimStartEvent(newSlotieClaimStart);
}
function setSlotieEarnPeriod(uint256 newSlotieEarnPeriod) external onlyOwner {
slotieEarnPeriod = newSlotieEarnPeriod;
emit setSlotieEarnPeriodEvent(newSlotieEarnPeriod);
}
function setSlotieClaimEndTime(uint256 newSlotieClaimEndTime) external onlyOwner {
slotieClaimEndTime = newSlotieClaimEndTime;
emit setSlotieClaimEndTimeEvent(newSlotieClaimEndTime);
}
function setSlotiePreClaimMerkleProof(bytes32 newSlotiePreClaimMerkleProof) external onlyOwner {
slotiePreClaimMerkleProof = newSlotiePreClaimMerkleProof;
emit setSlotiePreClaimMerkleProofEvent(newSlotiePreClaimMerkleProof);
}
function setSlotieEHRMerkleProof(bytes32 newSlotieEHRMerkleProof) external onlyOwner {
slotieEHRMerkleProof = newSlotieEHRMerkleProof;
emit setSlotieEHRMerkleProofEvent(newSlotieEHRMerkleProof);
}
function setSlotieDeployTimeAndClaimEndTime(uint256 newDeployTime, uint256 newSlotieClaimEndTime) external onlyOwner {
deployedTime = newDeployTime;
slotieClaimEndTime = newSlotieClaimEndTime;
emit setDeployTimeEvent(newDeployTime);
emit setSlotieClaimEndTimeEvent(newSlotieClaimEndTime);
}
function setSlotieJrIssuanceRate(uint256 newSlotieJrIssuanceRate) external onlyOwner {
slotieJrIssuanceRate = newSlotieJrIssuanceRate;
emit setSlotieJrIssuanceRateEvent(newSlotieJrIssuanceRate);
}
function setSlotieJrIssuancePeriod(uint256 newSlotieJrIssuancePeriod) external onlyOwner {
slotieJrIssuancePeriod = newSlotieJrIssuancePeriod;
emit setSlotieJrIssuancePeriodEvent(newSlotieJrIssuancePeriod);
}
function setSlotieJrDeployTime(uint256 newSlotieJrDeployTime) external onlyOwner {
slotieJrDeployTime = newSlotieJrDeployTime;
emit setSlotieJrDeployTimeEvent(newSlotieJrDeployTime);
}
function setSlotieJrEarnPeriod(uint256 newSlotieJrEarnPeriod) external onlyOwner {
slotieJrEarnPeriod = newSlotieJrEarnPeriod;
emit setSlotieJrEarnPeriodEvent(newSlotieJrEarnPeriod);
}
function setSlotieJrClaimEndTime(uint256 newSlotieJrClaimEndTime) external onlyOwner {
slotieJrClaimEndTime = newSlotieJrClaimEndTime;
emit setSlotieJrClaimEndTimeEvent(newSlotieJrClaimEndTime);
}
function setSlotieJrEHRMerkleProof(bytes32 newSlotieJrEHRMerkleProof) external onlyOwner {
slotieJrEHRMerkleProof = newSlotieJrEHRMerkleProof;
emit setSlotieJrEHRMerkleProofEvent(newSlotieJrEHRMerkleProof);
}
function setSlotieJrDeployTimeAndClaimEndTime(uint256 newSlotieJrDeployTime, uint256 newSlotieJrClaimEndTime) external onlyOwner {
slotieJrDeployTime = newSlotieJrDeployTime;
slotieJrClaimEndTime = newSlotieJrClaimEndTime;
emit setSlotieJrDeployTimeEvent(newSlotieJrDeployTime);
emit setSlotieJrClaimEndTimeEvent(newSlotieJrClaimEndTime);
}
function setBlackListPeriodStart(uint256 newBlackListPeriodStart) external onlyOwner {
blackListPeriodStart = newBlackListPeriodStart;
}
function setBlackListPeriod(uint256 newBlackListPeriod) external onlyOwner {
blackListPeriod = newBlackListPeriod;
}
function setIsBlackListed(address _address, bool _isBlackListed) external onlyOwner {
isBlackListed[_address] = _isBlackListed;
}
function setIsDex(address _address, bool _isDex) external onlyOwner {
isDex[_address] = _isDex;
}
}
{
"compilationTarget": {
"contracts/WATTS.sol": "WATTS"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs",
"useLiteralContent": true
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": []
}
[{"inputs":[{"internalType":"address","name":"_slotieNFT","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"AccumulatedRewardFromSlotie","type":"event"},{"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":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"ClaimedRewardFromSlotie","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"ClaimedRewardFromSlotieJr","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"deployTime","type":"uint256"}],"name":"setDeployTimeEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"lockperiod","type":"uint256"}],"name":"setLockPeriodEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"slotieClaimEndTime","type":"uint256"}],"name":"setSlotieClaimEndTimeEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"slotieClaimStart","type":"uint256"}],"name":"setSlotieClaimStartEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"slotieEHRMerkleProof","type":"bytes32"}],"name":"setSlotieEHRMerkleProofEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"slotieEarnPeriod","type":"uint256"}],"name":"setSlotieEarnPeriodEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"issuancePeriod","type":"uint256"}],"name":"setSlotieIssuancePeriodEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"issuanceRate","type":"uint256"}],"name":"setSlotieIssuanceRateEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"slotieJrClaimEndTime","type":"uint256"}],"name":"setSlotieJrClaimEndTimeEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"slotieJrDeployTime","type":"uint256"}],"name":"setSlotieJrDeployTimeEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"slotieEHRMerkleProof","type":"bytes32"}],"name":"setSlotieJrEHRMerkleProofEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"slotieJrEarnPeriod","type":"uint256"}],"name":"setSlotieJrEarnPeriodEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"issuancePeriod","type":"uint256"}],"name":"setSlotieJrIssuancePeriodEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"issuanceRate","type":"uint256"}],"name":"setSlotieJrIssuanceRateEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"slotieJrNFT","type":"address"}],"name":"setSlotieJrNFTEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"slotieNFT","type":"address"}],"name":"setSlotieNFTEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"slotiePreClaimMerkleProof","type":"bytes32"}],"name":"setSlotiePreClaimMerkleProofEvent","type":"event"},{"inputs":[],"name":"BURNER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"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":"blackListPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"blackListPeriodStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"burnClaimable","outputs":[],"stateMutability":"nonpayable","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":[],"name":"deployedTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","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":"","type":"address"}],"name":"isBlackListed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isDex","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mintClaimable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"seeClaimableBalanceOfUser","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"seeClaimableTotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"newBlackListPeriod","type":"uint256"}],"name":"setBlackListPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newBlackListPeriodStart","type":"uint256"}],"name":"setBlackListPeriodStart","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newDeployTime","type":"uint256"}],"name":"setDeployTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"bool","name":"_isBlackListed","type":"bool"}],"name":"setIsBlackListed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"bool","name":"_isDex","type":"bool"}],"name":"setIsDex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newLockPeriod","type":"uint256"}],"name":"setLockPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newSlotieClaimEndTime","type":"uint256"}],"name":"setSlotieClaimEndTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newSlotieClaimStart","type":"uint256"}],"name":"setSlotieClaimStart","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newDeployTime","type":"uint256"},{"internalType":"uint256","name":"newSlotieClaimEndTime","type":"uint256"}],"name":"setSlotieDeployTimeAndClaimEndTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"newSlotieEHRMerkleProof","type":"bytes32"}],"name":"setSlotieEHRMerkleProof","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newSlotieEarnPeriod","type":"uint256"}],"name":"setSlotieEarnPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newSlotieIssuancePeriod","type":"uint256"}],"name":"setSlotieIssuancePeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newSlotieIssuanceRate","type":"uint256"}],"name":"setSlotieIssuanceRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newSlotieJrClaimEndTime","type":"uint256"}],"name":"setSlotieJrClaimEndTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newSlotieJrDeployTime","type":"uint256"}],"name":"setSlotieJrDeployTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newSlotieJrDeployTime","type":"uint256"},{"internalType":"uint256","name":"newSlotieJrClaimEndTime","type":"uint256"}],"name":"setSlotieJrDeployTimeAndClaimEndTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"newSlotieJrEHRMerkleProof","type":"bytes32"}],"name":"setSlotieJrEHRMerkleProof","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newSlotieJrEarnPeriod","type":"uint256"}],"name":"setSlotieJrEarnPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newSlotieJrIssuancePeriod","type":"uint256"}],"name":"setSlotieJrIssuancePeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newSlotieJrIssuanceRate","type":"uint256"}],"name":"setSlotieJrIssuanceRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newSlotieJrNFT","type":"address"}],"name":"setSlotieJrNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newSlotieNFT","type":"address"}],"name":"setSlotieNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"newSlotiePreClaimMerkleProof","type":"bytes32"}],"name":"setSlotiePreClaimMerkleProof","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"slotieAddressToEHRNonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"slotieAddressToPreClaim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"preClaimAmount","type":"uint256"},{"internalType":"uint256","name":"ehrAmount","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes32[]","name":"preClaimProof","type":"bytes32[]"},{"internalType":"bytes32[]","name":"ehrProof","type":"bytes32[]"}],"name":"slotieClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"slotieClaimEndTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"slotieClaimStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"slotieDeployTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"slotieEHRMerkleProof","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"slotieEarnPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"preClaimAmount","type":"uint256"},{"internalType":"uint256","name":"ehrAmount","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes32[]","name":"preClaimProof","type":"bytes32[]"},{"internalType":"bytes32[]","name":"ehrProof","type":"bytes32[]"}],"name":"slotieGetClaimableBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"slotieIssuancePeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"slotieIssuanceRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"slotieJrAddressToEHRNonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"giftAmount","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"slotieJrClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"slotieJrClaimEndTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"slotieJrDeployTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"slotieJrEHRMerkleProof","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"slotieJrEarnPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"giftAmount","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"slotieJrGetClaimableBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"slotieJrIssuancePeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"slotieJrIssuanceRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"slotieJrNFT","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"}],"name":"slotieJrUpdateReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"slotieNFT","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"slotiePreClaimMerkleProof","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"}],"name":"updateReward","outputs":[],"stateMutability":"nonpayable","type":"function"}]