Advertisement
ynifor

Untitled

Nov 23rd, 2024
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.77 KB | None | 0 0
  1. -- Insert payment token
  2. INSERT INTO payment_tokens (address, name, symbol, decimals, added_at, added_tx)
  3. VALUES ('0xbcf39d8616d15fd146dd5db4a86b4f244a9bc772', 'Tether USD', 'USDT', 6, 0, '');
  4.  
  5. -- Insert wine
  6. INSERT INTO wines (id, winery, name, year, image_name, origin)
  7. VALUES (1, 'Château Margaux', 'Grand Vin', 2015, 'margaux_2015.jpg',
  8. ARRAY['France', 'Bordeaux', 'Margaux']);
  9.  
  10. -- Insert wine details
  11. INSERT INTO wine_details (wine_id, description, color, size, classification, blend, sweetness, alcohol)
  12. VALUES (1,
  13. 'A remarkable vintage showcasing the epitome of Margaux''s terroir with exceptional balance and complexity.',
  14. 'red',
  15. '0.75',
  16. 'Premier Cru',
  17. ARRAY['Cabernet Sauvignon', 'Merlot', 'Petit Verdot', 'Cabernet Franc'],
  18. 'dry',
  19. 13.5);
  20.  
  21. -- Insert wine analytics
  22. INSERT INTO wine_analytics (wine_id, critic_score, avarage_retail_price)
  23. VALUES (1, 98, 850.00);
  24.  
  25. -- Insert collection
  26. INSERT INTO collections (id, address, creator, owner, name, whitelisted)
  27. VALUES (1,
  28. '0x1234567890123456789012345678901234567890',
  29. '0x2234567890123456789012345678901234567890',
  30. '0x3234567890123456789012345678901234567890',
  31. 'Premium Bordeaux Collection',
  32. true);
  33.  
  34. -- Insert tokens for the wine
  35. INSERT INTO tokens (id, collection_id, wine_id, creator, owner, minted_at, minted_tx, burned)
  36. VALUES
  37. (1, 1, 1,
  38. '0x2234567890123456789012345678901234567890',
  39. '0x4234567890123456789012345678901234567890',
  40. 1699891200,
  41. '0xabcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234',
  42. false),
  43. (2, 1, 1,
  44. '0x2234567890123456789012345678901234567890',
  45. '0x5234567890123456789012345678901234567890',
  46. 1699891200,
  47. '0xefef5678efef5678efef5678efef5678efef5678efef5678efef5678efef5678',
  48. false),
  49. (3, 1, 1,
  50. '0x2234567890123456789012345678901234567890',
  51. '0x5234567890123456789012345678901234567890',
  52. 1699891200,
  53. '0xefef5678efef5678efef5678efef5678efef5678efef5678efef5678efef5678',
  54. true); -- Burned
  55.  
  56. -- Insert token metadata
  57. INSERT INTO token_metadata (token_id, collection_id, meta_uri)
  58. VALUES
  59. (1, 1, 'ipfs://QmAbC123...1'),
  60. (2, 1, 'ipfs://QmAbC123...2'),
  61. (3, 1, 'ipfs://QmAbC123...2');
  62.  
  63. -- Insert orders for first token
  64. INSERT INTO orders (id, seller, buyer, collection_id, token_id, price, payment_token, duration, expire_at)
  65. VALUES
  66. (1,
  67. '0x4234567890123456789012345678901234567890',
  68. '0x6234567890123456789012345678901234567890',
  69. 1, 1, 900.00,
  70. '0xbcf39d8616d15fd146dd5db4a86b4f244a9bc772',
  71. 604800,
  72. 1700496000),
  73. (2,
  74. '0x4234567890123456789012345678901234567890',
  75. NULL,
  76. 1, 1, 950.00,
  77. '0xbcf39d8616d15fd146dd5db4a86b4f244a9bc772',
  78. 604800,
  79. 1701100800), -- November 27, 2024
  80. (3,
  81. '0x4234567890123456789012345678901234567890',
  82. NULL,
  83. 1, 1, 1000.00,
  84. '0xbcf39d8616d15fd146dd5db4a86b4f244a9bc772',
  85. 604800,
  86. 1701705600); -- December 4, 2024
  87.  
  88. INSERT INTO order_statuses (order_id, state, timestamp)
  89. VALUES
  90. (1, 1, 1699891200), -- Created
  91. (1, 3, 1699977600), -- Confirmed
  92. (1, 7, 1699891200), -- Fulfilled
  93.  
  94. (2, 1, 1699977600), -- Created
  95. (2, 3, 1700064000), -- Confirmed
  96.  
  97. (3, 1, 1700150400); -- Created
  98.  
  99. -- Insert orders for second token
  100. INSERT INTO orders (id, seller, buyer, collection_id, token_id, price, payment_token, duration, expire_at)
  101. VALUES
  102. (4,
  103. '0x5234567890123456789012345678901234567890',
  104. '0x7234567890123456789012345678901234567890',
  105. 1, 2, 880.00,
  106. '0xbcf39d8616d15fd146dd5db4a86b4f244a9bc772',
  107. 604800,
  108. 1700496000),
  109. (5,
  110. '0x5234567890123456789012345678901234567890',
  111. NULL,
  112. 1, 2, 920.00,
  113. '0xbcf39d8616d15fd146dd5db4a86b4f244a9bc772',
  114. 604800,
  115. 1701100800),
  116. (6,
  117. '0x5234567890123456789012345678901234567890',
  118. NULL,
  119. 1, 2, 975.00,
  120. '0xbcf39d8616d15fd146dd5db4a86b4f244a9bc772',
  121. 604800,
  122. 1701705600);
  123.  
  124. INSERT INTO order_statuses (order_id, state, timestamp)
  125. VALUES
  126. (4, 1, 1699891200), -- Created
  127. (4, 3, 1699977600), -- Confirmed
  128. (4, 7, 1699891200), -- Fulfilled
  129.  
  130. (5, 1, 1699977600), -- Created
  131. (5, 3, 1700064000), -- Confirmed
  132.  
  133. (6, 1, 1700150400); -- Created
  134.  
  135. -- Insert orders for third(burned) token
  136. INSERT INTO orders (id, seller, buyer, collection_id, token_id, price, payment_token, duration, expire_at)
  137. VALUES
  138. (7,
  139. '0x5234567890123456789012345678901234567890',
  140. NULL,
  141. 1, 3, 69.00,
  142. '0xbcf39d8616d15fd146dd5db4a86b4f244a9bc772',
  143. 604800,
  144. 1701705600);
  145.  
  146. INSERT INTO order_statuses (order_id, state, timestamp)
  147. VALUES
  148. (7, 1, 1699977600), -- Created
  149. (7, 3, 1700064000); -- Confirmed
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement