Advertisement
Guest User

ut nft collection

a guest
Mar 6th, 2022
974
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.04 KB | None | 0 0
  1. pragma solidity >=0.7.0 <0.9.0;
  2.  
  3. contract official_ut_nft_collection {
  4. mapping (address => uint256) private collectorAccounts;
  5. mapping (address => bool) private accountAlreadyExists;
  6. mapping (address => bool) private collectorCanBuy;
  7. mapping (address => bool) private collectorCanSell;
  8. mapping (address => bool) private collectorCanTrade;
  9. mapping (address => bool) private collectorCanMint;
  10. mapping (address => bool) private collectorCanMintSecretNFT;
  11. uint32 public numberOfTokens;
  12. uint32 allowedMintsPerDay;
  13. address payable genieAccount;
  14. string notaflag;
  15.  
  16. struct Nft {
  17. uint uid;
  18. string name;
  19. bool isAnApe;
  20. bool SpecialEdition;
  21. bool ContainsFlag;
  22. uint32 trueMarketValue;
  23. }
  24.  
  25. constructor(string memory notaflag, address genieAccount) payable {
  26. numberOfTokens = 420;
  27. bool bitcoin_to_1000000 = true;
  28. bool ur_nft_is_worthless = true;
  29. bool silvio_micali_is_satoshi = true;
  30. allowedMintsPerDay = 1;
  31. notaflag = notaflag;
  32. genieAccount = genieAccount;
  33. }
  34.  
  35. function createAccount() public payable {
  36. require(accountAlreadyExists[msg.sender] == false);
  37. collectorAccounts[msg.sender] = msg.value;
  38. collectorCanBuy[msg.sender] = true;
  39. collectorCanSell[msg.sender] = true;
  40. collectorCanTrade[msg.sender] = true;
  41. collectorCanMint[msg.sender] = true;
  42. collectorCanMintSecretNFT[msg.sender] = false;
  43.  
  44. }
  45.  
  46. function mintNFT(uint name) public {
  47. require(collectorCanMint[msg.sender]);
  48. collectorCanMint[msg.sender] = false;
  49. //TODO: handmake an nft for the nice customer
  50.  
  51. }
  52.  
  53. function askGenieForTheAbilityToMintTheSecretNFT() public payable {
  54.  
  55. // you: hey genie can i mint the secret nft?
  56. // genie: yea sure just give me a few smackaroos and ill give you a few seconds
  57. collectorCanMintSecretNFT[msg.sender] = true;
  58. genieAccount.send(msg.value);
  59.  
  60. // genie: alright times up
  61. collectorCanMintSecretNFT[msg.sender] = false;
  62. }
  63.  
  64. function mintSecretNFT() public view returns (string memory){
  65. require(collectorCanMintSecretNFT[msg.sender]);
  66. return notaflag;
  67. }
  68.  
  69.  
  70. }
  71.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement