文件 1 的 15:Address.sol
pragma solidity ^0.8.0;
library Address {
function isContract(address account) internal view returns (bool) {
uint256 size;
assembly {
size := extcodesize(account)
}
return size > 0;
}
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
if (returndata.length > 0) {
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
文件 2 的 15: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 的 15:ERC165.sol
pragma solidity ^0.8.0;
import "../Interface/IERC165.sol";
abstract contract ERC165 is IERC165 {
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}
文件 4 的 15:ERC721.sol
pragma solidity ^0.8.0;
import "../Interface/IERC721.sol";
import "../Interface/IERC721Receiver.sol";
import "../Interface/IERC721Metadata.sol";
import "../utils/Address.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "./ERC165.sol";
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
string private _name;
string private _symbol;
mapping(uint256 => address) private _owners;
mapping(address => uint256) private _balances;
mapping(uint256 => address) private _tokenApprovals;
mapping(address => mapping(address => bool)) private _operatorApprovals;
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
super.supportsInterface(interfaceId);
}
function balanceOf(address owner) public view virtual override returns (uint256) {
require(owner != address(0), "ERC721: balance query for the zero address");
return _balances[owner];
}
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
address owner = _owners[tokenId];
require(owner != address(0), "ERC721: owner query for nonexistent token");
return owner;
}
function name() public view virtual override returns (string memory) {
return _name;
}
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
string memory baseURI = _baseURI();
return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
}
function _baseURI() internal view virtual returns (string memory) {
return "";
}
function approve(address to, uint256 tokenId) public virtual override {
address owner = ERC721.ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721: approve caller is not owner nor approved for all"
);
_approve(to, tokenId);
}
function getApproved(uint256 tokenId) public view virtual override returns (address) {
require(_exists(tokenId), "ERC721: approved query for nonexistent token");
return _tokenApprovals[tokenId];
}
function setApprovalForAll(address operator, bool approved) public virtual override {
_setApprovalForAll(_msgSender(), operator, approved);
}
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_transfer(from, to, tokenId);
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
safeTransferFrom(from, to, tokenId, "");
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_safeTransfer(from, to, tokenId, _data);
}
function _safeTransfer(
address from,
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_transfer(from, to, tokenId);
require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
}
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return _owners[tokenId] != address(0);
}
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
require(_exists(tokenId), "ERC721: operator query for nonexistent token");
address owner = ERC721.ownerOf(tokenId);
return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
}
function _safeMint(address to, uint256 tokenId) internal virtual {
_safeMint(to, tokenId, "");
}
function _safeMint(
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_mint(to, tokenId);
require(
_checkOnERC721Received(address(0), to, tokenId, _data),
"ERC721: transfer to non ERC721Receiver implementer"
);
}
function _mint(address to, uint256 tokenId) internal virtual {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_beforeTokenTransfer(address(0), to, tokenId);
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(address(0), to, tokenId);
}
function _burn(uint256 tokenId) internal virtual {
address owner = ERC721.ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId);
_approve(address(0), tokenId);
_balances[owner] -= 1;
delete _owners[tokenId];
emit Transfer(owner, address(0), tokenId);
}
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual {
require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, tokenId);
_approve(address(0), tokenId);
_balances[from] -= 1;
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(from, to, tokenId);
}
function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
}
function _setApprovalForAll(
address owner,
address operator,
bool approved
) internal virtual {
require(owner != operator, "ERC721: approve to caller");
_operatorApprovals[owner][operator] = approved;
emit ApprovalForAll(owner, operator, approved);
}
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
if (to.isContract()) {
try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
return retval == IERC721Receiver.onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert("ERC721: transfer to non ERC721Receiver implementer");
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
} else {
return true;
}
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
}
文件 5 的 15:ERC721Enumerable.sol
pragma solidity ^0.8.0;
import "./ERC721.sol";
import "../Interface/IERC721Enumerable.sol";
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
mapping(uint256 => uint256) private _ownedTokensIndex;
uint256[] private _allTokens;
mapping(uint256 => uint256) private _allTokensIndex;
mapping(uint256 => bool) staking;
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {
return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);
}
function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
return _ownedTokens[owner][index];
}
function totalSupply() public view virtual override returns (uint256) {
return _allTokens.length;
}
function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
return _allTokens[index];
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override {
require(!staking[tokenId], "ERC721Enumerable: token is staking");
super._beforeTokenTransfer(from, to, tokenId);
if (from == address(0)) {
_addTokenToAllTokensEnumeration(tokenId);
} else if (from != to) {
_removeTokenFromOwnerEnumeration(from, tokenId);
}
if (to == address(0)) {
_removeTokenFromAllTokensEnumeration(tokenId);
} else if (to != from) {
_addTokenToOwnerEnumeration(to, tokenId);
}
}
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
uint256 length = ERC721.balanceOf(to);
_ownedTokens[to][length] = tokenId;
_ownedTokensIndex[tokenId] = length;
}
function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
_allTokensIndex[tokenId] = _allTokens.length;
_allTokens.push(tokenId);
}
function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
uint256 tokenIndex = _ownedTokensIndex[tokenId];
if (tokenIndex != lastTokenIndex) {
uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];
_ownedTokens[from][tokenIndex] = lastTokenId;
_ownedTokensIndex[lastTokenId] = tokenIndex;
}
delete _ownedTokensIndex[tokenId];
delete _ownedTokens[from][lastTokenIndex];
}
function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
uint256 lastTokenIndex = _allTokens.length - 1;
uint256 tokenIndex = _allTokensIndex[tokenId];
uint256 lastTokenId = _allTokens[lastTokenIndex];
_allTokens[tokenIndex] = lastTokenId;
_allTokensIndex[lastTokenId] = tokenIndex;
delete _allTokensIndex[tokenId];
_allTokens.pop();
}
}
文件 6 的 15:Humach.sol
pragma solidity ^0.8.0;
import "./Owner.sol";
import "./token/ERC721Enumerable.sol";
import "./Interface/IMachinie.sol";
import "./Interface/IERC20.sol";
contract Humach is ERC721Enumerable, Ownable
{
using Strings for uint256;
mapping(uint256 => uint256)private level;
mapping(uint256 => uint256) private exp;
mapping(uint256 => uint256) private stakeTime;
mapping(address => uint8) private whiteListsMints;
mapping(address => bool) private whiteLists;
mapping(uint256 => uint256) breedFee;
mapping(uint256 => string) private idName;
mapping(uint256 => string) private idDescription;
address private machinieOld = 0xE6d3e488b9D31943dF6e3B7d82f6F842679a1a8c;
address private blackHole = 0x000000000000000000000000000000000000dEaD;
address private machinieNew = 0xB826bDe739897ad50363d045d65eE5b83FDb730d ;
address private floppy = 0x9F3dDF3309D501FfBDC4587ab11e9D61ADD3126a;
uint256 private tokenId = 888;
uint256 private mintFee = 0.068 ether;
uint256 private changeNameFee = 35 ether;
uint256 private changeDescFee = 35 ether;
uint256 private maximumMintAmount = 2562;
uint256 private maximumBreedAmount = 5388;
uint256 private upgradeAmount;
uint256 private totalMintFee;
uint256 private mintAmount ;
uint256 private breedAmount ;
uint256 private maxSupply = 8888;
uint256 private expPerLevel =10;
uint256 private minStakeForExp = 86400;
uint256 private maxLevel = 5;
uint256 private tOpenWhiteLists = 1637024400;
uint256 private tCloseWhiteLists = 1637197200;
uint256 private tOpenPublicMint = 1637197200;
uint8 private maximunMintPerTransaction =3;
uint8 private maximumWhiteListsMint = 2;
uint16 private maximumNameLength = 20;
uint16 private maximumDescLength = 300;
bool private enableStake;
string private uri = "https://api.machinienft.com/api/humach/unrevealed/";
constructor() ERC721("Humach", "Humach")
{
breedFee[0] = 8888 ether;
breedFee[1] = 170 ether;
breedFee[2] = 165 ether;
breedFee[3] = 160 ether;
breedFee[4] = 155 ether;
breedFee[5] = 150 ether;
_worker[machinieNew] = true;
_admin[0x714FdF665698837f2F31c57A3dB2Dd23a4Efe84c] = true;
}
function tokenURI(uint256 tokenId_) public view override returns (string memory) {
require(_exists(tokenId_), "Humach: URI query for nonexistent token tokenId");
(uint256 _level, )= calculateLevel(tokenId_);
require(_level != 0 ,"Humach: abnormal Level" );
uint256 _imgId = ((_level - 1 ) * maxSupply ) + tokenId_;
string memory baseURI = _baseURI();
return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, _imgId.toString())) : "";
}
function machinieUpgrade(uint256 tokenId_ ) external returns (uint256) {
require(IERC721(machinieOld).ownerOf(tokenId_) == _msgSender() , "Humach : owner query for nonexistent machinie token");
require(IERC721(machinieOld).isApprovedForAll(_msgSender(), address(this)), "Humach : Need approve this address for All");
IERC721(machinieOld).safeTransferFrom(_msgSender(), blackHole, tokenId_);
_safeMint(_msgSender(), tokenId_);
IMachinie(machinieNew).mintMachinie( _msgSender(),tokenId_);
level[tokenId_] = 1;
upgradeAmount++;
return tokenId_;
}
function machiniesUpgrade(uint256[] memory tokenIds_ ) external {
require(IERC721(machinieOld).isApprovedForAll(_msgSender(), address(this)), "Humach : Need approve this address for All");
for(uint _i =0; _i< tokenIds_.length; _i++)
{
require(IERC721(machinieOld).ownerOf(tokenIds_[_i]) == _msgSender() , "Humach : owner query for nonexistent machinie token");
IERC721(machinieOld).safeTransferFrom(_msgSender(), blackHole, tokenIds_[_i]);
_safeMint(_msgSender(), tokenIds_[_i]);
IMachinie(machinieNew).mintMachinie( _msgSender(),tokenIds_[_i]);
level[tokenIds_[_i]] = 1;
upgradeAmount++;
}
}
function whiteListsMintHumach(uint8 amount_ ) external payable returns (uint256 [] memory){
require(block.timestamp >= tOpenWhiteLists, "Humach : is not available period");
require(block.timestamp <= tCloseWhiteLists, "Humach : is not available period");
require(whiteLists[_msgSender()], "Humach : you are not in whiteLists");
require(whiteListsMints[_msgSender()] + amount_ <= maximumWhiteListsMint, "Humach : already use whiteLists Mint Humach");
require(msg.value >= (mintFee * amount_), "Humach : mintFee is not enought");
require((mintAmount + amount_ ) <= maximumMintAmount, "Humach : is over maxSupply");
uint256 [] memory _id = new uint256 [](amount_);
for(uint8 _i=0; _i< amount_; _i++){
_id[_i] = tokenId;
tokenId++;
_safeMint(_msgSender(), _id[_i]);
level[_id[_i]] = 1;
}
totalMintFee = totalMintFee + msg.value;
mintAmount = mintAmount + amount_;
whiteListsMints[_msgSender()] = whiteListsMints[_msgSender()] + amount_;
return _id;
}
function publicMintHumach(uint8 amount_) external payable returns (uint256 [] memory){
require(amount_ <= maximunMintPerTransaction , "Humach : over Maximum min per transaction");
require(block.timestamp >= tOpenPublicMint, "Humach : is not available period");
require(msg.value >= (mintFee *amount_) , "Humach : mintFee is not enought");
require((mintAmount + amount_) <= maximumMintAmount, "Humach : is over maxSupply");
uint256 [] memory _id = new uint256 [](amount_);
for(uint8 _i=0; _i< amount_; _i++){
_id[_i] = tokenId;
tokenId++;
_safeMint(_msgSender(), _id[_i]);
level[_id[_i]] = 1;
}
totalMintFee = totalMintFee + msg.value;
mintAmount = mintAmount + amount_;
return _id;
}
function giveAway(address account_, uint8 amount_) external onlyAdmin returns (uint256 [] memory){
require((mintAmount + amount_) <= maximumMintAmount, "Humach : is over mint capacity");
uint256 [] memory _id = new uint256 [](amount_);
for(uint8 _i=0; _i< amount_; _i++){
_id[_i] = tokenId;
tokenId++;
_safeMint(account_, _id[_i]);
level[_id[_i]] = 1;
}
mintAmount = mintAmount + amount_;
return _id;
}
function breedHumach(uint256 tokenId_) external returns (uint256){
require(ownerOf(tokenId_) == _msgSender() , "Humach : owner query for nonexistent Humach token");
require(breedAmount < maximumBreedAmount, "Humach : is over Breed capacity");
uint256 _level = level[tokenId_];
uint256 _fee = breedFee[_level];
require(_fee !=0 ,"Humach : breedFee Problem" );
require(IERC20(floppy).balanceOf(_msgSender()) >= _fee, "Humach : balanceOf Floppy is not enought");
require(IERC20(floppy).allowance(_msgSender(), address(this)) >= _fee, "Humach : allowance Floppy is not enought");
IERC20(floppy).transferFrom(_msgSender(), blackHole, _fee);
uint256 _tokenId = tokenId;
tokenId++;
_safeMint(_msgSender(), _tokenId);
level[_tokenId] = 1;
breedAmount++;
return(_tokenId);
}
function stakeHumach (uint256 [] memory tokenIds_) external {
require(enableStake, "Humach : Stake function is disable");
for(uint8 _i=0; _i< tokenIds_.length; _i++)
{
require(ownerOf(tokenIds_[_i]) == _msgSender() , "Humach : owner query for nonexistent Humach token");
require(!staking[tokenIds_[_i]], "Humach : HumachID is staking");
stakeTime[tokenIds_[_i]] = block.timestamp;
staking[tokenIds_[_i]] = true;
}
}
function unStakeHumach (uint256 [] memory tokenIds_) external {
for(uint8 _i=0; _i< tokenIds_.length; _i++)
{
require(ownerOf(tokenIds_[_i]) == _msgSender() , "Humach : You are not owner of this tokenId");
require(staking[tokenIds_[_i]], "Humach : HumachID is staking");
require(stakeTime[tokenIds_[_i]] !=0, "Humach: is staking with Machinie" );
(uint256 _level, uint256 _exp) = calculateLevel(tokenIds_[_i]);
level[tokenIds_[_i]] =_level;
exp[tokenIds_[_i]] =_exp;
staking[tokenIds_[_i]] = false;
stakeTime[tokenIds_[_i]] = 0;
}
}
function calculateLevel(uint256 tokenId_) public view returns(uint256,uint256){
if(stakeTime[tokenId_] == 0)
return (level[tokenId_],exp[tokenId_]);
uint256 _tStake = block.timestamp - stakeTime[tokenId_];
uint256 _addExp = _tStake / minStakeForExp;
uint256 _lastExp = (level[tokenId_] * expPerLevel) + exp[tokenId_];
uint256 _newExp = _lastExp + _addExp;
uint256 _maxExp = maxLevel * expPerLevel;
if(_newExp >= _maxExp )
return (maxLevel,0);
uint256 _level = _newExp / expPerLevel;
uint256 _exp = _newExp % expPerLevel;
return (_level,_exp);
}
function updateWhiteLists(address [] memory account_, bool status_) external onlyAdmin{
for(uint _i =0; _i<account_.length; _i++)
{
whiteLists[account_[_i]] = status_;
}
}
function updateTokenName (uint256 tokenId_ ,string memory name_ ) external {
require(ownerOf(tokenId_) == _msgSender() , "Humach : owner query for nonexistent Humach token");
require(IERC20(floppy).balanceOf(_msgSender()) >= changeNameFee, "Humach : BalanceOf Floppy is not enought");
require(IERC20(floppy).allowance(_msgSender(), address(this)) >= changeNameFee, "Humach : allowance Floppy isnot enought");
require(bytes(name_).length <= maximumNameLength, "Humach : Name length is over Limit");
IERC20(floppy).transferFrom(_msgSender(), blackHole, changeNameFee);
idName[tokenId_] = name_;
emit changeName(tokenId_ , name_, idDescription[tokenId_]);
}
function updateTokenDescription (uint256 tokenId_ ,string memory description_ ) external {
require(ownerOf(tokenId_) == _msgSender() , "Humach : owner query for nonexistent Humach token");
require(IERC20(floppy).balanceOf(_msgSender()) >= changeDescFee, "Humach : BalanceOf Floppy is not enought");
require(IERC20(floppy).allowance(_msgSender(), address(this)) >= changeDescFee, "Humach : allowance Floppy isnot enought");
require(bytes(description_).length <= maximumDescLength, "Humach : Description length is over Limit");
IERC20(floppy).transferFrom(_msgSender(), blackHole, changeDescFee);
idDescription[tokenId_] = description_;
emit changeName(tokenId_ , idName[tokenId_], description_);
}
function burnHumach(uint256 tokenId_) external {
require(ownerOf(tokenId_) == _msgSender() , "Humach : You are not owner of this tokenId");
_burn(tokenId_);
}
function updateEnableStake(bool status_) external onlyAdmin{
enableStake = status_;
}
function updateStakStatus(uint256 tokenId_,bool status_) external onlyWorker{
staking[tokenId_] = status_;
}
function updateMintFee(uint256 amount_) external onlyAdmin{
mintFee = amount_;
}
function updateBreedFee (uint256 level_ , uint256 fee_) external onlyAdmin{
breedFee[level_] = fee_ ;
}
function updateChangeNameFee(uint256 changeName_,uint256 changeDesc_) external onlyAdmin{
changeNameFee = changeName_;
changeDescFee = changeDesc_;
}
function updateMintPerTranaction (uint8 amount_ )external onlyAdmin{
maximunMintPerTransaction = amount_;
}
function updateExpParameter (uint256 expPerLevel_ , uint256 minStakeForExp_ ,uint256 maxLevel_ ) external onlyAdmin {
expPerLevel = expPerLevel_;
minStakeForExp = minStakeForExp_;
maxLevel = maxLevel_;
}
function updateMaximumMint(uint256 amount_)external onlyAdmin{
maximumMintAmount = amount_;
}
function updateMaximumBreed(uint256 amount_)external onlyAdmin{
maximumBreedAmount = amount_;
}
function updateProjectTime (uint256 openWhiteLists_ ,uint256 closeWhiteLists_,uint256 openPublic_ ) external onlyAdmin {
tOpenWhiteLists = openWhiteLists_;
tCloseWhiteLists = closeWhiteLists_;
tOpenPublicMint = openPublic_;
}
function updateLevel(uint256 [] memory tokenId_, uint256 level_) external onlyAdmin{
for(uint _i =0; _i<tokenId_.length; _i++)
{
level[tokenId_[_i]] = level_;
}
}
function updateNameLength (uint16 nameLength_, uint16 descLength_) external onlyAdmin{
maximumNameLength = nameLength_;
maximumDescLength = descLength_;
}
function updateContractMachinieOld (address newContract) external onlyOwner {
machinieOld = newContract;
}
function updateContractMachinie (address newContract) external onlyOwner {
machinieNew = newContract;
}
function updateContractFloppy (address newContract) external onlyOwner {
floppy = newContract;
}
function updateBaseURI(string memory baseURI_)external onlyOwner{
uri = baseURI_;
}
function withdraw() external payable onlyOwner {
require(payable(msg.sender).send(address(this).balance));
}
function withdraw(uint256 amount_) external payable onlyOwner {
require(payable(msg.sender).send(amount_));
}
function _baseURI() internal view virtual override returns (string memory) {
return uri;
}
function isStaking (uint256 tokenId_) external view returns(bool){
return staking[tokenId_];
}
function getStakeTime (uint256 tokenId_) external view returns (uint256){
return stakeTime[tokenId_];
}
function isWhiteLists (address account_) external view returns(bool){
return whiteLists[account_];
}
function getMintFee(uint256 amount_) external view returns(uint256){
return mintFee*amount_;
}
function getBreedHumachFee(uint256 tokenId_) external view returns (uint256){
return breedFee[level[tokenId_]];
}
function getChangeDataFee() external view returns (uint256,uint256){
return (changeNameFee,changeDescFee);
}
function getUpgradeAmount ()external view returns (uint256){
return upgradeAmount;
}
function getTotalMintFee ()external view returns (uint256){
return totalMintFee;
}
function getMintAmount ()external view returns (uint256){
return mintAmount;
}
function getBreedAmount ()external view returns (uint256){
return breedAmount;
}
function getTokenIdName(uint256 tokenId_) external view returns(string memory, string memory){
return(idName[tokenId_],idDescription[tokenId_]);
}
function getEnableStake() external view returns (bool){
return enableStake;
}
function getWhiteListminted(address account_) external view returns(uint8) {
return whiteListsMints[account_];
}
function walletOfOwner(address _owner) external view returns(uint256[] memory) {
uint256 tokenCount = balanceOf(_owner);
uint256[] memory tokensId = new uint256[](tokenCount);
for(uint256 _i; _i < tokenCount; _i++){
tokensId[_i] = tokenOfOwnerByIndex(_owner, _i);
}
return tokensId;
}
function getMintPerTranaction ( )external view returns(uint8){
return maximunMintPerTransaction;
}
function getExpParameter () external view returns(uint256,uint256,uint256) {
return (expPerLevel,minStakeForExp,maxLevel);
}
function getNameLength () external view returns(uint16,uint16) {
return (maximumNameLength,maximumDescLength);
}
function getTokenId() external view returns(uint256){
return tokenId;
}
function getProjectTime () external view returns(uint256,uint256,uint256){
return(tOpenWhiteLists,tCloseWhiteLists,tOpenPublicMint);
}
function getContractMachinieOld() external view returns(address){
return machinieOld;
}
function getContractMachinie() external view returns(address){
return machinieNew;
}
function getContractFloppy() external view returns(address){
return floppy;
}
event changeName(uint256 tokenId_ , string name_, string description_);
receive() external payable{
}
}
文件 7 的 15:IERC165.sol
pragma solidity ^0.8.0;
interface IERC165 {
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
文件 8 的 15: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 的 15:IERC721.sol
pragma solidity ^0.8.0;
import "./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;
}
文件 10 的 15:IERC721Enumerable.sol
pragma solidity ^0.8.0;
import "./IERC721.sol";
interface IERC721Enumerable is IERC721 {
function totalSupply() external view returns (uint256);
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);
function tokenByIndex(uint256 index) external view returns (uint256);
}
文件 11 的 15:IERC721Metadata.sol
pragma solidity ^0.8.0;
import "./IERC721.sol";
interface IERC721Metadata is IERC721 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function tokenURI(uint256 tokenId) external view returns (string memory);
}
文件 12 的 15:IERC721Receiver.sol
pragma solidity ^0.8.0;
interface IERC721Receiver {
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
文件 13 的 15:IMachinie.sol
pragma solidity ^0.8.0;
import "./IERC721Enumerable.sol";
interface IMachinie is IERC721Enumerable{
function mintMachinie( address to_,uint256 tokenId_) external;
function stakeMachinie(uint256[] memory machinieIds_,uint256[] memory hamachIds_) external;
function unStakeMachinie(uint256[] memory machinieIds_) external returns(uint256) ;
function claimFloppy(uint256[] memory machinieIds_) external returns(uint256) ;
function getStakeReward(uint256 machinieId_) external view returns(uint256) ;
function updateTokenName (uint256 tokenId_ ,string memory name_ ) external ;
function updateTokenDescription (uint256 tokenId_ ,string memory description_ ) external ;
function burnMachinie(uint256 tokenId_) external;
function updateStakStatus(uint256 tokenId_,bool status_) external ;
function updateStakeTime (uint256 tokenId_ ,uint256 stakeTime_) external;
function walletOfOwner(address _owner) external view returns(uint256[] memory) ;
function isLevel (uint256 tokenId_) external view returns(uint256);
function isStaking (uint256 tokenId_) external view returns(bool);
function getStakeTime (uint256 tokenId_) external view returns (uint256);
function getTokenIdName(uint256 tokenId_) external view returns(string memory, string memory);
function getStakeRate(uint256 level_) external view returns(uint256) ;
function getHumachTokenId(uint256 machinieId_) external view returns(uint256);
}
文件 14 的 15:Owner.sol
pragma solidity ^0.8.0;
import "./utils/Context.sol";
abstract contract Ownable is Context {
address private _owner;
mapping (address => bool) _admin;
mapping (address => bool) _worker;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
_transferOwnership(_msgSender());
_admin[_msgSender()] = true;
_worker[_msgSender()] = true;
}
function owner() public view virtual returns (address) {
return _owner;
}
function isAdmin(address account_) public view virtual returns (bool) {
return _admin[account_];
}
function isWorker(address account_) public view virtual returns (bool) {
return _worker[account_];
}
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
modifier onlyAdmin() {
require(isAdmin(_msgSender()), "Ownable: caller is not the Admin");
_;
}
modifier onlyWorker() {
require(isWorker(_msgSender()), "Ownable: caller is not the Worker");
_;
}
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);
}
function updateAdmin(address account_, bool status_) public onlyOwner{
require(account_ != address(0), "Ownable: new Admin is the zero address");
_admin[account_] = status_;
}
function updateWorker(address account_, bool status_) public onlyOwner{
require(account_ != address(0), "Ownable: new Worker is the zero address");
_worker[account_] = status_;
}
}
文件 15 的 15: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);
}
}
{
"compilationTarget": {
"contracts/Humach.sol": "Humach"
},
"evmVersion": "istanbul",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": []
}
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","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":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId_","type":"uint256"},{"indexed":false,"internalType":"string","name":"name_","type":"string"},{"indexed":false,"internalType":"string","name":"description_","type":"string"}],"name":"changeName","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"breedHumach","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"burnHumach","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"calculateLevel","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBreedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"getBreedHumachFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getChangeDataFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getContractFloppy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getContractMachinie","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getContractMachinieOld","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getEnableStake","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getExpParameter","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMintAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"getMintFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMintPerTranaction","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNameLength","outputs":[{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getProjectTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"getStakeTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"getTokenIdName","outputs":[{"internalType":"string","name":"","type":"string"},{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalMintFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getUpgradeAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account_","type":"address"}],"name":"getWhiteListminted","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account_","type":"address"},{"internalType":"uint8","name":"amount_","type":"uint8"}],"name":"giveAway","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account_","type":"address"}],"name":"isAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"isStaking","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account_","type":"address"}],"name":"isWhiteLists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account_","type":"address"}],"name":"isWorker","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"machinieUpgrade","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds_","type":"uint256[]"}],"name":"machiniesUpgrade","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":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"amount_","type":"uint8"}],"name":"publicMintHumach","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds_","type":"uint256[]"}],"name":"stakeHumach","outputs":[],"stateMutability":"nonpayable","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":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"tokenURI","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":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds_","type":"uint256[]"}],"name":"unStakeHumach","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account_","type":"address"},{"internalType":"bool","name":"status_","type":"bool"}],"name":"updateAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI_","type":"string"}],"name":"updateBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"level_","type":"uint256"},{"internalType":"uint256","name":"fee_","type":"uint256"}],"name":"updateBreedFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"changeName_","type":"uint256"},{"internalType":"uint256","name":"changeDesc_","type":"uint256"}],"name":"updateChangeNameFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newContract","type":"address"}],"name":"updateContractFloppy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newContract","type":"address"}],"name":"updateContractMachinie","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newContract","type":"address"}],"name":"updateContractMachinieOld","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"status_","type":"bool"}],"name":"updateEnableStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"expPerLevel_","type":"uint256"},{"internalType":"uint256","name":"minStakeForExp_","type":"uint256"},{"internalType":"uint256","name":"maxLevel_","type":"uint256"}],"name":"updateExpParameter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenId_","type":"uint256[]"},{"internalType":"uint256","name":"level_","type":"uint256"}],"name":"updateLevel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"updateMaximumBreed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"updateMaximumMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"updateMintFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"amount_","type":"uint8"}],"name":"updateMintPerTranaction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"nameLength_","type":"uint16"},{"internalType":"uint16","name":"descLength_","type":"uint16"}],"name":"updateNameLength","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"openWhiteLists_","type":"uint256"},{"internalType":"uint256","name":"closeWhiteLists_","type":"uint256"},{"internalType":"uint256","name":"openPublic_","type":"uint256"}],"name":"updateProjectTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"},{"internalType":"bool","name":"status_","type":"bool"}],"name":"updateStakStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"},{"internalType":"string","name":"description_","type":"string"}],"name":"updateTokenDescription","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"},{"internalType":"string","name":"name_","type":"string"}],"name":"updateTokenName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"account_","type":"address[]"},{"internalType":"bool","name":"status_","type":"bool"}],"name":"updateWhiteLists","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account_","type":"address"},{"internalType":"bool","name":"status_","type":"bool"}],"name":"updateWorker","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"walletOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"amount_","type":"uint8"}],"name":"whiteListsMintHumach","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}]