编译器
0.8.14+commit.80d49f37
文件 1 的 17:Address.sol
pragma solidity ^0.8.1;
library Address {
function isContract(address account) internal view returns (bool) {
return account.code.length > 0;
}
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
if (returndata.length > 0) {
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
文件 2 的 17: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 的 17:CryptoCitizenLiveMint.sol
pragma solidity 0.8.14;
import {IERC721} from '@openzeppelin/contracts/interfaces/IERC721.sol';
import {ERC721} from '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import {IERC20} from '@openzeppelin/contracts/interfaces/IERC20.sol';
import {Pausable} from '@openzeppelin/contracts/security/Pausable.sol';
import {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';
import {ReentrancyGuard} from '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import {MerkleProof} from '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol';
import {IArtBlocks} from './IArtBlocks.sol';
import {IRandomEdition} from './IRandomEdition.sol';
contract CryptoCitizenLiveMint is Ownable, Pausable, ReentrancyGuard
{
bytes32 private immutable _MINTER_ROLE = keccak256("MINTER_ROLE");
bytes32 private immutable _DEACTIVATED_ROLE = keccak256("DELISTED_ROLE");
address public immutable _BRTMULTISIG = 0xcff43A597911a9457071d89d2b2AC3D5b1862b86;
address public _ERC20_BRT_Token = 0x9EaFE760bC0eb62f0f9c5DCa18012478d9d8B2D2;
address public _ArtBlocksMintingContractCitizens = 0xDd06d8483868Cd0C5E69C24eEaA2A5F2bEaFd42b;
address public _ArtBlocksMintingContractArtists = 0x7b9a45E278b5B374bb2d96C65665d4360C97BF01;
address public _ArtBlocksCoreContractCitizens = 0xbDdE08BD57e5C9fD563eE7aC61618CB2ECdc0ce0;
address public _ArtBlocksCoreContractArtists = 0x0A1BBD57033F57E7B6743621b79fCB9Eb2CE3676;
address public _GoldenToken = 0xC2A3c3543701009d36C0357177a62E0F6459e8A9;
uint public _ArtBlocksProjectID = 4;
uint public _CurrentCityIndex;
uint _QRIndex = 333;
bytes32 public Root = 0x6d206441d8e1510b00e84caaba4a2c7bf848f36f10a5b11d04379bc457d1124b;
mapping(uint => mapping(address => bool)) public RedeemedQR;
mapping(uint => mapping(address => uint)) public QRAllocation;
mapping(uint => mapping(uint => mapping(uint => address))) public BrightListArtist;
mapping(uint => mapping(uint => mapping(uint => uint))) public SelectedTimeSlotArtistMintPass;
mapping(uint => mapping(uint => mapping(uint => bool))) public DelegateStatusArtist;
mapping(uint => mapping(uint => mapping(uint => bool))) public MintedArtist;
mapping(uint => mapping(uint => address)) public BrightListCitizen;
mapping(uint => mapping(uint => address)) public ArtistMintPasses;
mapping(uint => mapping(uint => address)) public ArtistContracts;
mapping(uint => mapping(uint => bool)) public MintType;
mapping(uint => mapping(uint => uint)) public BookingsAvailable;
mapping(uint => mapping(uint => uint)) public SelectedTimeSlotGoldenTicket;
mapping(uint => mapping(uint => bool)) public MintedCitizen;
mapping(uint => mapping(uint => bool)) public DelegateStatusCitizen;
mapping(address => bytes32) private Role;
event LiveMintComplete(address indexed Redeemer, uint TicketID, uint TokenID, bool Delegate);
event LiveMintCompleteArtist(address indexed Redeemer, uint ArtistID, uint TicketID, uint TokenID, bool Delegate);
event GoldenTokenRedeemed(address indexed Redeemer, uint TicketID, uint Slot, bool Delegate);
event QRRedeemed(address indexed Redeemer, uint TicketID, uint Slot);
event ArtistMintPassRedeemed(address indexed Redeemer, uint ArtistID, uint TicketID, uint Slot, bool Delegate);
event MinterAdded(address NewMinter);
event MinterRemoved(address RemovedMinter);
event ModifiedProjectID(uint OldProjectID, uint NewProjectID);
event ArtBlocksMintingAddressChanged(address OldMintingAddress, address NewMintingAddress);
event ArtBlocksCoreAddressChanged(address OldCoreAddress, address NewCoreAddress);
event ArtBlocksCoreAddressChangedArtist(address OldCoreAddress, address NewCoreAddress);
event GoldenTokenAddressChanged(address OldGTAddress, address NewGTAddress);
event ERC20AddressChanged(address OldERC20Address, address NewERC20Address);
event CurrentCityIndexChanged(uint OldIndex, uint NewIndex);
event TimeSlotChanged(uint OldAmount, uint NewAmount);
event TimeSlotsChanged(uint[] Slots, uint[] Amounts);
event ArtistContractAddressChanged(address OldContractAddress, address NewContractAddress);
event ArtistMintTypeChanged(bool OldMintType, bool NewMintType);
event MultisigAddressChanged(address OldAddress, address NewAddress);
event NewCityStarted(
address ERC20_BRT_TokenAddress,
address ArtBlocksMintingContractAddress,
address ArtBlocksCoreContractAddressCitizen,
address ArtBlocksCoreContractAddressArtist,
address GoldenTokenAddress,
uint ArtBlocksProjectID,
uint CurrentCityIndex,
uint QRIndex
);
event NewArtists(uint[] ArtistIDs, address[] MintPasses, address[] MintingAddresses, bool[] MintTypes);
event MerkleRootChanged(bytes32 OldRoot, bytes32 NewRoot);
constructor()
{
Role[0x1A0a3E3AE390a0710f8A6d00587082273eA8F6C9] = _MINTER_ROLE;
Role[0x4d8013b0c264034CBf22De9DF33e22f58D52F207] = _MINTER_ROLE;
Role[0x4D9A8CF2fE52b8D49C7F7EAA87b2886c2bCB4160] = _MINTER_ROLE;
Role[0x124fd966A0D83aA020D3C54AE2c9f4800b46F460] = _MINTER_ROLE;
Role[0x100469feA90Ac1Fe1073E1B2b5c020A8413635c4] = _MINTER_ROLE;
Role[0x756De4236373fd17652b377315954ca327412bBA] = _MINTER_ROLE;
Role[0xc5Dfba6ef7803665C1BDE478B51Bd7eB257A2Cb9] = _MINTER_ROLE;
Role[0xFBF32b29Bcf8fEe32d43a4Bfd3e7249daec457C0] = _MINTER_ROLE;
Role[0xF2A15A83DEE7f03C70936449037d65a1C100FF27] = _MINTER_ROLE;
Role[0x1D2BAB965a4bB72f177Cd641C7BacF3d8257230D] = _MINTER_ROLE;
Role[0x2e51E8b950D72BDf003b58E357C2BA28FB77c7fB] = _MINTER_ROLE;
Role[0x8a7186dECb91Da854090be8226222eA42c5eeCb6] = _MINTER_ROLE;
BookingsAvailable[_CurrentCityIndex][20220701] = 100;
BookingsAvailable[_CurrentCityIndex][20220703] = 100;
BookingsAvailable[_CurrentCityIndex][20220706] = 100;
BookingsAvailable[_CurrentCityIndex][20220708] = 100;
BookingsAvailable[_CurrentCityIndex][20220709] = 100;
BookingsAvailable[_CurrentCityIndex][20220713] = 100;
BookingsAvailable[_CurrentCityIndex][20220715] = 100;
BookingsAvailable[_CurrentCityIndex][20220716] = 100;
BookingsAvailable[_CurrentCityIndex][20220720] = 100;
BookingsAvailable[_CurrentCityIndex][20220722] = 100;
BookingsAvailable[_CurrentCityIndex][20220723] = 100;
BookingsAvailable[_CurrentCityIndex][20220727] = 100;
BookingsAvailable[_CurrentCityIndex][20220729] = 100;
BookingsAvailable[_CurrentCityIndex][20220730] = 100;
ArtistMintPasses[_CurrentCityIndex][7] = 0x40ee4A63f6773D06F70629962AfCF52Af9AB38ed;
ArtistMintPasses[_CurrentCityIndex][8] = 0x85885ADeD016Ba8a88593338928C88D99316ace9;
ArtistMintPasses[_CurrentCityIndex][9] = 0x2E42CcE2b828f2176013075F37f7b64dF378fB45;
ArtistMintPasses[_CurrentCityIndex][10] = 0xD0Ca41E0098Ffa698d9a4d33b61006a490678d94;
ArtistMintPasses[_CurrentCityIndex][11] = 0xB22c69E6Ca346051F20207dB031810B596838138;
ArtistMintPasses[_CurrentCityIndex][12] = 0x373E6C537F0CD423948694a93Ec1DfE5eB06eFfe;
IERC20(_ERC20_BRT_Token).approve(
_ArtBlocksMintingContractCitizens,
0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
);
IERC20(0x3dF1a91Fa71c24C8c52afcE62dbA54351CBA7a63).approve(
_ArtBlocksMintingContractArtists,
0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
);
}
function RedeemGT(uint TicketID, uint TimeSlot, bool Delegate) public nonReentrant whenNotPaused
{
require(BookingsAvailable[_CurrentCityIndex][TimeSlot] > 0, "LiveMint: TimeSlot Fully Booked");
require(IERC721(_GoldenToken).ownerOf(TicketID) == msg.sender, "ERC721: Sender Does Not Own Token With The Input Token ID");
IERC721(_GoldenToken).transferFrom(msg.sender, _BRTMULTISIG, TicketID);
require(IERC721(_GoldenToken).ownerOf(TicketID) == _BRTMULTISIG, "ERC721: Golden Token Redemption Failed");
BookingsAvailable[_CurrentCityIndex][TimeSlot]--;
SelectedTimeSlotGoldenTicket[_CurrentCityIndex][TicketID] = TimeSlot;
BrightListCitizen[_CurrentCityIndex][TicketID] = msg.sender;
DelegateStatusCitizen[_CurrentCityIndex][TicketID] = Delegate;
emit GoldenTokenRedeemed(msg.sender, TicketID, TimeSlot, Delegate);
}
function RedeemArtistPass(uint ArtistID, uint TicketID, uint TimeSlot, bool Delegate) public nonReentrant whenNotPaused
{
require(BookingsAvailable[_CurrentCityIndex][TimeSlot] > 0, "LiveMint: TimeSlot Fully Booked");
address ArtistMintPass = resolveArtistMintPass(ArtistID);
require(IERC721(ArtistMintPass).ownerOf(TicketID) == msg.sender, "ERC721: Sender Does Not Own Token With The Input Token ID");
IERC721(ArtistMintPass).transferFrom(msg.sender, _BRTMULTISIG, TicketID);
require(IERC721(ArtistMintPass).ownerOf(TicketID) == _BRTMULTISIG, "ERC721: Golden Token Redemption Failed");
BrightListArtist[_CurrentCityIndex][ArtistID][TicketID] = msg.sender;
SelectedTimeSlotArtistMintPass[_CurrentCityIndex][ArtistID][TicketID] = TimeSlot;
DelegateStatusArtist[_CurrentCityIndex][ArtistID][TicketID] = Delegate;
emit ArtistMintPassRedeemed(msg.sender, ArtistID, TicketID, TimeSlot, Delegate);
}
function RedeemQR(uint TimeSlot, bytes32[] calldata Proof) public nonReentrant whenNotPaused
{
require(BookingsAvailable[_CurrentCityIndex][TimeSlot] > 0, "LiveMint: TimeSlot Fully Booked");
require(!RedeemedQR[_CurrentCityIndex][msg.sender], "LiveMint: User Has Already Redeemed");
require(QRAllocation[_CurrentCityIndex][msg.sender] == 0, "LiveMint: Use RedeemQRAllocation() Function");
require(readBrightListMerkle(msg.sender, Proof), "LiveMint: User Is Not On BrightList");
if(!RedeemedQR[_CurrentCityIndex][msg.sender]) { RedeemedQR[_CurrentCityIndex][msg.sender] = true; }
BookingsAvailable[_CurrentCityIndex][TimeSlot]--;
SelectedTimeSlotGoldenTicket[_CurrentCityIndex][_QRIndex] = TimeSlot;
BrightListCitizen[_CurrentCityIndex][_QRIndex] = msg.sender;
emit QRRedeemed(msg.sender, _QRIndex, TimeSlot);
_QRIndex++;
}
function RedeemQRAllocation(uint TimeSlot, bytes32[] calldata Proof) public nonReentrant whenNotPaused
{
require(BookingsAvailable[_CurrentCityIndex][TimeSlot] > 0, "LiveMint: TimeSlot Fully Booked");
require(QRAllocation[_CurrentCityIndex][msg.sender] > 0, "LiveMint: User Has No QR Allocation To Redeem");
require(readBrightListMerkle(msg.sender, Proof), "LiveMint: User Is Not On BrightList");
if(!RedeemedQR[_CurrentCityIndex][msg.sender]) { RedeemedQR[_CurrentCityIndex][msg.sender] = true; }
QRAllocation[_CurrentCityIndex][msg.sender]--;
BookingsAvailable[_CurrentCityIndex][TimeSlot]--;
SelectedTimeSlotGoldenTicket[_CurrentCityIndex][_QRIndex] = TimeSlot;
BrightListCitizen[_CurrentCityIndex][_QRIndex] = msg.sender;
emit QRRedeemed(msg.sender, _QRIndex, TimeSlot);
_QRIndex++;
}
function _LiveMint(uint TicketID) public onlyMinter whenNotPaused
{
address Recipient = readBrightListCitizen(TicketID);
require(!MintedCitizen[_CurrentCityIndex][TicketID], "LiveMint: Golden Token Already Minted");
require(Recipient != address(0), "LiveMint: Golden Token Entered Is Not Brightlisted");
BrightListCitizen[_CurrentCityIndex][TicketID] = address(0);
MintedCitizen[_CurrentCityIndex][TicketID] = true;
uint TokenID = IArtBlocks(_ArtBlocksMintingContractCitizens).purchase(_ArtBlocksProjectID);
IERC721(_ArtBlocksCoreContractCitizens).transferFrom(address(this), Recipient, TokenID);
emit LiveMintComplete(Recipient, TicketID, TokenID, DelegateStatusCitizen[_CurrentCityIndex][TicketID]);
}
function _LiveMintArtist(uint ArtistID, uint TicketID) public onlyMinter whenNotPaused
{
address Recipient = readBrightListArtist(ArtistID, TicketID);
require(!MintedArtist[_CurrentCityIndex][ArtistID][TicketID], "LiveMint: Artist Mint Pass Already Minted");
require(Recipient != address(0), "LiveMint: Mint Pass Entered Is Not Brightlisted");
BrightListArtist[_CurrentCityIndex][ArtistID][TicketID] = address(0);
MintedArtist[_CurrentCityIndex][ArtistID][TicketID] = true;
address ArtistMintingContractAddress = resolveArtistContract(ArtistID);
bool ArtBlocksMint = resolveArtistMint(ArtistID);
if(ArtBlocksMint)
{
uint TokenID = IArtBlocks(ArtistMintingContractAddress).purchase(ArtistID);
IERC721(_ArtBlocksCoreContractArtists).transferFrom(address(this), Recipient, TokenID);
emit LiveMintCompleteArtist(Recipient, ArtistID, TicketID, TokenID, DelegateStatusArtist[_CurrentCityIndex][ArtistID][TicketID]);
}
else
{
uint TokenID = IRandomEdition(ArtistMintingContractAddress)._Mint(Recipient, 1);
emit LiveMintCompleteArtist(Recipient, ArtistID, TicketID, TokenID, DelegateStatusArtist[_CurrentCityIndex][ArtistID][TicketID]);
}
}
function __ApproveERC20(address BRT, address Operator, uint Amount) external onlyOwner { IERC20(BRT).approve(Operator, Amount); }
function __BatchApproveERC20(address[] calldata ERC20s, address[] calldata Operators, uint[] calldata Amounts) external onlyOwner
{
require(ERC20s.length == Operators.length && Operators.length == Amounts.length, "LiveMint: Arrays Must Be Equal Length");
for(uint i; i < ERC20s.length; i++)
{
IERC20(ERC20s[i]).approve(Operators[i], Amounts[i]);
}
}
function __MinterAdd(address Minter) external onlyOwner
{
Role[Minter] = _MINTER_ROLE;
emit MinterAdded(Minter);
}
function __MinterRemove(address Minter) external onlyOwner
{
Role[Minter] = _DEACTIVATED_ROLE;
emit MinterRemoved(Minter);
}
function __ChangeArtBlocksMintingAddress(address NewMintingAddress) external onlyOwner
{
address OldMintingAddress = _ArtBlocksMintingContractCitizens;
_ArtBlocksMintingContractCitizens = NewMintingAddress;
emit ArtBlocksMintingAddressChanged(OldMintingAddress, _ArtBlocksMintingContractCitizens);
}
function __ChangeArtBlocksMintingAddressArtists(address NewMintingAddress) external onlyOwner
{
address OldMintingAddress = _ArtBlocksMintingContractArtists;
_ArtBlocksMintingContractArtists = NewMintingAddress;
emit ArtBlocksMintingAddressChanged(OldMintingAddress, _ArtBlocksMintingContractArtists);
}
function __ChangeArtBlocksCoreAddress(address NewMintingAddress) external onlyOwner
{
address OldMintingAddress = _ArtBlocksCoreContractCitizens;
_ArtBlocksCoreContractCitizens = NewMintingAddress;
emit ArtBlocksCoreAddressChanged(OldMintingAddress, _ArtBlocksCoreContractCitizens);
}
function __ChangeArtBlocksCoreAddressArtist(address NewMintingAddress) external onlyOwner
{
address OldMintingAddress = _ArtBlocksCoreContractArtists;
_ArtBlocksCoreContractArtists = NewMintingAddress;
emit ArtBlocksCoreAddressChangedArtist(OldMintingAddress, _ArtBlocksCoreContractArtists);
}
function __ChangeArtistContractAddresses(uint[] calldata ArtistIDs, address[] calldata NewContractAddresses) external onlyOwner
{
require(ArtistIDs.length == NewContractAddresses.length, "Arrays Must Be Of Equal Length");
for(uint ArtistID; ArtistID < ArtistIDs.length; ArtistID++)
{
address OldArtistContractAddress = resolveArtistContract(ArtistIDs[ArtistID]);
ArtistContracts[_CurrentCityIndex][ArtistIDs[ArtistID]] = NewContractAddresses[ArtistID];
emit ArtistContractAddressChanged(OldArtistContractAddress, NewContractAddresses[ArtistID]);
}
}
function __ChangeArtistMintPasses(uint[] calldata ArtistIDs, address[] calldata NewContractAddresses) external onlyOwner
{
require(ArtistIDs.length == NewContractAddresses.length, "Arrays Must Be Of Equal Length");
for(uint x; x < ArtistIDs.length; x++)
{
address OldArtistContractAddress = ArtistMintPasses[_CurrentCityIndex][ArtistIDs[x]];
ArtistMintPasses[_CurrentCityIndex][ArtistIDs[x]] = NewContractAddresses[x];
emit ArtistContractAddressChanged(OldArtistContractAddress, NewContractAddresses[x]);
}
}
function __ChangeArtistMintTypes(uint[] calldata ArtistIDs, bool[] calldata NewMintTypes) external onlyOwner
{
for(uint x; x < ArtistIDs.length; x++)
{
bool OldMintType = resolveArtistMint(ArtistIDs[x]);
MintType[_CurrentCityIndex][ArtistIDs[x]] = NewMintTypes[x];
emit ArtistMintTypeChanged(OldMintType, NewMintTypes[x]);
}
}
function __ChangeArtBlocksProjectID(uint ArtBlocksProjectID) external onlyOwner
{
uint OldProjectID = _ArtBlocksProjectID;
_ArtBlocksProjectID = ArtBlocksProjectID;
emit ModifiedProjectID(OldProjectID, _ArtBlocksProjectID);
}
function __ChangeGoldenTokenAddress(address NewGTAddress) external onlyOwner
{
address OldAddress = _GoldenToken;
_GoldenToken = NewGTAddress;
emit GoldenTokenAddressChanged(OldAddress, _GoldenToken);
}
function __ChangeERC20Address(address NewERC20Address) external onlyOwner
{
address OldAddress = _ERC20_BRT_Token;
_ERC20_BRT_Token = NewERC20Address;
emit ERC20AddressChanged(OldAddress, _ERC20_BRT_Token);
}
function __ChangeCityIndex(uint Index) external onlyOwner
{
uint OldIndex = _CurrentCityIndex;
_CurrentCityIndex = Index;
emit CurrentCityIndexChanged(OldIndex, _CurrentCityIndex);
}
function __ChangeTimeSlot(uint Slot, uint Amount) external onlyOwner
{
uint OldAmount = BookingsAvailable[_CurrentCityIndex][Slot];
BookingsAvailable[_CurrentCityIndex][Slot] = Amount;
emit TimeSlotChanged(OldAmount, Amount);
}
function __ChangeTimeSlots(uint[] calldata Slots, uint[] calldata Amounts) external onlyOwner
{
require(Slots.length == Amounts.length, "Arrays Must Match Length");
for(uint i; i < Slots.length; i++)
{
BookingsAvailable[_CurrentCityIndex][Slots[i]] = Amounts[i];
}
emit TimeSlotsChanged(Slots, Amounts);
}
function __ChangeQRAllocations(address[] calldata Addresses, uint[] calldata Amounts) external onlyOwner
{
for(uint x; x < Addresses.length; x++)
{
QRAllocation[_CurrentCityIndex][Addresses[x]] = Amounts[x];
}
}
function __ChangeQRIndex(uint NewIndex) external onlyOwner { _QRIndex = NewIndex; }
function __NewCity(
address ERC20TokenAddress,
address ArtBlocksMintingContractAddress,
address ArtBlocksCoreContractAddress,
address ArtBlocksCoreContractAddressArtist,
address GoldenTokenAddress,
uint ArtBlocksProjectID,
uint CurrentCityIndex,
uint QRIndex
)
external onlyOwner
{
_ERC20_BRT_Token = ERC20TokenAddress;
_ArtBlocksMintingContractCitizens = ArtBlocksMintingContractAddress;
_ArtBlocksCoreContractCitizens = ArtBlocksCoreContractAddress;
_ArtBlocksCoreContractArtists = ArtBlocksCoreContractAddressArtist;
_GoldenToken = GoldenTokenAddress;
_ArtBlocksProjectID = ArtBlocksProjectID;
_CurrentCityIndex = CurrentCityIndex;
_QRIndex = QRIndex;
emit NewCityStarted(
_ERC20_BRT_Token,
_ArtBlocksMintingContractCitizens,
_ArtBlocksCoreContractCitizens,
_ArtBlocksCoreContractArtists,
_GoldenToken,
_ArtBlocksProjectID,
_CurrentCityIndex,
_QRIndex
);
}
function __NewArtists(
uint[] calldata ArtistIDs,
address[] calldata MintPasses,
address[] calldata MintingAddresses,
bool[] calldata MintTypes
) external onlyOwner {
require(
ArtistIDs.length == MintPasses.length
&& MintPasses.length == MintingAddresses.length
&& MintingAddresses.length == MintTypes.length,
"LiveMint: Array Lengths Must Be Of Equal Value"
);
for(uint i; i < ArtistIDs.length; i++)
{
ArtistMintPasses[_CurrentCityIndex][ArtistIDs[i]] = MintPasses[i];
ArtistContracts[_CurrentCityIndex][ArtistIDs[i]] = MintingAddresses[i];
MintType[_CurrentCityIndex][ArtistIDs[i]] = MintTypes[i];
}
emit NewArtists(ArtistIDs, MintPasses, MintingAddresses, MintTypes);
}
function __NewRoot(bytes32 NewRoot) external onlyOwner
{
bytes32 OldRoot = Root;
Root = NewRoot;
emit MerkleRootChanged(OldRoot, NewRoot);
}
function __WithdrawEther() external onlyOwner { payable(msg.sender).transfer(address(this).balance); }
function __WithdrawERC20(address tokenAddress) external onlyOwner
{
IERC20 erc20Token = IERC20(tokenAddress);
uint balance = erc20Token.balanceOf(address(this));
require(balance > 0, "0 ERC20 Balance At `tokenAddress`");
erc20Token.transfer(msg.sender, balance);
}
function __WithdrawERC721(address ContractAddress, address Recipient, uint TokenID) external onlyOwner
{
IERC721(ContractAddress).transferFrom(address(this), Recipient, TokenID);
}
function readBrightListCitizen(uint TicketID) public view returns(address)
{
return BrightListCitizen[_CurrentCityIndex][TicketID];
}
function readBrightListArtist(uint ArtistID, uint TicketID) public view returns(address)
{
return BrightListArtist[_CurrentCityIndex][ArtistID][TicketID];
}
function resolveArtistContract(uint ArtistID) public view returns(address)
{
return ArtistContracts[_CurrentCityIndex][ArtistID];
}
function resolveArtistMintPass(uint ArtistID) public view returns(address)
{
return ArtistMintPasses[_CurrentCityIndex][ArtistID];
}
function resolveArtistMintPasses(uint[] calldata ArtistIDs) public view returns(address[] memory)
{
address[] memory MintPasses = new address[](ArtistIDs.length);
for(uint i; i < ArtistIDs.length; i++)
{
address x = resolveArtistMintPass(ArtistIDs[i]);
MintPasses[i] = x;
}
return MintPasses;
}
function resolveArtistMint(uint ArtistID) public view returns(bool)
{
return MintType[_CurrentCityIndex][ArtistID];
}
function readTimeSlotGoldenTicket(uint TicketID) public view returns(uint)
{
return SelectedTimeSlotGoldenTicket[_CurrentCityIndex][TicketID];
}
function readTimeSlotArtistMintPass(uint ArtistID, uint TicketID) public view returns(uint)
{
return SelectedTimeSlotArtistMintPass[_CurrentCityIndex][ArtistID][TicketID];
}
function readMintedCitizen(uint TicketID) public view returns(bool)
{
return MintedCitizen[_CurrentCityIndex][TicketID];
}
function readMintedArtist(uint ArtistID, uint TicketID) public view returns(bool)
{
return MintedArtist[_CurrentCityIndex][ArtistID][TicketID];
}
function readOwnerOfMintPass(uint ArtistID, uint TicketID) public view returns(address)
{
return IERC721(resolveArtistMintPass(ArtistID)).ownerOf(TicketID);
}
function readOwnerOfGoldenToken(uint TicketID) public view returns(address)
{
return IERC721(_GoldenToken).ownerOf(TicketID);
}
function readMetadataArtist(uint ArtistID, uint TokenID) public view returns(string memory)
{
if(!resolveArtistMint(ArtistID))
{
return IRandomEdition(resolveArtistContract(ArtistID)).tokenURI(TokenID);
}
else if(resolveArtistMint(ArtistID))
{
return IArtBlocks(resolveArtistContract(ArtistID)).tokenURI(TokenID);
}
else { return "Artist NFT Corresponding To `TicketID` Not Minted"; }
}
function readMetadataCitizen(uint TokenID) public view returns (string memory)
{
return IArtBlocks(_ArtBlocksCoreContractCitizens).tokenURI(TokenID);
}
function readBrightListMerkle(address Recipient, bytes32[] memory Proof) public view returns(bool)
{
bytes32 Leaf = keccak256(abi.encodePacked(Recipient));
return MerkleProof.verify(Proof, Root, Leaf);
}
function readQREligibility(address Recipient, bytes32[] memory Proof) public view returns(bool)
{
bytes32 Leaf = keccak256(abi.encodePacked(Recipient));
if(
MerkleProof.verify(Proof, Root, Leaf)
&&
!RedeemedQR[_CurrentCityIndex][Recipient]
) { return true; }
else { return false; }
}
function readQRAllocationEligibility(address Recipient, bytes32[] memory Proof) public view returns(bool)
{
bytes32 Leaf = keccak256(abi.encodePacked(Recipient));
if(
MerkleProof.verify(Proof, Root, Leaf)
&&
QRAllocation[_CurrentCityIndex][Recipient] > 0
) { return true; }
else { return false; }
}
function readTimeSlotAvailable(uint TimeSlot) public view returns(uint)
{
return BookingsAvailable[_CurrentCityIndex][TimeSlot];
}
function readNFTsOwnedTokenIDs(
address Wallet,
address[] calldata NFTAddresses,
uint Range
) public view returns (uint[][] memory) {
uint[][] memory OwnedIDs = new uint[][](NFTAddresses.length);
for(uint x; x < NFTAddresses.length; x++)
{
IERC721 NFT = IERC721(NFTAddresses[x]);
uint[] memory temp = new uint[](Range);
uint counter;
for(uint y; y <= Range; y++)
{
try NFT.ownerOf(y)
{
if(NFT.ownerOf(y) == Wallet)
{
temp[counter] = y;
counter++;
}
} catch { }
}
uint[] memory FormattedOwnedIDs = new uint[](counter);
uint index;
for(uint z; z < counter; z++)
{
if(temp[z] != 0 || (z == 0 && temp[z] == 0))
{
FormattedOwnedIDs[index] = temp[z];
index++;
}
}
OwnedIDs[x] = FormattedOwnedIDs;
}
return OwnedIDs;
}
function readBatchMetadata(
address[] calldata ContractAddresses,
uint[][] calldata TokenIDs
) public view returns(string[][] memory) {
string[][] memory Metadata = new string[][](TokenIDs.length);
for(uint ProjectID; ProjectID < ContractAddresses.length; ProjectID++)
{
string[] memory ProjectMetadata = new string[](TokenIDs[ProjectID].length);
for(uint TokenID; TokenID < TokenIDs[ProjectID].length; TokenID++)
{
ProjectMetadata[TokenID] = ERC721(ContractAddresses[ProjectID]).tokenURI(TokenIDs[ProjectID][TokenID]);
}
Metadata[ProjectID] = ProjectMetadata;
}
return Metadata;
}
modifier onlyMinter()
{
require(Role[msg.sender] == _MINTER_ROLE, "OnlyMinter: Caller Is Not Approved BRT Minter");
_;
}
}
文件 4 的 17:ERC165.sol
pragma solidity ^0.8.0;
import "./IERC165.sol";
abstract contract ERC165 is IERC165 {
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}
文件 5 的 17:ERC721.sol
pragma solidity ^0.8.0;
import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
string private _name;
string private _symbol;
mapping(uint256 => address) private _owners;
mapping(address => uint256) private _balances;
mapping(uint256 => address) private _tokenApprovals;
mapping(address => mapping(address => bool)) private _operatorApprovals;
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
super.supportsInterface(interfaceId);
}
function balanceOf(address owner) public view virtual override returns (uint256) {
require(owner != address(0), "ERC721: balance query for the zero address");
return _balances[owner];
}
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
address owner = _owners[tokenId];
require(owner != address(0), "ERC721: owner query for nonexistent token");
return owner;
}
function name() public view virtual override returns (string memory) {
return _name;
}
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
string memory baseURI = _baseURI();
return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
}
function _baseURI() internal view virtual returns (string memory) {
return "";
}
function approve(address to, uint256 tokenId) public virtual override {
address owner = ERC721.ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721: approve caller is not owner nor approved for all"
);
_approve(to, tokenId);
}
function getApproved(uint256 tokenId) public view virtual override returns (address) {
require(_exists(tokenId), "ERC721: approved query for nonexistent token");
return _tokenApprovals[tokenId];
}
function setApprovalForAll(address operator, bool approved) public virtual override {
_setApprovalForAll(_msgSender(), operator, approved);
}
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_transfer(from, to, tokenId);
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
safeTransferFrom(from, to, tokenId, "");
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_safeTransfer(from, to, tokenId, _data);
}
function _safeTransfer(
address from,
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_transfer(from, to, tokenId);
require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
}
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return _owners[tokenId] != address(0);
}
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
require(_exists(tokenId), "ERC721: operator query for nonexistent token");
address owner = ERC721.ownerOf(tokenId);
return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
}
function _safeMint(address to, uint256 tokenId) internal virtual {
_safeMint(to, tokenId, "");
}
function _safeMint(
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_mint(to, tokenId);
require(
_checkOnERC721Received(address(0), to, tokenId, _data),
"ERC721: transfer to non ERC721Receiver implementer"
);
}
function _mint(address to, uint256 tokenId) internal virtual {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_beforeTokenTransfer(address(0), to, tokenId);
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(address(0), to, tokenId);
_afterTokenTransfer(address(0), to, tokenId);
}
function _burn(uint256 tokenId) internal virtual {
address owner = ERC721.ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId);
_approve(address(0), tokenId);
_balances[owner] -= 1;
delete _owners[tokenId];
emit Transfer(owner, address(0), tokenId);
_afterTokenTransfer(owner, address(0), tokenId);
}
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual {
require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, tokenId);
_approve(address(0), tokenId);
_balances[from] -= 1;
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(from, to, tokenId);
_afterTokenTransfer(from, to, tokenId);
}
function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
}
function _setApprovalForAll(
address owner,
address operator,
bool approved
) internal virtual {
require(owner != operator, "ERC721: approve to caller");
_operatorApprovals[owner][operator] = approved;
emit ApprovalForAll(owner, operator, approved);
}
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
if (to.isContract()) {
try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
return retval == IERC721Receiver.onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert("ERC721: transfer to non ERC721Receiver implementer");
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
} else {
return true;
}
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
function _afterTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
}
文件 6 的 17:IArtBlocks.sol
pragma solidity ^0.8.14;
interface IArtBlocks
{
function purchase(uint256 _projectId) payable external returns (uint tokenID);
function tokenURI(uint256 _tokenId) external view returns (string memory);
}
文件 7 的 17:IERC165.sol
pragma solidity ^0.8.0;
interface IERC165 {
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
文件 8 的 17: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 to, 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 from,
address to,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
文件 9 的 17:IERC721.sol
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
interface IERC721 is IERC165 {
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
function balanceOf(address owner) external view returns (uint256 balance);
function ownerOf(uint256 tokenId) external view returns (address owner);
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
function approve(address to, uint256 tokenId) external;
function getApproved(uint256 tokenId) external view returns (address operator);
function setApprovalForAll(address operator, bool _approved) external;
function isApprovedForAll(address owner, address operator) external view returns (bool);
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
}
文件 10 的 17:IERC721Metadata.sol
pragma solidity ^0.8.0;
import "../IERC721.sol";
interface IERC721Metadata is IERC721 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function tokenURI(uint256 tokenId) external view returns (string memory);
}
文件 11 的 17:IERC721Receiver.sol
pragma solidity ^0.8.0;
interface IERC721Receiver {
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
文件 12 的 17:IRandomEdition.sol
pragma solidity 0.8.14;
interface IRandomEdition
{
function _Mint(address Recipient, uint Amount) external returns(uint tokenID);
function tokenURI(uint256 tokenId) external view returns (string memory);
}
文件 13 的 17: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 = _efficientHash(computedHash, proofElement);
} else {
computedHash = _efficientHash(proofElement, computedHash);
}
}
return computedHash;
}
function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
assembly {
mstore(0x00, a)
mstore(0x20, b)
value := keccak256(0x00, 0x40)
}
}
}
文件 14 的 17: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 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);
}
}
文件 15 的 17:Pausable.sol
pragma solidity ^0.8.0;
import "../utils/Context.sol";
abstract contract Pausable is Context {
event Paused(address account);
event Unpaused(address account);
bool private _paused;
constructor() {
_paused = false;
}
function paused() public view virtual returns (bool) {
return _paused;
}
modifier whenNotPaused() {
require(!paused(), "Pausable: paused");
_;
}
modifier whenPaused() {
require(paused(), "Pausable: not paused");
_;
}
function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
function _unpause() internal virtual whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
}
文件 16 的 17:ReentrancyGuard.sol
pragma solidity ^0.8.0;
abstract contract ReentrancyGuard {
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
modifier nonReentrant() {
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
_status = _ENTERED;
_;
_status = _NOT_ENTERED;
}
}
文件 17 的 17:Strings.sol
pragma solidity ^0.8.0;
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
function toString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
}
{
"compilationTarget": {
"contracts/CryptoCitizenLiveMint.sol": "CryptoCitizenLiveMint"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 1000
},
"remappings": []
}
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"OldCoreAddress","type":"address"},{"indexed":false,"internalType":"address","name":"NewCoreAddress","type":"address"}],"name":"ArtBlocksCoreAddressChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"OldCoreAddress","type":"address"},{"indexed":false,"internalType":"address","name":"NewCoreAddress","type":"address"}],"name":"ArtBlocksCoreAddressChangedArtist","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"OldMintingAddress","type":"address"},{"indexed":false,"internalType":"address","name":"NewMintingAddress","type":"address"}],"name":"ArtBlocksMintingAddressChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"OldContractAddress","type":"address"},{"indexed":false,"internalType":"address","name":"NewContractAddress","type":"address"}],"name":"ArtistContractAddressChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"Redeemer","type":"address"},{"indexed":false,"internalType":"uint256","name":"ArtistID","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"TicketID","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"Slot","type":"uint256"},{"indexed":false,"internalType":"bool","name":"Delegate","type":"bool"}],"name":"ArtistMintPassRedeemed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"OldMintType","type":"bool"},{"indexed":false,"internalType":"bool","name":"NewMintType","type":"bool"}],"name":"ArtistMintTypeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"OldIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"NewIndex","type":"uint256"}],"name":"CurrentCityIndexChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"OldERC20Address","type":"address"},{"indexed":false,"internalType":"address","name":"NewERC20Address","type":"address"}],"name":"ERC20AddressChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"OldGTAddress","type":"address"},{"indexed":false,"internalType":"address","name":"NewGTAddress","type":"address"}],"name":"GoldenTokenAddressChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"Redeemer","type":"address"},{"indexed":false,"internalType":"uint256","name":"TicketID","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"Slot","type":"uint256"},{"indexed":false,"internalType":"bool","name":"Delegate","type":"bool"}],"name":"GoldenTokenRedeemed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"Redeemer","type":"address"},{"indexed":false,"internalType":"uint256","name":"TicketID","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"TokenID","type":"uint256"},{"indexed":false,"internalType":"bool","name":"Delegate","type":"bool"}],"name":"LiveMintComplete","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"Redeemer","type":"address"},{"indexed":false,"internalType":"uint256","name":"ArtistID","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"TicketID","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"TokenID","type":"uint256"},{"indexed":false,"internalType":"bool","name":"Delegate","type":"bool"}],"name":"LiveMintCompleteArtist","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"OldRoot","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"NewRoot","type":"bytes32"}],"name":"MerkleRootChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"NewMinter","type":"address"}],"name":"MinterAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"RemovedMinter","type":"address"}],"name":"MinterRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"OldProjectID","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"NewProjectID","type":"uint256"}],"name":"ModifiedProjectID","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"OldAddress","type":"address"},{"indexed":false,"internalType":"address","name":"NewAddress","type":"address"}],"name":"MultisigAddressChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"ArtistIDs","type":"uint256[]"},{"indexed":false,"internalType":"address[]","name":"MintPasses","type":"address[]"},{"indexed":false,"internalType":"address[]","name":"MintingAddresses","type":"address[]"},{"indexed":false,"internalType":"bool[]","name":"MintTypes","type":"bool[]"}],"name":"NewArtists","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"ERC20_BRT_TokenAddress","type":"address"},{"indexed":false,"internalType":"address","name":"ArtBlocksMintingContractAddress","type":"address"},{"indexed":false,"internalType":"address","name":"ArtBlocksCoreContractAddressCitizen","type":"address"},{"indexed":false,"internalType":"address","name":"ArtBlocksCoreContractAddressArtist","type":"address"},{"indexed":false,"internalType":"address","name":"GoldenTokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"ArtBlocksProjectID","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"CurrentCityIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"QRIndex","type":"uint256"}],"name":"NewCityStarted","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":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"Redeemer","type":"address"},{"indexed":false,"internalType":"uint256","name":"TicketID","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"Slot","type":"uint256"}],"name":"QRRedeemed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"OldAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"NewAmount","type":"uint256"}],"name":"TimeSlotChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"Slots","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"Amounts","type":"uint256[]"}],"name":"TimeSlotsChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"ArtistContracts","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"ArtistMintPasses","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"BookingsAvailable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"BrightListArtist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"BrightListCitizen","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"DelegateStatusArtist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"DelegateStatusCitizen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"MintType","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"MintedArtist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"MintedCitizen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"QRAllocation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"ArtistID","type":"uint256"},{"internalType":"uint256","name":"TicketID","type":"uint256"},{"internalType":"uint256","name":"TimeSlot","type":"uint256"},{"internalType":"bool","name":"Delegate","type":"bool"}],"name":"RedeemArtistPass","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"TicketID","type":"uint256"},{"internalType":"uint256","name":"TimeSlot","type":"uint256"},{"internalType":"bool","name":"Delegate","type":"bool"}],"name":"RedeemGT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"TimeSlot","type":"uint256"},{"internalType":"bytes32[]","name":"Proof","type":"bytes32[]"}],"name":"RedeemQR","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"TimeSlot","type":"uint256"},{"internalType":"bytes32[]","name":"Proof","type":"bytes32[]"}],"name":"RedeemQRAllocation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"RedeemedQR","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Root","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"SelectedTimeSlotArtistMintPass","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"SelectedTimeSlotGoldenTicket","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_ArtBlocksCoreContractArtists","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_ArtBlocksCoreContractCitizens","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_ArtBlocksMintingContractArtists","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_ArtBlocksMintingContractCitizens","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_ArtBlocksProjectID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_BRTMULTISIG","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_CurrentCityIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_ERC20_BRT_Token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_GoldenToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"TicketID","type":"uint256"}],"name":"_LiveMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"ArtistID","type":"uint256"},{"internalType":"uint256","name":"TicketID","type":"uint256"}],"name":"_LiveMintArtist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"BRT","type":"address"},{"internalType":"address","name":"Operator","type":"address"},{"internalType":"uint256","name":"Amount","type":"uint256"}],"name":"__ApproveERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"ERC20s","type":"address[]"},{"internalType":"address[]","name":"Operators","type":"address[]"},{"internalType":"uint256[]","name":"Amounts","type":"uint256[]"}],"name":"__BatchApproveERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"NewMintingAddress","type":"address"}],"name":"__ChangeArtBlocksCoreAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"NewMintingAddress","type":"address"}],"name":"__ChangeArtBlocksCoreAddressArtist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"NewMintingAddress","type":"address"}],"name":"__ChangeArtBlocksMintingAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"NewMintingAddress","type":"address"}],"name":"__ChangeArtBlocksMintingAddressArtists","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"ArtBlocksProjectID","type":"uint256"}],"name":"__ChangeArtBlocksProjectID","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ArtistIDs","type":"uint256[]"},{"internalType":"address[]","name":"NewContractAddresses","type":"address[]"}],"name":"__ChangeArtistContractAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ArtistIDs","type":"uint256[]"},{"internalType":"address[]","name":"NewContractAddresses","type":"address[]"}],"name":"__ChangeArtistMintPasses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ArtistIDs","type":"uint256[]"},{"internalType":"bool[]","name":"NewMintTypes","type":"bool[]"}],"name":"__ChangeArtistMintTypes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"Index","type":"uint256"}],"name":"__ChangeCityIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"NewERC20Address","type":"address"}],"name":"__ChangeERC20Address","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"NewGTAddress","type":"address"}],"name":"__ChangeGoldenTokenAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"Addresses","type":"address[]"},{"internalType":"uint256[]","name":"Amounts","type":"uint256[]"}],"name":"__ChangeQRAllocations","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"NewIndex","type":"uint256"}],"name":"__ChangeQRIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"Slot","type":"uint256"},{"internalType":"uint256","name":"Amount","type":"uint256"}],"name":"__ChangeTimeSlot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"Slots","type":"uint256[]"},{"internalType":"uint256[]","name":"Amounts","type":"uint256[]"}],"name":"__ChangeTimeSlots","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"Minter","type":"address"}],"name":"__MinterAdd","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"Minter","type":"address"}],"name":"__MinterRemove","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ArtistIDs","type":"uint256[]"},{"internalType":"address[]","name":"MintPasses","type":"address[]"},{"internalType":"address[]","name":"MintingAddresses","type":"address[]"},{"internalType":"bool[]","name":"MintTypes","type":"bool[]"}],"name":"__NewArtists","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"ERC20TokenAddress","type":"address"},{"internalType":"address","name":"ArtBlocksMintingContractAddress","type":"address"},{"internalType":"address","name":"ArtBlocksCoreContractAddress","type":"address"},{"internalType":"address","name":"ArtBlocksCoreContractAddressArtist","type":"address"},{"internalType":"address","name":"GoldenTokenAddress","type":"address"},{"internalType":"uint256","name":"ArtBlocksProjectID","type":"uint256"},{"internalType":"uint256","name":"CurrentCityIndex","type":"uint256"},{"internalType":"uint256","name":"QRIndex","type":"uint256"}],"name":"__NewCity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"NewRoot","type":"bytes32"}],"name":"__NewRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"__WithdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"ContractAddress","type":"address"},{"internalType":"address","name":"Recipient","type":"address"},{"internalType":"uint256","name":"TokenID","type":"uint256"}],"name":"__WithdrawERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"__WithdrawEther","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"ContractAddresses","type":"address[]"},{"internalType":"uint256[][]","name":"TokenIDs","type":"uint256[][]"}],"name":"readBatchMetadata","outputs":[{"internalType":"string[][]","name":"","type":"string[][]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"ArtistID","type":"uint256"},{"internalType":"uint256","name":"TicketID","type":"uint256"}],"name":"readBrightListArtist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"TicketID","type":"uint256"}],"name":"readBrightListCitizen","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"Recipient","type":"address"},{"internalType":"bytes32[]","name":"Proof","type":"bytes32[]"}],"name":"readBrightListMerkle","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"ArtistID","type":"uint256"},{"internalType":"uint256","name":"TokenID","type":"uint256"}],"name":"readMetadataArtist","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"TokenID","type":"uint256"}],"name":"readMetadataCitizen","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"ArtistID","type":"uint256"},{"internalType":"uint256","name":"TicketID","type":"uint256"}],"name":"readMintedArtist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"TicketID","type":"uint256"}],"name":"readMintedCitizen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"Wallet","type":"address"},{"internalType":"address[]","name":"NFTAddresses","type":"address[]"},{"internalType":"uint256","name":"Range","type":"uint256"}],"name":"readNFTsOwnedTokenIDs","outputs":[{"internalType":"uint256[][]","name":"","type":"uint256[][]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"TicketID","type":"uint256"}],"name":"readOwnerOfGoldenToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"ArtistID","type":"uint256"},{"internalType":"uint256","name":"TicketID","type":"uint256"}],"name":"readOwnerOfMintPass","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"Recipient","type":"address"},{"internalType":"bytes32[]","name":"Proof","type":"bytes32[]"}],"name":"readQRAllocationEligibility","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"Recipient","type":"address"},{"internalType":"bytes32[]","name":"Proof","type":"bytes32[]"}],"name":"readQREligibility","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"ArtistID","type":"uint256"},{"internalType":"uint256","name":"TicketID","type":"uint256"}],"name":"readTimeSlotArtistMintPass","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"TimeSlot","type":"uint256"}],"name":"readTimeSlotAvailable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"TicketID","type":"uint256"}],"name":"readTimeSlotGoldenTicket","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"ArtistID","type":"uint256"}],"name":"resolveArtistContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"ArtistID","type":"uint256"}],"name":"resolveArtistMint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"ArtistID","type":"uint256"}],"name":"resolveArtistMintPass","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ArtistIDs","type":"uint256[]"}],"name":"resolveArtistMintPasses","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]