编译器
0.8.20+commit.a1b79de6
文件 1 的 5:BuildrBuild_v4.sol
pragma solidity ^0.8.20;
import "../lib/solmate/src/tokens/ERC721.sol";
import "../lib/openzeppelin-contracts/contracts/utils/Strings.sol";
error FixTokenId();
error NotEOA();
error TransferFailed();
error NotTokenOwner();
error NotTheBuildr();
contract BuildrBuild is ERC721 {
using Strings for uint256;
enum Web3District {
Nomads,
ContentMaestros,
Founders,
Investors,
Devs
}
struct Outputs {
uint256 tokenId;
uint256 balance;
Web3District district;
uint256 order;
}
mapping(uint256 => uint256) private map;
mapping(uint256 => Web3District) private buildrDistrict;
mapping(uint256 => string) private buildrInfo;
mapping(uint256 => mapping(Web3District => uint256)) private buildrBalance;
Outputs[] public outputs;
string public baseURI;
uint256 private constant TOTAL_SUPPLY = 4024;
uint256 private constant INFRA_COST = 0.005 ether;
address private buildr;
event Received(
address indexed caller,
uint256 indexed amount,
string indexed message
);
event MapChange(
uint256 indexed mapToken1,
uint256 indexed mapToken2,
uint256 indexed token2
);
modifier onlyEOA() {
if (msg.sender != tx.origin) {
revert NotEOA();
}
_;
}
constructor(
string memory _name,
string memory _symbol,
string memory _baseURI
) ERC721(_name, _symbol) {
baseURI = _baseURI;
buildr = msg.sender;
}
receive() external payable {
emit Received(msg.sender, msg.value, "Kudos");
}
fallback() external payable {
emit Received(msg.sender, msg.value, "Fallback was called");
}
function mintBuildr(uint256 _tokenId) external payable onlyEOA {
if (msg.value < INFRA_COST) {
revert TransferFailed();
}
if (_tokenId > TOTAL_SUPPLY || _tokenId < 1) {
revert FixTokenId();
}
_mint(msg.sender, _tokenId);
}
function mapChange(uint256 _token1, uint256 _token2) external {
if (
ownerOf(_token1) != ownerOf(_token2) ||
ownerOf(_token2) != msg.sender
) {
revert NotTokenOwner();
}
uint256 tmp_token1 = mapView(_token1);
uint256 tmp_token2 = mapView(_token2);
resetBuildrInfo(_token2);
_burn(_token2);
map[_token1] = tmp_token2;
map[_token2] = tmp_token1;
emit MapChange(map[_token1], map[_token2], _token2);
}
function fundBuildr(
uint256 _tokenId,
Web3District _district
) external payable {
if (_tokenId > TOTAL_SUPPLY || _tokenId < 1) {
revert FixTokenId();
}
buildrBalance[_tokenId][_district] += msg.value;
}
function withdrawETH() external {
uint256 balance = address(this).balance;
(bool transferTx , ) = buildr.call{value: balance}("");
if (!transferTx) {
revert TransferFailed();
}
}
function editAllDetails_v2(
Web3District _district,
uint256 _tokenId,
string calldata _ipfsCID
) external {
if (ownerOf(_tokenId) != msg.sender) {
revert NotTokenOwner();
}
editDistrict(_district, _tokenId);
editBuildrDetail(_ipfsCID, _tokenId);
}
function editBuildrDistrict(
Web3District _district,
uint256 _tokenId
) external {
if (ownerOf(_tokenId) != msg.sender) {
revert NotTokenOwner();
}
editDistrict(_district, _tokenId);
}
function editBuildrInfo(
string calldata _ipfsCID,
uint256 _tokenId
) external {
if (ownerOf(_tokenId) != msg.sender) {
revert NotTokenOwner();
}
editBuildrDetail(_ipfsCID, _tokenId);
}
function changeBuildr(address _buildr) external {
if (msg.sender != buildr) {
revert NotTheBuildr();
}
buildr = _buildr;
}
function transferFrom(
address from,
address to,
uint256 id
) public override {
super.transferFrom(from, to, id);
resetBuildrInfo(id);
}
function tokenURI(
uint256 tokenId
) public view override returns (string memory) {
return string(abi.encodePacked(baseURI, tokenId.toString(), ".json"));
}
function getBuildrInfo(
uint256 _tokenId
) public view returns (string memory) {
if (_tokenId > TOTAL_SUPPLY || _tokenId < 1) {
revert FixTokenId();
}
return buildrInfo[_tokenId];
}
function getInfraCosts() public pure returns (uint256) {
return INFRA_COST;
}
function getTokenMap(uint256 _tokenId) public view returns (uint256) {
if (_tokenId > TOTAL_SUPPLY || _tokenId < 1) {
revert FixTokenId();
}
return mapView(_tokenId);
}
function getFullMap(
uint256 _start,
uint256 _limit
) public view returns (Outputs[] memory) {
if (_start < 1) {
revert FixTokenId();
}
Outputs[] memory mapOutput = new Outputs[](_limit);
for (uint256 i = 0; i < _limit; i++) {
uint256 id = _start + i;
if (id <= 4024) {
mapOutput[i].tokenId = id;
mapOutput[i].balance = getBuildrTotalBalance(id);
mapOutput[i].district = buildrDistrict[id];
mapOutput[i].order = mapView(id);
}
}
return mapOutput;
}
function getFullMap_v2(
uint256 _start,
uint256 _limit
) public view returns (Outputs[] memory) {
if (_start < 1) {
revert FixTokenId();
}
Outputs[] memory mapOutput = new Outputs[](_limit);
for (uint256 i = 0; i < _limit; i++) {
uint256 id = _start + i;
if (id <= 4024) {
mapOutput[i].district = buildrDistrict[id];
mapOutput[i].balance = getBuildrDistrictBalance(
_start + i,
buildrDistrict[id]
);
mapOutput[i].tokenId = id;
}
}
return mapOutput;
}
function getDistrictMap_v2(
Web3District _district,
uint256 _start,
uint256 _limit
) public view returns (Outputs[] memory) {
if (_start < 1) {
revert FixTokenId();
}
Outputs[] memory mapOutput = new Outputs[](_limit);
uint256 temp;
for (uint256 i = 0; i < _limit; i++) {
uint256 id = _start + i;
if (
(buildrDistrict[id] == _district) &&
(_ownerOf[id] != address(0))
) {
mapOutput[temp].tokenId = id;
mapOutput[temp].balance = getBuildrDistrictBalance(
id,
_district
);
mapOutput[temp].district = buildrDistrict[id];
temp++;
}
}
return mapOutput;
}
function getUnassignedBuildrs(
uint256 _start,
uint256 _limit
) public view returns (Outputs[] memory) {
if (_start < 1) {
revert FixTokenId();
}
Outputs[] memory mapOutput = new Outputs[](_limit);
uint256 temp;
for (uint256 i = 0; i < _limit; i++) {
uint256 id = _start + i;
if (
(buildrDistrict[id] == Web3District(0)) &&
(_ownerOf[id] == address(0) && (id <= 4024))
) {
mapOutput[temp].tokenId = id;
mapOutput[temp].balance = getBuildrTotalBalance(id);
temp++;
}
}
return mapOutput;
}
function getDistrict(uint256 _tokenId) public view returns (Web3District) {
if (_tokenId > TOTAL_SUPPLY || _tokenId < 1) {
revert FixTokenId();
}
return buildrDistrict[_tokenId];
}
function getBuildrDistrictBalance(
uint256 _tokenId,
Web3District _district
) public view returns (uint256) {
return buildrBalance[_tokenId][_district];
}
function getBuildrTotalBalance(
uint256 _tokenId
) public view returns (uint256) {
uint256 balance;
for (uint256 i = 0; i < 5; i++) {
Web3District district = Web3District(i);
balance += buildrBalance[_tokenId][district];
}
return balance;
}
function totalSupply() public pure returns (uint256) {
return TOTAL_SUPPLY;
}
function getBuildr() public view returns (address) {
return buildr;
}
function resetBuildrInfo(uint256 _tokenId) private {
delete buildrInfo[_tokenId];
buildrDistrict[_tokenId] = Web3District.Nomads;
}
function editDistrict(Web3District _district, uint256 _tokenId) private {
buildrDistrict[_tokenId] = _district;
}
function editBuildrDetail(
string calldata _ipfsCID,
uint256 _tokenId
) private {
buildrInfo[_tokenId] = _ipfsCID;
}
function mapView(uint256 _tokenId) private view returns (uint256) {
return map[_tokenId] == 0 ? _tokenId : map[_tokenId];
}
}
文件 2 的 5:ERC721.sol
pragma solidity >=0.8.0;
abstract contract ERC721 {
event Transfer(address indexed from, address indexed to, uint256 indexed id);
event Approval(address indexed owner, address indexed spender, uint256 indexed id);
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
string public name;
string public symbol;
function tokenURI(uint256 id) public view virtual returns (string memory);
mapping(uint256 => address) internal _ownerOf;
mapping(address => uint256) internal _balanceOf;
function ownerOf(uint256 id) public view virtual returns (address owner) {
require((owner = _ownerOf[id]) != address(0), "NOT_MINTED");
}
function balanceOf(address owner) public view virtual returns (uint256) {
require(owner != address(0), "ZERO_ADDRESS");
return _balanceOf[owner];
}
mapping(uint256 => address) public getApproved;
mapping(address => mapping(address => bool)) public isApprovedForAll;
constructor(string memory _name, string memory _symbol) {
name = _name;
symbol = _symbol;
}
function approve(address spender, uint256 id) public virtual {
address owner = _ownerOf[id];
require(msg.sender == owner || isApprovedForAll[owner][msg.sender], "NOT_AUTHORIZED");
getApproved[id] = spender;
emit Approval(owner, spender, id);
}
function setApprovalForAll(address operator, bool approved) public virtual {
isApprovedForAll[msg.sender][operator] = approved;
emit ApprovalForAll(msg.sender, operator, approved);
}
function transferFrom(
address from,
address to,
uint256 id
) public virtual {
require(from == _ownerOf[id], "WRONG_FROM");
require(to != address(0), "INVALID_RECIPIENT");
require(
msg.sender == from || isApprovedForAll[from][msg.sender] || msg.sender == getApproved[id],
"NOT_AUTHORIZED"
);
unchecked {
_balanceOf[from]--;
_balanceOf[to]++;
}
_ownerOf[id] = to;
delete getApproved[id];
emit Transfer(from, to, id);
}
function safeTransferFrom(
address from,
address to,
uint256 id
) public virtual {
transferFrom(from, to, id);
require(
to.code.length == 0 ||
ERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, "") ==
ERC721TokenReceiver.onERC721Received.selector,
"UNSAFE_RECIPIENT"
);
}
function safeTransferFrom(
address from,
address to,
uint256 id,
bytes calldata data
) public virtual {
transferFrom(from, to, id);
require(
to.code.length == 0 ||
ERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, data) ==
ERC721TokenReceiver.onERC721Received.selector,
"UNSAFE_RECIPIENT"
);
}
function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
return
interfaceId == 0x01ffc9a7 ||
interfaceId == 0x80ac58cd ||
interfaceId == 0x5b5e139f;
}
function _mint(address to, uint256 id) internal virtual {
require(to != address(0), "INVALID_RECIPIENT");
require(_ownerOf[id] == address(0), "ALREADY_MINTED");
unchecked {
_balanceOf[to]++;
}
_ownerOf[id] = to;
emit Transfer(address(0), to, id);
}
function _burn(uint256 id) internal virtual {
address owner = _ownerOf[id];
require(owner != address(0), "NOT_MINTED");
unchecked {
_balanceOf[owner]--;
}
delete _ownerOf[id];
delete getApproved[id];
emit Transfer(owner, address(0), id);
}
function _safeMint(address to, uint256 id) internal virtual {
_mint(to, id);
require(
to.code.length == 0 ||
ERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, "") ==
ERC721TokenReceiver.onERC721Received.selector,
"UNSAFE_RECIPIENT"
);
}
function _safeMint(
address to,
uint256 id,
bytes memory data
) internal virtual {
_mint(to, id);
require(
to.code.length == 0 ||
ERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, data) ==
ERC721TokenReceiver.onERC721Received.selector,
"UNSAFE_RECIPIENT"
);
}
}
abstract contract ERC721TokenReceiver {
function onERC721Received(
address,
address,
uint256,
bytes calldata
) external virtual returns (bytes4) {
return ERC721TokenReceiver.onERC721Received.selector;
}
}
文件 3 的 5:Math.sol
pragma solidity ^0.8.20;
library Math {
error MathOverflowedMulDiv();
enum Rounding {
Floor,
Ceil,
Trunc,
Expand
}
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a > b ? a : b;
}
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
function average(uint256 a, uint256 b) internal pure returns (uint256) {
return (a & b) + (a ^ b) / 2;
}
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
if (b == 0) {
return a / b;
}
return a == 0 ? 0 : (a - 1) / b + 1;
}
function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
unchecked {
uint256 prod0 = x * y;
uint256 prod1;
assembly {
let mm := mulmod(x, y, not(0))
prod1 := sub(sub(mm, prod0), lt(mm, prod0))
}
if (prod1 == 0) {
return prod0 / denominator;
}
if (denominator <= prod1) {
revert MathOverflowedMulDiv();
}
uint256 remainder;
assembly {
remainder := mulmod(x, y, denominator)
prod1 := sub(prod1, gt(remainder, prod0))
prod0 := sub(prod0, remainder)
}
uint256 twos = denominator & (0 - denominator);
assembly {
denominator := div(denominator, twos)
prod0 := div(prod0, twos)
twos := add(div(sub(0, twos), twos), 1)
}
prod0 |= prod1 * twos;
uint256 inverse = (3 * denominator) ^ 2;
inverse *= 2 - denominator * inverse;
inverse *= 2 - denominator * inverse;
inverse *= 2 - denominator * inverse;
inverse *= 2 - denominator * inverse;
inverse *= 2 - denominator * inverse;
inverse *= 2 - denominator * inverse;
result = prod0 * inverse;
return result;
}
}
function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
uint256 result = mulDiv(x, y, denominator);
if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) {
result += 1;
}
return result;
}
function sqrt(uint256 a) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 result = 1 << (log2(a) >> 1);
unchecked {
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
return min(result, a / result);
}
}
function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = sqrt(a);
return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);
}
}
function log2(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 128;
}
if (value >> 64 > 0) {
value >>= 64;
result += 64;
}
if (value >> 32 > 0) {
value >>= 32;
result += 32;
}
if (value >> 16 > 0) {
value >>= 16;
result += 16;
}
if (value >> 8 > 0) {
value >>= 8;
result += 8;
}
if (value >> 4 > 0) {
value >>= 4;
result += 4;
}
if (value >> 2 > 0) {
value >>= 2;
result += 2;
}
if (value >> 1 > 0) {
result += 1;
}
}
return result;
}
function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log2(value);
return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);
}
}
function log10(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >= 10 ** 64) {
value /= 10 ** 64;
result += 64;
}
if (value >= 10 ** 32) {
value /= 10 ** 32;
result += 32;
}
if (value >= 10 ** 16) {
value /= 10 ** 16;
result += 16;
}
if (value >= 10 ** 8) {
value /= 10 ** 8;
result += 8;
}
if (value >= 10 ** 4) {
value /= 10 ** 4;
result += 4;
}
if (value >= 10 ** 2) {
value /= 10 ** 2;
result += 2;
}
if (value >= 10 ** 1) {
result += 1;
}
}
return result;
}
function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log10(value);
return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);
}
}
function log256(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 16;
}
if (value >> 64 > 0) {
value >>= 64;
result += 8;
}
if (value >> 32 > 0) {
value >>= 32;
result += 4;
}
if (value >> 16 > 0) {
value >>= 16;
result += 2;
}
if (value >> 8 > 0) {
result += 1;
}
}
return result;
}
function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log256(value);
return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);
}
}
function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {
return uint8(rounding) % 2 == 1;
}
}
文件 4 的 5:SignedMath.sol
pragma solidity ^0.8.20;
library SignedMath {
function max(int256 a, int256 b) internal pure returns (int256) {
return a > b ? a : b;
}
function min(int256 a, int256 b) internal pure returns (int256) {
return a < b ? a : b;
}
function average(int256 a, int256 b) internal pure returns (int256) {
int256 x = (a & b) + ((a ^ b) >> 1);
return x + (int256(uint256(x) >> 255) & (a ^ b));
}
function abs(int256 n) internal pure returns (uint256) {
unchecked {
return uint256(n >= 0 ? n : -n);
}
}
}
文件 5 的 5:Strings.sol
pragma solidity ^0.8.20;
import {Math} from "./math/Math.sol";
import {SignedMath} from "./math/SignedMath.sol";
library Strings {
bytes16 private constant HEX_DIGITS = "0123456789abcdef";
uint8 private constant ADDRESS_LENGTH = 20;
error StringsInsufficientHexLength(uint256 value, uint256 length);
function toString(uint256 value) internal pure returns (string memory) {
unchecked {
uint256 length = Math.log10(value) + 1;
string memory buffer = new string(length);
uint256 ptr;
assembly {
ptr := add(buffer, add(32, length))
}
while (true) {
ptr--;
assembly {
mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))
}
value /= 10;
if (value == 0) break;
}
return buffer;
}
}
function toStringSigned(int256 value) internal pure returns (string memory) {
return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value)));
}
function toHexString(uint256 value) internal pure returns (string memory) {
unchecked {
return toHexString(value, Math.log256(value) + 1);
}
}
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
uint256 localValue = value;
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_DIGITS[localValue & 0xf];
localValue >>= 4;
}
if (localValue != 0) {
revert StringsInsufficientHexLength(value, length);
}
return string(buffer);
}
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);
}
function equal(string memory a, string memory b) internal pure returns (bool) {
return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));
}
}
{
"compilationTarget": {
"src/BuildrBuild_v4.sol": "BuildrBuild"
},
"evmVersion": "paris",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 28
},
"remappings": [
":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
":ds-test/=lib/solmate/lib/ds-test/src/",
":erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
":forge-std/=lib/forge-std/src/",
":openzeppelin-contracts/=lib/openzeppelin-contracts/",
":solmate/=lib/solmate/src/"
]
}
[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_baseURI","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"FixTokenId","type":"error"},{"inputs":[],"name":"NotEOA","type":"error"},{"inputs":[],"name":"NotTheBuildr","type":"error"},{"inputs":[],"name":"NotTokenOwner","type":"error"},{"inputs":[],"name":"TransferFailed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","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":"uint256","name":"mapToken1","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"mapToken2","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"token2","type":"uint256"}],"name":"MapChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"string","name":"message","type":"string"}],"name":"Received","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":"id","type":"uint256"}],"name":"Transfer","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"id","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":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_buildr","type":"address"}],"name":"changeBuildr","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum BuildrBuild.Web3District","name":"_district","type":"uint8"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"string","name":"_ipfsCID","type":"string"}],"name":"editAllDetails_v2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum BuildrBuild.Web3District","name":"_district","type":"uint8"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"editBuildrDistrict","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_ipfsCID","type":"string"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"editBuildrInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"enum BuildrBuild.Web3District","name":"_district","type":"uint8"}],"name":"fundBuildr","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBuildr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"enum BuildrBuild.Web3District","name":"_district","type":"uint8"}],"name":"getBuildrDistrictBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getBuildrInfo","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getBuildrTotalBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getDistrict","outputs":[{"internalType":"enum BuildrBuild.Web3District","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum BuildrBuild.Web3District","name":"_district","type":"uint8"},{"internalType":"uint256","name":"_start","type":"uint256"},{"internalType":"uint256","name":"_limit","type":"uint256"}],"name":"getDistrictMap_v2","outputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"enum BuildrBuild.Web3District","name":"district","type":"uint8"},{"internalType":"uint256","name":"order","type":"uint256"}],"internalType":"struct BuildrBuild.Outputs[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_start","type":"uint256"},{"internalType":"uint256","name":"_limit","type":"uint256"}],"name":"getFullMap","outputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"enum BuildrBuild.Web3District","name":"district","type":"uint8"},{"internalType":"uint256","name":"order","type":"uint256"}],"internalType":"struct BuildrBuild.Outputs[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_start","type":"uint256"},{"internalType":"uint256","name":"_limit","type":"uint256"}],"name":"getFullMap_v2","outputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"enum BuildrBuild.Web3District","name":"district","type":"uint8"},{"internalType":"uint256","name":"order","type":"uint256"}],"internalType":"struct BuildrBuild.Outputs[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getInfraCosts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getTokenMap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_start","type":"uint256"},{"internalType":"uint256","name":"_limit","type":"uint256"}],"name":"getUnassignedBuildrs","outputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"enum BuildrBuild.Web3District","name":"district","type":"uint8"},{"internalType":"uint256","name":"order","type":"uint256"}],"internalType":"struct BuildrBuild.Outputs[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_token1","type":"uint256"},{"internalType":"uint256","name":"_token2","type":"uint256"}],"name":"mapChange","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"mintBuildr","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"outputs","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"enum BuildrBuild.Web3District","name":"district","type":"uint8"},{"internalType":"uint256","name":"order","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","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":"id","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":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]