文件 1 的 10:Address.sol
pragma solidity ^0.7.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) private 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 的 10:Context.sol
pragma solidity >=0.6.0 <0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes memory) {
this;
return msg.data;
}
}
文件 3 的 10:ERC1155.sol
pragma solidity ^0.7.0;
import "./IERC1155.sol";
import "./IERC1155MetadataURI.sol";
import "./IERC1155Receiver.sol";
import "./Context.sol";
import "./ERC165.sol";
import "./safemath.sol";
import "./Address.sol";
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
using SafeMath for uint256;
using Address for address;
mapping (uint256 => mapping(address => uint256)) private _balances;
mapping (address => mapping(address => bool)) private _operatorApprovals;
string private _uri;
bytes4 private constant _INTERFACE_ID_ERC1155 = 0xd9b67a26;
bytes4 private constant _INTERFACE_ID_ERC1155_METADATA_URI = 0x0e89341c;
constructor (string memory uri_) {
_setURI(uri_);
_registerInterface(_INTERFACE_ID_ERC1155);
_registerInterface(_INTERFACE_ID_ERC1155_METADATA_URI);
}
function uri(uint256) external view virtual override returns (string memory) {
return _uri;
}
function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {
require(account != address(0), "ERC1155: balance query for the zero address");
return _balances[id][account];
}
function balanceOfBatch(
address[] memory accounts,
uint256[] memory ids
)
public
view
virtual
override
returns (uint256[] memory)
{
require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch");
uint256[] memory batchBalances = new uint256[](accounts.length);
for (uint256 i = 0; i < accounts.length; ++i) {
batchBalances[i] = balanceOf(accounts[i], ids[i]);
}
return batchBalances;
}
function setApprovalForAll(address operator, bool approved) public virtual override {
require(_msgSender() != operator, "ERC1155: setting approval status for self");
_operatorApprovals[_msgSender()][operator] = approved;
emit ApprovalForAll(_msgSender(), operator, approved);
}
function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {
return _operatorApprovals[account][operator];
}
function safeTransferFrom(
address from,
address to,
uint256 id,
uint256 amount,
bytes memory data
)
public
virtual
override
{
require(to != address(0), "ERC1155: transfer to the zero address");
require(
from == _msgSender() || isApprovedForAll(from, _msgSender()),
"ERC1155: caller is not owner nor approved"
);
address operator = _msgSender();
_beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data);
_balances[id][from] = _balances[id][from].sub(amount, "ERC1155: insufficient balance for transfer");
_balances[id][to] = _balances[id][to].add(amount);
emit TransferSingle(operator, from, to, id, amount);
_doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);
}
function safeBatchTransferFrom(
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
)
public
virtual
override
{
require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
require(to != address(0), "ERC1155: transfer to the zero address");
require(
from == _msgSender() || isApprovedForAll(from, _msgSender()),
"ERC1155: transfer caller is not owner nor approved"
);
address operator = _msgSender();
_beforeTokenTransfer(operator, from, to, ids, amounts, data);
for (uint256 i = 0; i < ids.length; ++i) {
uint256 id = ids[i];
uint256 amount = amounts[i];
_balances[id][from] = _balances[id][from].sub(
amount,
"ERC1155: insufficient balance for transfer"
);
_balances[id][to] = _balances[id][to].add(amount);
}
emit TransferBatch(operator, from, to, ids, amounts);
_doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);
}
function _setURI(string memory newuri) internal virtual {
_uri = newuri;
}
function _mint(address account, uint256 id, uint256 amount, bytes memory data) internal virtual {
require(account != address(0), "ERC1155: mint to the zero address");
address operator = _msgSender();
_beforeTokenTransfer(operator, address(0), account, _asSingletonArray(id), _asSingletonArray(amount), data);
_balances[id][account] = _balances[id][account].add(amount);
emit TransferSingle(operator, address(0), account, id, amount);
_doSafeTransferAcceptanceCheck(operator, address(0), account, id, amount, data);
}
function _mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal virtual {
require(to != address(0), "ERC1155: mint to the zero address");
require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
address operator = _msgSender();
_beforeTokenTransfer(operator, address(0), to, ids, amounts, data);
for (uint i = 0; i < ids.length; i++) {
_balances[ids[i]][to] = amounts[i].add(_balances[ids[i]][to]);
}
emit TransferBatch(operator, address(0), to, ids, amounts);
_doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);
}
function _burn(address account, uint256 id, uint256 amount) internal virtual {
require(account != address(0), "ERC1155: burn from the zero address");
address operator = _msgSender();
_beforeTokenTransfer(operator, account, address(0), _asSingletonArray(id), _asSingletonArray(amount), "");
_balances[id][account] = _balances[id][account].sub(
amount,
"ERC1155: burn amount exceeds balance"
);
emit TransferSingle(operator, account, address(0), id, amount);
}
function _burnBatch(address account, uint256[] memory ids, uint256[] memory amounts) internal virtual {
require(account != address(0), "ERC1155: burn from the zero address");
require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
address operator = _msgSender();
_beforeTokenTransfer(operator, account, address(0), ids, amounts, "");
for (uint i = 0; i < ids.length; i++) {
_balances[ids[i]][account] = _balances[ids[i]][account].sub(
amounts[i],
"ERC1155: burn amount exceeds balance"
);
}
emit TransferBatch(operator, account, address(0), ids, amounts);
}
function _beforeTokenTransfer(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
)
internal
virtual
{ }
function _doSafeTransferAcceptanceCheck(
address operator,
address from,
address to,
uint256 id,
uint256 amount,
bytes memory data
)
private
{
if (to.isContract()) {
try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
if (response != IERC1155Receiver(to).onERC1155Received.selector) {
revert("ERC1155: ERC1155Receiver rejected tokens");
}
} catch Error(string memory reason) {
revert(reason);
} catch {
revert("ERC1155: transfer to non ERC1155Receiver implementer");
}
}
}
function _doSafeBatchTransferAcceptanceCheck(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
)
private
{
if (to.isContract()) {
try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (bytes4 response) {
if (response != IERC1155Receiver(to).onERC1155BatchReceived.selector) {
revert("ERC1155: ERC1155Receiver rejected tokens");
}
} catch Error(string memory reason) {
revert(reason);
} catch {
revert("ERC1155: transfer to non ERC1155Receiver implementer");
}
}
}
function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {
uint256[] memory array = new uint256[](1);
array[0] = element;
return array;
}
}
文件 4 的 10:ERC165.sol
pragma solidity ^0.7.0;
import "./IERC165.sol";
abstract contract ERC165 is IERC165 {
bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;
mapping(bytes4 => bool) private _supportedInterfaces;
constructor () {
_registerInterface(_INTERFACE_ID_ERC165);
}
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return _supportedInterfaces[interfaceId];
}
function _registerInterface(bytes4 interfaceId) internal virtual {
require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
_supportedInterfaces[interfaceId] = true;
}
}
文件 5 的 10:IERC1155.sol
pragma solidity ^0.7.0;
import "./IERC165.sol";
interface IERC1155 is IERC165 {
event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);
event TransferBatch(address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values);
event ApprovalForAll(address indexed account, address indexed operator, bool approved);
event URI(string value, uint256 indexed id);
function balanceOf(address account, uint256 id) external view returns (uint256);
function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory);
function setApprovalForAll(address operator, bool approved) external;
function isApprovedForAll(address account, address operator) external view returns (bool);
function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;
function safeBatchTransferFrom(address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data) external;
}
文件 6 的 10:IERC1155MetadataURI.sol
pragma solidity ^0.7.0;
import "./IERC1155.sol";
interface IERC1155MetadataURI is IERC1155 {
function uri(uint256 id) external view returns (string memory);
}
文件 7 的 10:IERC1155Receiver.sol
pragma solidity ^0.7.0;
import "./IERC165.sol";
interface IERC1155Receiver is IERC165 {
function onERC1155Received(
address operator,
address from,
uint256 id,
uint256 value,
bytes calldata data
)
external
returns(bytes4);
function onERC1155BatchReceived(
address operator,
address from,
uint256[] calldata ids,
uint256[] calldata values,
bytes calldata data
)
external
returns(bytes4);
}
文件 8 的 10:IERC165.sol
pragma solidity ^0.7.0;
interface IERC165 {
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
文件 9 的 10:lynccrafter.sol
pragma solidity ^0.7.0;
import "./ERC1155.sol";
contract LYNCCrafter is ERC1155 {
address public owner;
address public rewardContract;
uint256 public cardID = 1;
uint256 public cardCountETH = 9950;
uint256 public cardCountLYNC = 9975;
struct CardStats {
string collectionName;
uint256 cardType;
uint256 boostAmount;
uint256 redeemInitial;
uint256 redeemLeft;
uint256 redeemInterval;
uint256 useLastTimeStamp;
uint256 tokenReward;
uint256 percentageReward;
}
event BulkCardCrafted(address indexed _to, uint256 cardID, uint256 _amountOfCards, uint256 _tokenReward, uint256 _percentageReward);
event CollectionCardCrafted(address indexed _to, uint256 cardID, uint256 _redeemInitial, uint256 _redeemInterval, uint256 _tokenReward, uint256 _percentageReward);
event BoosterCardCrafted(address indexed _to, uint256 cardID, uint256 _amountOfCards, uint256 _boostAmount);
event BulkBoosterCardIncreased(address indexed _to, uint256 _amountOfCards, uint256 _cardID);
event RewardCardCrafted(address indexed _to, uint256 _cardCounter);
event CardStatsUpdated(uint256 _cardID);
event BoosterCardApplied(uint256 _cardID, uint256 _newRedeemTotal);
event CardBurned(uint256 _cardID, uint256 _amount);
event CardBurnedByOwner(address indexed _cardholder, uint256 _cardID, uint256 _amount);
event RewardContractAddressUpdated(address indexed _previousRewardAddress, address indexed _newRewardAddress);
event OwnershipTransferred(address indexed _previousOwner, address indexed _newOwner);
event OwnershipRenounced(address indexed _previousOwner, address indexed _newOwner);
mapping(uint256 => CardStats) public cards;
mapping(string => mapping(uint256 => uint256)) public collections;
constructor(string memory _uri) ERC1155(_uri) {
owner = msg.sender;
}
function craftBulkCard(address _to, uint256 _amountOfCards, uint256 _tokenReward, uint256 _percentageReward) public onlyOwner {
_mint(_to, cardID, _amountOfCards, "");
cards[cardID].cardType = 1;
cards[cardID].tokenReward = _tokenReward;
cards[cardID].percentageReward = _percentageReward;
emit BulkCardCrafted(_to, cardID, _amountOfCards, _tokenReward, _percentageReward);
cardID += 1;
}
function craftCollectionCard(address _to, string memory _collectionName, uint256 _amountOfCards, uint256 _redeemInitial, uint256 _redeemInterval, uint256 _tokenReward, uint256 _percentageReward) public onlyOwner {
require(collections[_collectionName][0] == 0, "This collection name aready exists!");
collections[_collectionName][0] = _amountOfCards;
for (uint256 i = 1; i <= _amountOfCards; i++) {
collections[_collectionName][i] = cardID;
_mint(_to, cardID, 1, "");
cards[cardID].collectionName = _collectionName;
cards[cardID].cardType = 2;
cards[cardID].redeemInitial = _redeemInitial;
cards[cardID].redeemLeft = _redeemInitial;
cards[cardID].redeemInterval = _redeemInterval;
cards[cardID].tokenReward = _tokenReward;
cards[cardID].percentageReward = _percentageReward;
emit CollectionCardCrafted(_to, cardID, _redeemInitial, _redeemInterval, _tokenReward, _percentageReward);
cardID += 1;
}
}
function craftBoosterCard(address _to, uint256 _amountOfCards, uint256 _boostAmount) public onlyOwner {
_mint(_to, cardID, _amountOfCards, "");
cards[cardID].cardType = 3;
cards[cardID].boostAmount = _boostAmount;
emit BoosterCardCrafted(_to, cardID, _amountOfCards, _boostAmount);
cardID += 1;
}
function increaseBulkBoosterCard(address _to, uint256 _amountOfCards, uint256 _cardID) public onlyOwner {
require(cards[_cardID].cardType != 2, "Cannot increase a collection / unique card");
require(_cardID > 0 && _cardID < cardID, "Card ID has not been crafted yet");
_mint(_to, _cardID, _amountOfCards, "");
emit BulkBoosterCardIncreased(_to, _amountOfCards, _cardID);
}
function craftRewardCard(address _to, uint256 _cardID, string memory _collectionName) public onlyRewardContract {
uint256 _cardCounter;
if(_cardID < 3) {
_cardCounter = cardCountETH;
cardCountETH += 1;
} else {
_cardCounter = cardCountLYNC;
cardCountLYNC += 1;
}
collections[_collectionName][0] += 1;
_mint(_to, _cardCounter, 1, "");
cards[_cardCounter].collectionName = _collectionName;
cards[_cardCounter].cardType = 2;
cards[_cardCounter].redeemInitial = 6;
cards[_cardCounter].redeemLeft = 6;
cards[_cardCounter].redeemInterval = 28;
cards[_cardCounter].tokenReward = 400;
cards[_cardCounter].percentageReward = 4;
emit RewardCardCrafted(_to, _cardCounter);
}
function updateCardStats(uint256 _cardID) public onlyRewardContract {
cards[_cardID].redeemLeft -= 1;
cards[_cardID].useLastTimeStamp = block.timestamp;
emit CardStatsUpdated(_cardID);
}
function applyCardBooster(uint256 _cardID, uint256 _newRedeemTotal) public onlyRewardContract {
cards[_cardID].redeemLeft += _newRedeemTotal;
emit BoosterCardApplied(_cardID, _newRedeemTotal);
}
function burnCard(address _cardholder, uint256 _cardID, uint256 _amount) public onlyRewardContract {
_burn(_cardholder, _cardID, _amount);
emit CardBurned(_cardID, _amount);
}
function ownerBurnCard(address _cardholder, uint256 _cardID, uint256 _amount) public onlyOwner {
_burn(_cardholder, _cardID, _amount);
emit CardBurnedByOwner(_cardholder, _cardID, _amount);
}
function updateRewardContractAddress(address _newRewardContractAddress) public onlyOwner {
require(_newRewardContractAddress != address(0), "New reward contract address cannot be a zero address");
emit RewardContractAddressUpdated(rewardContract, _newRewardContractAddress);
rewardContract = _newRewardContractAddress;
}
function transferOwnership(address _newOwner) public onlyOwner {
require(_newOwner != address(0), "New owner cannot be a zero address");
emit OwnershipTransferred(owner, _newOwner);
owner = _newOwner;
}
function renounceOwnership() public onlyOwner {
emit OwnershipRenounced(owner, address(0));
owner = address(0);
}
modifier onlyOwner() {
require(owner == msg.sender, "Only the owner of the crafter contract can call this function");
_;
}
modifier onlyRewardContract() {
require(rewardContract == msg.sender, "Only the reward contract address can call this function");
_;
}
}
文件 10 的 10:safemath.sol
pragma solidity ^0.7.0;
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
return c;
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
}
{
"compilationTarget": {
"lynccrafter.sol": "LYNCCrafter"
},
"evmVersion": "istanbul",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
}
[{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","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":false,"internalType":"uint256","name":"_cardID","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_newRedeemTotal","type":"uint256"}],"name":"BoosterCardApplied","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"cardID","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_amountOfCards","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_boostAmount","type":"uint256"}],"name":"BoosterCardCrafted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amountOfCards","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_cardID","type":"uint256"}],"name":"BulkBoosterCardIncreased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"cardID","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_amountOfCards","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_tokenReward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_percentageReward","type":"uint256"}],"name":"BulkCardCrafted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_cardID","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"CardBurned","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_cardholder","type":"address"},{"indexed":false,"internalType":"uint256","name":"_cardID","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"CardBurnedByOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_cardID","type":"uint256"}],"name":"CardStatsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"cardID","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_redeemInitial","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_redeemInterval","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_tokenReward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_percentageReward","type":"uint256"}],"name":"CollectionCardCrafted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"_newOwner","type":"address"}],"name":"OwnershipRenounced","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":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_cardCounter","type":"uint256"}],"name":"RewardCardCrafted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_previousRewardAddress","type":"address"},{"indexed":true,"internalType":"address","name":"_newRewardAddress","type":"address"}],"name":"RewardContractAddressUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[{"internalType":"uint256","name":"_cardID","type":"uint256"},{"internalType":"uint256","name":"_newRedeemTotal","type":"uint256"}],"name":"applyCardBooster","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_cardholder","type":"address"},{"internalType":"uint256","name":"_cardID","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"burnCard","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cardCountETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cardCountLYNC","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cardID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"cards","outputs":[{"internalType":"string","name":"collectionName","type":"string"},{"internalType":"uint256","name":"cardType","type":"uint256"},{"internalType":"uint256","name":"boostAmount","type":"uint256"},{"internalType":"uint256","name":"redeemInitial","type":"uint256"},{"internalType":"uint256","name":"redeemLeft","type":"uint256"},{"internalType":"uint256","name":"redeemInterval","type":"uint256"},{"internalType":"uint256","name":"useLastTimeStamp","type":"uint256"},{"internalType":"uint256","name":"tokenReward","type":"uint256"},{"internalType":"uint256","name":"percentageReward","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"collections","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amountOfCards","type":"uint256"},{"internalType":"uint256","name":"_boostAmount","type":"uint256"}],"name":"craftBoosterCard","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amountOfCards","type":"uint256"},{"internalType":"uint256","name":"_tokenReward","type":"uint256"},{"internalType":"uint256","name":"_percentageReward","type":"uint256"}],"name":"craftBulkCard","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"string","name":"_collectionName","type":"string"},{"internalType":"uint256","name":"_amountOfCards","type":"uint256"},{"internalType":"uint256","name":"_redeemInitial","type":"uint256"},{"internalType":"uint256","name":"_redeemInterval","type":"uint256"},{"internalType":"uint256","name":"_tokenReward","type":"uint256"},{"internalType":"uint256","name":"_percentageReward","type":"uint256"}],"name":"craftCollectionCard","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_cardID","type":"uint256"},{"internalType":"string","name":"_collectionName","type":"string"}],"name":"craftRewardCard","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amountOfCards","type":"uint256"},{"internalType":"uint256","name":"_cardID","type":"uint256"}],"name":"increaseBulkBoosterCard","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_cardholder","type":"address"},{"internalType":"uint256","name":"_cardID","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"ownerBurnCard","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","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":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cardID","type":"uint256"}],"name":"updateCardStats","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newRewardContractAddress","type":"address"}],"name":"updateRewardContractAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]