文件 1 的 13:AnonymiceBadges.sol
pragma solidity ^0.8.7;
import "./POAPBoard.sol";
import "./POAPLibrary.sol";
import "./IDescriptor.sol";
import "./IBadgesVerifier.sol";
import "./ICheeth.sol";
contract AnonymiceBadges is POAPBoard {
address public cheethAddress;
address public descriptorAddress;
address public badgesVerifierAddress;
bool public isPaused = true;
mapping(uint256 => uint256) public boardPrices;
mapping(address => string) public boardNames;
mapping(address => bool) private _auth;
constructor() POAPBoard("Anonymice Collector Cards", "AnonymiceCollectorCards") {}
function mint() external pure override {
revert("no free mint");
}
function claimAll(
uint256[] calldata ids,
bytes32[][] calldata proofs,
uint256[] calldata genesisMice,
uint256[] calldata babyMice
) external {
for (uint256 index = 0; index < ids.length; index++) {
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(MerkleProof.verify(proofs[index], merkleRootsByPOAPId[ids[index]], leaf), "not in whitelist");
_claimPOAP(ids[index], msg.sender);
}
uint256[] memory badgeIds = IBadgesVerifier(badgesVerifierAddress).claimableBadges(
genesisMice,
babyMice,
msg.sender
);
for (uint256 index = 0; index < badgeIds.length; index++) {
uint256 badgeId = badgeIds[index];
if (badgeId == 0) break;
if (!_poapOwners[badgeId][msg.sender]) {
_claimPOAP(badgeIds[index], msg.sender);
}
}
}
function claimVerifiedBadge(
uint256[] calldata genesisMice,
uint256[] calldata babyMice,
uint256 badgeIdToClaim
) external {
uint256[] memory badgeIds = IBadgesVerifier(badgesVerifierAddress).claimableBadges(
genesisMice,
babyMice,
msg.sender
);
for (uint256 index = 0; index < badgeIds.length; index++) {
uint256 badgeId = badgeIds[index];
if (badgeId == 0) break;
if (badgeIdToClaim == badgeId) {
if (!_poapOwners[badgeId][msg.sender]) {
_claimPOAP(badgeIds[index], msg.sender);
}
}
}
}
function getVerifiedBadges(uint256[] memory genesisMice, uint256[] memory babyMice)
external
view
returns (uint256[] memory)
{
return IBadgesVerifier(badgesVerifierAddress).claimableBadges(genesisMice, babyMice, msg.sender);
}
function buyBoard(uint256 boardId) external {
require(boardPrices[boardId] > 0, "price not set");
ICheeth(cheethAddress).burnFrom(msg.sender, boardPrices[boardId]);
if (!_minted(msg.sender)) {
_mint(msg.sender);
currentBoard[msg.sender] = boardId;
}
_claimBoard(boardId, msg.sender);
}
function setBoardName(string memory name) external {
boardNames[msg.sender] = name;
}
function externalClaimBoard(uint256 boardId, address to) external {
require(_auth[msg.sender], "no auth");
_claimBoard(boardId, to);
}
function externalClaimPOAP(uint256 id, address to) external {
require(_auth[msg.sender], "no auth");
_claimPOAP(id, to);
}
function tokenURI(uint256 id) public view override returns (string memory) {
return IDescriptor(descriptorAddress).tokenURI(id);
}
function rearrangeBoardAndName(
uint256 boardId,
uint256[] memory slots,
string memory text
) external {
if (boardId != currentBoard[msg.sender]) _swapBoard(boardId, false);
_rearrangePOAPs(slots);
boardNames[msg.sender] = text;
}
function previewBoard(
uint256 boardId,
uint256[] calldata badges,
string memory text
) external view returns (string memory) {
return IDescriptor(descriptorAddress).buildSvg(boardId, badges, text, true);
}
function setDescriptorAddress(address _descriptorAddress) external onlyOwner {
descriptorAddress = _descriptorAddress;
}
function setCheethAddress(address _cheethAddress) external onlyOwner {
cheethAddress = _cheethAddress;
}
function setBadgesVerifierAddress(address _badgesVerifierAddress) external onlyOwner {
badgesVerifierAddress = _badgesVerifierAddress;
}
function setAuth(address wallet, bool value) external onlyOwner {
_auth[wallet] = value;
}
function setIsPaused(bool value) external onlyOwner {
isPaused = value;
}
function setBoardPrice(uint256 boardId, uint256 boardPrice) external onlyOwner {
boardPrices[boardId] = boardPrice;
}
}
文件 2 的 13: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 的 13:ERC721UniqueBound.sol
pragma solidity ^0.8.7;
import "./IERC721UniqueBound.sol";
contract ERC721UniqueBound is IERC721UniqueBound {
uint256 private _currentIndex;
string private _name;
string private _symbol;
mapping(uint256 => address) private _ownerships;
mapping(address => uint256) private _ownerToTokenId;
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
_currentIndex = _startTokenId();
}
function _startTokenId() internal view virtual returns (uint256) {
return 1;
}
function totalSupply() public view override returns (uint256) {
unchecked {
return _currentIndex - _startTokenId();
}
}
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return
interfaceId == 0x01ffc9a7 ||
interfaceId == 0x80ac58cd ||
interfaceId == 0x5b5e139f;
}
function balanceOf(address owner) public view override returns (uint256) {
if (owner == address(0)) revert BalanceQueryForZeroAddress();
return _minted(owner) ? 1 : 0;
}
function _minted(address owner) internal view returns (bool) {
uint256 tokenId = _ownerToTokenId[owner];
return _ownerships[tokenId] == owner;
}
function ownerOf(uint256 tokenId) public view override returns (address) {
return _ownerships[tokenId];
}
function tokenOf(address owner) public view override returns (uint256) {
return _ownerToTokenId[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) {
if (!_exists(tokenId)) revert URIQueryForNonexistentToken();
string memory baseURI = _baseURI();
return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : "";
}
function _baseURI() internal view virtual returns (string memory) {
return "";
}
function _exists(uint256 tokenId) internal view returns (bool) {
return _startTokenId() <= tokenId && tokenId < _currentIndex;
}
function _mint(address to) internal {
if (to == address(0)) revert MintToZeroAddress();
if (_minted(to)) revert MintToExistingOwnerAddress();
_ownerships[_currentIndex] = to;
_ownerToTokenId[to] = _currentIndex;
emit Transfer(address(0), to, _currentIndex);
_currentIndex++;
}
function _toString(uint256 value) internal pure returns (string memory ptr) {
assembly {
ptr := add(mload(0x40), 128)
mstore(0x40, ptr)
let end := ptr
for {
let temp := value
ptr := sub(ptr, 1)
mstore8(ptr, add(48, mod(temp, 10)))
temp := div(temp, 10)
} temp {
temp := div(temp, 10)
} {
ptr := sub(ptr, 1)
mstore8(ptr, add(48, mod(temp, 10)))
}
let length := sub(end, ptr)
ptr := sub(ptr, 32)
mstore(ptr, length)
}
}
}
文件 4 的 13:IBadgesVerifier.sol
pragma solidity ^0.8.7;
import "./POAPLibrary.sol";
interface IBadgesVerifier {
function claimableBadges(
uint256[] memory genesisMice,
uint256[] memory babyMice,
address wallet
) external view returns (uint256[] memory);
}
文件 5 的 13:ICheeth.sol
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
interface ICheeth is IERC20 {
function burnFrom(address account, uint256 amount) external;
}
文件 6 的 13:IDescriptor.sol
pragma solidity ^0.8.7;
interface IDescriptor {
function badgeImages(uint256 badgeId) external view returns (string memory);
function boardImages(uint256 boardId) external view returns (string memory);
function tokenURI(uint256 tokenId) external view returns (string memory);
function getSvg(uint256 id) external view returns (string memory);
function buildSvg(
uint256 boardId,
uint256[] memory poaps,
string memory boardName,
bool isPreview
) external view returns (string memory);
}
文件 7 的 13: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);
}
文件 8 的 13:IERC721UniqueBound.sol
pragma solidity ^0.8.7;
interface IERC721UniqueBound {
error MintZeroQuantity();
error MintToZeroAddress();
error MintToExistingOwnerAddress();
error BalanceQueryForZeroAddress();
error URIQueryForNonexistentToken();
function totalSupply() external view returns (uint256);
function supportsInterface(bytes4 interfaceId) external view returns (bool);
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
function balanceOf(address owner) external view returns (uint256 balance);
function ownerOf(uint256 tokenId) external view returns (address owner);
function tokenOf(address owner) external view returns (uint256);
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function tokenURI(uint256 tokenId) external view returns (string memory);
}
文件 9 的 13:IPOAPBoard.sol
pragma solidity ^0.8.7;
import "./POAPLibrary.sol";
interface IPOAPBoard {
function totalSupply() external view returns (uint256);
function supportsInterface(bytes4 interfaceId) external view returns (bool);
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
function balanceOf(address owner) external view returns (uint256 balance);
function ownerOf(uint256 tokenId) external view returns (address owner);
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function tokenURI(uint256 tokenId) external view returns (string memory);
function getAllPOAPs(address wallet) external view returns (uint256[] memory);
function getBoardPOAPs(address wallet) external view returns (uint256[] memory);
function currentBoard(address wallet) external view returns (uint256);
function getBoard(uint256 boardId) external view returns (POAPLibrary.Board memory);
}
文件 10 的 13: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;
}
}
文件 11 的 13: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);
}
}
文件 12 的 13:POAPBoard.sol
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./ERC721UniqueBound.sol";
import "./IPOAPBoard.sol";
import "./POAPLibrary.sol";
contract POAPBoard is Ownable, ERC721UniqueBound {
mapping(uint256 => mapping(address => bool)) internal _poapOwners;
mapping(address => mapping(uint256 => uint256)) internal _poaps;
uint256 public boardCount;
uint256 public poapCount;
mapping(uint256 => POAPLibrary.Board) public boards;
mapping(address => uint256) public currentBoard;
mapping(address => uint256) public poapsBalanceOf;
mapping(uint256 => bytes32) public merkleRootsByPOAPId;
mapping(uint256 => bytes32) public merkleRootsByBoardId;
mapping(address => mapping(uint256 => bool)) public availableBoards;
mapping(address => mapping(uint256 => uint256)) public poapPositions;
constructor(string memory name_, string memory symbol_) ERC721UniqueBound(name_, symbol_) {}
function mint() external virtual {
_mint(msg.sender);
availableBoards[msg.sender][1] = true;
currentBoard[msg.sender] = 1;
}
function claimBoard(uint256 boardId, bytes32[] calldata proof) external {
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(MerkleProof.verify(proof, merkleRootsByBoardId[boardId], leaf), "not in whitelist");
_claimBoard(boardId, msg.sender);
}
function claimPOAP(uint256 id, bytes32[] calldata proof) public {
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(MerkleProof.verify(proof, merkleRootsByPOAPId[id], leaf), "not in whitelist");
_claimPOAP(id, msg.sender);
}
function setCurrentBoard(uint256 boardId) external {
_swapBoard(boardId, true);
}
function rearrangeBoard(uint256 boardId, uint256[] memory slots) external {
if (boardId != currentBoard[msg.sender]) _swapBoard(boardId, false);
_rearrangePOAPs(slots);
}
function rearrangePOAPs(uint256[] memory slots) external {
_rearrangePOAPs(slots);
}
function _rearrangePOAPs(uint256[] memory slots) internal {
POAPLibrary.Board memory selectedBoard = boards[currentBoard[msg.sender]];
require(slots.length == selectedBoard.slots.length, "wrong size");
for (uint256 index = 0; index < slots.length; index++) {
uint256 poapId = slots[index];
for (uint256 innerIndex = 0; innerIndex < index; innerIndex++) {
require(poapId == 0 || poapId != slots[innerIndex], "already used");
}
poapPositions[msg.sender][index] = _poapOwners[poapId][msg.sender] ? poapId : 0;
}
}
function _swapBoard(uint256 boardId, bool shouldWipe) internal {
require(currentBoard[msg.sender] != boardId, "same board");
require(availableBoards[msg.sender][boardId], "locked board");
currentBoard[msg.sender] = boardId;
if (shouldWipe) {
POAPLibrary.Board memory selectedBoard = boards[boardId];
for (uint256 index = 0; index < selectedBoard.slots.length; index++) {
poapPositions[msg.sender][index] = 0;
}
}
}
function getAllPOAPs(address wallet) public view returns (uint256[] memory) {
uint256 poapsCount = poapsBalanceOf[wallet];
uint256[] memory poaps = new uint256[](poapsCount);
for (uint256 index = 0; index < poapsCount; index++) {
poaps[index] = _poaps[wallet][index];
}
return poaps;
}
function getBoardPOAPs(address wallet) public view returns (uint256[] memory) {
POAPLibrary.Board memory selectedBoard = boards[currentBoard[wallet]];
uint256[] memory poaps = new uint256[](selectedBoard.slots.length);
for (uint256 index = 0; index < poaps.length; index++) {
poaps[index] = poapPositions[wallet][index];
}
return poaps;
}
function getBoards(address wallet) public view returns (POAPLibrary.Board[] memory) {
uint256 walletCount;
for (uint256 boardId = 1; boardId <= boardCount; boardId++) {
if (availableBoards[wallet][boardId]) {
walletCount++;
}
}
POAPLibrary.Board[] memory walletBoards = new POAPLibrary.Board[](walletCount);
uint256 walletBoardsIndex;
for (uint256 boardId = 1; boardId <= boardCount; boardId++) {
if (availableBoards[wallet][boardId]) {
walletBoards[walletBoardsIndex++] = boards[boardId];
}
}
return walletBoards;
}
function getCurrentBoard(address wallet) public view returns (POAPLibrary.Board memory) {
return boards[currentBoard[wallet]];
}
function getWalletState(address wallet)
external
view
returns (
uint256[] memory,
POAPLibrary.Board[] memory,
POAPLibrary.Board memory
)
{
return (getAllPOAPs(wallet), getBoards(wallet), getCurrentBoard(wallet));
}
function getBoard(uint256 boardId) external view returns (POAPLibrary.Board memory) {
return boards[boardId];
}
function _claimPOAP(uint256 poapId, address to) internal existingPOAP(poapId) {
if (_poapOwners[poapId][to]) return;
_poapOwners[poapId][to] = true;
_poaps[to][poapsBalanceOf[to]] = poapId;
poapsBalanceOf[to]++;
}
function _claimBoard(uint256 boardId, address to) internal existingBoard(boardId) {
require(_minted(to), "mint required");
require(!availableBoards[to][boardId], "already claimed");
availableBoards[to][boardId] = true;
}
function registerBoard(
uint64 width,
uint64 height,
POAPLibrary.Slot[] memory slots
) external onlyOwner {
boardCount++;
POAPLibrary.Board storage newBoard = boards[boardCount];
newBoard.id = uint128(boardCount);
newBoard.width = width;
newBoard.height = height;
for (uint256 index = 0; index < slots.length; index++) {
newBoard.slots.push(slots[index]);
}
}
function registerPOAP() external onlyOwner {
poapCount++;
}
function setPOAPCount(uint256 count) external onlyOwner {
poapCount = count;
}
function overrideBoard(
uint128 id,
uint64 width,
uint64 height,
POAPLibrary.Slot[] memory slots
) external onlyOwner existingBoard(id) {
POAPLibrary.Board storage newBoard = boards[id];
newBoard.id = id;
newBoard.width = width;
newBoard.height = height;
uint256 oldSlotsSize = newBoard.slots.length;
for (uint256 index = 0; index < slots.length; index++) {
if (oldSlotsSize <= index) {
newBoard.slots.push(slots[index]);
} else {
newBoard.slots[index] = slots[index];
}
}
}
function setMerkleRootsByPOAPId(uint256 poapId, bytes32 merkleRoot) external onlyOwner {
merkleRootsByPOAPId[poapId] = merkleRoot;
}
function setMerkleRootsByBoardId(uint256 boardId, bytes32 merkleRoot) external onlyOwner {
merkleRootsByBoardId[boardId] = merkleRoot;
}
modifier existingBoard(uint256 boardId) {
require(boardId <= boardCount, "unknown board");
_;
}
modifier existingPOAP(uint256 poapId) {
require(poapId <= poapCount, "unknown poap");
_;
}
}
文件 13 的 13:POAPLibrary.sol
pragma solidity ^0.8.7;
library POAPLibrary {
struct Slot {
uint32 x;
uint32 y;
uint32 scale;
}
struct Board {
uint128 id;
uint64 width;
uint64 height;
Slot[] slots;
}
string internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
function encode(bytes memory data) internal pure returns (string memory) {
if (data.length == 0) return "";
string memory table = TABLE;
uint256 encodedLen = 4 * ((data.length + 2) / 3);
string memory result = new string(encodedLen + 32);
assembly {
mstore(result, encodedLen)
let tablePtr := add(table, 1)
let dataPtr := data
let endPtr := add(dataPtr, mload(data))
let resultPtr := add(result, 32)
for {
} lt(dataPtr, endPtr) {
} {
dataPtr := add(dataPtr, 3)
let input := mload(dataPtr)
mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr(18, input), 0x3F)))))
resultPtr := add(resultPtr, 1)
mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr(12, input), 0x3F)))))
resultPtr := add(resultPtr, 1)
mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr(6, input), 0x3F)))))
resultPtr := add(resultPtr, 1)
mstore(resultPtr, shl(248, mload(add(tablePtr, and(input, 0x3F)))))
resultPtr := add(resultPtr, 1)
}
switch mod(mload(data), 3)
case 1 {
mstore(sub(resultPtr, 2), shl(240, 0x3d3d))
}
case 2 {
mstore(sub(resultPtr, 1), shl(248, 0x3d))
}
}
return result;
}
function _toString(uint256 value) internal pure returns (string memory ptr) {
assembly {
ptr := add(mload(0x40), 128)
mstore(0x40, ptr)
let end := ptr
for {
let temp := value
ptr := sub(ptr, 1)
mstore8(ptr, add(48, mod(temp, 10)))
temp := div(temp, 10)
} temp {
temp := div(temp, 10)
} {
ptr := sub(ptr, 1)
mstore8(ptr, add(48, mod(temp, 10)))
}
let length := sub(end, ptr)
ptr := sub(ptr, 32)
mstore(ptr, length)
}
}
}
{
"compilationTarget": {
"contracts/AnonymiceBadges.sol": "AnonymiceBadges"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": []
}
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintToExistingOwnerAddress","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"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"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"availableBoards","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"badgesVerifierAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"boardCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"boardNames","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"boardPrices","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"boards","outputs":[{"internalType":"uint128","name":"id","type":"uint128"},{"internalType":"uint64","name":"width","type":"uint64"},{"internalType":"uint64","name":"height","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"boardId","type":"uint256"}],"name":"buyBoard","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cheethAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"bytes32[][]","name":"proofs","type":"bytes32[][]"},{"internalType":"uint256[]","name":"genesisMice","type":"uint256[]"},{"internalType":"uint256[]","name":"babyMice","type":"uint256[]"}],"name":"claimAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"boardId","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"claimBoard","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"claimPOAP","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"genesisMice","type":"uint256[]"},{"internalType":"uint256[]","name":"babyMice","type":"uint256[]"},{"internalType":"uint256","name":"badgeIdToClaim","type":"uint256"}],"name":"claimVerifiedBadge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"currentBoard","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"descriptorAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"boardId","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"externalClaimBoard","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"externalClaimPOAP","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"}],"name":"getAllPOAPs","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"boardId","type":"uint256"}],"name":"getBoard","outputs":[{"components":[{"internalType":"uint128","name":"id","type":"uint128"},{"internalType":"uint64","name":"width","type":"uint64"},{"internalType":"uint64","name":"height","type":"uint64"},{"components":[{"internalType":"uint32","name":"x","type":"uint32"},{"internalType":"uint32","name":"y","type":"uint32"},{"internalType":"uint32","name":"scale","type":"uint32"}],"internalType":"struct POAPLibrary.Slot[]","name":"slots","type":"tuple[]"}],"internalType":"struct POAPLibrary.Board","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"}],"name":"getBoardPOAPs","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"}],"name":"getBoards","outputs":[{"components":[{"internalType":"uint128","name":"id","type":"uint128"},{"internalType":"uint64","name":"width","type":"uint64"},{"internalType":"uint64","name":"height","type":"uint64"},{"components":[{"internalType":"uint32","name":"x","type":"uint32"},{"internalType":"uint32","name":"y","type":"uint32"},{"internalType":"uint32","name":"scale","type":"uint32"}],"internalType":"struct POAPLibrary.Slot[]","name":"slots","type":"tuple[]"}],"internalType":"struct POAPLibrary.Board[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"}],"name":"getCurrentBoard","outputs":[{"components":[{"internalType":"uint128","name":"id","type":"uint128"},{"internalType":"uint64","name":"width","type":"uint64"},{"internalType":"uint64","name":"height","type":"uint64"},{"components":[{"internalType":"uint32","name":"x","type":"uint32"},{"internalType":"uint32","name":"y","type":"uint32"},{"internalType":"uint32","name":"scale","type":"uint32"}],"internalType":"struct POAPLibrary.Slot[]","name":"slots","type":"tuple[]"}],"internalType":"struct POAPLibrary.Board","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"genesisMice","type":"uint256[]"},{"internalType":"uint256[]","name":"babyMice","type":"uint256[]"}],"name":"getVerifiedBadges","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"}],"name":"getWalletState","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"},{"components":[{"internalType":"uint128","name":"id","type":"uint128"},{"internalType":"uint64","name":"width","type":"uint64"},{"internalType":"uint64","name":"height","type":"uint64"},{"components":[{"internalType":"uint32","name":"x","type":"uint32"},{"internalType":"uint32","name":"y","type":"uint32"},{"internalType":"uint32","name":"scale","type":"uint32"}],"internalType":"struct POAPLibrary.Slot[]","name":"slots","type":"tuple[]"}],"internalType":"struct POAPLibrary.Board[]","name":"","type":"tuple[]"},{"components":[{"internalType":"uint128","name":"id","type":"uint128"},{"internalType":"uint64","name":"width","type":"uint64"},{"internalType":"uint64","name":"height","type":"uint64"},{"components":[{"internalType":"uint32","name":"x","type":"uint32"},{"internalType":"uint32","name":"y","type":"uint32"},{"internalType":"uint32","name":"scale","type":"uint32"}],"internalType":"struct POAPLibrary.Slot[]","name":"slots","type":"tuple[]"}],"internalType":"struct POAPLibrary.Board","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"merkleRootsByBoardId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"merkleRootsByPOAPId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mint","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint128","name":"id","type":"uint128"},{"internalType":"uint64","name":"width","type":"uint64"},{"internalType":"uint64","name":"height","type":"uint64"},{"components":[{"internalType":"uint32","name":"x","type":"uint32"},{"internalType":"uint32","name":"y","type":"uint32"},{"internalType":"uint32","name":"scale","type":"uint32"}],"internalType":"struct POAPLibrary.Slot[]","name":"slots","type":"tuple[]"}],"name":"overrideBoard","outputs":[],"stateMutability":"nonpayable","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":[],"name":"poapCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"poapPositions","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"poapsBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"boardId","type":"uint256"},{"internalType":"uint256[]","name":"badges","type":"uint256[]"},{"internalType":"string","name":"text","type":"string"}],"name":"previewBoard","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"boardId","type":"uint256"},{"internalType":"uint256[]","name":"slots","type":"uint256[]"}],"name":"rearrangeBoard","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"boardId","type":"uint256"},{"internalType":"uint256[]","name":"slots","type":"uint256[]"},{"internalType":"string","name":"text","type":"string"}],"name":"rearrangeBoardAndName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"slots","type":"uint256[]"}],"name":"rearrangePOAPs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"width","type":"uint64"},{"internalType":"uint64","name":"height","type":"uint64"},{"components":[{"internalType":"uint32","name":"x","type":"uint32"},{"internalType":"uint32","name":"y","type":"uint32"},{"internalType":"uint32","name":"scale","type":"uint32"}],"internalType":"struct POAPLibrary.Slot[]","name":"slots","type":"tuple[]"}],"name":"registerBoard","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"registerPOAP","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"},{"internalType":"bool","name":"value","type":"bool"}],"name":"setAuth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_badgesVerifierAddress","type":"address"}],"name":"setBadgesVerifierAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"}],"name":"setBoardName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"boardId","type":"uint256"},{"internalType":"uint256","name":"boardPrice","type":"uint256"}],"name":"setBoardPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_cheethAddress","type":"address"}],"name":"setCheethAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"boardId","type":"uint256"}],"name":"setCurrentBoard","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_descriptorAddress","type":"address"}],"name":"setDescriptorAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"value","type":"bool"}],"name":"setIsPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"boardId","type":"uint256"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"name":"setMerkleRootsByBoardId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"poapId","type":"uint256"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"name":"setMerkleRootsByPOAPId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"count","type":"uint256"}],"name":"setPOAPCount","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":"address","name":"owner","type":"address"}],"name":"tokenOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","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":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]