From 79d6b6895f54d2a55128ccd1f39dd2e80d67246b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Le=C3=B3n?= Date: Fri, 2 Jun 2023 11:45:07 -0300 Subject: [PATCH] add: mainnet deployment --- .../LandPreSale_25/bundles.mainnet.json | 5 + .../LandPreSale_25/sectors.mainnet.json | 3479 +++++++++++++++++ .../polygon/PolygonLandPreSale_48.json | 3441 ++++++++++++++++ .../b42a863a795806b4ea3a8f05dfa42539.json | 251 ++ 4 files changed, 7176 insertions(+) create mode 100644 packages/core/data/landSales/LandPreSale_25/bundles.mainnet.json create mode 100644 packages/core/data/landSales/LandPreSale_25/sectors.mainnet.json create mode 100644 packages/core/deployments/polygon/PolygonLandPreSale_48.json create mode 100644 packages/core/deployments/polygon/solcInputs/b42a863a795806b4ea3a8f05dfa42539.json diff --git a/packages/core/data/landSales/LandPreSale_25/bundles.mainnet.json b/packages/core/data/landSales/LandPreSale_25/bundles.mainnet.json new file mode 100644 index 0000000000..17afffd2db --- /dev/null +++ b/packages/core/data/landSales/LandPreSale_25/bundles.mainnet.json @@ -0,0 +1,5 @@ +{ + "161": [], + "162": [], + "163": [] +} \ No newline at end of file diff --git a/packages/core/data/landSales/LandPreSale_25/sectors.mainnet.json b/packages/core/data/landSales/LandPreSale_25/sectors.mainnet.json new file mode 100644 index 0000000000..de733119e3 --- /dev/null +++ b/packages/core/data/landSales/LandPreSale_25/sectors.mainnet.json @@ -0,0 +1,3479 @@ +[ + { + "sector": 48, + "lands": [ + { + "coordinateX": 84, + "coordinateY": -17, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 84, + "coordinateY": -16, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 84, + "coordinateY": -12, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 84, + "coordinateY": -11, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 84, + "coordinateY": -10, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 84, + "coordinateY": -9, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 84, + "coordinateY": -8, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 84, + "coordinateY": -7, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 85, + "coordinateY": -17, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 85, + "coordinateY": -16, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 85, + "coordinateY": -12, + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "bundleId": "" + }, + { + "coordinateX": 85, + "coordinateY": -11, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 85, + "coordinateY": -10, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 85, + "coordinateY": -9, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 85, + "coordinateY": -8, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 85, + "coordinateY": -7, + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "bundleId": "" + }, + { + "coordinateX": 86, + "coordinateY": -17, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 86, + "coordinateY": -16, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 86, + "coordinateY": -12, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 86, + "coordinateY": -11, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 86, + "coordinateY": -10, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 86, + "coordinateY": -9, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 86, + "coordinateY": -8, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 86, + "coordinateY": -7, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 87, + "coordinateY": -17, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 87, + "coordinateY": -16, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 87, + "coordinateY": -15, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 87, + "coordinateY": -14, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 87, + "coordinateY": -13, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 87, + "coordinateY": -12, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 87, + "coordinateY": -11, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 87, + "coordinateY": -10, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 87, + "coordinateY": -9, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 87, + "coordinateY": -8, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 87, + "coordinateY": -7, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 88, + "coordinateY": -16, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 88, + "coordinateY": -15, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 88, + "coordinateY": -14, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 88, + "coordinateY": -13, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 88, + "coordinateY": -12, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 88, + "coordinateY": -11, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 88, + "coordinateY": -10, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 88, + "coordinateY": -9, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 88, + "coordinateY": -8, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 88, + "coordinateY": -7, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 89, + "coordinateY": -16, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 89, + "coordinateY": -15, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 89, + "coordinateY": -14, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 89, + "coordinateY": -13, + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "bundleId": "" + }, + { + "coordinateX": 89, + "coordinateY": -12, + "ownerAddress": "", + "bundleId": "163" + }, + { + "coordinateX": 89, + "coordinateY": -11, + "ownerAddress": "", + "bundleId": "162" + }, + { + "coordinateX": 89, + "coordinateY": -10, + "ownerAddress": "", + "bundleId": "162" + }, + { + "coordinateX": 89, + "coordinateY": -9, + "ownerAddress": "", + "bundleId": "161" + }, + { + "coordinateX": 89, + "coordinateY": -8, + "ownerAddress": "", + "bundleId": "161" + }, + { + "coordinateX": 89, + "coordinateY": -7, + "ownerAddress": "", + "bundleId": "162" + }, + { + "coordinateX": 90, + "coordinateY": -16, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 90, + "coordinateY": -6, + "ownerAddress": "", + "bundleId": "161" + }, + { + "coordinateX": 90, + "coordinateY": -5, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 90, + "coordinateY": -4, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 90, + "coordinateY": -3, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 90, + "coordinateY": -2, + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "bundleId": "" + }, + { + "coordinateX": 90, + "coordinateY": -1, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 90, + "coordinateY": 0, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 90, + "coordinateY": 1, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 90, + "coordinateY": 2, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 90, + "coordinateY": 12, + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "bundleId": "" + }, + { + "coordinateX": 90, + "coordinateY": 13, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 90, + "coordinateY": 14, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 91, + "coordinateY": -16, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 91, + "coordinateY": -6, + "ownerAddress": "", + "bundleId": "162" + }, + { + "coordinateX": 91, + "coordinateY": -5, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 91, + "coordinateY": -4, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 91, + "coordinateY": -3, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 91, + "coordinateY": -2, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 91, + "coordinateY": -1, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 91, + "coordinateY": 0, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 91, + "coordinateY": 1, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 91, + "coordinateY": 2, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 91, + "coordinateY": 12, + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "bundleId": "" + }, + { + "coordinateX": 91, + "coordinateY": 13, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 91, + "coordinateY": 14, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 92, + "coordinateY": -16, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 92, + "coordinateY": -6, + "ownerAddress": "", + "bundleId": "162" + }, + { + "coordinateX": 92, + "coordinateY": -5, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 92, + "coordinateY": -4, + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "bundleId": "" + }, + { + "coordinateX": 92, + "coordinateY": -3, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 92, + "coordinateY": -2, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 92, + "coordinateY": -1, + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "bundleId": "" + }, + { + "coordinateX": 92, + "coordinateY": 0, + "ownerAddress": "", + "bundleId": "161" + }, + { + "coordinateX": 92, + "coordinateY": 1, + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "bundleId": "" + }, + { + "coordinateX": 92, + "coordinateY": 2, + "ownerAddress": "", + "bundleId": "162" + }, + { + "coordinateX": 92, + "coordinateY": 12, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 92, + "coordinateY": 13, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 92, + "coordinateY": 14, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 93, + "coordinateY": -16, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 93, + "coordinateY": -15, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 93, + "coordinateY": -14, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 93, + "coordinateY": -13, + "ownerAddress": "", + "bundleId": "163" + }, + { + "coordinateX": 93, + "coordinateY": -6, + "ownerAddress": "", + "bundleId": "161" + }, + { + "coordinateX": 93, + "coordinateY": -5, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 93, + "coordinateY": -4, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 93, + "coordinateY": -3, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 93, + "coordinateY": -2, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 93, + "coordinateY": -1, + "ownerAddress": "", + "bundleId": "163" + }, + { + "coordinateX": 93, + "coordinateY": 3, + "ownerAddress": "", + "bundleId": "163" + }, + { + "coordinateX": 93, + "coordinateY": 4, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 93, + "coordinateY": 5, + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "bundleId": "" + }, + { + "coordinateX": 93, + "coordinateY": 15, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 93, + "coordinateY": 16, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 93, + "coordinateY": 17, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 93, + "coordinateY": 18, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 93, + "coordinateY": 19, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 93, + "coordinateY": 20, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 94, + "coordinateY": -16, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 94, + "coordinateY": -15, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 94, + "coordinateY": -14, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 94, + "coordinateY": -13, + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "bundleId": "" + }, + { + "coordinateX": 94, + "coordinateY": -6, + "ownerAddress": "", + "bundleId": "162" + }, + { + "coordinateX": 94, + "coordinateY": -5, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 94, + "coordinateY": -4, + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "bundleId": "" + }, + { + "coordinateX": 94, + "coordinateY": -3, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 94, + "coordinateY": -2, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 94, + "coordinateY": -1, + "ownerAddress": "", + "bundleId": "163" + }, + { + "coordinateX": 94, + "coordinateY": 3, + "ownerAddress": "", + "bundleId": "163" + }, + { + "coordinateX": 94, + "coordinateY": 4, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 94, + "coordinateY": 5, + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "bundleId": "" + }, + { + "coordinateX": 94, + "coordinateY": 15, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 94, + "coordinateY": 16, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 94, + "coordinateY": 17, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 94, + "coordinateY": 18, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 94, + "coordinateY": 19, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 94, + "coordinateY": 20, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 95, + "coordinateY": -15, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 95, + "coordinateY": -14, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 95, + "coordinateY": -13, + "ownerAddress": "", + "bundleId": "161" + }, + { + "coordinateX": 95, + "coordinateY": -6, + "ownerAddress": "", + "bundleId": "162" + }, + { + "coordinateX": 95, + "coordinateY": -5, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 95, + "coordinateY": -4, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 95, + "coordinateY": -3, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 95, + "coordinateY": -2, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 95, + "coordinateY": -1, + "ownerAddress": "", + "bundleId": "162" + }, + { + "coordinateX": 95, + "coordinateY": 3, + "ownerAddress": "", + "bundleId": "161" + }, + { + "coordinateX": 95, + "coordinateY": 4, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 95, + "coordinateY": 5, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 95, + "coordinateY": 15, + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "bundleId": "" + }, + { + "coordinateX": 95, + "coordinateY": 16, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 95, + "coordinateY": 17, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 95, + "coordinateY": 18, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 95, + "coordinateY": 19, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 95, + "coordinateY": 20, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 96, + "coordinateY": -15, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 96, + "coordinateY": -14, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 96, + "coordinateY": -13, + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "bundleId": "" + }, + { + "coordinateX": 96, + "coordinateY": -9, + "ownerAddress": "", + "bundleId": "161" + }, + { + "coordinateX": 96, + "coordinateY": -8, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 96, + "coordinateY": -7, + "ownerAddress": "", + "bundleId": "162" + }, + { + "coordinateX": 96, + "coordinateY": -6, + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "bundleId": "" + }, + { + "coordinateX": 96, + "coordinateY": -5, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 96, + "coordinateY": -4, + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "bundleId": "" + }, + { + "coordinateX": 96, + "coordinateY": -3, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 96, + "coordinateY": -2, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 96, + "coordinateY": -1, + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "bundleId": "" + }, + { + "coordinateX": 96, + "coordinateY": 0, + "ownerAddress": "", + "bundleId": "163" + }, + { + "coordinateX": 96, + "coordinateY": 1, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 96, + "coordinateY": 2, + "ownerAddress": "", + "bundleId": "163" + }, + { + "coordinateX": 96, + "coordinateY": 3, + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "bundleId": "" + }, + { + "coordinateX": 96, + "coordinateY": 4, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 96, + "coordinateY": 5, + "ownerAddress": "", + "bundleId": "163" + }, + { + "coordinateX": 96, + "coordinateY": 12, + "ownerAddress": "", + "bundleId": "163" + }, + { + "coordinateX": 96, + "coordinateY": 13, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 96, + "coordinateY": 14, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 96, + "coordinateY": 15, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 96, + "coordinateY": 16, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 96, + "coordinateY": 17, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": -15, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": -14, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": -13, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": -9, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": -8, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": -7, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": -6, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": -5, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": -4, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": -3, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": -2, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": -1, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": 0, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": 1, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": 2, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": 3, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": 4, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": 5, + "ownerAddress": "", + "bundleId": "162" + }, + { + "coordinateX": 97, + "coordinateY": 12, + "ownerAddress": "", + "bundleId": "163" + }, + { + "coordinateX": 97, + "coordinateY": 13, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": 14, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": 15, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": 16, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": 17, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": -15, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": -14, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": -13, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": -9, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": -8, + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": -7, + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": -6, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": -5, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": -4, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": -3, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": -2, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": -1, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": 0, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": 1, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": 2, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": 3, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": 4, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": 5, + "ownerAddress": "", + "bundleId": "163" + }, + { + "coordinateX": 98, + "coordinateY": 12, + "ownerAddress": "", + "bundleId": "161" + }, + { + "coordinateX": 98, + "coordinateY": 13, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": 14, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": 15, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": 16, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": 17, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 99, + "coordinateY": -15, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 99, + "coordinateY": -14, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 99, + "coordinateY": -13, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 99, + "coordinateY": -12, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 99, + "coordinateY": -11, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 99, + "coordinateY": -10, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 99, + "coordinateY": 12, + "ownerAddress": "", + "bundleId": "161" + }, + { + "coordinateX": 99, + "coordinateY": 13, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 99, + "coordinateY": 14, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 99, + "coordinateY": 15, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 99, + "coordinateY": 16, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 99, + "coordinateY": 17, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 100, + "coordinateY": -15, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 100, + "coordinateY": -14, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 100, + "coordinateY": -13, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 100, + "coordinateY": -12, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 100, + "coordinateY": -11, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 100, + "coordinateY": -10, + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "bundleId": "" + }, + { + "coordinateX": 100, + "coordinateY": 12, + "ownerAddress": "", + "bundleId": "163" + }, + { + "coordinateX": 100, + "coordinateY": 13, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 100, + "coordinateY": 14, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 100, + "coordinateY": 15, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 100, + "coordinateY": 16, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 100, + "coordinateY": 17, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 101, + "coordinateY": -15, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 101, + "coordinateY": -14, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 101, + "coordinateY": -13, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 101, + "coordinateY": -12, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 101, + "coordinateY": -11, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 101, + "coordinateY": -10, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 101, + "coordinateY": 12, + "ownerAddress": "", + "bundleId": "163" + }, + { + "coordinateX": 101, + "coordinateY": 13, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 101, + "coordinateY": 14, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 101, + "coordinateY": 15, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 101, + "coordinateY": 16, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 101, + "coordinateY": 17, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 102, + "coordinateY": -9, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 102, + "coordinateY": -8, + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "bundleId": "" + }, + { + "coordinateX": 102, + "coordinateY": -7, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 102, + "coordinateY": 3, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 102, + "coordinateY": 4, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 102, + "coordinateY": 5, + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "bundleId": "" + }, + { + "coordinateX": 102, + "coordinateY": 6, + "ownerAddress": "", + "bundleId": "162" + }, + { + "coordinateX": 102, + "coordinateY": 7, + "ownerAddress": "", + "bundleId": "161" + }, + { + "coordinateX": 102, + "coordinateY": 8, + "ownerAddress": "", + "bundleId": "162" + }, + { + "coordinateX": 102, + "coordinateY": 9, + "ownerAddress": "", + "bundleId": "161" + }, + { + "coordinateX": 102, + "coordinateY": 10, + "ownerAddress": "", + "bundleId": "162" + }, + { + "coordinateX": 102, + "coordinateY": 11, + "ownerAddress": "", + "bundleId": "161" + }, + { + "coordinateX": 102, + "coordinateY": 12, + "ownerAddress": "", + "bundleId": "161" + }, + { + "coordinateX": 102, + "coordinateY": 13, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 103, + "coordinateY": -9, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 103, + "coordinateY": -8, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 103, + "coordinateY": -7, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 104, + "coordinateY": -9, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 104, + "coordinateY": -8, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 104, + "coordinateY": -7, + "ownerAddress": "", + "bundleId": "" + } + ], + "estates": [ + { + "coordinateX": 84, + "coordinateY": -15, + "type": 1, + "lands": [ + { + "coordinateX": 84, + "coordinateY": -15, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 85, + "coordinateY": -15, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 86, + "coordinateY": -15, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 84, + "coordinateY": -14, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 85, + "coordinateY": -14, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 86, + "coordinateY": -14, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 84, + "coordinateY": -13, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 85, + "coordinateY": -13, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 86, + "coordinateY": -13, + "ownerAddress": "", + "bundleId": "" + } + ], + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca" + }, + { + "coordinateX": 90, + "coordinateY": -15, + "type": 1, + "lands": [ + { + "coordinateX": 90, + "coordinateY": -15, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 91, + "coordinateY": -15, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 92, + "coordinateY": -15, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 90, + "coordinateY": -14, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 91, + "coordinateY": -14, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 92, + "coordinateY": -14, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 90, + "coordinateY": -13, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 91, + "coordinateY": -13, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 92, + "coordinateY": -13, + "ownerAddress": "", + "bundleId": "" + } + ], + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca" + }, + { + "coordinateX": 90, + "coordinateY": 3, + "type": 1, + "lands": [ + { + "coordinateX": 90, + "coordinateY": 3, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 91, + "coordinateY": 3, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 92, + "coordinateY": 3, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 90, + "coordinateY": 4, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 91, + "coordinateY": 4, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 92, + "coordinateY": 4, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 90, + "coordinateY": 5, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 91, + "coordinateY": 5, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 92, + "coordinateY": 5, + "ownerAddress": "", + "bundleId": "" + } + ], + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca" + }, + { + "coordinateX": 90, + "coordinateY": 15, + "type": 1, + "lands": [ + { + "coordinateX": 90, + "coordinateY": 15, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 91, + "coordinateY": 15, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 92, + "coordinateY": 15, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 90, + "coordinateY": 16, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 91, + "coordinateY": 16, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 92, + "coordinateY": 16, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 90, + "coordinateY": 17, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 91, + "coordinateY": 17, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 92, + "coordinateY": 17, + "ownerAddress": "", + "bundleId": "" + } + ], + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca" + }, + { + "coordinateX": 90, + "coordinateY": 18, + "type": 1, + "lands": [ + { + "coordinateX": 90, + "coordinateY": 18, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 91, + "coordinateY": 18, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 92, + "coordinateY": 18, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 90, + "coordinateY": 19, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 91, + "coordinateY": 19, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 92, + "coordinateY": 19, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 90, + "coordinateY": 20, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 91, + "coordinateY": 20, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 92, + "coordinateY": 20, + "ownerAddress": "", + "bundleId": "" + } + ], + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca" + }, + { + "coordinateX": 93, + "coordinateY": 0, + "type": 1, + "lands": [ + { + "coordinateX": 93, + "coordinateY": 0, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 94, + "coordinateY": 0, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 95, + "coordinateY": 0, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 93, + "coordinateY": 1, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 94, + "coordinateY": 1, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 95, + "coordinateY": 1, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 93, + "coordinateY": 2, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 94, + "coordinateY": 2, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 95, + "coordinateY": 2, + "ownerAddress": "", + "bundleId": "" + } + ], + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca" + }, + { + "coordinateX": 93, + "coordinateY": 12, + "type": 1, + "lands": [ + { + "coordinateX": 93, + "coordinateY": 12, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 94, + "coordinateY": 12, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 95, + "coordinateY": 12, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 93, + "coordinateY": 13, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 94, + "coordinateY": 13, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 95, + "coordinateY": 13, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 93, + "coordinateY": 14, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 94, + "coordinateY": 14, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 95, + "coordinateY": 14, + "ownerAddress": "", + "bundleId": "" + } + ], + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca" + }, + { + "coordinateX": 96, + "coordinateY": -12, + "type": 1, + "lands": [ + { + "coordinateX": 96, + "coordinateY": -12, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": -12, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": -12, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 96, + "coordinateY": -11, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": -11, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": -11, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 96, + "coordinateY": -10, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": -10, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": -10, + "ownerAddress": "", + "bundleId": "" + } + ], + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca" + }, + { + "coordinateX": 99, + "coordinateY": -9, + "type": 1, + "lands": [ + { + "coordinateX": 99, + "coordinateY": -9, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 100, + "coordinateY": -9, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 101, + "coordinateY": -9, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 99, + "coordinateY": -8, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 100, + "coordinateY": -8, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 101, + "coordinateY": -8, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 99, + "coordinateY": -7, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 100, + "coordinateY": -7, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 101, + "coordinateY": -7, + "ownerAddress": "", + "bundleId": "" + } + ], + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca" + }, + { + "coordinateX": 99, + "coordinateY": 0, + "type": 1, + "lands": [ + { + "coordinateX": 99, + "coordinateY": 0, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 100, + "coordinateY": 0, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 101, + "coordinateY": 0, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 99, + "coordinateY": 1, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 100, + "coordinateY": 1, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 101, + "coordinateY": 1, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 99, + "coordinateY": 2, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 100, + "coordinateY": 2, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 101, + "coordinateY": 2, + "ownerAddress": "", + "bundleId": "" + } + ], + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca" + }, + { + "coordinateX": 99, + "coordinateY": 3, + "type": 1, + "lands": [ + { + "coordinateX": 99, + "coordinateY": 3, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 100, + "coordinateY": 3, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 101, + "coordinateY": 3, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 99, + "coordinateY": 4, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 100, + "coordinateY": 4, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 101, + "coordinateY": 4, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 99, + "coordinateY": 5, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 100, + "coordinateY": 5, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 101, + "coordinateY": 5, + "ownerAddress": "", + "bundleId": "" + } + ], + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca" + }, + { + "coordinateX": 84, + "coordinateY": -6, + "type": 2, + "lands": [ + { + "coordinateX": 84, + "coordinateY": -6, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 85, + "coordinateY": -6, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 86, + "coordinateY": -6, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 87, + "coordinateY": -6, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 88, + "coordinateY": -6, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 89, + "coordinateY": -6, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 84, + "coordinateY": -5, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 85, + "coordinateY": -5, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 86, + "coordinateY": -5, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 87, + "coordinateY": -5, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 88, + "coordinateY": -5, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 89, + "coordinateY": -5, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 84, + "coordinateY": -4, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 85, + "coordinateY": -4, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 86, + "coordinateY": -4, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 87, + "coordinateY": -4, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 88, + "coordinateY": -4, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 89, + "coordinateY": -4, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 84, + "coordinateY": -3, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 85, + "coordinateY": -3, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 86, + "coordinateY": -3, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 87, + "coordinateY": -3, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 88, + "coordinateY": -3, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 89, + "coordinateY": -3, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 84, + "coordinateY": -2, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 85, + "coordinateY": -2, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 86, + "coordinateY": -2, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 87, + "coordinateY": -2, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 88, + "coordinateY": -2, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 89, + "coordinateY": -2, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 84, + "coordinateY": -1, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 85, + "coordinateY": -1, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 86, + "coordinateY": -1, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 87, + "coordinateY": -1, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 88, + "coordinateY": -1, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 89, + "coordinateY": -1, + "ownerAddress": "", + "bundleId": "" + } + ], + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca" + }, + { + "coordinateX": 90, + "coordinateY": -12, + "type": 2, + "lands": [ + { + "coordinateX": 90, + "coordinateY": -12, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 91, + "coordinateY": -12, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 92, + "coordinateY": -12, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 93, + "coordinateY": -12, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 94, + "coordinateY": -12, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 95, + "coordinateY": -12, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 90, + "coordinateY": -11, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 91, + "coordinateY": -11, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 92, + "coordinateY": -11, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 93, + "coordinateY": -11, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 94, + "coordinateY": -11, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 95, + "coordinateY": -11, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 90, + "coordinateY": -10, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 91, + "coordinateY": -10, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 92, + "coordinateY": -10, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 93, + "coordinateY": -10, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 94, + "coordinateY": -10, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 95, + "coordinateY": -10, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 90, + "coordinateY": -9, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 91, + "coordinateY": -9, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 92, + "coordinateY": -9, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 93, + "coordinateY": -9, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 94, + "coordinateY": -9, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 95, + "coordinateY": -9, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 90, + "coordinateY": -8, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 91, + "coordinateY": -8, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 92, + "coordinateY": -8, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 93, + "coordinateY": -8, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 94, + "coordinateY": -8, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 95, + "coordinateY": -8, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 90, + "coordinateY": -7, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 91, + "coordinateY": -7, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 92, + "coordinateY": -7, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 93, + "coordinateY": -7, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 94, + "coordinateY": -7, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 95, + "coordinateY": -7, + "ownerAddress": "", + "bundleId": "" + } + ], + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca" + }, + { + "coordinateX": 90, + "coordinateY": 6, + "type": 2, + "lands": [ + { + "coordinateX": 90, + "coordinateY": 6, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 91, + "coordinateY": 6, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 92, + "coordinateY": 6, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 93, + "coordinateY": 6, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 94, + "coordinateY": 6, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 95, + "coordinateY": 6, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 90, + "coordinateY": 7, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 91, + "coordinateY": 7, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 92, + "coordinateY": 7, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 93, + "coordinateY": 7, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 94, + "coordinateY": 7, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 95, + "coordinateY": 7, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 90, + "coordinateY": 8, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 91, + "coordinateY": 8, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 92, + "coordinateY": 8, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 93, + "coordinateY": 8, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 94, + "coordinateY": 8, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 95, + "coordinateY": 8, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 90, + "coordinateY": 9, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 91, + "coordinateY": 9, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 92, + "coordinateY": 9, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 93, + "coordinateY": 9, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 94, + "coordinateY": 9, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 95, + "coordinateY": 9, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 90, + "coordinateY": 10, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 91, + "coordinateY": 10, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 92, + "coordinateY": 10, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 93, + "coordinateY": 10, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 94, + "coordinateY": 10, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 95, + "coordinateY": 10, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 90, + "coordinateY": 11, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 91, + "coordinateY": 11, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 92, + "coordinateY": 11, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 93, + "coordinateY": 11, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 94, + "coordinateY": 11, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 95, + "coordinateY": 11, + "ownerAddress": "", + "bundleId": "" + } + ], + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca" + }, + { + "coordinateX": 96, + "coordinateY": 6, + "type": 2, + "lands": [ + { + "coordinateX": 96, + "coordinateY": 6, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": 6, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": 6, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 99, + "coordinateY": 6, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 100, + "coordinateY": 6, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 101, + "coordinateY": 6, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 96, + "coordinateY": 7, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": 7, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": 7, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 99, + "coordinateY": 7, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 100, + "coordinateY": 7, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 101, + "coordinateY": 7, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 96, + "coordinateY": 8, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": 8, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": 8, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 99, + "coordinateY": 8, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 100, + "coordinateY": 8, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 101, + "coordinateY": 8, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 96, + "coordinateY": 9, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": 9, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": 9, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 99, + "coordinateY": 9, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 100, + "coordinateY": 9, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 101, + "coordinateY": 9, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 96, + "coordinateY": 10, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": 10, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": 10, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 99, + "coordinateY": 10, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 100, + "coordinateY": 10, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 101, + "coordinateY": 10, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 96, + "coordinateY": 11, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": 11, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": 11, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 99, + "coordinateY": 11, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 100, + "coordinateY": 11, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 101, + "coordinateY": 11, + "ownerAddress": "", + "bundleId": "" + } + ], + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca" + }, + { + "coordinateX": 96, + "coordinateY": 18, + "type": 2, + "lands": [ + { + "coordinateX": 96, + "coordinateY": 18, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": 18, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": 18, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 99, + "coordinateY": 18, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 100, + "coordinateY": 18, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 101, + "coordinateY": 18, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 96, + "coordinateY": 19, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": 19, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": 19, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 99, + "coordinateY": 19, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 100, + "coordinateY": 19, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 101, + "coordinateY": 19, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 96, + "coordinateY": 20, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": 20, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": 20, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 99, + "coordinateY": 20, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 100, + "coordinateY": 20, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 101, + "coordinateY": 20, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 96, + "coordinateY": 21, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": 21, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": 21, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 99, + "coordinateY": 21, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 100, + "coordinateY": 21, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 101, + "coordinateY": 21, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 96, + "coordinateY": 22, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": 22, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": 22, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 99, + "coordinateY": 22, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 100, + "coordinateY": 22, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 101, + "coordinateY": 22, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 96, + "coordinateY": 23, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 97, + "coordinateY": 23, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 98, + "coordinateY": 23, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 99, + "coordinateY": 23, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 100, + "coordinateY": 23, + "ownerAddress": "", + "bundleId": "" + }, + { + "coordinateX": 101, + "coordinateY": 23, + "ownerAddress": "", + "bundleId": "" + } + ], + "ownerAddress": "0x7a9fe22691c811ea339d9b73150e6911a5343dca" + } + ] + } +] \ No newline at end of file diff --git a/packages/core/deployments/polygon/PolygonLandPreSale_48.json b/packages/core/deployments/polygon/PolygonLandPreSale_48.json new file mode 100644 index 0000000000..2b461cf52f --- /dev/null +++ b/packages/core/deployments/polygon/PolygonLandPreSale_48.json @@ -0,0 +1,3441 @@ +{ + "address": "0xFb9bb804be6CF87e7432D61ED87B92025e338ca3", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "landAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "sandContractAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "initialMetaTx", + "type": "address" + }, + { + "internalType": "address", + "name": "admin", + "type": "address" + }, + { + "internalType": "address payable", + "name": "initialWalletAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "merkleRoot", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "expiryTime", + "type": "uint256" + }, + { + "internalType": "address", + "name": "initialSigningWallet", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialMaxCommissionRate", + "type": "uint256" + }, + { + "internalType": "address", + "name": "estate", + "type": "address" + }, + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "address", + "name": "feeDistributor", + "type": "address" + }, + { + "internalType": "address", + "name": "authValidator", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "buyer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "topCornerId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "price", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountPaid", + "type": "uint256" + } + ], + "name": "LandQuadPurchased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "newMaxCommissionRate", + "type": "uint256" + } + ], + "name": "MaxCommissionRateUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "metaTransactionProcessor", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "enabled", + "type": "bool" + } + ], + "name": "MetaTransactionProcessor", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newWallet", + "type": "address" + } + ], + "name": "NewReceivingWallet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "referrer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "referee", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "commission", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "commissionRate", + "type": "uint256" + } + ], + "name": "ReferralUsed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newSigningWallet", + "type": "address" + } + ], + "name": "SigningWalletUpdated", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "buyer", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "address", + "name": "reserved", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "info", + "type": "uint256[]" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "assetIds", + "type": "uint256[]" + }, + { + "internalType": "bytes32[]", + "name": "proof", + "type": "bytes32[]" + }, + { + "internalType": "bytes", + "name": "referral", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "buyLandWithSand", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "referral", + "type": "bytes" + } + ], + "name": "decodeReferral", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "disableWallet", + "type": "address" + } + ], + "name": "disablePreviousSigningWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getExpiryTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMaxCommissionRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMerkleRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getSigningWallet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "who", + "type": "address" + } + ], + "name": "isMetaTransactionProcessor", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + }, + { + "internalType": "address", + "name": "referrer", + "type": "address" + }, + { + "internalType": "address", + "name": "referee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "expiryTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "commissionRate", + "type": "uint256" + } + ], + "name": "isReferralValid", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "metaTransactionProcessor", + "type": "address" + }, + { + "internalType": "bool", + "name": "enabled", + "type": "bool" + } + ], + "name": "setMetaTransactionProcessor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "newWallet", + "type": "address" + } + ], + "name": "setReceivingWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newMaxCommissionRate", + "type": "uint256" + } + ], + "name": "updateMaxCommissionRate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newSigningWallet", + "type": "address" + } + ], + "name": "updateSigningWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "assetIds", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + } + ], + "name": "withdrawAssets", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xbdc80ebfe1540e2571933252fa1f5200a6b818eef6a7c803165b8f2b5dcdb8a0", + "receipt": { + "to": null, + "from": "0x7074BB056C53ACC0b6091dd3FAe591aa3A4acC88", + "contractAddress": "0xFb9bb804be6CF87e7432D61ED87B92025e338ca3", + "transactionIndex": 120, + "gasUsed": "2667591", + "logsBloom": "0x0000000000000000000000000000000000000000000000000004000040000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000800080000000000000000100000000000000000000000000000000000000000108000000000000000080000000010000000040000000040000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004000000000000000000001000000000000000000000000000000120008000000000000000000000000000000000000000000000800000000000000000000100000", + "blockHash": "0x2dc017e5a1f4cb29de71e0c140dd8536eb8e60d6bdb8a99db7ff5c8b5d5af0c3", + "transactionHash": "0xbdc80ebfe1540e2571933252fa1f5200a6b818eef6a7c803165b8f2b5dcdb8a0", + "logs": [ + { + "transactionIndex": 120, + "blockNumber": 43449807, + "transactionHash": "0xbdc80ebfe1540e2571933252fa1f5200a6b818eef6a7c803165b8f2b5dcdb8a0", + "address": "0xFb9bb804be6CF87e7432D61ED87B92025e338ca3", + "topics": [ + "0xb21eb88b4e33b3f1281830a7178d74d8aa73220416215726b68ae23d539515cb" + ], + "data": "0x000000000000000000000000bbba073c31bf03b8acf7c28ef0738decf36956830000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 456, + "blockHash": "0x2dc017e5a1f4cb29de71e0c140dd8536eb8e60d6bdb8a99db7ff5c8b5d5af0c3" + }, + { + "transactionIndex": 120, + "blockNumber": 43449807, + "transactionHash": "0xbdc80ebfe1540e2571933252fa1f5200a6b818eef6a7c803165b8f2b5dcdb8a0", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x0000000000000000000000007074bb056c53acc0b6091dd3fae591aa3a4acc88", + "0x0000000000000000000000009ead03f7136fc6b4bdb0780b00a1c14ae5a8b6d0" + ], + "data": "0x000000000000000000000000000000000000000000000000012ccc5f5ea0e5b50000000000000000000000000000000000000000000000018e9c4c9401cf86050000000000000000000000000000000000000000000001f54857092e06701f1d0000000000000000000000000000000000000000000000018d6f8034a32ea0500000000000000000000000000000000000000000000001f54983d58d651104d2", + "logIndex": 457, + "blockHash": "0x2dc017e5a1f4cb29de71e0c140dd8536eb8e60d6bdb8a99db7ff5c8b5d5af0c3" + } + ], + "blockNumber": 43449807, + "cumulativeGasUsed": "19909926", + "status": 1, + "byzantium": true + }, + "args": [ + "0x9d305a42A3975Ee4c1C57555BeD5919889DCE63F", + "0xBbba073C31bF03b8ACf7c28EF0738DeCF3695683", + "0xBbba073C31bF03b8ACf7c28EF0738DeCF3695683", + "0xfD30a48Bc6c56E24B0ebF1B0117d750e2CFf7531", + "0x1b47567CBE36e63293A7A2018F79687f942aB24C", + "0xb9582ef97161a48b633e0cf8648af0fb357e8f83e5c2dced374ed78fe1d1a4ea", + 1687435200, + "0x3044719d139F866a44c988823513eCB93060bF1b", + 2000, + "0x0000000000000000000000000000000000000000", + "0xd19cc137bb848d3a48ad8ad883886b67c26761dc", + "0x42a4a3795446A4c070565da201c6303fC78a2569", + "0x7804fb2AF15bB1323795A888B09913cEf629Ffda" + ], + "numDeployments": 1, + "linkedData": [ + { + "x": 288, + "y": 187, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xa31a321a7540ac60e65ac4770bb553d0e7e44a7ce1343484a0f9a9cc4bd360d1", + "assetIds": [] + }, + { + "x": 288, + "y": 188, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x49dcb1f3fcbfa8f0a22e245abb2c4669bf65b44b0a3da712c64f9d9d87c4be6c", + "assetIds": [] + }, + { + "x": 288, + "y": 192, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x97d434550ba1d82be59e78f3d43f0bd67dbf82191b911cdca6d3f3ce1064f014", + "assetIds": [] + }, + { + "x": 288, + "y": 193, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x510ff594d942664b57b72a744abb02d8083fcde7b40ca77a53e15e8320089067", + "assetIds": [] + }, + { + "x": 288, + "y": 194, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x88f1052a8b251288ec36a38cdec8234726fa561ecfb3439025f95bcadb42f4a4", + "assetIds": [] + }, + { + "x": 288, + "y": 195, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xa9c26a064ea117a621e08cb397e7817b3de663b92d2bd5a681a43b7da83746aa", + "assetIds": [] + }, + { + "x": 288, + "y": 196, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xd2d84f7786cbc6c3e97a45d6a1ea1231560fa2aae17e2bf434c887903f79a062", + "assetIds": [] + }, + { + "x": 288, + "y": 197, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xf8882571500ba5d61608dc57b18a596a00672bc401ed95e5782179f1fccdabad", + "assetIds": [] + }, + { + "x": 289, + "y": 187, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x073646c6a9a4f116e7b040cd103ace61e21a15a41f90e53605515ae6506e66bc", + "assetIds": [] + }, + { + "x": 289, + "y": 188, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xa7acc151da810682db00d03c57c2b7822e0255ed7f90b51dbff22bb4722d9a6a", + "assetIds": [] + }, + { + "x": 289, + "y": 192, + "size": 1, + "price": "1011000000000000000000", + "reserved": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "salt": "0x73a65fd11b0187a8c90eee412eecd8a6d003c170202449ecb00673b559861d68", + "assetIds": [] + }, + { + "x": 289, + "y": 193, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x3fa42d37e060dcdae221728ae0ba59d00586e0809a9f89ab8b2ffb9b7d915ab1", + "assetIds": [] + }, + { + "x": 289, + "y": 194, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x9bb41099b6182873073f34999e3102457b4208abfa5fc24c2723735308032348", + "assetIds": [] + }, + { + "x": 289, + "y": 195, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xe5206cb4247a881aa5fdf0a91d0fa9c97d21727435d779976132ab5d5f954585", + "assetIds": [] + }, + { + "x": 289, + "y": 196, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x211c54e00dcae5c00be8158d8b54c70e2d600f638055570aefb039d95097acaa", + "assetIds": [] + }, + { + "x": 289, + "y": 197, + "size": 1, + "price": "1011000000000000000000", + "reserved": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "salt": "0x5e6afef61d41e2b7ddf5033ec3828b361493de86ff72fc5fe12a2fe878f00b7c", + "assetIds": [] + }, + { + "x": 290, + "y": 187, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xdf1ab43137918ef09af368efb657eb3e0f5c6f76636ded364a3830001e699177", + "assetIds": [] + }, + { + "x": 290, + "y": 188, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xf1d88a840e5f9792993e8f22a423d438217d0889bb272de36506e6c0ed6001ff", + "assetIds": [] + }, + { + "x": 290, + "y": 192, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xd6b672a8c9fcc490f530372adebef8c10bd81f4914ae5243bf88dac327e139e1", + "assetIds": [] + }, + { + "x": 290, + "y": 193, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xabba6c046752b94dceb1c5f31911765c5ad0a000f5a9c570f6f4dca01a3049b1", + "assetIds": [] + }, + { + "x": 290, + "y": 194, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x9d80580bd73883ed5daa0b7ab7b44cdc0bdb1701d72d4b9b1869999eb2826e53", + "assetIds": [] + }, + { + "x": 290, + "y": 195, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xab293f4428d82df99ffb491a20988f6afb828306ca7c75952aa473079f0763b5", + "assetIds": [] + }, + { + "x": 290, + "y": 196, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xf9f5d956af6b375c633219e71cd114602c226f18757d130c5808a8ce8eba7520", + "assetIds": [] + }, + { + "x": 290, + "y": 197, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xb1984199fdb0e8df134de7c09ace5ae4470f1ec7db5bfa985645a9cc4ba87daa", + "assetIds": [] + }, + { + "x": 291, + "y": 187, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x05c5b99cfb497d12b03e12e49309cb212f46d028a834dcd2322c9d11b18e9347", + "assetIds": [] + }, + { + "x": 291, + "y": 188, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x79c660a2b37f8f658f89ee084103ab823652da609114934d454f00963fdbbaa1", + "assetIds": [] + }, + { + "x": 291, + "y": 189, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xb32cc4210bd88988f8c98cd21fd7c38d508bf5c12d25bb753af022d79ce3d7a7", + "assetIds": [] + }, + { + "x": 291, + "y": 190, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x84b5ae9ab7bcc1388bf1f35082859ccb89584b42db3e8e7fe30614961155027f", + "assetIds": [] + }, + { + "x": 291, + "y": 191, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x42ed9d8d2012c6e759bec41c388822703329f885482d8dc00d0e429cf9c58713", + "assetIds": [] + }, + { + "x": 291, + "y": 192, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xce153becb09f4fc529d145e4d1b503aabdc31f41faffdf62016fe409ee401ae6", + "assetIds": [] + }, + { + "x": 291, + "y": 193, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xd790f1bfa3123cffe78ab2f4a8777e3a5ef0c60682bb002ca819e32569c54a98", + "assetIds": [] + }, + { + "x": 291, + "y": 194, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x05e0f5c91636872746e7ba62fb54720d644e4ead64b0fbb28e70c7e8654d0bc0", + "assetIds": [] + }, + { + "x": 291, + "y": 195, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x7b6fe121dab62153404fbe84bab3b8ff4579d5047cfbff354d1c67d4cdfa97d9", + "assetIds": [] + }, + { + "x": 291, + "y": 196, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x9961a8bf3c0a1e701fff0c6a40da2cf92c9311171cfc550cd6b7f6a64a749117", + "assetIds": [] + }, + { + "x": 291, + "y": 197, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x7f65032e537e59d991d45c11eeca7f6fad3b4c938de3045d151fe252f4a2b920", + "assetIds": [] + }, + { + "x": 292, + "y": 188, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x4cc7b543aca7662f314ce6959b949662208f90a8eb69ebdb2c3ba863f1b4aeb8", + "assetIds": [] + }, + { + "x": 292, + "y": 189, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xe1975644a4247b243321183042042d0f78f25e62799ca84f488dd88c3d5844b4", + "assetIds": [] + }, + { + "x": 292, + "y": 190, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x8b5b8e9298621c9a1893a67551a1a0ad37831c48cc16d9444d2706cae1136f8e", + "assetIds": [] + }, + { + "x": 292, + "y": 191, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xfb3336cf64848e7c3f32273ebd99d62184888f5f6dac64d31f70aa80024b5b5a", + "assetIds": [] + }, + { + "x": 292, + "y": 192, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x7bc97bcf77e27a6ae97e0baf69ad47377b34da07bde53effddbd9c519477afde", + "assetIds": [] + }, + { + "x": 292, + "y": 193, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xb44b19b808302686d07f65f169568adf40fdbe56db64eb61910aa631ab6b067d", + "assetIds": [] + }, + { + "x": 292, + "y": 194, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xeef94b241faf2a7cc3e3b4f78928b7bbeadb45818c30d58240ff42857dd4e1cf", + "assetIds": [] + }, + { + "x": 292, + "y": 195, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x8d00276fa436897feb810bf7e731fceeac842b2ac967568c7bdd91b58fc3f03e", + "assetIds": [] + }, + { + "x": 292, + "y": 196, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x164e8b9f4d1c86f3c82fd4652ccebb39c9af34be16c6d39b70db73b42a669fea", + "assetIds": [] + }, + { + "x": 292, + "y": 197, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x1bc2fb3d5bafc840748f280e09ccb46127565a724fb81f97c0a1d0ae37b6f301", + "assetIds": [] + }, + { + "x": 293, + "y": 188, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x09533593d45b9d70cfb71205226827751447ea3928ba1638c6ed0f44d9dbf86d", + "assetIds": [] + }, + { + "x": 293, + "y": 189, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xe4a5419984bbdd25e566748790915869f6935a44312501a1539ee61d13df3b79", + "assetIds": [] + }, + { + "x": 293, + "y": 190, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x130c0de5af4ad149bb1305e818763f9934ded644dc03b9820ff8b42e2ba3a4b0", + "assetIds": [] + }, + { + "x": 293, + "y": 191, + "size": 1, + "price": "1011000000000000000000", + "reserved": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "salt": "0x2d7614339f4efe165cc4e410e742f9232a78298faa9ee660252c9586d16e3946", + "assetIds": [] + }, + { + "x": 293, + "y": 192, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0xa2566f155b7b2980bbfa9609cd2738744e5540352cec8be7122991d6185fd30c", + "assetIds": [] + }, + { + "x": 293, + "y": 193, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0x289fbcdbe2c011e2d54d595b0fd280d594528de5834656313e94313c538b1a1c", + "assetIds": [] + }, + { + "x": 293, + "y": 194, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0xd9d8c79cb7c3db89c08839e9ef7f2bdb31a76137dd1601ebdd979072b51c830b", + "assetIds": [] + }, + { + "x": 293, + "y": 195, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0x4c5933e41cdc57d6b68126f675cc768c2282e0e38407033d7b66804ee8cfbe23", + "assetIds": [] + }, + { + "x": 293, + "y": 196, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0x252a6548f98f29b83a64ca006e0e1bec42929faea45957591e15d0f0677623cb", + "assetIds": [] + }, + { + "x": 293, + "y": 197, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0x19bc9bd73f867e21def158021d03db31d18e4509e79c0396c24ad2f6079517d5", + "assetIds": [] + }, + { + "x": 294, + "y": 188, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x71a6ca6bc77f6d325c9550f73645835006fff5abd835230d440b533a90b59cd1", + "assetIds": [] + }, + { + "x": 294, + "y": 198, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0x4a1f34e36499e5992c08f2f3185ba02db4ba41836dc820f82123a9bb4dc73559", + "assetIds": [] + }, + { + "x": 294, + "y": 199, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xc352314b9052979ae109edcf250521f97c0c87a3d00da08aac963a18967d6a8c", + "assetIds": [] + }, + { + "x": 294, + "y": 200, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x295cfd0e4a2ef21d892eb99f22f2248017be7601a85cf34e90c8a4f782c477d2", + "assetIds": [] + }, + { + "x": 294, + "y": 201, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xfe376eda67f4b0eb3676733bbf810966ff2af332a23c3430e510a17547e47952", + "assetIds": [] + }, + { + "x": 294, + "y": 202, + "size": 1, + "price": "1011000000000000000000", + "reserved": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "salt": "0x5d93fc29be6566dfd49fcde6bb18ae9a6178282f969e56ee1d9a24fe8097e384", + "assetIds": [] + }, + { + "x": 294, + "y": 203, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x9bb7be6faf916ca3ed88bea390ed8d0c8449d4ee1c5fa42815b1533dd856786a", + "assetIds": [] + }, + { + "x": 294, + "y": 204, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x630dfc12bd9e3770fbc51a0713e39bd1c71e502f645dbe6407cab2b06b53e74a", + "assetIds": [] + }, + { + "x": 294, + "y": 205, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xde221f4bee1a271d14b96bb19c63a9ebac661f8eed695a76e46d17cbc0236b8d", + "assetIds": [] + }, + { + "x": 294, + "y": 206, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x3b973ada1fdcddecb022b013a04205fc29d7666b146cc7f2a32239e19b635d43", + "assetIds": [] + }, + { + "x": 294, + "y": 216, + "size": 1, + "price": "1011000000000000000000", + "reserved": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "salt": "0x9eb77080862b4ef3523eafee0fc232341bd76653fbd154db12b832d820486c87", + "assetIds": [] + }, + { + "x": 294, + "y": 217, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x17924ad0728f4881cdd6c6b6085f07566c43bffd428ad44693e337259ab69c58", + "assetIds": [] + }, + { + "x": 294, + "y": 218, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xa797ed8f0a1c64ee5cf5b576222caa37dc5fceefe52e5f3978c3fa3fcd0534f6", + "assetIds": [] + }, + { + "x": 295, + "y": 188, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x3d67256da00da8c70462cb7f03cd2df09fab05b26c73236886088565907438f7", + "assetIds": [] + }, + { + "x": 295, + "y": 198, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0x1867b879684268adf3b61b3199daff670274d20489d4da12189afd79299e5974", + "assetIds": [] + }, + { + "x": 295, + "y": 199, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xd117d7143ffbd97f1659d4b748da0422d29e0ab70b8d090961c9a1c4d56a5684", + "assetIds": [] + }, + { + "x": 295, + "y": 200, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x6fdc05374d1c3cf8bb42213f8fb723185e2d18e3a297ac58c3ff6cc769d1cee7", + "assetIds": [] + }, + { + "x": 295, + "y": 201, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x6955fe3a42c570dd4982eb3d99c6a8f961974ca7eec778def21c2115dee3836e", + "assetIds": [] + }, + { + "x": 295, + "y": 202, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xae24f9876e69f0494df3da52a9c2c4ed20366ed6409a1f64063602c885a78f31", + "assetIds": [] + }, + { + "x": 295, + "y": 203, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x2c8a2f7dfa68e17e6aa04bf65fd32dd356ec9e0ec6d3054566e36c60904bbcfa", + "assetIds": [] + }, + { + "x": 295, + "y": 204, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xeeeef95fe393c2822a78c0c62503c1bfe7ce41b8fe646ee912baba3f292700c0", + "assetIds": [] + }, + { + "x": 295, + "y": 205, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x655b552227430478c816ce616ce641ac32fea4dc642d146eabfc72b68e399079", + "assetIds": [] + }, + { + "x": 295, + "y": 206, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x4d69ecc71a3b16e1586c713ba1999eab9a0d0cb0b5a14ce3d293cb2aee3066c7", + "assetIds": [] + }, + { + "x": 295, + "y": 216, + "size": 1, + "price": "1011000000000000000000", + "reserved": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "salt": "0xc2d7f37c9734a6764104e1974fe1402bc860b40325fbdf86b01a35ee73d93971", + "assetIds": [] + }, + { + "x": 295, + "y": 217, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xe46a12aafe98be809503f707fa62633f2f0271070936b8d50ed7eb05474f7da1", + "assetIds": [] + }, + { + "x": 295, + "y": 218, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x3ac8d6cdbf12f9a4236e43a94c4c3b99bf7030ab022e88dc19ed342cf5c8196c", + "assetIds": [] + }, + { + "x": 296, + "y": 188, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xa3858f44b83a6667918b02eb1a69e7b859b701fc3e3c42e688be93ddcc4fab38", + "assetIds": [] + }, + { + "x": 296, + "y": 198, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0x83ebaef64173cefdb44a03dab5c3a834f70d7513809ca57ae4a71af78de85b93", + "assetIds": [] + }, + { + "x": 296, + "y": 199, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x81ed754ec901d5ee109c9e28c22951d25eef06f3a635436eb80bfb0f983ea0ce", + "assetIds": [] + }, + { + "x": 296, + "y": 200, + "size": 1, + "price": "1011000000000000000000", + "reserved": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "salt": "0xde6e07a4a8a4c34b6b138f21bdcf8b4992baaeb4cda780166fc905fcde19126a", + "assetIds": [] + }, + { + "x": 296, + "y": 201, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x7126274197c5cfaa4a4cc88fdefac0305866b9c9b501243fdbf30d14bdfa3f3c", + "assetIds": [] + }, + { + "x": 296, + "y": 202, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xc78b2a8f84283c598afa4bddd4e5b9e5753be82632b584789756275f7935670b", + "assetIds": [] + }, + { + "x": 296, + "y": 203, + "size": 1, + "price": "1011000000000000000000", + "reserved": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "salt": "0x9caec92f467e39f533bb5346d891072cd8cd0fd4dfdf449385b4c8226d036f11", + "assetIds": [] + }, + { + "x": 296, + "y": 204, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0x1b0a2ff22a0bc595e48b81923752f54df620b65e9474d4208391abe361e8eeac", + "assetIds": [] + }, + { + "x": 296, + "y": 205, + "size": 1, + "price": "1011000000000000000000", + "reserved": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "salt": "0x2bcd1c73afcc0e71ac1fc4faa192538ed232b89543e53625d54bd7e634e1e97c", + "assetIds": [] + }, + { + "x": 296, + "y": 206, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0xf805cfb76c489d8f8c30fc50c156b0c19e10471c8b894b963bc93cdfbc3971ae", + "assetIds": [] + }, + { + "x": 296, + "y": 216, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xc3cd3ec1ce51256f3a1236ddef7edc0c8510ae45af6d60494d33a2d496cf2189", + "assetIds": [] + }, + { + "x": 296, + "y": 217, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xeec65873e1edd1eeb58ca66cc832ea34c772af88e40aad7d41077faed2f68174", + "assetIds": [] + }, + { + "x": 296, + "y": 218, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xe9a9eeb78d6528ca7f39151bb17c991b2dd666c0b4a36088c08234683c9f4620", + "assetIds": [] + }, + { + "x": 297, + "y": 188, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x0be997e389b1cb08626dcda6fdae7523f2c5be1c915f6620dfa857c9d3df3837", + "assetIds": [] + }, + { + "x": 297, + "y": 189, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x3dffc521df53279a9c21578aa6797f19ca62b7ea21c5abed703fdd8a00d8ee84", + "assetIds": [] + }, + { + "x": 297, + "y": 190, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x12b883b388069230a7c827aa511c0e72466c22057e655da8b3a1b1d466eaca6c", + "assetIds": [] + }, + { + "x": 297, + "y": 191, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0xac117e2e0912b35719f1ac1697dd8a4bccb76b37c1cdab258ba0440bf3fe2fe7", + "assetIds": [] + }, + { + "x": 297, + "y": 198, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0x7be29ef561f21592d266806ee0dc8dd0e7fd0abaa56684cea3e8eef9e3e98a6f", + "assetIds": [] + }, + { + "x": 297, + "y": 199, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x896001584d94877005389dcfccf3e1efc1746e8d3214b80f16edbbf1e6d04d9d", + "assetIds": [] + }, + { + "x": 297, + "y": 200, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xfda5b5deb62525595a01da725e739096ea86acc57dcde051f2ea929d2ca6ad6d", + "assetIds": [] + }, + { + "x": 297, + "y": 201, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xfa26753a1eb8bbb17a0fe9ea773a24871324f80b45165406de87e74b9e5b01aa", + "assetIds": [] + }, + { + "x": 297, + "y": 202, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x9a06ffc44aa6ec016ffb3a03bc7492805fe8d0bfbf79ac1c212f8ad791283883", + "assetIds": [] + }, + { + "x": 297, + "y": 203, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0x761cc7cf8c3e32ec212d575d00ccf70499ed2451965e299db4a4f4923f5ea510", + "assetIds": [] + }, + { + "x": 297, + "y": 207, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0xe9bf1d7fd18d6d64768c426d0c630cdf186ff1e2b3f5ca963b8a837c8bfe102e", + "assetIds": [] + }, + { + "x": 297, + "y": 208, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x306cfae50f0de0a7b9ce6375e2487026baba8d30e61664c75ce4575e2ea5c5cf", + "assetIds": [] + }, + { + "x": 297, + "y": 209, + "size": 1, + "price": "1011000000000000000000", + "reserved": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "salt": "0xca2809598536754ca601d5e05d8378ff2c6afdb851f184d2559e3bebcf7f2c80", + "assetIds": [] + }, + { + "x": 297, + "y": 219, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x7db6ad3a5d26f1ed8d06778868994e7a6dbbc6f035c249f18c8f9a21313b4277", + "assetIds": [] + }, + { + "x": 297, + "y": 220, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x099a07de0d1aa89793e4815943d1266441f4181a198da8c0cc8f38399ad79d71", + "assetIds": [] + }, + { + "x": 297, + "y": 221, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xb657c5e8cf1cce0ae633a689cb50f8de604443912d5bce4a6cba09923a30c4c5", + "assetIds": [] + }, + { + "x": 297, + "y": 222, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x23132b03297e03a6f6bd4f90628b8fa1b57ccc64b6d6b2bb8d6a7bbb81034a94", + "assetIds": [] + }, + { + "x": 297, + "y": 223, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x302efe90387646ac9f52d438d1c83fa5f351ce4d70aae858504d45997ad1ec4e", + "assetIds": [] + }, + { + "x": 297, + "y": 224, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x05e6c2cf06c3136a4eab64598faa7f0bbb09beada036b88aa772015a89341fb7", + "assetIds": [] + }, + { + "x": 298, + "y": 188, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x8ef15c695172320373decf5e00f594ba6fd0ca5a408983a13e32406a57356bed", + "assetIds": [] + }, + { + "x": 298, + "y": 189, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x014f4b041aae26cfc11f342834e4e7742e89c81acf4e802a8071151161c7d065", + "assetIds": [] + }, + { + "x": 298, + "y": 190, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xc4689d068e116ecb9e72a501b5b3db40a285ef6956f42a5c20ec0a2770682ec7", + "assetIds": [] + }, + { + "x": 298, + "y": 191, + "size": 1, + "price": "1011000000000000000000", + "reserved": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "salt": "0xa8b1369de23d2351dcee9f59addf20825e390e1d553b1888f621338f9007661c", + "assetIds": [] + }, + { + "x": 298, + "y": 198, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0xb9bda704b68fa8003bfb33c599cd5619b240e1553e3cb4ab0555244fb0403ea4", + "assetIds": [] + }, + { + "x": 298, + "y": 199, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x634fbaf9a18cb7e30cc850079577c2d968765b7d845e96227635a1a38d4ba3ac", + "assetIds": [] + }, + { + "x": 298, + "y": 200, + "size": 1, + "price": "1011000000000000000000", + "reserved": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "salt": "0xb959411a89c5eec4b3719412ec8aae7d8eaaea81d4dc764651c6bff28b7cd80f", + "assetIds": [] + }, + { + "x": 298, + "y": 201, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x417cd278fd2f217f8b95184cb744f3aefb4e24a381cac6ee8a0b889fa2c44cb0", + "assetIds": [] + }, + { + "x": 298, + "y": 202, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x8298dcccc178d204ab664d17b8d31c430d1be6641c38310350e76f584fdec764", + "assetIds": [] + }, + { + "x": 298, + "y": 203, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0x64c3ecdc944ae23a4dc5184b99523f6299734b33a45f1b2b5bcb7494ae2363d8", + "assetIds": [] + }, + { + "x": 298, + "y": 207, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0x17d0bd85814995e9c5e387def01254aceaea16fa698758b9cc56a00b797087d2", + "assetIds": [] + }, + { + "x": 298, + "y": 208, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x8c41a341ec4c28b4733e7b8565f99dcdcec6fec05acb3277823522c97d74fede", + "assetIds": [] + }, + { + "x": 298, + "y": 209, + "size": 1, + "price": "1011000000000000000000", + "reserved": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "salt": "0xc54622cee175119bcd678cda2b5af137c604ceb671fb06eebfab07d91e332613", + "assetIds": [] + }, + { + "x": 298, + "y": 219, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xa9fd91a05dfbbf47599dc87204905a78723d213650e1eedad0a9cbaa96304b68", + "assetIds": [] + }, + { + "x": 298, + "y": 220, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x430b7420eb88f7318d4257cfa614e90299930b2acfedf77af8f8644265fda687", + "assetIds": [] + }, + { + "x": 298, + "y": 221, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xde994e9ff3c2c07acf1487423ee311d0c2408865630297f42f760f182aa03b28", + "assetIds": [] + }, + { + "x": 298, + "y": 222, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x0cb3e3ec34a552b9c7bcc0f49d55fd7e0f08dd337c02272ec20bde575b6c428f", + "assetIds": [] + }, + { + "x": 298, + "y": 223, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x8a0635d27774fa2b3618fac20dd6aa419ad0dbade1bcc7111230561d4d5ba0d7", + "assetIds": [] + }, + { + "x": 298, + "y": 224, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x332d442273d1a77b2cf9336212aa294a8735a7ac7b32f7921800583bc0c9d584", + "assetIds": [] + }, + { + "x": 299, + "y": 189, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xdc2a2ad2ced871dacdf8358dff1c7eaa0a6531ed54ded5c7aa39328ce07732fe", + "assetIds": [] + }, + { + "x": 299, + "y": 190, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xfe3aa654883f9508e960cbd7755e345493b3ab1b7f068811ce6f79870a47f90f", + "assetIds": [] + }, + { + "x": 299, + "y": 191, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0x791f3c341fa2032c5881d5a842e7f7bc32504f28a9528448953194d0f2eedf5e", + "assetIds": [] + }, + { + "x": 299, + "y": 198, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0x775bbbe6e8e3dbb35392c1662114fed843db16762ea09cc471866b9e29689ed8", + "assetIds": [] + }, + { + "x": 299, + "y": 199, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x86688c1538985515a830272d9a0bdc5846b1cd76616a12c5c89bf7aa80f233b7", + "assetIds": [] + }, + { + "x": 299, + "y": 200, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x12c21d4e869d62f5fde5cec70d7bb35a7728f235a3bc1b0b9cad8eaf34d5be3f", + "assetIds": [] + }, + { + "x": 299, + "y": 201, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x67e82d439ed9808086c5e26b4fc024426ae714c402a116d5eb26a8b137cadc71", + "assetIds": [] + }, + { + "x": 299, + "y": 202, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xe3717dd16fb0e1491e6935c87e93eacb55111f158a2f24c1187d666502e6b654", + "assetIds": [] + }, + { + "x": 299, + "y": 203, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0x2b58ecf9524a44cb7ed4509347c2cca236401ee1e55c040f165a4ab9f7dc46c9", + "assetIds": [] + }, + { + "x": 299, + "y": 207, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0xf1e1418310a228780f9f9e407a32e21390e6bdd610322d962fb9ee9bc7a9bb6f", + "assetIds": [] + }, + { + "x": 299, + "y": 208, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x91a05a52fffd66072fba2940419e67822a8888ea1595d03abae8e7e6418be164", + "assetIds": [] + }, + { + "x": 299, + "y": 209, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x684d65934f17293ef5788941a9b702a061ed0b653c6e50668e26f8416d18eeb0", + "assetIds": [] + }, + { + "x": 299, + "y": 219, + "size": 1, + "price": "1011000000000000000000", + "reserved": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "salt": "0x74c238b876723e73ed9fe71cd196fabd851df323864352283678cd3a14e5f72e", + "assetIds": [] + }, + { + "x": 299, + "y": 220, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x3276bda195d08242e539d600c469e4b758fecb03d7c93a412a20d7ded03e24fd", + "assetIds": [] + }, + { + "x": 299, + "y": 221, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xe9e9c90ab24720a8d9557e8e7708230d96e709e0bc95db75c048bae6287926fd", + "assetIds": [] + }, + { + "x": 299, + "y": 222, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x1517d7ac1c09db66758b62335b572e999b6cda89076e851e172b70fa91deef8b", + "assetIds": [] + }, + { + "x": 299, + "y": 223, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x951544578ecb8768239a8d8db3c1c3d544a86459caae85ac1d518b5dfec94c7c", + "assetIds": [] + }, + { + "x": 299, + "y": 224, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x5637fd30096fe2c3a28b550282b939e368b22ac9de675ca2d2c630a9e00a9e1f", + "assetIds": [] + }, + { + "x": 300, + "y": 189, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x977411ea7eef7b5f8f270469aee3de0e023f00a5ecfe8d283b50d7aab55607cc", + "assetIds": [] + }, + { + "x": 300, + "y": 190, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x2ff5270e1f06bfb855fdee39a8a32348f1b3f59147c60b60cbc671a2da1552a0", + "assetIds": [] + }, + { + "x": 300, + "y": 191, + "size": 1, + "price": "1011000000000000000000", + "reserved": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "salt": "0x9299d0457bd2278bbade833670acf0a17f48f15e9a945307e9cb8d5eac2ea9c7", + "assetIds": [] + }, + { + "x": 300, + "y": 195, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0x8c9d1481ea72108cfd10f239194ef3f1fa45a9ff6e9f89a633c5be2a475e0526", + "assetIds": [] + }, + { + "x": 300, + "y": 196, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xe0e5d6d264900bb2845bb58a310d819de7cc2a9b34f79da61ec989e3efbeff80", + "assetIds": [] + }, + { + "x": 300, + "y": 197, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0x42a669ae96076a26c9a26b452ba857f8e4b73ae7fc305410d354e120257a4d3c", + "assetIds": [] + }, + { + "x": 300, + "y": 198, + "size": 1, + "price": "1011000000000000000000", + "reserved": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "salt": "0x86a53fac0f28ae78ab6eb7b574806bb5f39ddd54099e22081c766405b9a5f64e", + "assetIds": [] + }, + { + "x": 300, + "y": 199, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xddfb5125d231b7dc8a4b1b541f8c4323c640d1c402beb0239cae2bbf57c2e9a2", + "assetIds": [] + }, + { + "x": 300, + "y": 200, + "size": 1, + "price": "1011000000000000000000", + "reserved": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "salt": "0x51876af1ead29e7a600e5f65f7230541c87af4c9ca3ab5b534a80f3aa5cf38e7", + "assetIds": [] + }, + { + "x": 300, + "y": 201, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x27dadcdfc9c481799553e1bb0699d7aed0991e5550383734e9ffea995d44b5c8", + "assetIds": [] + }, + { + "x": 300, + "y": 202, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x61c3ef32135e3f0e6444afce343e5a73f494f902344d1520861be3a54d07de7e", + "assetIds": [] + }, + { + "x": 300, + "y": 203, + "size": 1, + "price": "1011000000000000000000", + "reserved": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "salt": "0x95c25034c97ec0f4e140875309180b7773fa7f0eba61333d9c1e054a03a8713b", + "assetIds": [] + }, + { + "x": 300, + "y": 204, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0xe819b12928cdffa8d4acd4cb0c5880473125c4fea0a235532a65200e2fc66d85", + "assetIds": [] + }, + { + "x": 300, + "y": 205, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xf8d6615bb15c191c050ab5168a30e2bce48984a2a5100c95da3b4110aec3e1b2", + "assetIds": [] + }, + { + "x": 300, + "y": 206, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0xd06eea829f514eef56cf01e7b90275ac8059fe4086fffc5fa54151b6fd7f31ec", + "assetIds": [] + }, + { + "x": 300, + "y": 207, + "size": 1, + "price": "1011000000000000000000", + "reserved": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "salt": "0xa6ea9b13e80bd6fa8d9ae8a5ae27e1793f007ce2e7f650a6cacdd1546a2df350", + "assetIds": [] + }, + { + "x": 300, + "y": 208, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x26beb0d9784e34b45efbe547297a9d8b881f085185ef4e0ed5019296ff653094", + "assetIds": [] + }, + { + "x": 300, + "y": 209, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0xe80b1e070cdd96213efa126ad2e242ff447bc09bb75cac16c1814552a74e8a96", + "assetIds": [] + }, + { + "x": 300, + "y": 216, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0x37b7f938f84820f11b2fcc67452ea8a350b48129ef9efe43b3c2ea1f47134180", + "assetIds": [] + }, + { + "x": 300, + "y": 217, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x8251b00d8cb437a9a478717b6ae5f372f955684a08d684e31f195149db6a27e6", + "assetIds": [] + }, + { + "x": 300, + "y": 218, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xf6b12772e24299572f96d795513e2b13a7be63b8843d3c3fa3bcb2d7212b5d61", + "assetIds": [] + }, + { + "x": 300, + "y": 219, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x82fbbf7513a042abb4239b87cbf1337fb8750a76dae246741328aea263ea4aa2", + "assetIds": [] + }, + { + "x": 300, + "y": 220, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xc170c66d4e8c1e6b6b1a8aca2a6b1e17f71d747f704039cd965cd6550ecf6c05", + "assetIds": [] + }, + { + "x": 300, + "y": 221, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x56bc173d951d675fdb67bc9c492d735d00a72a6dbe0f0c49a636ee580414fdf7", + "assetIds": [] + }, + { + "x": 301, + "y": 189, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x537be33b3c4d8f955b800aa698872a311c3a0c143307d94bc6e9e11764e951c8", + "assetIds": [] + }, + { + "x": 301, + "y": 190, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x556a0568953f362eba565fa6b24c9eae2b8e24bab1be40e72b19ea101b8edfa9", + "assetIds": [] + }, + { + "x": 301, + "y": 191, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xaa9446305afd6bd5b7419cd254521c8b0ba164e2905332c4d0690e09f4ce093d", + "assetIds": [] + }, + { + "x": 301, + "y": 195, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x39030d4e1a80145c2768ca67852c07d5350c9d1dccf5da9cd3158d2a025afdb4", + "assetIds": [] + }, + { + "x": 301, + "y": 196, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x44ed543603a293033a0712a198a58ee728ef25a03f9378c8c315cca84bcf0841", + "assetIds": [] + }, + { + "x": 301, + "y": 197, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x12f7a2c9b116e37b2017040b1e4bb8d191526ce964389b6e4a775239db755c05", + "assetIds": [] + }, + { + "x": 301, + "y": 198, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xd7e2ec0791cf60707f5fbf7ba26735e9c007d3e1246a758b345919eaf934c125", + "assetIds": [] + }, + { + "x": 301, + "y": 199, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x5ec198ca023016034301b46f234deb046400119f6b5ea2b87835684e876772d7", + "assetIds": [] + }, + { + "x": 301, + "y": 200, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x80053212f31cbc273f1c4e597c97ee6a7d8fc8d6289d7994bdde84b2bc5c48c0", + "assetIds": [] + }, + { + "x": 301, + "y": 201, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x7022016ca105d427ff297abbe1d1b41cbcfac399a7a95c1cd55d937a0d756542", + "assetIds": [] + }, + { + "x": 301, + "y": 202, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x2a3f3b62d873d661a18c23d784e0bc7285059bbdd01eb81c669a2d6ff43fcb4f", + "assetIds": [] + }, + { + "x": 301, + "y": 203, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x166b110836df4dd9de1327f2ae35d3305e5bfb65e9024384eb37d0bf1de1bab0", + "assetIds": [] + }, + { + "x": 301, + "y": 204, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xa77327d6b4b48cc2de2444de5577b13ced2aa4478079a230f4565f90786bc6eb", + "assetIds": [] + }, + { + "x": 301, + "y": 205, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x5b1003033f69b8d4441206c5c40f91e632d7c09145e88df99542610a44e597c3", + "assetIds": [] + }, + { + "x": 301, + "y": 206, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xbd8d55a2538f77c180793e0985f4a086b7ca9c18b1fe594d8ec880b8b0575f25", + "assetIds": [] + }, + { + "x": 301, + "y": 207, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x417aeae39438c712d730d208549357c3e4ffb2cb8b95b77a827d67f47904ff06", + "assetIds": [] + }, + { + "x": 301, + "y": 208, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xa332669c567997bfecd7dabe636bda0c3f5d1612dc8991074d74391afb018609", + "assetIds": [] + }, + { + "x": 301, + "y": 209, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0x627a596e8a27dad54b7bed60c66756d51de9eb0e2337601aa0934d603f27572a", + "assetIds": [] + }, + { + "x": 301, + "y": 216, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0xd85e2ce6a77e763f9ae506c73dc8b10618fc9505848afab96e9b5265c0b8787f", + "assetIds": [] + }, + { + "x": 301, + "y": 217, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x83f3daddcfbd5c6e9642c74e196c2150a8a9930f0a4f41b944a88b8ebef1df96", + "assetIds": [] + }, + { + "x": 301, + "y": 218, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xb1f2a1cd88e330aabadb995c6ebbc95cab7a76ab17c7f1e76ecc5aac9e00be73", + "assetIds": [] + }, + { + "x": 301, + "y": 219, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xed0756f01bd2e2b0d21f9c5f2537256de3d63d611ea2543397d240f09dfbe76d", + "assetIds": [] + }, + { + "x": 301, + "y": 220, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x8ab82782f315961feece7c9dfb25f45b1fdbb4db011a7056b2ca807adc76bbe5", + "assetIds": [] + }, + { + "x": 301, + "y": 221, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x2406bb211ab3f6ce49fe20c0bdcfd8ce6d4338081ee00b50c99e3c37aa2ff6aa", + "assetIds": [] + }, + { + "x": 302, + "y": 189, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x990d799da1a4fae0e22e088496f892595df2615df54539f4d48a075e73124416", + "assetIds": [] + }, + { + "x": 302, + "y": 190, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x3c0b0dab673573ddc31304de53f8d421db52c0cfe8205d8c7ed9a55e1b67dec8", + "assetIds": [] + }, + { + "x": 302, + "y": 191, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x5f283e1f0b88a9a40f2ce2c351a91d6238bfebb65bcca15bd9670d4294ac50c6", + "assetIds": [] + }, + { + "x": 302, + "y": 195, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xdec3a4e4e36f994804b758e457ddc67ed849ef8bddbc5982cfde5cdac9e516b7", + "assetIds": [] + }, + { + "x": 302, + "y": 196, + "size": 1, + "price": "1011000000000000000000", + "reserved": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "salt": "0x478bd2653735e96c6ab091b701d4ad8dc0ff44da05689a1d4a8bd23e64b357e0", + "assetIds": [] + }, + { + "x": 302, + "y": 197, + "size": 1, + "price": "1011000000000000000000", + "reserved": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "salt": "0xae315b3c4f9ee41083d89fd6fe56fad80fba5bbc98da4628ec91500e2c8be19b", + "assetIds": [] + }, + { + "x": 302, + "y": 198, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x0fa56a667360a3ccfbc728b730c4676f819c4ad55b5579098bdc0ea5560fa94e", + "assetIds": [] + }, + { + "x": 302, + "y": 199, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x83a735cb32ebd37073c32b8dc1277389b4070d7db9301f27ecb9aae68caa393f", + "assetIds": [] + }, + { + "x": 302, + "y": 200, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x4e318460ab5b1cbc802ca243764cc9c5229dc7eeb222f0139856d252f8e8c5f5", + "assetIds": [] + }, + { + "x": 302, + "y": 201, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x4c72fa60e039278bc4e9b92331c8d98c206f488a83d7b5e105d5ff483693fca4", + "assetIds": [] + }, + { + "x": 302, + "y": 202, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xa8f1f013d700cbdb7f351c4b5730d9f09cec6143f74b454dd49608152fb8e561", + "assetIds": [] + }, + { + "x": 302, + "y": 203, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x55054a3b8b36e550b787162da56ff575212a5a79cc184a94bd0dbbcb61392c39", + "assetIds": [] + }, + { + "x": 302, + "y": 204, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x57d0459b9764ea0d38d5bbab6730fbf65de8ffad1e22f0a712dcd91fe121480d", + "assetIds": [] + }, + { + "x": 302, + "y": 205, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x7719c3979bfc6e3dbd51ccf26dbdd390096612c8e9f1ea425a6732d14060520f", + "assetIds": [] + }, + { + "x": 302, + "y": 206, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x0bd6a95c6e3e30e8158a1223ea82018d56cd75b3c9133c6a41c193cb743c6268", + "assetIds": [] + }, + { + "x": 302, + "y": 207, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xd99b77dabeb95713db64de6d781487220126c7a03cb12bbf5161489fce7f9858", + "assetIds": [] + }, + { + "x": 302, + "y": 208, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x09c51cdcdd8387ff086140be80eac89a98df28fbbdabc6d712733b2473ab7495", + "assetIds": [] + }, + { + "x": 302, + "y": 209, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0x1ac45fa0fbb7f3028b106c2d07bd85ae00acdd0463fda69f1706111aa3391f4c", + "assetIds": [] + }, + { + "x": 302, + "y": 216, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0xa2565b469e50491229edfe7e16fe0e3827a644d3c126e4630f202d72a6c2729c", + "assetIds": [] + }, + { + "x": 302, + "y": 217, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x4c28393a0f5429377e2084fadabd15d9fa3940ce2adea64d69cbc6e6588028c3", + "assetIds": [] + }, + { + "x": 302, + "y": 218, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x50ed85695c70c12da855dc75e406788e89e2450e4ac907467f8d65e5b8ea554a", + "assetIds": [] + }, + { + "x": 302, + "y": 219, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x0cac5c73e27c7922b158ad9118e1fd538392f46a410410ae2f3ccd91d797873f", + "assetIds": [] + }, + { + "x": 302, + "y": 220, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x91c3c5633a07cbde6e54845597573edb19ca2d1d3fcb3492f1fe7f28eec38b3d", + "assetIds": [] + }, + { + "x": 302, + "y": 221, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x27cbae9dcdf8d4c9b8016a0ca8eaad07314e17a2ce46a377b82ee74440be9887", + "assetIds": [] + }, + { + "x": 303, + "y": 189, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x50a5d39cd2b6752b79dc71db612a89a3fd8e2bc418928d090f430805f9ae5540", + "assetIds": [] + }, + { + "x": 303, + "y": 190, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x399dc7c96cce89c939453a077445cba55f0bab7b93ab94e95ba8d1045768e1ce", + "assetIds": [] + }, + { + "x": 303, + "y": 191, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xcc3ba371b459ebffeda636a5d59eaaa265bd68ca4a7d126134ebf6fdc8b1e93a", + "assetIds": [] + }, + { + "x": 303, + "y": 192, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x397af23a20739d5c365d0e85f9f27052a5cb92b01b8a12ac96f71300b3605704", + "assetIds": [] + }, + { + "x": 303, + "y": 193, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x9d9a3ba3d2bad382a44d407acb050f4724216b652ce624f084d4c1813b6b32e1", + "assetIds": [] + }, + { + "x": 303, + "y": 194, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x1677dafe5ea35ad4ca82336fa9cce1ecaf6d80e32b23e210185096a7a88f7415", + "assetIds": [] + }, + { + "x": 303, + "y": 216, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0x7a9f71db8c39a9c71e89591480d6493dda0a458bf7800d766c3c85e4e3067330", + "assetIds": [] + }, + { + "x": 303, + "y": 217, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x259fbf5b9456a96bbb4bb30c0c16556f0e8a52650abfad03c356af9330544a88", + "assetIds": [] + }, + { + "x": 303, + "y": 218, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x1d62f8e91276b89ffd417eb98e70f898ba4d5539449a4101f5410f75bd1b1c59", + "assetIds": [] + }, + { + "x": 303, + "y": 219, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x9fb6e58a11ec266664d8116151858b17f0e7d3196fe3a7db83ef271fbea482e4", + "assetIds": [] + }, + { + "x": 303, + "y": 220, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x9d0ad202da6cfb94da4cd5a0b533d2e142fcb5854c73ef83b845b70490eb7702", + "assetIds": [] + }, + { + "x": 303, + "y": 221, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x7446d44c0a8bd46a86c34dabec1d9614a1df9c6c0eb348a1ebd2bf15cdbc7378", + "assetIds": [] + }, + { + "x": 304, + "y": 189, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x99d9c2193c0e266eff26a40971fe96b88733d5492cac1ab128da8a37ea2efce0", + "assetIds": [] + }, + { + "x": 304, + "y": 190, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xcb4fcd9f8734a32decc6dd1b5a7ad9658355601d7fca6b021f05c528a62bb864", + "assetIds": [] + }, + { + "x": 304, + "y": 191, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x9b8b619ab02c8656b5297b9a5685928e927cef3b87e1175450fe6ca374688dad", + "assetIds": [] + }, + { + "x": 304, + "y": 192, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x843f17f83248418d57ecddbad824bd8d233c87e8642278eaf5aacdd44658da49", + "assetIds": [] + }, + { + "x": 304, + "y": 193, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x1f10361e84c9560d73ff118560d8b2d9528a16940766234da76c90e78f51dcb2", + "assetIds": [] + }, + { + "x": 304, + "y": 194, + "size": 1, + "price": "1011000000000000000000", + "reserved": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "salt": "0x855d938b183467c922d26b71e482198fbd4bf8483f8f624e0be8ef0bafb8fd5d", + "assetIds": [] + }, + { + "x": 304, + "y": 216, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0xb8e1dae912c18d2d36478fc88cd9acd08c3b14c5e0c66ebe9c7545ae6edbf96b", + "assetIds": [] + }, + { + "x": 304, + "y": 217, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xed725e7d22bf984301016ba766c59fabe19f51065330f18fa1372f295cce1074", + "assetIds": [] + }, + { + "x": 304, + "y": 218, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xf693b2006010913dadf092c5a0ab930ea57795ae71fe9118b80f9f15f9081471", + "assetIds": [] + }, + { + "x": 304, + "y": 219, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x9f3d286918d6e3f9750975165d4f743717c814f791a6f2c426080542834f921e", + "assetIds": [] + }, + { + "x": 304, + "y": 220, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xfd88442407d4d3c2c03f9b4b71355a79a285f89648097efa678b5c81a4d9ef90", + "assetIds": [] + }, + { + "x": 304, + "y": 221, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x889bde16f813f217854856ba7b835610f3539786f91b33e731c6a1a69c05beac", + "assetIds": [] + }, + { + "x": 305, + "y": 189, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x09890b716c290462b67dd68e553317bc8340ac477ec20534ae6f68dcc44d7f71", + "assetIds": [] + }, + { + "x": 305, + "y": 190, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x45b6d57483c9348bcca6aab9223789a1ffe1f24b176b8cccd8e5c4ecb9ded39c", + "assetIds": [] + }, + { + "x": 305, + "y": 191, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x90d48fd12e74bc75b965661097bbc13721369a97589c5be2308e241de4a21c3c", + "assetIds": [] + }, + { + "x": 305, + "y": 192, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xf006d3e26b4a992039369834a568b56ac0dd51da55ce60a5a2a85b74f7cfbec1", + "assetIds": [] + }, + { + "x": 305, + "y": 193, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x51edb6dadfe215908c12f37d84d78bcc391b8b9445c2d69e7b69091172c12796", + "assetIds": [] + }, + { + "x": 305, + "y": 194, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x208e85df833af7687f3a3935ab8812adaf65f6ea2301ba26b691774be9d1d2f9", + "assetIds": [] + }, + { + "x": 305, + "y": 216, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0x2faa27b9fa9bc1108c1c57733a90751aad22a50244d86ed787029341270318d4", + "assetIds": [] + }, + { + "x": 305, + "y": 217, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x09ce1e4339295d43980d57619911d9e9087cef33941477f927185a6e5aebc778", + "assetIds": [] + }, + { + "x": 305, + "y": 218, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x762c241b5fa5c88dde910424750c358a0746844c2db4c9c6515dd94fb0ec6c47", + "assetIds": [] + }, + { + "x": 305, + "y": 219, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xfc35fc87991b96eb2e5808990fc5ef7399fba0eacafbd59e8c0ec07829f523ae", + "assetIds": [] + }, + { + "x": 305, + "y": 220, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x41fc72b0ee5edaab19773c649048a43e69e81d63b86166ab20858023b89a6be2", + "assetIds": [] + }, + { + "x": 305, + "y": 221, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xb7050e9c313f1da8f112a8eff9bf91973027d6c85e5d8d39932b6e17b202ee81", + "assetIds": [] + }, + { + "x": 306, + "y": 195, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xe4a9637734c3f96b2a3a1b59752f7fc7c6ad077fb9c22f74e7f12010b09f99e2", + "assetIds": [] + }, + { + "x": 306, + "y": 196, + "size": 1, + "price": "1011000000000000000000", + "reserved": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "salt": "0x160ea9a1a4622166be28b4d3c12db676f048a7c0d990814f4bbff7bde62c19ab", + "assetIds": [] + }, + { + "x": 306, + "y": 197, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x69058e8df1e6aeb8b2b5288c6dc3d5d6e23e7d90e7f5077094451a59c6b706ba", + "assetIds": [] + }, + { + "x": 306, + "y": 207, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x0e4966892b870384df7593494a5819821a61c4d74f0583d7a091058d6921a011", + "assetIds": [] + }, + { + "x": 306, + "y": 208, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x0a749ad554aca3dc5a71b73314d0da12e6f412e0647c81549edbf22d5b7e3cef", + "assetIds": [] + }, + { + "x": 306, + "y": 209, + "size": 1, + "price": "1011000000000000000000", + "reserved": "0x7a9fe22691c811ea339d9b73150e6911a5343dca", + "salt": "0x606715c569deca794168244694189376d7c61fed4afd2ee5ed8dc6b762425ae7", + "assetIds": [] + }, + { + "x": 306, + "y": 210, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0x5bad3e3bc9b16862f62f519baea0de9f07dddd6e421bf2d598d6c0af38d275d4", + "assetIds": [] + }, + { + "x": 306, + "y": 211, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0x76b2725a570465a871d1d36f07491ab955292e9b07c9fd8eb10bc10ce53e75b8", + "assetIds": [] + }, + { + "x": 306, + "y": 212, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0x13dc2bf4e24891b9e7cf6593266335f0248ea611ff2959636765b9b7295480a7", + "assetIds": [] + }, + { + "x": 306, + "y": 213, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0x72e94b017d18dc5739120141a8254ca3e52763fb206aa513b916d0116b52c284", + "assetIds": [] + }, + { + "x": 306, + "y": 214, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0xdae92f284aa12aa7eab4604d35478d5a3d2876e27da2d05f08039a93e70bcbf1", + "assetIds": [] + }, + { + "x": 306, + "y": 215, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0x4c362ae5d28309a4f413d3c175baa59d52806809a7b3a820aedabdf26bef00f9", + "assetIds": [] + }, + { + "x": 306, + "y": 216, + "size": 1, + "price": "4683000000000000000000", + "reserved": "", + "salt": "0xebce072f5a05539a445a5a1d89a8703ffd8d167c81c9af8ad92e7b83bcc5208f", + "assetIds": [] + }, + { + "x": 306, + "y": 217, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x39148443810cad96c09fca775abe13d68de3acc64493d00cf23413320564afe1", + "assetIds": [] + }, + { + "x": 307, + "y": 195, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xb08ca86c21f9893e1e442c410b1d5807ab355e8236072a5059320d5f16544efc", + "assetIds": [] + }, + { + "x": 307, + "y": 196, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x686b29933bce4455c3d273c24ab89b78d12a646a940dcef55a8d8e917c6265f8", + "assetIds": [] + }, + { + "x": 307, + "y": 197, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xd9059257175ee0367bca0d929784fc7a9913be827359b62c0b7bb0b0cbb397ad", + "assetIds": [] + }, + { + "x": 308, + "y": 195, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0xd6be07aaff95a4cef4e810f9102d6b24d8dba212f4e843e2c82193f6758f3676", + "assetIds": [] + }, + { + "x": 308, + "y": 196, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x36e676452783b3fbff68108fe2cfc6d9b5b71dff495f06e4b91eadddbbb92d38", + "assetIds": [] + }, + { + "x": 308, + "y": 197, + "size": 1, + "price": "1011000000000000000000", + "reserved": "", + "salt": "0x15ac116ff03bd7889e09d596824c1dda7b1537392d268b15babc4f6dea739782", + "assetIds": [] + } + ], + "solcInputHash": "b42a863a795806b4ea3a8f05dfa42539", + "metadata": "{\"compiler\":{\"version\":\"0.6.5+commit.f956cc89\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"landAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"sandContractAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"initialMetaTx\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"initialWalletAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"expiryTime\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"initialSigningWallet\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"initialMaxCommissionRate\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"estate\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeDistributor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"authValidator\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"buyer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"topCornerId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountPaid\",\"type\":\"uint256\"}],\"name\":\"LandQuadPurchased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newMaxCommissionRate\",\"type\":\"uint256\"}],\"name\":\"MaxCommissionRateUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"metaTransactionProcessor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"MetaTransactionProcessor\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newWallet\",\"type\":\"address\"}],\"name\":\"NewReceivingWallet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"referrer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"referee\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"commission\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"commissionRate\",\"type\":\"uint256\"}],\"name\":\"ReferralUsed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newSigningWallet\",\"type\":\"address\"}],\"name\":\"SigningWalletUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"buyer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"reserved\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"info\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"assetIds\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes\",\"name\":\"referral\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"buyLandWithSand\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"referral\",\"type\":\"bytes\"}],\"name\":\"decodeReferral\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"disableWallet\",\"type\":\"address\"}],\"name\":\"disablePreviousSigningWallet\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getExpiryTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMaxCommissionRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMerkleRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSigningWallet\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"isMetaTransactionProcessor\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"referrer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"referee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"expiryTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"commissionRate\",\"type\":\"uint256\"}],\"name\":\"isReferralValid\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155BatchReceived\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"metaTransactionProcessor\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"setMetaTransactionProcessor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"newWallet\",\"type\":\"address\"}],\"name\":\"setReceivingWallet\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newMaxCommissionRate\",\"type\":\"uint256\"}],\"name\":\"updateMaxCommissionRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newSigningWallet\",\"type\":\"address\"}],\"name\":\"updateSigningWallet\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"assetIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"}],\"name\":\"withdrawAssets\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"buyLandWithSand(address,address,address,uint256[],bytes32,uint256[],bytes32[],bytes,bytes)\":{\"params\":{\"assetIds\":\"asset ids (lands) that will be bought\",\"buyer\":\"address that perform the payment\",\"info\":\"[X_INDEX=0] x coordinate of the Land [Y_INDEX=1] y coordinate of the Land [SIZE_INDEX=2] size of the pack of Land to purchase [PRICE_INDEX=3] price in SAND to purchase that Land\",\"proof\":\"merkleProof for that particular Land\",\"referral\":\"referral id\",\"reserved\":\"the reserved address (if any)\",\"salt\":\"The salt submitted for verification.\",\"signature\":\"A signed message specifying tx details\",\"to\":\"address that will own the purchased Land\"}},\"changeAdmin(address)\":{\"details\":\"change the administrator to be `newAdmin`.\",\"params\":{\"newAdmin\":\"address of the new administrator.\"}},\"disablePreviousSigningWallet(address)\":{\"details\":\"Disable compromised signing wallet\",\"params\":{\"disableWallet\":\"The wallet address to be disabled\"}},\"getAdmin()\":{\"details\":\"gives the current administrator of this contract.\",\"returns\":{\"_0\":\"the current administrator of this contract.\"}},\"getSigningWallet()\":{\"details\":\"signing wallet authorized for referral\",\"returns\":{\"_0\":\"the address of the signing wallet\"}},\"isMetaTransactionProcessor(address)\":{\"details\":\"check whether address `who` is given meta-transaction execution rights.\",\"params\":{\"who\":\"The address to query.\"},\"returns\":{\"_0\":\"whether the address has meta-transaction execution rights.\"}},\"isReferralValid(bytes,address,address,uint256,uint256)\":{\"params\":{\"commissionRate\":\"The commissionRate of the referral\",\"expiryTime\":\"The expiry time of the referral\",\"referee\":\"The address of the referee\",\"referrer\":\"The address of the referrer\",\"signature\":\"The signature to check (signed referral)\"},\"returns\":{\"_0\":\"True if the referral is valid\"}},\"setMetaTransactionProcessor(address,bool)\":{\"details\":\"Enable or disable the ability of `metaTransactionProcessor` to perform meta-tx (metaTransactionProcessor rights).\",\"params\":{\"enabled\":\"set whether the metaTransactionProcessor is enabled or disabled.\",\"metaTransactionProcessor\":\"address that will be given/removed metaTransactionProcessor rights.\"}},\"setReceivingWallet(address)\":{\"params\":{\"newWallet\":\"address of the new receiving wallet\"}},\"updateMaxCommissionRate(uint256)\":{\"details\":\"Update the maximum commission rate\",\"params\":{\"newMaxCommissionRate\":\"The new maximum commission rate\"}},\"updateSigningWallet(address)\":{\"details\":\"Update the signing wallet The previous wallet is still valid for a grace period (_previousSigningDelay). If you want to disable the previous wallet, use the disablePreviousSigningWallet function.\",\"params\":{\"newSigningWallet\":\"The new address of the signing wallet\"}},\"withdrawAssets(address,uint256[],uint256[])\":{\"params\":{\"assetIds\":\"the assetIds to be transferred\",\"to\":\"intended recipient of the asset tokens\",\"values\":\"the quantities of the assetIds to be transferred\"}}},\"title\":\"Estate Sale contract with referral\"},\"userdoc\":{\"methods\":{\"buyLandWithSand(address,address,address,uint256[],bytes32,uint256[],bytes32[],bytes,bytes)\":{\"notice\":\"buy Land with SAND using the merkle proof associated with it\"},\"getExpiryTime()\":{\"notice\":\"Gets the expiry time for the current sale\"},\"getMaxCommissionRate()\":{\"notice\":\"the max commission rate\"},\"getMerkleRoot()\":{\"notice\":\"Gets the Merkle root associated with the current sale\"},\"isReferralValid(bytes,address,address,uint256,uint256)\":{\"notice\":\"Check if a referral is valid\"},\"setReceivingWallet(address)\":{\"notice\":\"set the wallet receiving the proceeds\"},\"withdrawAssets(address,uint256[],uint256[])\":{\"notice\":\"enable Admin to withdraw remaining assets from EstateSaleWithFee contract\"}},\"notice\":\"This contract manages the sale of our lands as Estates\"}},\"settings\":{\"compilationTarget\":{\"src/solc_0.6/EstateSale/EstateSaleWithAuth.sol\":\"EstateSaleWithAuth\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-0.6/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.6.0;\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n // Check the signature length\\n if (signature.length != 65) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n }\\n\\n // Divide the signature in r, s and v variables\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (281): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (282): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n }\\n\\n if (v != 27 && v != 28) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n require(signer != address(0), \\\"ECDSA: invalid signature\\\");\\n\\n return signer;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * replicates the behavior of the\\n * https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign[`eth_sign`]\\n * JSON-RPC method.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n}\\n\",\"keccak256\":\"0x1efcb1ccef6b3bce65467c4b704cec8d0582e35ff48352269ba8cda4b54ae3da\"},\"@openzeppelin/contracts-0.6/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.6.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xfa152b6e88a1dc50780e8f1580426dc23ad2e1e2c2f086a088adf206a202f453\"},\"@openzeppelin/contracts-0.6/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.6.0;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return sub(a, b, \\\"SafeMath: subtraction overflow\\\");\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n uint256 c = a - b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return div(a, b, \\\"SafeMath: division by zero\\\");\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n uint256 c = a / b;\\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * Reverts when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return mod(a, b, \\\"SafeMath: modulo by zero\\\");\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * Reverts with custom message when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b != 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0x9a9cf02622cd7a64261b10534fc3260449da25c98c9e96d1b4ae8110a20e5806\"},\"@openzeppelin/contracts-0.6/token/ERC1155/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.6.2;\\n\\nimport \\\"../../introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155 is IERC165 {\\n /**\\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\n */\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\n\\n /**\\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\n * transfers.\\n */\\n event TransferBatch(address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values);\\n\\n /**\\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\n * `approved`.\\n */\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\n\\n /**\\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\n *\\n * If an {URI} event was emitted for `id`, the standard\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\n * returned by {IERC1155MetadataURI-uri}.\\n */\\n event URI(string value, uint256 indexed id);\\n\\n /**\\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\n *\\n * Emits an {ApprovalForAll} event.\\n *\\n * Requirements:\\n *\\n * - `operator` cannot be the caller.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\n *\\n * See {setApprovalForAll}.\\n */\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function safeBatchTransferFrom(address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data) external;\\n}\\n\",\"keccak256\":\"0x31691ad0817f8cb338531b78d2ab2989027d9f27e6f8e62492b754fed9429b10\"},\"@openzeppelin/contracts-0.6/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.6.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0x5c26b39d26f7ed489e555d955dcd3e01872972e71fdd1528e93ec164e4f23385\"},\"@openzeppelin/contracts-0.6/token/ERC20/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.6.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n // solhint-disable-next-line max-line-length\\n require((value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf3b30f8a49631420635a8c35daacfcaa338012755f18a76fdd118730256f9a27\"},\"@openzeppelin/contracts-0.6/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.6.2;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies in extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\n return size > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\n (bool success, ) = recipient.call{ value: amount }(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain`call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n return _functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n return _functionCallWithValue(target, data, value, errorMessage);\\n }\\n\\n function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf5fa8cbdffa5ef8be49b246b5628facc30b71707e78a45d80d93b64eff3fe390\"},\"@openzeppelin/contracts-0.6/utils/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.6.0;\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\ncontract ReentrancyGuard {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n constructor () internal {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and make it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0x7ff0067f2d7df4187eaa1cb4800949b929602c9d9cb20fcaee6922a7613ef2fb\"},\"src/solc_0.6/EstateSale/AuthValidator.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity 0.6.5;\\n\\nimport \\\"@openzeppelin/contracts-0.6/cryptography/ECDSA.sol\\\";\\nimport \\\"../common/BaseWithStorage/Admin.sol\\\";\\n\\ncontract AuthValidator is Admin {\\n address public _signingAuthWallet;\\n\\n event SigningWallet(address indexed signingWallet);\\n\\n constructor(address adminWallet, address initialSigningWallet) public {\\n require(adminWallet != address(0), \\\"AuthValidator: zero address\\\");\\n\\n _admin = adminWallet;\\n _updateSigningAuthWallet(initialSigningWallet);\\n }\\n\\n function updateSigningAuthWallet(address newSigningWallet) external onlyAdmin {\\n _updateSigningAuthWallet(newSigningWallet);\\n }\\n\\n function _updateSigningAuthWallet(address newSigningWallet) internal {\\n require(newSigningWallet != address(0), \\\"AuthValidator: INVALID_SIGNING_WALLET\\\");\\n _signingAuthWallet = newSigningWallet;\\n emit SigningWallet(newSigningWallet);\\n }\\n\\n function isAuthValid(bytes memory signature, bytes32 hashedData) public view returns (bool) {\\n address signer = ECDSA.recover(ECDSA.toEthSignedMessageHash(hashedData), signature);\\n return signer == _signingAuthWallet;\\n }\\n}\\n\",\"keccak256\":\"0x949c6063b3d90a8c53ca8d3c80a1097da05b7189e87d8c8825b97acc17dbd38e\"},\"src/solc_0.6/EstateSale/EstateSaleWithAuth.sol\":{\"content\":\"/* solhint-disable not-rely-on-time, func-order */\\npragma solidity 0.6.5;\\n\\nimport \\\"@openzeppelin/contracts-0.6/utils/ReentrancyGuard.sol\\\";\\nimport \\\"@openzeppelin/contracts-0.6/math/SafeMath.sol\\\";\\nimport \\\"@openzeppelin/contracts-0.6/utils/Address.sol\\\";\\nimport \\\"@openzeppelin/contracts-0.6/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts-0.6/token/ERC1155/IERC1155.sol\\\";\\nimport \\\"./ILandToken.sol\\\";\\nimport \\\"../common/BaseWithStorage/MetaTransactionReceiver.sol\\\";\\nimport \\\"../ReferralValidator/ReferralValidator.sol\\\";\\nimport \\\"./AuthValidator.sol\\\";\\n\\n/// @title Estate Sale contract with referral\\n/// @notice This contract manages the sale of our lands as Estates\\ncontract EstateSaleWithAuth is ReentrancyGuard, MetaTransactionReceiver, ReferralValidator {\\n using SafeMath for uint256;\\n using Address for address;\\n using SafeERC20 for IERC20;\\n\\n event LandQuadPurchased(\\n address indexed buyer,\\n address indexed to,\\n uint256 indexed topCornerId,\\n uint256 size,\\n uint256 price,\\n address token,\\n uint256 amountPaid\\n );\\n\\n event NewReceivingWallet(address indexed newWallet);\\n\\n /// @notice set the wallet receiving the proceeds\\n /// @param newWallet address of the new receiving wallet\\n function setReceivingWallet(address payable newWallet) external {\\n require(newWallet != address(0), \\\"ZERO_ADDRESS\\\");\\n require(msg.sender == _admin, \\\"NOT_AUTHORIZED\\\");\\n _wallet = newWallet;\\n\\n emit NewReceivingWallet(newWallet);\\n }\\n\\n /// @notice buy Land with SAND using the merkle proof associated with it\\n /// @param buyer address that perform the payment\\n /// @param to address that will own the purchased Land\\n /// @param reserved the reserved address (if any)\\n /// @param info [X_INDEX=0] x coordinate of the Land [Y_INDEX=1] y coordinate of the Land [SIZE_INDEX=2] size of the pack of Land to purchase [PRICE_INDEX=3] price in SAND to purchase that Land\\n /// @param salt The salt submitted for verification.\\n /// @param assetIds asset ids (lands) that will be bought\\n /// @param proof merkleProof for that particular Land\\n /// @param referral referral id\\n /// @param signature A signed message specifying tx details\\n function buyLandWithSand(\\n address buyer,\\n address to,\\n address reserved,\\n uint256[] calldata info,\\n bytes32 salt,\\n uint256[] calldata assetIds,\\n bytes32[] calldata proof,\\n bytes calldata referral,\\n bytes calldata signature\\n ) external nonReentrant {\\n _checkAddressesAndExpiryTime(buyer, reserved);\\n _checkAuthAndProofValidity(to, reserved, info, salt, assetIds, proof, signature);\\n _handleFeeAndReferral(buyer, info[PRICE_INDEX], referral);\\n _mint(buyer, to, info);\\n _sendAssets(to, assetIds);\\n }\\n\\n /// @notice Gets the expiry time for the current sale\\n /// @return The expiry time, as a unix epoch\\n function getExpiryTime() external view returns (uint256) {\\n return _expiryTime;\\n }\\n\\n /// @notice Gets the Merkle root associated with the current sale\\n /// @return The Merkle root, as a bytes32 hash\\n function getMerkleRoot() external view returns (bytes32) {\\n return _merkleRoot;\\n }\\n\\n /// @notice enable Admin to withdraw remaining assets from EstateSaleWithFee contract\\n /// @param to intended recipient of the asset tokens\\n /// @param assetIds the assetIds to be transferred\\n /// @param values the quantities of the assetIds to be transferred\\n function withdrawAssets(\\n address to,\\n uint256[] calldata assetIds,\\n uint256[] calldata values\\n ) external {\\n require(msg.sender == _admin, \\\"NOT_AUTHORIZED\\\");\\n _asset.safeBatchTransferFrom(address(this), to, assetIds, values, \\\"\\\");\\n }\\n\\n function onERC1155Received(\\n address, /*operator*/\\n address, /*from*/\\n uint256, /*id*/\\n uint256, /*value*/\\n bytes calldata /*data*/\\n ) external pure returns (bytes4) {\\n return 0xf23a6e61;\\n }\\n\\n function onERC1155BatchReceived(\\n address, /*operator*/\\n address, /*from*/\\n uint256[] calldata, /*ids*/\\n uint256[] calldata, /*values*/\\n bytes calldata /*data*/\\n ) external pure returns (bytes4) {\\n return 0xbc197c81;\\n }\\n\\n function _sendAssets(address to, uint256[] memory assetIds) internal {\\n uint256[] memory values = new uint256[](assetIds.length);\\n for (uint256 i = 0; i < assetIds.length; i++) {\\n values[i] = 1;\\n }\\n _asset.safeBatchTransferFrom(address(this), to, assetIds, values, \\\"\\\");\\n }\\n\\n // NOTE: _checkAddressesAndExpiryTime & _checkAuthAndProofValidity were split due to a stack too deep issue\\n function _checkAddressesAndExpiryTime(address buyer, address reserved) internal view {\\n /* solium-disable-next-line security/no-block-members */\\n require(block.timestamp < _expiryTime, \\\"SALE_IS_OVER\\\");\\n require(buyer == msg.sender || _metaTransactionContracts[msg.sender], \\\"NOT_AUTHORIZED\\\");\\n require(reserved == address(0) || reserved == buyer, \\\"RESERVED_LAND\\\");\\n }\\n\\n // NOTE: _checkAddressesAndExpiryTime & _checkAuthAndProofValidity were split due to a stack too deep issue\\n function _checkAuthAndProofValidity(\\n address to,\\n address reserved,\\n uint256[] memory info,\\n bytes32 salt,\\n uint256[] memory assetIds,\\n bytes32[] memory proof,\\n bytes memory signature\\n ) internal view {\\n bytes32 hashedData = keccak256(\\n abi.encodePacked(\\n to,\\n reserved,\\n info[X_INDEX],\\n info[Y_INDEX],\\n info[SIZE_INDEX],\\n info[PRICE_INDEX],\\n salt,\\n keccak256(abi.encodePacked(assetIds)),\\n keccak256(abi.encodePacked(proof))\\n )\\n );\\n require(_authValidator.isAuthValid(signature, hashedData), \\\"INVALID_AUTH\\\");\\n\\n bytes32 leaf = _generateLandHash(\\n info[X_INDEX],\\n info[Y_INDEX],\\n info[SIZE_INDEX],\\n info[PRICE_INDEX],\\n reserved,\\n salt,\\n assetIds\\n );\\n require(_verify(proof, leaf), \\\"INVALID_LAND\\\");\\n }\\n\\n function _mint(\\n address buyer,\\n address to,\\n uint256[] memory info\\n ) internal {\\n if (info[SIZE_INDEX] == 1 || _estate == address(0)) {\\n _land.mintQuad(to, info[SIZE_INDEX], info[X_INDEX], info[Y_INDEX], \\\"\\\");\\n } else {\\n _land.mintQuad(_estate, info[SIZE_INDEX], info[X_INDEX], info[Y_INDEX], abi.encode(to));\\n }\\n emit LandQuadPurchased(\\n buyer,\\n to,\\n info[X_INDEX] + (info[Y_INDEX] * GRID_SIZE),\\n info[SIZE_INDEX],\\n info[PRICE_INDEX],\\n address(_sand),\\n info[PRICE_INDEX]\\n );\\n }\\n\\n function _generateLandHash(\\n uint256 x,\\n uint256 y,\\n uint256 size,\\n uint256 price,\\n address reserved,\\n bytes32 salt,\\n uint256[] memory assetIds\\n ) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(x, y, size, price, reserved, salt, assetIds));\\n }\\n\\n function _verify(bytes32[] memory proof, bytes32 leaf) internal view returns (bool) {\\n bytes32 computedHash = leaf;\\n\\n for (uint256 i = 0; i < proof.length; i++) {\\n bytes32 proofElement = proof[i];\\n\\n if (computedHash < proofElement) {\\n computedHash = keccak256(abi.encodePacked(computedHash, proofElement));\\n } else {\\n computedHash = keccak256(abi.encodePacked(proofElement, computedHash));\\n }\\n }\\n\\n return computedHash == _merkleRoot;\\n }\\n\\n function _handleFeeAndReferral(\\n address buyer,\\n uint256 priceInSand,\\n bytes memory referral\\n ) internal {\\n // send 5% fee to a specially configured instance of FeeDistributor.sol\\n uint256 remainingAmountInSand = _handleSandFee(buyer, priceInSand);\\n\\n // calculate referral based on 95% of original priceInSand\\n handleReferralWithERC20(buyer, remainingAmountInSand, referral, _wallet, address(_sand));\\n }\\n\\n function _handleSandFee(address buyer, uint256 priceInSand) internal returns (uint256) {\\n uint256 feeAmountInSand = priceInSand.mul(FEE).div(100);\\n _sand.safeTransferFrom(buyer, address(_feeDistributor), feeAmountInSand);\\n return priceInSand.sub(feeAmountInSand);\\n }\\n\\n uint256 internal constant GRID_SIZE = 408; // 408 is the size of the Land\\n\\n IERC1155 internal immutable _asset;\\n ILandToken internal immutable _land;\\n IERC20 internal immutable _sand;\\n address internal immutable _estate;\\n address internal immutable _feeDistributor;\\n\\n address payable internal _wallet;\\n AuthValidator internal _authValidator;\\n uint256 internal immutable _expiryTime;\\n bytes32 internal immutable _merkleRoot;\\n\\n uint256 private constant FEE = 5; // percentage of land sale price to be diverted to a specially configured instance of FeeDistributor, shown as an integer\\n // buyLandWithSand info indexes\\n uint256 private constant X_INDEX = 0;\\n uint256 private constant Y_INDEX = 1;\\n uint256 private constant SIZE_INDEX = 2;\\n uint256 private constant PRICE_INDEX = 3;\\n\\n constructor(\\n address landAddress,\\n address sandContractAddress,\\n address initialMetaTx,\\n address admin,\\n address payable initialWalletAddress,\\n bytes32 merkleRoot,\\n uint256 expiryTime,\\n address initialSigningWallet,\\n uint256 initialMaxCommissionRate,\\n address estate,\\n address asset,\\n address feeDistributor,\\n address authValidator\\n ) public ReferralValidator(initialSigningWallet, initialMaxCommissionRate) {\\n require(landAddress.isContract(), \\\"EstateSaleWithAuth: is not a contract\\\");\\n require(sandContractAddress.isContract(), \\\"EstateSaleWithAuth: is not a contract\\\");\\n require(initialMetaTx != address(0), \\\"EstateSaleWithAuth: zero address\\\");\\n require(admin != address(0), \\\"EstateSaleWithAuth: zero address\\\");\\n require(initialWalletAddress != address(0), \\\"EstateSaleWithAuth: zero address\\\");\\n require(asset.isContract(), \\\"EstateSaleWithAuth: is not a contract\\\");\\n require(feeDistributor != address(0), \\\"EstateSaleWithAuth: zero address\\\");\\n require(authValidator.isContract(), \\\"EstateSaleWithAuth: is not a contract\\\");\\n\\n\\n _land = ILandToken(landAddress);\\n _sand = IERC20(sandContractAddress);\\n _setMetaTransactionProcessor(initialMetaTx, true);\\n _wallet = initialWalletAddress;\\n _merkleRoot = merkleRoot;\\n _expiryTime = expiryTime;\\n _admin = admin;\\n _estate = estate;\\n _asset = IERC1155(asset);\\n _feeDistributor = feeDistributor;\\n _authValidator = AuthValidator(authValidator);\\n }\\n}\\n\",\"keccak256\":\"0x039331cd15021fe3b9312674d873fdc02b968ae2af5343caf14e6c054a2fcc1d\"},\"src/solc_0.6/EstateSale/ILandToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.5;\\n\\n\\ninterface ILandToken {\\n function mintQuad(\\n address to,\\n uint256 size,\\n uint256 x,\\n uint256 y,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0x8d03b53d325fbb052d78f274b106f14bf9a5afc928451b26bc9e579585ae44b2\"},\"src/solc_0.6/ReferralValidator/ReferralValidator.sol\":{\"content\":\"/* solhint-disable not-rely-on-time, func-order */\\n\\n// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.5;\\n\\nimport \\\"@openzeppelin/contracts-0.6/utils/Address.sol\\\";\\nimport \\\"@openzeppelin/contracts-0.6/cryptography/ECDSA.sol\\\";\\nimport \\\"@openzeppelin/contracts-0.6/token/ERC20/SafeERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts-0.6/math/SafeMath.sol\\\";\\nimport \\\"../common/BaseWithStorage/Admin.sol\\\";\\n\\n\\n/// @dev This contract verifies if a referral is valid\\ncontract ReferralValidator is Admin {\\n using Address for address;\\n using SafeERC20 for IERC20;\\n\\n address private _signingWallet;\\n uint256 private _maxCommissionRate;\\n\\n mapping(address => uint256) private _previousSigningWallets;\\n uint256 constant private _previousSigningDelay = 10 days;\\n\\n event ReferralUsed(\\n address indexed referrer,\\n address indexed referee,\\n address indexed token,\\n uint256 amount,\\n uint256 commission,\\n uint256 commissionRate\\n );\\n\\n event SigningWalletUpdated(address indexed newSigningWallet);\\n event MaxCommissionRateUpdated(uint256 indexed newMaxCommissionRate);\\n\\n constructor(address initialSigningWallet, uint256 initialMaxCommissionRate) public {\\n require(initialSigningWallet != address(0), \\\"ReferralValidator: zero address\\\");\\n\\n _signingWallet = initialSigningWallet;\\n _maxCommissionRate = initialMaxCommissionRate;\\n }\\n\\n /**\\n * @dev Update the signing wallet\\n * The previous wallet is still valid for a grace period (_previousSigningDelay). If you want to\\n * disable the previous wallet, use the disablePreviousSigningWallet function.\\n * @param newSigningWallet The new address of the signing wallet\\n */\\n function updateSigningWallet(address newSigningWallet) external onlyAdmin {\\n require(newSigningWallet != address(0), \\\"ReferralValidator: zero address\\\");\\n _previousSigningWallets[_signingWallet] = now + _previousSigningDelay;\\n _signingWallet = newSigningWallet;\\n\\n emit SigningWalletUpdated(newSigningWallet);\\n }\\n\\n /**\\n * @dev Disable compromised signing wallet\\n * @param disableWallet The wallet address to be disabled\\n */\\n function disablePreviousSigningWallet(address disableWallet) external {\\n require(_admin == msg.sender, \\\"ReferralValidator: Sender not admin\\\");\\n require(disableWallet != address(0), \\\"ReferralValidator: zero address\\\");\\n _previousSigningWallets[disableWallet] = 0;\\n }\\n\\n /**\\n * @dev signing wallet authorized for referral\\n * @return the address of the signing wallet\\n */\\n function getSigningWallet() external view returns (address) {\\n return _signingWallet;\\n }\\n\\n /**\\n * @notice the max commission rate\\n * @return the maximum commission rate that a referral can give\\n */\\n function getMaxCommissionRate() external view returns (uint256) {\\n return _maxCommissionRate;\\n }\\n\\n /**\\n * @dev Update the maximum commission rate\\n * @param newMaxCommissionRate The new maximum commission rate\\n */\\n function updateMaxCommissionRate(uint256 newMaxCommissionRate) external onlyAdmin {\\n _maxCommissionRate = newMaxCommissionRate;\\n\\n emit MaxCommissionRateUpdated(newMaxCommissionRate);\\n }\\n\\n function handleReferralWithETH(\\n uint256 amount,\\n bytes memory referral,\\n address payable destination\\n ) internal {\\n uint256 amountForDestination = amount;\\n\\n require(msg.value >= amount, \\\"ReferralValidator: insufficient funds\\\");\\n\\n if (referral.length > 0) {\\n (bytes memory signature, address referrer, address referee, uint256 expiryTime, uint256 commissionRate) = decodeReferral(referral);\\n\\n require(commissionRate < 10000, \\\"ReferralValidator: invalid commisionRate\\\");\\n\\n uint256 commission = 0;\\n\\n if (isReferralValid(signature, referrer, referee, expiryTime, commissionRate)) {\\n commission = SafeMath.div(SafeMath.mul(amount, commissionRate), 10000);\\n\\n emit ReferralUsed(referrer, referee, address(0), amount, commission, commissionRate);\\n amountForDestination = SafeMath.sub(amountForDestination, commission);\\n }\\n\\n if (commission > 0) {\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, ) = payable(referrer).call{value:commission}(\\\"\\\");\\n require(success, \\\"ReferralValidator: Transfer failed.\\\");\\n }\\n }\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, ) = destination.call{value:amountForDestination}(\\\"\\\");\\n require(success, \\\"ReferralValidator: Transfer failed.\\\");\\n }\\n\\n function handleReferralWithERC20(\\n address buyer,\\n uint256 amount,\\n bytes memory referral,\\n address payable destination,\\n address tokenAddress\\n ) internal {\\n IERC20 token = IERC20(tokenAddress);\\n uint256 amountForDestination = amount;\\n\\n if (referral.length > 0) {\\n (bytes memory signature, address referrer, address referee, uint256 expiryTime, uint256 commissionRate) = decodeReferral(referral);\\n\\n uint256 commission = 0;\\n\\n if (isReferralValid(signature, referrer, referee, expiryTime, commissionRate)) {\\n commission = SafeMath.div(SafeMath.mul(amount, commissionRate), 10000);\\n\\n emit ReferralUsed(referrer, referee, tokenAddress, amount, commission, commissionRate);\\n amountForDestination = SafeMath.sub(amountForDestination, commission);\\n }\\n\\n if (commission > 0) {\\n token.safeTransferFrom(buyer, referrer, commission);\\n }\\n }\\n\\n token.safeTransferFrom(buyer, destination, amountForDestination);\\n }\\n\\n /**\\n * @notice Check if a referral is valid\\n * @param signature The signature to check (signed referral)\\n * @param referrer The address of the referrer\\n * @param referee The address of the referee\\n * @param expiryTime The expiry time of the referral\\n * @param commissionRate The commissionRate of the referral\\n * @return True if the referral is valid\\n */\\n function isReferralValid(\\n bytes memory signature,\\n address referrer,\\n address referee,\\n uint256 expiryTime,\\n uint256 commissionRate\\n ) public view returns (bool) {\\n if (commissionRate > _maxCommissionRate || referrer == referee || now > expiryTime) {\\n return false;\\n }\\n\\n bytes32 hashedData = keccak256(abi.encodePacked(referrer, referee, expiryTime, commissionRate));\\n\\n address signer = ECDSA.recover(keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hashedData)), signature);\\n\\n if (_previousSigningWallets[signer] >= now) {\\n return true;\\n }\\n\\n return _signingWallet == signer;\\n }\\n\\n function decodeReferral(bytes memory referral)\\n public\\n pure\\n returns (\\n bytes memory,\\n address,\\n address,\\n uint256,\\n uint256\\n )\\n {\\n (bytes memory signature, address referrer, address referee, uint256 expiryTime, uint256 commissionRate) = abi.decode(\\n referral,\\n (bytes, address, address, uint256, uint256)\\n );\\n\\n return (signature, referrer, referee, expiryTime, commissionRate);\\n }\\n}\\n\",\"keccak256\":\"0xad5300e058f15841c54f3bc70ad5c89a6c9a0853aa6e0b542e7a9e59192687d2\"},\"src/solc_0.6/common/BaseWithStorage/Admin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.5;\\n\\n\\ncontract Admin {\\n address internal _admin;\\n\\n /// @dev emitted when the contract administrator is changed.\\n /// @param oldAdmin address of the previous administrator.\\n /// @param newAdmin address of the new administrator.\\n event AdminChanged(address oldAdmin, address newAdmin);\\n\\n /// @dev gives the current administrator of this contract.\\n /// @return the current administrator of this contract.\\n function getAdmin() external view returns (address) {\\n return _admin;\\n }\\n\\n /// @dev change the administrator to be `newAdmin`.\\n /// @param newAdmin address of the new administrator.\\n function changeAdmin(address newAdmin) external {\\n require(msg.sender == _admin, \\\"only admin can change admin\\\");\\n require(_admin != newAdmin, \\\"already admin\\\");\\n emit AdminChanged(_admin, newAdmin);\\n _admin = newAdmin;\\n }\\n\\n modifier onlyAdmin() {\\n require(msg.sender == _admin, \\\"only admin allowed\\\");\\n _;\\n }\\n}\\n\",\"keccak256\":\"0xe1a95ec41b32e523a6fad060f90aa6d03a72a545857a91c2f51473b6072637dc\"},\"src/solc_0.6/common/BaseWithStorage/MetaTransactionReceiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.5;\\n\\nimport \\\"./Admin.sol\\\";\\n\\ncontract MetaTransactionReceiver is Admin {\\n mapping(address => bool) internal _metaTransactionContracts;\\n\\n /// @dev emiited when a meta transaction processor is enabled/disabled\\n /// @param metaTransactionProcessor address that will be given/removed metaTransactionProcessor rights.\\n /// @param enabled set whether the metaTransactionProcessor is enabled or disabled.\\n event MetaTransactionProcessor(address metaTransactionProcessor, bool enabled);\\n\\n /// @dev Enable or disable the ability of `metaTransactionProcessor` to perform meta-tx (metaTransactionProcessor rights).\\n /// @param metaTransactionProcessor address that will be given/removed metaTransactionProcessor rights.\\n /// @param enabled set whether the metaTransactionProcessor is enabled or disabled.\\n function setMetaTransactionProcessor(address metaTransactionProcessor, bool enabled) public onlyAdmin {\\n _setMetaTransactionProcessor(metaTransactionProcessor, enabled);\\n }\\n\\n function _setMetaTransactionProcessor(address metaTransactionProcessor, bool enabled) internal {\\n require(metaTransactionProcessor != address(0), \\\"MetaTransactionReceiver: zero address\\\");\\n _metaTransactionContracts[metaTransactionProcessor] = enabled;\\n emit MetaTransactionProcessor(metaTransactionProcessor, enabled);\\n }\\n\\n /// @dev check whether address `who` is given meta-transaction execution rights.\\n /// @param who The address to query.\\n /// @return whether the address has meta-transaction execution rights.\\n function isMetaTransactionProcessor(address who) external view returns (bool) {\\n return _metaTransactionContracts[who];\\n }\\n}\\n\",\"keccak256\":\"0x4a11e21dfc85fb9330c02abc019bfb5b1e40d0fcd36e2a2e652d4c06b6e8105b\"}},\"version\":1}", + "bytecode": "0x6101606040523480156200001257600080fd5b50604051620031e9380380620031e983398181016040526101a08110156200003957600080fd5b508051602082015160408301516060840151608085015160a086015160c087015160e08801516101008901516101208a01516101408b01516101608c0151610180909c015160016000559a9b999a9899979896979596949593949293919290919085856001600160a01b038216620000f8576040805162461bcd60e51b815260206004820152601f60248201527f526566657272616c56616c696461746f723a207a65726f206164647265737300604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0393841617905560045562000130908e1662000459602090811b62002adc17901c565b6200016d5760405162461bcd60e51b8152600401808060200182810382526025815260200180620031c46025913960400191505060405180910390fd5b6200018c8c6001600160a01b03166200045960201b62002adc1760201c565b620001c95760405162461bcd60e51b8152600401808060200182810382526025815260200180620031c46025913960400191505060405180910390fd5b6001600160a01b038b1662000214576040805162461bcd60e51b815260206004820181905260248201526000805160206200317f833981519152604482015290519081900360640190fd5b6001600160a01b038a166200025f576040805162461bcd60e51b815260206004820181905260248201526000805160206200317f833981519152604482015290519081900360640190fd5b6001600160a01b038916620002aa576040805162461bcd60e51b815260206004820181905260248201526000805160206200317f833981519152604482015290519081900360640190fd5b620002c9836001600160a01b03166200045960201b62002adc1760201c565b620003065760405162461bcd60e51b8152600401808060200182810382526025815260200180620031c46025913960400191505060405180910390fd5b6001600160a01b03821662000351576040805162461bcd60e51b815260206004820181905260248201526000805160206200317f833981519152604482015290519081900360640190fd5b62000370816001600160a01b03166200045960201b62002adc1760201c565b620003ad5760405162461bcd60e51b8152600401808060200182810382526025815260200180620031c46025913960400191505060405180910390fd5b6001600160601b031960608e811b821660a0528d901b1660c052620003dd8b60016001600160e01b036200045f16565b600680546001600160a01b039a8b166001600160a01b031991821617909155610140989098526101209690965260018054998916998816999099179098556001600160601b0319606092831b811660e05290821b811660805296901b909516610100525060078054919093169116179055506200050a92505050565b3b151590565b6001600160a01b038216620004a65760405162461bcd60e51b81526004018080602001828103825260258152602001806200319f6025913960400191505060405180910390fd5b6001600160a01b038216600081815260026020908152604091829020805460ff191685151590811790915582519384529083015280517fb21eb88b4e33b3f1281830a7178d74d8aa73220416215726b68ae23d539515cb9281900390910190a15050565b60805160601c60a05160601c60c05160601c60e05160601c6101005160601c6101205161014051612bef6200059060003980610be0528061247e525080610bbc528061159d5250806124fc525080611af25280611c4f525080611aa85280611e4e52806124d9525080611b235280611c205250806111075280611f3a5250612bef6000f3fe608060405234801561001057600080fd5b50600436106101365760003560e01c8063984d6252116100b2578063c10a420811610081578063dc5074af11610066578063dc5074af146108a0578063e56f8a9e146108c6578063f23a6e61146108e357610136565b8063c10a4208146107c1578063caed35001461089857610136565b8063984d62521461055f578063ab1cc78c14610631578063b522ecff14610639578063bc197c811461065f57610136565b806365194ce71161010957806378e6e5b9116100ee57806378e6e5b9146104e55780638a04af6a1461050b5780638f2839701461053957610136565b806365194ce7146103635780636e9960c3146104c157610136565b80631187fd3c1461013b57806325cb5bc01461031b578063495906571461033557806358bc29441461033d575b600080fd5b610319600480360361012081101561015257600080fd5b6001600160a01b038235811692602081013582169260408201359092169181019060808101606082013564010000000081111561018e57600080fd5b8201836020820111156101a057600080fd5b803590602001918460208302840111640100000000831117156101c257600080fd5b919390928235926040810190602001356401000000008111156101e457600080fd5b8201836020820111156101f657600080fd5b8035906020019184602083028401116401000000008311171561021857600080fd5b91939092909160208101903564010000000081111561023657600080fd5b82018360208201111561024857600080fd5b8035906020019184602083028401116401000000008311171561026a57600080fd5b91939092909160208101903564010000000081111561028857600080fd5b82018360208201111561029a57600080fd5b803590602001918460018302840111640100000000831117156102bc57600080fd5b9193909290916020810190356401000000008111156102da57600080fd5b8201836020820111156102ec57600080fd5b8035906020019184600183028401116401000000008311171561030e57600080fd5b509092509050610978565b005b610323610bba565b60408051918252519081900360200190f35b610323610bde565b6103196004803603602081101561035357600080fd5b50356001600160a01b0316610c02565b6104096004803603602081101561037957600080fd5b81019060208101813564010000000081111561039457600080fd5b8201836020820111156103a657600080fd5b803590602001918460018302840111640100000000831117156103c857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610d2e945050505050565b6040518080602001866001600160a01b03166001600160a01b03168152602001856001600160a01b03166001600160a01b03168152602001848152602001838152602001828103825287818151815260200191508051906020019080838360005b8381101561048257818101518382015260200161046a565b50505050905090810190601f1680156104af5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390f35b6104c9610e33565b604080516001600160a01b039092168252519081900360200190f35b610319600480360360208110156104fb57600080fd5b50356001600160a01b0316610e42565b6103196004803603604081101561052157600080fd5b506001600160a01b0381351690602001351515610f00565b6103196004803603602081101561054f57600080fd5b50356001600160a01b0316610f6d565b6103196004803603606081101561057557600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156105a057600080fd5b8201836020820111156105b257600080fd5b803590602001918460208302840111640100000000831117156105d457600080fd5b9193909290916020810190356401000000008111156105f257600080fd5b82018360208201111561060457600080fd5b8035906020019184602083028401116401000000008311171561062657600080fd5b5090925090506110a6565b610323611231565b6103196004803603602081101561064f57600080fd5b50356001600160a01b0316611237565b61078c600480360360a081101561067557600080fd5b6001600160a01b0382358116926020810135909116918101906060810160408201356401000000008111156106a957600080fd5b8201836020820111156106bb57600080fd5b803590602001918460208302840111640100000000831117156106dd57600080fd5b9193909290916020810190356401000000008111156106fb57600080fd5b82018360208201111561070d57600080fd5b8035906020019184602083028401116401000000008311171561072f57600080fd5b91939092909160208101903564010000000081111561074d57600080fd5b82018360208201111561075f57600080fd5b8035906020019184600183028401116401000000008311171561078157600080fd5b509092509050611348565b604080517fffffffff000000000000000000000000000000000000000000000000000000009092168252519081900360200190f35b610884600480360360a08110156107d757600080fd5b8101906020810181356401000000008111156107f257600080fd5b82018360208201111561080457600080fd5b8035906020019184600183028401116401000000008311171561082657600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550506001600160a01b038335811694506020840135169260408101359250606001359050611375565b604080519115158252519081900360200190f35b6104c96114b1565b610884600480360360208110156108b657600080fd5b50356001600160a01b03166114c0565b610319600480360360208110156108dc57600080fd5b50356114de565b61078c600480360360a08110156108f957600080fd5b6001600160a01b03823581169260208101359091169160408201359160608101359181019060a08101608082013564010000000081111561093957600080fd5b82018360208201111561094b57600080fd5b8035906020019184600183028401116401000000008311171561096d57600080fd5b509092509050611570565b600260005414156109d0576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026000556109df8e8d61159b565b610ad68d8d8d8d80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508c8c8c80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508b8b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020601f8d018190048102820181019092528b815292508b91508a90819084018382808284376000920191909152506116fe92505050565b610b2a8e8c8c6003818110610ae757fe5b9050602002013586868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611a8192505050565b610b688e8e8d8d80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611ad292505050565b610ba58d898980806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611ec392505050565b50506001600055505050505050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b6001546001600160a01b03163314610c61576040805162461bcd60e51b815260206004820152601260248201527f6f6e6c792061646d696e20616c6c6f7765640000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116610cbc576040805162461bcd60e51b815260206004820152601f60248201527f526566657272616c56616c696461746f723a207a65726f206164647265737300604482015290519081900360640190fd5b600380546001600160a01b03908116600090815260056020526040808220620d2f0042019055835473ffffffffffffffffffffffffffffffffffffffff1916928516928317909355915190917fbbb5fb2ee7e707ae0c968f63e94211ea81e66a718c34e2f810a7619e5678a21791a250565b606060008060008060606000806000808a80602001905160a0811015610d5357600080fd5b8101908080516040519392919084640100000000821115610d7357600080fd5b908301906020820185811115610d8857600080fd5b8251640100000000811182820188101715610da257600080fd5b82525081516020918201929091019080838360005b83811015610dcf578181015183820152602001610db7565b50505050905090810190601f168015610dfc5780820380516001836020036101000a031916815260200191505b5060409081526020820151908201516060830151608090930151959f50909d509b5099509197505050505050505091939590929450565b6001546001600160a01b031690565b6001546001600160a01b03163314610e8b5760405162461bcd60e51b8152600401808060200182810382526023815260200180612b056023913960400191505060405180910390fd5b6001600160a01b038116610ee6576040805162461bcd60e51b815260206004820152601f60248201527f526566657272616c56616c696461746f723a207a65726f206164647265737300604482015290519081900360640190fd5b6001600160a01b0316600090815260056020526040812055565b6001546001600160a01b03163314610f5f576040805162461bcd60e51b815260206004820152601260248201527f6f6e6c792061646d696e20616c6c6f7765640000000000000000000000000000604482015290519081900360640190fd5b610f698282612087565b5050565b6001546001600160a01b03163314610fcc576040805162461bcd60e51b815260206004820152601b60248201527f6f6e6c792061646d696e2063616e206368616e67652061646d696e0000000000604482015290519081900360640190fd5b6001546001600160a01b038281169116141561102f576040805162461bcd60e51b815260206004820152600d60248201527f616c72656164792061646d696e00000000000000000000000000000000000000604482015290519081900360640190fd5b600154604080516001600160a01b039283168152918316602083015280517f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f9281900390910190a16001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6001546001600160a01b03163314611105576040805162461bcd60e51b815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632eb2c2d63087878787876040518763ffffffff1660e01b815260040180876001600160a01b03166001600160a01b03168152602001866001600160a01b03166001600160a01b031681526020018060200180602001806020018481038452888882818152602001925060200280828437600083820152601f01601f19169091018581038452868152602090810191508790870280828437600081840152601f19601f8201169050808301925050508481038252600081526020016020019950505050505050505050600060405180830381600087803b15801561121257600080fd5b505af1158015611226573d6000803e3d6000fd5b505050505050505050565b60045490565b6001600160a01b038116611292576040805162461bcd60e51b815260206004820152600c60248201527f5a45524f5f414444524553530000000000000000000000000000000000000000604482015290519081900360640190fd5b6001546001600160a01b031633146112f1576040805162461bcd60e51b815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b6006805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517f4d66958b757eb92a1b43d02be4c38c9500b73f532420ee3706cb43d420ba023690600090a250565b7fbc197c810000000000000000000000000000000000000000000000000000000098975050505050505050565b60006004548211806113985750836001600160a01b0316856001600160a01b0316145b806113a257508242115b156113af575060006114a8565b60408051606087811b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000009081166020808501919091529188901b166034830152604882018690526068808301869052835180840390910181526088830184528051908201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000060a884015260c48084018290528451808503909101815260e49093019093528151910120600090611466908961214e565b6001600160a01b0381166000908152600560205260409020549091504211611493576001925050506114a8565b6003546001600160a01b039081169116149150505b95945050505050565b6003546001600160a01b031690565b6001600160a01b031660009081526002602052604090205460ff1690565b6001546001600160a01b0316331461153d576040805162461bcd60e51b815260206004820152601260248201527f6f6e6c792061646d696e20616c6c6f7765640000000000000000000000000000604482015290519081900360640190fd5b600481905560405181907f774069781371d65424b3b0b101c1d40014532cac040f979595b99a3fcf8ce08c90600090a250565b7ff23a6e61000000000000000000000000000000000000000000000000000000009695505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000421061160f576040805162461bcd60e51b815260206004820152600c60248201527f53414c455f49535f4f5645520000000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b03821633148061163557503360009081526002602052604090205460ff165b611686576040805162461bcd60e51b815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b03811615806116ad5750816001600160a01b0316816001600160a01b0316145b610f69576040805162461bcd60e51b815260206004820152600d60248201527f52455345525645445f4c414e4400000000000000000000000000000000000000604482015290519081900360640190fd5b600087878760008151811061170f57fe5b60200260200101518860018151811061172457fe5b60200260200101518960028151811061173957fe5b60200260200101518a60038151811061174e57fe5b60200260200101518a8a60405160200180828051906020019060200280838360005b83811015611788578181015183820152602001611770565b50505050905001915050604051602081830303815290604052805190602001208a60405160200180828051906020019060200280838360005b838110156117d95781810151838201526020016117c1565b5050505090500191505060405160208183030381529060405280519060200120604051602001808a6001600160a01b03166001600160a01b031660601b8152601401896001600160a01b03166001600160a01b031660601b81526014018881526020018781526020018681526020018581526020018481526020018381526020018281526020019950505050505050505050604051602081830303815290604052805190602001209050600760009054906101000a90046001600160a01b03166001600160a01b031663012847ed83836040518363ffffffff1660e01b81526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b838110156118fb5781810151838201526020016118e3565b50505050905090810190601f1680156119285780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561194657600080fd5b505afa15801561195a573d6000803e3d6000fd5b505050506040513d602081101561197057600080fd5b50516119c3576040805162461bcd60e51b815260206004820152600c60248201527f494e56414c49445f415554480000000000000000000000000000000000000000604482015290519081900360640190fd5b6000611a24876000815181106119d557fe5b6020026020010151886001815181106119ea57fe5b6020026020010151896002815181106119ff57fe5b60200260200101518a600381518110611a1457fe5b60200260200101518c8b8b612337565b9050611a3084826123dc565b611226576040805162461bcd60e51b815260206004820152600c60248201527f494e56414c49445f4c414e440000000000000000000000000000000000000000604482015290519081900360640190fd5b6000611a8d84846124a5565b600654909150611acc908590839085906001600160a01b03167f000000000000000000000000000000000000000000000000000000000000000061253f565b50505050565b80600281518110611adf57fe5b602002602001015160011480611b1c57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316155b15611c1e577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636e1e3bbf8383600281518110611b5e57fe5b602002602001015184600081518110611b7357fe5b602002602001015185600181518110611b8857fe5b60200260200101516040518563ffffffff1660e01b815260040180856001600160a01b03166001600160a01b031681526020018481526020018381526020018281526020018060200182810382526000815260200160200195505050505050600060405180830381600087803b158015611c0157600080fd5b505af1158015611c15573d6000803e3d6000fd5b50505050611dbe565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636e1e3bbf7f000000000000000000000000000000000000000000000000000000000000000083600281518110611c7b57fe5b602002602001015184600081518110611c9057fe5b602002602001015185600181518110611ca557fe5b60200260200101518760405160200180826001600160a01b03166001600160a01b031681526020019150506040516020818303038152906040526040518663ffffffff1660e01b815260040180866001600160a01b03166001600160a01b0316815260200185815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611d55578181015183820152602001611d3d565b50505050905090810190601f168015611d825780820380516001836020036101000a031916815260200191505b509650505050505050600060405180830381600087803b158015611da557600080fd5b505af1158015611db9573d6000803e3d6000fd5b505050505b61019881600181518110611dce57fe5b60200260200101510281600081518110611de457fe5b602002602001015101826001600160a01b0316846001600160a01b03167fe4dfa6ac11314892f3029b34a25b1a887da3b1cab2bbf8506d87128ba6e3ac0284600281518110611e2f57fe5b602002602001015185600381518110611e4457fe5b60200260200101517f000000000000000000000000000000000000000000000000000000000000000087600381518110611e7a57fe5b602002602001015160405180858152602001848152602001836001600160a01b03166001600160a01b0316815260200182815260200194505050505060405180910390a4505050565b6060815167ffffffffffffffff81118015611edd57600080fd5b50604051908082528060200260200182016040528015611f07578160200160208202803683370190505b50905060005b8251811015611f37576001828281518110611f2457fe5b6020908102919091010152600101611f0d565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632eb2c2d6308585856040518563ffffffff1660e01b815260040180856001600160a01b03166001600160a01b03168152602001846001600160a01b03166001600160a01b03168152602001806020018060200180602001848103845286818151815260200191508051906020019060200280838360005b83811015611ff2578181015183820152602001611fda565b50505050905001848103835285818151815260200191508051906020019060200280838360005b83811015612031578181015183820152602001612019565b50505050905001848103825260008152602001602001975050505050505050600060405180830381600087803b15801561206a57600080fd5b505af115801561207e573d6000803e3d6000fd5b50505050505050565b6001600160a01b0382166120cc5760405162461bcd60e51b8152600401808060200182810382526025815260200180612b6b6025913960400191505060405180910390fd5b6001600160a01b03821660008181526002602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915582519384529083015280517fb21eb88b4e33b3f1281830a7178d74d8aa73220416215726b68ae23d539515cb9281900390910190a15050565b600081516041146121a6576040805162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015290519081900360640190fd5b60208201516040830151606084015160001a7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08211156122175760405162461bcd60e51b8152600401808060200182810382526022815260200180612ae36022913960400191505060405180910390fd5b8060ff16601b1415801561222f57508060ff16601c14155b1561226b5760405162461bcd60e51b8152600401808060200182810382526022815260200180612b286022913960400191505060405180910390fd5b60408051600080825260208083018085528a905260ff85168385015260608301879052608083018690529251909260019260a080820193601f1981019281900390910190855afa1580156122c3573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661232b576040805162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015290519081900360640190fd5b93505050505b92915050565b60008787878787878760405160200180888152602001878152602001868152602001858152602001846001600160a01b03166001600160a01b031660601b8152601401838152602001828051906020019060200280838360005b838110156123a9578181015183820152602001612391565b50505050905001975050505050505050604051602081830303815290604052805190602001209050979650505050505050565b600081815b845181101561247b5760008582815181106123f857fe5b60200260200101519050808310156124405782816040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209250612472565b808360405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092505b506001016123e1565b507f0000000000000000000000000000000000000000000000000000000000000000149392505050565b6000806124ca60646124be85600563ffffffff61264716565b9063ffffffff6126a716565b90506125276001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016857f00000000000000000000000000000000000000000000000000000000000000008463ffffffff6126e916565b612537838263ffffffff61277116565b949350505050565b8251819085901561262c57606060008060008061255b8a610d2e565b93985091965094509250905060006125768686868686611375565b15612604576125906125888d84612647565b6127106126a7565b9050886001600160a01b0316846001600160a01b0316866001600160a01b03167fac7a699eb95c3c6d390ec4626de17ef9a67b35891efdb197beba7c7fdd45fac48f858760405180848152602001838152602001828152602001935050505060405180910390a46126018782612771565b96505b8015612625576126256001600160a01b0389168e878463ffffffff6126e916565b5050505050505b61207e6001600160a01b03831688868463ffffffff6126e916565b60008261265657506000612331565b8282028284828161266357fe5b04146126a05760405162461bcd60e51b8152600401808060200182810382526021815260200180612b4a6021913960400191505060405180910390fd5b9392505050565b60006126a083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506127b3565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052611acc908590612855565b60006126a083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061290b565b6000818361283f5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156128045781810151838201526020016127ec565b50505050905090810190601f1680156128315780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161284b57fe5b0495945050505050565b60606128aa826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166129659092919063ffffffff16565b805190915015612906578080602001905160208110156128c957600080fd5b50516129065760405162461bcd60e51b815260040180806020018281038252602a815260200180612b90602a913960400191505060405180910390fd5b505050565b6000818484111561295d5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156128045781810151838201526020016127ec565b505050900390565b60606125378484600085606061297a85612adc565b6129cb576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310612a0a5780518252601f1990920191602091820191016129eb565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114612a6c576040519150601f19603f3d011682016040523d82523d6000602084013e612a71565b606091505b50915091508115612a855791506125379050565b805115612a955780518082602001fd5b60405162461bcd60e51b81526020600482018181528651602484015286518793919283926044019190850190808383600083156128045781810151838201526020016127ec565b3b15159056fe45434453413a20696e76616c6964207369676e6174757265202773272076616c7565526566657272616c56616c696461746f723a2053656e646572206e6f742061646d696e45434453413a20696e76616c6964207369676e6174757265202776272076616c7565536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774d6574615472616e73616374696f6e52656365697665723a207a65726f20616464726573735361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122077f2d13cbcb85fa08010a53c1e4ef27117b031e8c1c9273d55cef362af299f3164736f6c6343000605003345737461746553616c6557697468417574683a207a65726f20616464726573734d6574615472616e73616374696f6e52656365697665723a207a65726f206164647265737345737461746553616c6557697468417574683a206973206e6f74206120636f6e7472616374", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101365760003560e01c8063984d6252116100b2578063c10a420811610081578063dc5074af11610066578063dc5074af146108a0578063e56f8a9e146108c6578063f23a6e61146108e357610136565b8063c10a4208146107c1578063caed35001461089857610136565b8063984d62521461055f578063ab1cc78c14610631578063b522ecff14610639578063bc197c811461065f57610136565b806365194ce71161010957806378e6e5b9116100ee57806378e6e5b9146104e55780638a04af6a1461050b5780638f2839701461053957610136565b806365194ce7146103635780636e9960c3146104c157610136565b80631187fd3c1461013b57806325cb5bc01461031b578063495906571461033557806358bc29441461033d575b600080fd5b610319600480360361012081101561015257600080fd5b6001600160a01b038235811692602081013582169260408201359092169181019060808101606082013564010000000081111561018e57600080fd5b8201836020820111156101a057600080fd5b803590602001918460208302840111640100000000831117156101c257600080fd5b919390928235926040810190602001356401000000008111156101e457600080fd5b8201836020820111156101f657600080fd5b8035906020019184602083028401116401000000008311171561021857600080fd5b91939092909160208101903564010000000081111561023657600080fd5b82018360208201111561024857600080fd5b8035906020019184602083028401116401000000008311171561026a57600080fd5b91939092909160208101903564010000000081111561028857600080fd5b82018360208201111561029a57600080fd5b803590602001918460018302840111640100000000831117156102bc57600080fd5b9193909290916020810190356401000000008111156102da57600080fd5b8201836020820111156102ec57600080fd5b8035906020019184600183028401116401000000008311171561030e57600080fd5b509092509050610978565b005b610323610bba565b60408051918252519081900360200190f35b610323610bde565b6103196004803603602081101561035357600080fd5b50356001600160a01b0316610c02565b6104096004803603602081101561037957600080fd5b81019060208101813564010000000081111561039457600080fd5b8201836020820111156103a657600080fd5b803590602001918460018302840111640100000000831117156103c857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610d2e945050505050565b6040518080602001866001600160a01b03166001600160a01b03168152602001856001600160a01b03166001600160a01b03168152602001848152602001838152602001828103825287818151815260200191508051906020019080838360005b8381101561048257818101518382015260200161046a565b50505050905090810190601f1680156104af5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390f35b6104c9610e33565b604080516001600160a01b039092168252519081900360200190f35b610319600480360360208110156104fb57600080fd5b50356001600160a01b0316610e42565b6103196004803603604081101561052157600080fd5b506001600160a01b0381351690602001351515610f00565b6103196004803603602081101561054f57600080fd5b50356001600160a01b0316610f6d565b6103196004803603606081101561057557600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156105a057600080fd5b8201836020820111156105b257600080fd5b803590602001918460208302840111640100000000831117156105d457600080fd5b9193909290916020810190356401000000008111156105f257600080fd5b82018360208201111561060457600080fd5b8035906020019184602083028401116401000000008311171561062657600080fd5b5090925090506110a6565b610323611231565b6103196004803603602081101561064f57600080fd5b50356001600160a01b0316611237565b61078c600480360360a081101561067557600080fd5b6001600160a01b0382358116926020810135909116918101906060810160408201356401000000008111156106a957600080fd5b8201836020820111156106bb57600080fd5b803590602001918460208302840111640100000000831117156106dd57600080fd5b9193909290916020810190356401000000008111156106fb57600080fd5b82018360208201111561070d57600080fd5b8035906020019184602083028401116401000000008311171561072f57600080fd5b91939092909160208101903564010000000081111561074d57600080fd5b82018360208201111561075f57600080fd5b8035906020019184600183028401116401000000008311171561078157600080fd5b509092509050611348565b604080517fffffffff000000000000000000000000000000000000000000000000000000009092168252519081900360200190f35b610884600480360360a08110156107d757600080fd5b8101906020810181356401000000008111156107f257600080fd5b82018360208201111561080457600080fd5b8035906020019184600183028401116401000000008311171561082657600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550506001600160a01b038335811694506020840135169260408101359250606001359050611375565b604080519115158252519081900360200190f35b6104c96114b1565b610884600480360360208110156108b657600080fd5b50356001600160a01b03166114c0565b610319600480360360208110156108dc57600080fd5b50356114de565b61078c600480360360a08110156108f957600080fd5b6001600160a01b03823581169260208101359091169160408201359160608101359181019060a08101608082013564010000000081111561093957600080fd5b82018360208201111561094b57600080fd5b8035906020019184600183028401116401000000008311171561096d57600080fd5b509092509050611570565b600260005414156109d0576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026000556109df8e8d61159b565b610ad68d8d8d8d80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508c8c8c80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508b8b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020601f8d018190048102820181019092528b815292508b91508a90819084018382808284376000920191909152506116fe92505050565b610b2a8e8c8c6003818110610ae757fe5b9050602002013586868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611a8192505050565b610b688e8e8d8d80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611ad292505050565b610ba58d898980806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611ec392505050565b50506001600055505050505050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000090565b7f000000000000000000000000000000000000000000000000000000000000000090565b6001546001600160a01b03163314610c61576040805162461bcd60e51b815260206004820152601260248201527f6f6e6c792061646d696e20616c6c6f7765640000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116610cbc576040805162461bcd60e51b815260206004820152601f60248201527f526566657272616c56616c696461746f723a207a65726f206164647265737300604482015290519081900360640190fd5b600380546001600160a01b03908116600090815260056020526040808220620d2f0042019055835473ffffffffffffffffffffffffffffffffffffffff1916928516928317909355915190917fbbb5fb2ee7e707ae0c968f63e94211ea81e66a718c34e2f810a7619e5678a21791a250565b606060008060008060606000806000808a80602001905160a0811015610d5357600080fd5b8101908080516040519392919084640100000000821115610d7357600080fd5b908301906020820185811115610d8857600080fd5b8251640100000000811182820188101715610da257600080fd5b82525081516020918201929091019080838360005b83811015610dcf578181015183820152602001610db7565b50505050905090810190601f168015610dfc5780820380516001836020036101000a031916815260200191505b5060409081526020820151908201516060830151608090930151959f50909d509b5099509197505050505050505091939590929450565b6001546001600160a01b031690565b6001546001600160a01b03163314610e8b5760405162461bcd60e51b8152600401808060200182810382526023815260200180612b056023913960400191505060405180910390fd5b6001600160a01b038116610ee6576040805162461bcd60e51b815260206004820152601f60248201527f526566657272616c56616c696461746f723a207a65726f206164647265737300604482015290519081900360640190fd5b6001600160a01b0316600090815260056020526040812055565b6001546001600160a01b03163314610f5f576040805162461bcd60e51b815260206004820152601260248201527f6f6e6c792061646d696e20616c6c6f7765640000000000000000000000000000604482015290519081900360640190fd5b610f698282612087565b5050565b6001546001600160a01b03163314610fcc576040805162461bcd60e51b815260206004820152601b60248201527f6f6e6c792061646d696e2063616e206368616e67652061646d696e0000000000604482015290519081900360640190fd5b6001546001600160a01b038281169116141561102f576040805162461bcd60e51b815260206004820152600d60248201527f616c72656164792061646d696e00000000000000000000000000000000000000604482015290519081900360640190fd5b600154604080516001600160a01b039283168152918316602083015280517f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f9281900390910190a16001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6001546001600160a01b03163314611105576040805162461bcd60e51b815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632eb2c2d63087878787876040518763ffffffff1660e01b815260040180876001600160a01b03166001600160a01b03168152602001866001600160a01b03166001600160a01b031681526020018060200180602001806020018481038452888882818152602001925060200280828437600083820152601f01601f19169091018581038452868152602090810191508790870280828437600081840152601f19601f8201169050808301925050508481038252600081526020016020019950505050505050505050600060405180830381600087803b15801561121257600080fd5b505af1158015611226573d6000803e3d6000fd5b505050505050505050565b60045490565b6001600160a01b038116611292576040805162461bcd60e51b815260206004820152600c60248201527f5a45524f5f414444524553530000000000000000000000000000000000000000604482015290519081900360640190fd5b6001546001600160a01b031633146112f1576040805162461bcd60e51b815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b6006805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517f4d66958b757eb92a1b43d02be4c38c9500b73f532420ee3706cb43d420ba023690600090a250565b7fbc197c810000000000000000000000000000000000000000000000000000000098975050505050505050565b60006004548211806113985750836001600160a01b0316856001600160a01b0316145b806113a257508242115b156113af575060006114a8565b60408051606087811b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000009081166020808501919091529188901b166034830152604882018690526068808301869052835180840390910181526088830184528051908201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000060a884015260c48084018290528451808503909101815260e49093019093528151910120600090611466908961214e565b6001600160a01b0381166000908152600560205260409020549091504211611493576001925050506114a8565b6003546001600160a01b039081169116149150505b95945050505050565b6003546001600160a01b031690565b6001600160a01b031660009081526002602052604090205460ff1690565b6001546001600160a01b0316331461153d576040805162461bcd60e51b815260206004820152601260248201527f6f6e6c792061646d696e20616c6c6f7765640000000000000000000000000000604482015290519081900360640190fd5b600481905560405181907f774069781371d65424b3b0b101c1d40014532cac040f979595b99a3fcf8ce08c90600090a250565b7ff23a6e61000000000000000000000000000000000000000000000000000000009695505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000421061160f576040805162461bcd60e51b815260206004820152600c60248201527f53414c455f49535f4f5645520000000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b03821633148061163557503360009081526002602052604090205460ff165b611686576040805162461bcd60e51b815260206004820152600e60248201527f4e4f545f415554484f52495a4544000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b03811615806116ad5750816001600160a01b0316816001600160a01b0316145b610f69576040805162461bcd60e51b815260206004820152600d60248201527f52455345525645445f4c414e4400000000000000000000000000000000000000604482015290519081900360640190fd5b600087878760008151811061170f57fe5b60200260200101518860018151811061172457fe5b60200260200101518960028151811061173957fe5b60200260200101518a60038151811061174e57fe5b60200260200101518a8a60405160200180828051906020019060200280838360005b83811015611788578181015183820152602001611770565b50505050905001915050604051602081830303815290604052805190602001208a60405160200180828051906020019060200280838360005b838110156117d95781810151838201526020016117c1565b5050505090500191505060405160208183030381529060405280519060200120604051602001808a6001600160a01b03166001600160a01b031660601b8152601401896001600160a01b03166001600160a01b031660601b81526014018881526020018781526020018681526020018581526020018481526020018381526020018281526020019950505050505050505050604051602081830303815290604052805190602001209050600760009054906101000a90046001600160a01b03166001600160a01b031663012847ed83836040518363ffffffff1660e01b81526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b838110156118fb5781810151838201526020016118e3565b50505050905090810190601f1680156119285780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561194657600080fd5b505afa15801561195a573d6000803e3d6000fd5b505050506040513d602081101561197057600080fd5b50516119c3576040805162461bcd60e51b815260206004820152600c60248201527f494e56414c49445f415554480000000000000000000000000000000000000000604482015290519081900360640190fd5b6000611a24876000815181106119d557fe5b6020026020010151886001815181106119ea57fe5b6020026020010151896002815181106119ff57fe5b60200260200101518a600381518110611a1457fe5b60200260200101518c8b8b612337565b9050611a3084826123dc565b611226576040805162461bcd60e51b815260206004820152600c60248201527f494e56414c49445f4c414e440000000000000000000000000000000000000000604482015290519081900360640190fd5b6000611a8d84846124a5565b600654909150611acc908590839085906001600160a01b03167f000000000000000000000000000000000000000000000000000000000000000061253f565b50505050565b80600281518110611adf57fe5b602002602001015160011480611b1c57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316155b15611c1e577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636e1e3bbf8383600281518110611b5e57fe5b602002602001015184600081518110611b7357fe5b602002602001015185600181518110611b8857fe5b60200260200101516040518563ffffffff1660e01b815260040180856001600160a01b03166001600160a01b031681526020018481526020018381526020018281526020018060200182810382526000815260200160200195505050505050600060405180830381600087803b158015611c0157600080fd5b505af1158015611c15573d6000803e3d6000fd5b50505050611dbe565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636e1e3bbf7f000000000000000000000000000000000000000000000000000000000000000083600281518110611c7b57fe5b602002602001015184600081518110611c9057fe5b602002602001015185600181518110611ca557fe5b60200260200101518760405160200180826001600160a01b03166001600160a01b031681526020019150506040516020818303038152906040526040518663ffffffff1660e01b815260040180866001600160a01b03166001600160a01b0316815260200185815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611d55578181015183820152602001611d3d565b50505050905090810190601f168015611d825780820380516001836020036101000a031916815260200191505b509650505050505050600060405180830381600087803b158015611da557600080fd5b505af1158015611db9573d6000803e3d6000fd5b505050505b61019881600181518110611dce57fe5b60200260200101510281600081518110611de457fe5b602002602001015101826001600160a01b0316846001600160a01b03167fe4dfa6ac11314892f3029b34a25b1a887da3b1cab2bbf8506d87128ba6e3ac0284600281518110611e2f57fe5b602002602001015185600381518110611e4457fe5b60200260200101517f000000000000000000000000000000000000000000000000000000000000000087600381518110611e7a57fe5b602002602001015160405180858152602001848152602001836001600160a01b03166001600160a01b0316815260200182815260200194505050505060405180910390a4505050565b6060815167ffffffffffffffff81118015611edd57600080fd5b50604051908082528060200260200182016040528015611f07578160200160208202803683370190505b50905060005b8251811015611f37576001828281518110611f2457fe5b6020908102919091010152600101611f0d565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632eb2c2d6308585856040518563ffffffff1660e01b815260040180856001600160a01b03166001600160a01b03168152602001846001600160a01b03166001600160a01b03168152602001806020018060200180602001848103845286818151815260200191508051906020019060200280838360005b83811015611ff2578181015183820152602001611fda565b50505050905001848103835285818151815260200191508051906020019060200280838360005b83811015612031578181015183820152602001612019565b50505050905001848103825260008152602001602001975050505050505050600060405180830381600087803b15801561206a57600080fd5b505af115801561207e573d6000803e3d6000fd5b50505050505050565b6001600160a01b0382166120cc5760405162461bcd60e51b8152600401808060200182810382526025815260200180612b6b6025913960400191505060405180910390fd5b6001600160a01b03821660008181526002602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915582519384529083015280517fb21eb88b4e33b3f1281830a7178d74d8aa73220416215726b68ae23d539515cb9281900390910190a15050565b600081516041146121a6576040805162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015290519081900360640190fd5b60208201516040830151606084015160001a7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08211156122175760405162461bcd60e51b8152600401808060200182810382526022815260200180612ae36022913960400191505060405180910390fd5b8060ff16601b1415801561222f57508060ff16601c14155b1561226b5760405162461bcd60e51b8152600401808060200182810382526022815260200180612b286022913960400191505060405180910390fd5b60408051600080825260208083018085528a905260ff85168385015260608301879052608083018690529251909260019260a080820193601f1981019281900390910190855afa1580156122c3573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661232b576040805162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015290519081900360640190fd5b93505050505b92915050565b60008787878787878760405160200180888152602001878152602001868152602001858152602001846001600160a01b03166001600160a01b031660601b8152601401838152602001828051906020019060200280838360005b838110156123a9578181015183820152602001612391565b50505050905001975050505050505050604051602081830303815290604052805190602001209050979650505050505050565b600081815b845181101561247b5760008582815181106123f857fe5b60200260200101519050808310156124405782816040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209250612472565b808360405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092505b506001016123e1565b507f0000000000000000000000000000000000000000000000000000000000000000149392505050565b6000806124ca60646124be85600563ffffffff61264716565b9063ffffffff6126a716565b90506125276001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016857f00000000000000000000000000000000000000000000000000000000000000008463ffffffff6126e916565b612537838263ffffffff61277116565b949350505050565b8251819085901561262c57606060008060008061255b8a610d2e565b93985091965094509250905060006125768686868686611375565b15612604576125906125888d84612647565b6127106126a7565b9050886001600160a01b0316846001600160a01b0316866001600160a01b03167fac7a699eb95c3c6d390ec4626de17ef9a67b35891efdb197beba7c7fdd45fac48f858760405180848152602001838152602001828152602001935050505060405180910390a46126018782612771565b96505b8015612625576126256001600160a01b0389168e878463ffffffff6126e916565b5050505050505b61207e6001600160a01b03831688868463ffffffff6126e916565b60008261265657506000612331565b8282028284828161266357fe5b04146126a05760405162461bcd60e51b8152600401808060200182810382526021815260200180612b4a6021913960400191505060405180910390fd5b9392505050565b60006126a083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506127b3565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052611acc908590612855565b60006126a083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061290b565b6000818361283f5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156128045781810151838201526020016127ec565b50505050905090810190601f1680156128315780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161284b57fe5b0495945050505050565b60606128aa826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166129659092919063ffffffff16565b805190915015612906578080602001905160208110156128c957600080fd5b50516129065760405162461bcd60e51b815260040180806020018281038252602a815260200180612b90602a913960400191505060405180910390fd5b505050565b6000818484111561295d5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156128045781810151838201526020016127ec565b505050900390565b60606125378484600085606061297a85612adc565b6129cb576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310612a0a5780518252601f1990920191602091820191016129eb565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114612a6c576040519150601f19603f3d011682016040523d82523d6000602084013e612a71565b606091505b50915091508115612a855791506125379050565b805115612a955780518082602001fd5b60405162461bcd60e51b81526020600482018181528651602484015286518793919283926044019190850190808383600083156128045781810151838201526020016127ec565b3b15159056fe45434453413a20696e76616c6964207369676e6174757265202773272076616c7565526566657272616c56616c696461746f723a2053656e646572206e6f742061646d696e45434453413a20696e76616c6964207369676e6174757265202776272076616c7565536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774d6574615472616e73616374696f6e52656365697665723a207a65726f20616464726573735361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122077f2d13cbcb85fa08010a53c1e4ef27117b031e8c1c9273d55cef362af299f3164736f6c63430006050033", + "devdoc": { + "methods": { + "buyLandWithSand(address,address,address,uint256[],bytes32,uint256[],bytes32[],bytes,bytes)": { + "params": { + "assetIds": "asset ids (lands) that will be bought", + "buyer": "address that perform the payment", + "info": "[X_INDEX=0] x coordinate of the Land [Y_INDEX=1] y coordinate of the Land [SIZE_INDEX=2] size of the pack of Land to purchase [PRICE_INDEX=3] price in SAND to purchase that Land", + "proof": "merkleProof for that particular Land", + "referral": "referral id", + "reserved": "the reserved address (if any)", + "salt": "The salt submitted for verification.", + "signature": "A signed message specifying tx details", + "to": "address that will own the purchased Land" + } + }, + "changeAdmin(address)": { + "details": "change the administrator to be `newAdmin`.", + "params": { + "newAdmin": "address of the new administrator." + } + }, + "disablePreviousSigningWallet(address)": { + "details": "Disable compromised signing wallet", + "params": { + "disableWallet": "The wallet address to be disabled" + } + }, + "getAdmin()": { + "details": "gives the current administrator of this contract.", + "returns": { + "_0": "the current administrator of this contract." + } + }, + "getSigningWallet()": { + "details": "signing wallet authorized for referral", + "returns": { + "_0": "the address of the signing wallet" + } + }, + "isMetaTransactionProcessor(address)": { + "details": "check whether address `who` is given meta-transaction execution rights.", + "params": { + "who": "The address to query." + }, + "returns": { + "_0": "whether the address has meta-transaction execution rights." + } + }, + "isReferralValid(bytes,address,address,uint256,uint256)": { + "params": { + "commissionRate": "The commissionRate of the referral", + "expiryTime": "The expiry time of the referral", + "referee": "The address of the referee", + "referrer": "The address of the referrer", + "signature": "The signature to check (signed referral)" + }, + "returns": { + "_0": "True if the referral is valid" + } + }, + "setMetaTransactionProcessor(address,bool)": { + "details": "Enable or disable the ability of `metaTransactionProcessor` to perform meta-tx (metaTransactionProcessor rights).", + "params": { + "enabled": "set whether the metaTransactionProcessor is enabled or disabled.", + "metaTransactionProcessor": "address that will be given/removed metaTransactionProcessor rights." + } + }, + "setReceivingWallet(address)": { + "params": { + "newWallet": "address of the new receiving wallet" + } + }, + "updateMaxCommissionRate(uint256)": { + "details": "Update the maximum commission rate", + "params": { + "newMaxCommissionRate": "The new maximum commission rate" + } + }, + "updateSigningWallet(address)": { + "details": "Update the signing wallet The previous wallet is still valid for a grace period (_previousSigningDelay). If you want to disable the previous wallet, use the disablePreviousSigningWallet function.", + "params": { + "newSigningWallet": "The new address of the signing wallet" + } + }, + "withdrawAssets(address,uint256[],uint256[])": { + "params": { + "assetIds": "the assetIds to be transferred", + "to": "intended recipient of the asset tokens", + "values": "the quantities of the assetIds to be transferred" + } + } + }, + "title": "Estate Sale contract with referral" + }, + "userdoc": { + "methods": { + "buyLandWithSand(address,address,address,uint256[],bytes32,uint256[],bytes32[],bytes,bytes)": { + "notice": "buy Land with SAND using the merkle proof associated with it" + }, + "getExpiryTime()": { + "notice": "Gets the expiry time for the current sale" + }, + "getMaxCommissionRate()": { + "notice": "the max commission rate" + }, + "getMerkleRoot()": { + "notice": "Gets the Merkle root associated with the current sale" + }, + "isReferralValid(bytes,address,address,uint256,uint256)": { + "notice": "Check if a referral is valid" + }, + "setReceivingWallet(address)": { + "notice": "set the wallet receiving the proceeds" + }, + "withdrawAssets(address,uint256[],uint256[])": { + "notice": "enable Admin to withdraw remaining assets from EstateSaleWithFee contract" + } + }, + "notice": "This contract manages the sale of our lands as Estates" + }, + "storageLayout": { + "storage": [ + { + "astId": 1129, + "contract": "src/solc_0.6/EstateSale/EstateSaleWithAuth.sol:EstateSaleWithAuth", + "label": "_status", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 14099, + "contract": "src/solc_0.6/EstateSale/EstateSaleWithAuth.sol:EstateSaleWithAuth", + "label": "_admin", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 14168, + "contract": "src/solc_0.6/EstateSale/EstateSaleWithAuth.sol:EstateSaleWithAuth", + "label": "_metaTransactionContracts", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 12200, + "contract": "src/solc_0.6/EstateSale/EstateSaleWithAuth.sol:EstateSaleWithAuth", + "label": "_signingWallet", + "offset": 0, + "slot": "3", + "type": "t_address" + }, + { + "astId": 12202, + "contract": "src/solc_0.6/EstateSale/EstateSaleWithAuth.sol:EstateSaleWithAuth", + "label": "_maxCommissionRate", + "offset": 0, + "slot": "4", + "type": "t_uint256" + }, + { + "astId": 12206, + "contract": "src/solc_0.6/EstateSale/EstateSaleWithAuth.sol:EstateSaleWithAuth", + "label": "_previousSigningWallets", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 7750, + "contract": "src/solc_0.6/EstateSale/EstateSaleWithAuth.sol:EstateSaleWithAuth", + "label": "_wallet", + "offset": 0, + "slot": "6", + "type": "t_address_payable" + }, + { + "astId": 7752, + "contract": "src/solc_0.6/EstateSale/EstateSaleWithAuth.sol:EstateSaleWithAuth", + "label": "_authValidator", + "offset": 0, + "slot": "7", + "type": "t_contract(AuthValidator)7063" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_address_payable": { + "encoding": "inplace", + "label": "address payable", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(AuthValidator)7063": { + "encoding": "inplace", + "label": "contract AuthValidator", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/packages/core/deployments/polygon/solcInputs/b42a863a795806b4ea3a8f05dfa42539.json b/packages/core/deployments/polygon/solcInputs/b42a863a795806b4ea3a8f05dfa42539.json new file mode 100644 index 0000000000..0a47805ce8 --- /dev/null +++ b/packages/core/deployments/polygon/solcInputs/b42a863a795806b4ea3a8f05dfa42539.json @@ -0,0 +1,251 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts-0.6/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.6.0;\n\nimport \"../GSN/Context.sol\";\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\ncontract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor () internal {\n address msgSender = _msgSender();\n _owner = msgSender;\n emit OwnershipTransferred(address(0), msgSender);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(_owner == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = address(0);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n" + }, + "@openzeppelin/contracts-0.6/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.6.0;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n // Check the signature length\n if (signature.length != 65) {\n revert(\"ECDSA: invalid signature length\");\n }\n\n // Divide the signature in r, s and v variables\n bytes32 r;\n bytes32 s;\n uint8 v;\n\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n // solhint-disable-next-line no-inline-assembly\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (281): 0 < s < secp256k1n ÷ 2 + 1, and for v in (282): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n revert(\"ECDSA: invalid signature 's' value\");\n }\n\n if (v != 27 && v != 28) {\n revert(\"ECDSA: invalid signature 'v' value\");\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n require(signer != address(0), \"ECDSA: invalid signature\");\n\n return signer;\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n * replicates the behavior of the\n * https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign[`eth_sign`]\n * JSON-RPC method.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash));\n }\n}\n" + }, + "@openzeppelin/contracts-0.6/GSN/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.6.0;\n\n/*\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with GSN meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n" + }, + "@openzeppelin/contracts-0.6/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.6.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts-0.6/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.6.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a >= b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow, so we distribute\n return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);\n }\n}\n" + }, + "@openzeppelin/contracts-0.6/math/SafeMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.6.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n *\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n *\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n *\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n *\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n" + }, + "@openzeppelin/contracts-0.6/token/ERC1155/IERC1155.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.6.2;\n\nimport \"../../introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155 is IERC165 {\n /**\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\n */\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\n\n /**\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\n * transfers.\n */\n event TransferBatch(address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values);\n\n /**\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\n * `approved`.\n */\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\n\n /**\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\n *\n * If an {URI} event was emitted for `id`, the standard\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\n * returned by {IERC1155MetadataURI-uri}.\n */\n event URI(string value, uint256 indexed id);\n\n /**\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function balanceOf(address account, uint256 id) external view returns (uint256);\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\n *\n * Requirements:\n *\n * - `accounts` and `ids` must have the same length.\n */\n function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory);\n\n /**\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\n *\n * Emits an {ApprovalForAll} event.\n *\n * Requirements:\n *\n * - `operator` cannot be the caller.\n */\n function setApprovalForAll(address operator, bool approved) external;\n\n /**\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\n *\n * See {setApprovalForAll}.\n */\n function isApprovedForAll(address account, address operator) external view returns (bool);\n\n /**\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\n *\n * Emits a {TransferSingle} event.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n * acceptance magic value.\n */\n function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\n *\n * Emits a {TransferBatch} event.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the same length.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n * acceptance magic value.\n */\n function safeBatchTransferFrom(address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data) external;\n}\n" + }, + "@openzeppelin/contracts-0.6/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.6.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n" + }, + "@openzeppelin/contracts-0.6/token/ERC20/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.6.0;\n\nimport \"./IERC20.sol\";\nimport \"../../math/SafeMath.sol\";\nimport \"../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n // solhint-disable-next-line max-line-length\n require((value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \"SafeERC20: decreased allowance below zero\");\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n if (returndata.length > 0) { // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n" + }, + "@openzeppelin/contracts-0.6/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.6.2;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies in extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n // solhint-disable-next-line no-inline-assembly\n assembly { size := extcodesize(account) }\n return size > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\n (bool success, ) = recipient.call{ value: amount }(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain`call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\n return _functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n return _functionCallWithValue(target, data, value, errorMessage);\n }\n\n function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {\n require(isContract(target), \"Address: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n}\n" + }, + "@openzeppelin/contracts-0.6/utils/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.6.0;\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\ncontract ReentrancyGuard {\n // Booleans are more expensive than uint256 or any type that takes up a full\n // word because each write operation emits an extra SLOAD to first read the\n // slot's contents, replace the bits taken up by the boolean, and then write\n // back. This is the compiler's defense against contract upgrades and\n // pointer aliasing, and it cannot be disabled.\n\n // The values being non-zero value makes deployment a bit more expensive,\n // but in exchange the refund on every call to nonReentrant will be lower in\n // amount. Since refunds are capped to a percentage of the total\n // transaction's gas, it is best to keep them low in cases like this one, to\n // increase the likelihood of the full refund coming into effect.\n uint256 private constant _NOT_ENTERED = 1;\n uint256 private constant _ENTERED = 2;\n\n uint256 private _status;\n\n constructor () internal {\n _status = _NOT_ENTERED;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n * Calling a `nonReentrant` function from another `nonReentrant`\n * function is not supported. It is possible to prevent this from happening\n * by making the `nonReentrant` function external, and make it call a\n * `private` function that does the actual work.\n */\n modifier nonReentrant() {\n // On the first call to nonReentrant, _notEntered will be true\n require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n // Any calls to nonReentrant after this point will fail\n _status = _ENTERED;\n\n _;\n\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = _NOT_ENTERED;\n }\n}\n" + }, + "src/solc_0.6/Base/TheSandbox712.sol": { + "content": "pragma solidity 0.6.5;\n\n\ncontract TheSandbox712 {\n bytes32 constant EIP712DOMAIN_TYPEHASH = keccak256(\"EIP712Domain(string name,string version,address verifyingContract)\");\n bytes32 public immutable DOMAIN_SEPARATOR;\n\n constructor() public {\n DOMAIN_SEPARATOR = keccak256(abi.encode(EIP712DOMAIN_TYPEHASH, keccak256(\"The Sandbox\"), keccak256(\"1\"), address(this)));\n }\n}\n" + }, + "src/solc_0.6/BaseWithStorage/ERC20Group.sol": { + "content": "pragma solidity 0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"./ERC20SubToken.sol\";\nimport \"../common/Libraries/SafeMath.sol\";\nimport \"../common/Libraries/AddressUtils.sol\";\nimport \"../common/Libraries/ObjectLib32.sol\";\nimport \"../common/Libraries/BytesUtil.sol\";\n\nimport \"../common/BaseWithStorage/SuperOperators.sol\";\nimport \"../common/BaseWithStorage/MetaTransactionReceiver.sol\";\n\n\ncontract ERC20Group is SuperOperators, MetaTransactionReceiver {\n uint256 internal constant MAX_UINT256 = ~uint256(0);\n\n /// @notice emitted when a new Token is added to the group.\n /// @param subToken the token added, its id will be its index in the array.\n event SubToken(ERC20SubToken subToken);\n\n /// @notice emitted when `owner` is allowing or disallowing `operator` to transfer tokens on its behalf.\n /// @param owner the address approving.\n /// @param operator the address being granted (or revoked) permission to transfer.\n /// @param approved whether the operator is granted transfer right or not.\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n event Minter(address minter, bool enabled);\n\n /// @notice Enable or disable the ability of `minter` to mint tokens\n /// @param minter address that will be given/removed minter right.\n /// @param enabled set whether the minter is enabled or disabled.\n function setMinter(address minter, bool enabled) external {\n require(msg.sender == _admin, \"NOT_AUTHORIZED_ADMIN\");\n _setMinter(minter, enabled);\n }\n\n /// @notice check whether address `who` is given minter rights.\n /// @param who The address to query.\n /// @return whether the address has minter rights.\n function isMinter(address who) public view returns (bool) {\n return _minters[who];\n }\n\n /// @dev mint more tokens of a specific subToken .\n /// @param to address receiving the tokens.\n /// @param id subToken id (also the index at which it was added).\n /// @param amount of token minted.\n function mint(\n address to,\n uint256 id,\n uint256 amount\n ) external {\n require(_minters[msg.sender], \"NOT_AUTHORIZED_MINTER\");\n (uint256 bin, uint256 index) = id.getTokenBinIndex();\n mapping(uint256 => uint256) storage toPack = _packedTokenBalance[to];\n toPack[bin] = toPack[bin].updateTokenBalance(index, amount, ObjectLib32.Operations.ADD);\n _packedSupplies[bin] = _packedSupplies[bin].updateTokenBalance(index, amount, ObjectLib32.Operations.ADD);\n _erc20s[id].emitTransferEvent(address(0), to, amount);\n }\n\n /// @dev mint more tokens of a several subToken .\n /// @param to address receiving the tokens.\n /// @param ids subToken ids (also the index at which it was added).\n /// @param amounts for each token minted.\n function batchMint(\n address to,\n uint256[] calldata ids,\n uint256[] calldata amounts\n ) external {\n require(_minters[msg.sender], \"NOT_AUTHORIZED_MINTER\");\n require(ids.length == amounts.length, \"INVALID_INCONSISTENT_LENGTH\");\n _batchMint(to, ids, amounts);\n }\n\n function _batchMint(\n address to,\n uint256[] memory ids,\n uint256[] memory amounts\n ) internal {\n uint256 lastBin = MAX_UINT256;\n uint256 bal = 0;\n uint256 supply = 0;\n mapping(uint256 => uint256) storage toPack = _packedTokenBalance[to];\n for (uint256 i = 0; i < ids.length; i++) {\n if (amounts[i] != 0) {\n (uint256 bin, uint256 index) = ids[i].getTokenBinIndex();\n if (lastBin == MAX_UINT256) {\n lastBin = bin;\n bal = toPack[bin].updateTokenBalance(index, amounts[i], ObjectLib32.Operations.ADD);\n supply = _packedSupplies[bin].updateTokenBalance(index, amounts[i], ObjectLib32.Operations.ADD);\n } else {\n if (bin != lastBin) {\n toPack[lastBin] = bal;\n bal = toPack[bin];\n _packedSupplies[lastBin] = supply;\n supply = _packedSupplies[bin];\n lastBin = bin;\n }\n bal = bal.updateTokenBalance(index, amounts[i], ObjectLib32.Operations.ADD);\n supply = supply.updateTokenBalance(index, amounts[i], ObjectLib32.Operations.ADD);\n }\n _erc20s[ids[i]].emitTransferEvent(address(0), to, amounts[i]);\n }\n }\n if (lastBin != MAX_UINT256) {\n toPack[lastBin] = bal;\n _packedSupplies[lastBin] = supply;\n }\n }\n\n /// @notice return the current total supply of a specific subToken.\n /// @param id subToken id.\n /// @return supply current total number of tokens.\n function supplyOf(uint256 id) external view returns (uint256 supply) {\n (uint256 bin, uint256 index) = id.getTokenBinIndex();\n return _packedSupplies[bin].getValueInBin(index);\n }\n\n /// @notice return the balance of a particular owner for a particular subToken.\n /// @param owner whose balance it is of.\n /// @param id subToken id.\n /// @return balance of the owner\n function balanceOf(address owner, uint256 id) public view returns (uint256 balance) {\n (uint256 bin, uint256 index) = id.getTokenBinIndex();\n return _packedTokenBalance[owner][bin].getValueInBin(index);\n }\n\n /// @notice return the balances of a list of owners / subTokens.\n /// @param owners list of addresses to which we want to know the balance.\n /// @param ids list of subTokens's addresses.\n /// @return balances list of balances for each request.\n function balanceOfBatch(address[] calldata owners, uint256[] calldata ids) external view returns (uint256[] memory balances) {\n require(owners.length == ids.length, \"INVALID_INCONSISTENT_LENGTH\");\n balances = new uint256[](ids.length);\n for (uint256 i = 0; i < ids.length; i++) {\n balances[i] = balanceOf(owners[i], ids[i]);\n }\n }\n\n /// @notice transfer a number of subToken from one address to another.\n /// @param from owner to transfer from.\n /// @param to destination address that will receive the tokens.\n /// @param id subToken id.\n /// @param value amount of tokens to transfer.\n function singleTransferFrom(\n address from,\n address to,\n uint256 id,\n uint256 value\n ) external {\n require(to != address(0), \"INVALID_TO_ZERO_ADDRESS\");\n ERC20SubToken erc20 = _erc20s[id];\n require(\n from == msg.sender ||\n msg.sender == address(erc20) ||\n _metaTransactionContracts[msg.sender] ||\n _superOperators[msg.sender] ||\n _operatorsForAll[from][msg.sender],\n \"NOT_AUTHORIZED\"\n );\n\n (uint256 bin, uint256 index) = id.getTokenBinIndex();\n mapping(uint256 => uint256) storage fromPack = _packedTokenBalance[from];\n mapping(uint256 => uint256) storage toPack = _packedTokenBalance[to];\n fromPack[bin] = fromPack[bin].updateTokenBalance(index, value, ObjectLib32.Operations.SUB);\n toPack[bin] = toPack[bin].updateTokenBalance(index, value, ObjectLib32.Operations.ADD);\n erc20.emitTransferEvent(from, to, value);\n }\n\n /// @notice transfer a number of different subTokens from one address to another.\n /// @param from owner to transfer from.\n /// @param to destination address that will receive the tokens.\n /// @param ids list of subToken ids to transfer.\n /// @param values list of amount for eacg subTokens to transfer.\n function batchTransferFrom(\n address from,\n address to,\n uint256[] calldata ids,\n uint256[] calldata values\n ) external {\n require(ids.length == values.length, \"INVALID_INCONSISTENT_LENGTH\");\n require(to != address(0), \"INVALID_TO_ZERO_ADDRESS\");\n require(\n from == msg.sender || _superOperators[msg.sender] || _operatorsForAll[from][msg.sender] || _metaTransactionContracts[msg.sender],\n \"NOT_AUTHORIZED\"\n );\n _batchTransferFrom(from, to, ids, values);\n }\n\n function _batchTransferFrom(\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory values\n ) internal {\n uint256 lastBin = MAX_UINT256;\n uint256 balFrom;\n uint256 balTo;\n mapping(uint256 => uint256) storage fromPack = _packedTokenBalance[from];\n mapping(uint256 => uint256) storage toPack = _packedTokenBalance[to];\n for (uint256 i = 0; i < ids.length; i++) {\n if (values[i] != 0) {\n (uint256 bin, uint256 index) = ids[i].getTokenBinIndex();\n if (lastBin == MAX_UINT256) {\n lastBin = bin;\n balFrom = ObjectLib32.updateTokenBalance(fromPack[bin], index, values[i], ObjectLib32.Operations.SUB);\n balTo = ObjectLib32.updateTokenBalance(toPack[bin], index, values[i], ObjectLib32.Operations.ADD);\n } else {\n if (bin != lastBin) {\n fromPack[lastBin] = balFrom;\n toPack[lastBin] = balTo;\n balFrom = fromPack[bin];\n balTo = toPack[bin];\n lastBin = bin;\n }\n balFrom = balFrom.updateTokenBalance(index, values[i], ObjectLib32.Operations.SUB);\n balTo = balTo.updateTokenBalance(index, values[i], ObjectLib32.Operations.ADD);\n }\n ERC20SubToken erc20 = _erc20s[ids[i]];\n erc20.emitTransferEvent(from, to, values[i]);\n }\n }\n if (lastBin != MAX_UINT256) {\n fromPack[lastBin] = balFrom;\n toPack[lastBin] = balTo;\n }\n }\n\n /// @notice grant or revoke the ability for an address to transfer token on behalf of another address.\n /// @param sender address granting/revoking the approval.\n /// @param operator address being granted/revoked ability to transfer.\n /// @param approved whether the operator is revoked or approved.\n function setApprovalForAllFor(\n address sender,\n address operator,\n bool approved\n ) external {\n require(msg.sender == sender || _metaTransactionContracts[msg.sender] || _superOperators[msg.sender], \"NOT_AUTHORIZED\");\n _setApprovalForAll(sender, operator, approved);\n }\n\n /// @notice grant or revoke the ability for an address to transfer token on your behalf.\n /// @param operator address being granted/revoked ability to transfer.\n /// @param approved whether the operator is revoked or approved.\n function setApprovalForAll(address operator, bool approved) external {\n _setApprovalForAll(msg.sender, operator, approved);\n }\n\n /// @notice return whether an oeprator has the ability to transfer on behalf of another address.\n /// @param owner address who would have granted the rights.\n /// @param operator address being given the ability to transfer.\n /// @return isOperator whether the operator has approval rigths or not.\n function isApprovedForAll(address owner, address operator) external view returns (bool isOperator) {\n return _operatorsForAll[owner][operator] || _superOperators[operator];\n }\n\n function isAuthorizedToTransfer(address owner, address sender) external view returns (bool) {\n return _metaTransactionContracts[sender] || _superOperators[sender] || _operatorsForAll[owner][sender];\n }\n\n function isAuthorizedToApprove(address sender) external view returns (bool) {\n return _metaTransactionContracts[sender] || _superOperators[sender];\n }\n\n function batchBurnFrom(\n address from,\n uint256[] calldata ids,\n uint256[] calldata amounts\n ) external {\n require(from != address(0), \"INVALID_FROM_ZERO_ADDRESS\");\n require(\n from == msg.sender || _metaTransactionContracts[msg.sender] || _superOperators[msg.sender] || _operatorsForAll[from][msg.sender],\n \"NOT_AUTHORIZED\"\n );\n\n _batchBurnFrom(from, ids, amounts);\n }\n\n /// @notice burn token for a specific owner and subToken.\n /// @param from fron which address the token are burned from.\n /// @param id subToken id.\n /// @param value amount of tokens to burn.\n function burnFrom(\n address from,\n uint256 id,\n uint256 value\n ) external {\n require(\n from == msg.sender || _superOperators[msg.sender] || _operatorsForAll[from][msg.sender] || _metaTransactionContracts[msg.sender],\n \"NOT_AUTHORIZED\"\n );\n _burn(from, id, value);\n }\n\n /// @notice burn token for a specific subToken.\n /// @param id subToken id.\n /// @param value amount of tokens to burn.\n function burn(uint256 id, uint256 value) external {\n _burn(msg.sender, id, value);\n }\n\n // ///////////////// INTERNAL //////////////////////////\n\n function _batchBurnFrom(\n address from,\n uint256[] memory ids,\n uint256[] memory amounts\n ) internal {\n uint256 balFrom = 0;\n uint256 supply = 0;\n uint256 lastBin = MAX_UINT256;\n mapping(uint256 => uint256) storage fromPack = _packedTokenBalance[from];\n for (uint256 i = 0; i < ids.length; i++) {\n if (amounts[i] != 0) {\n (uint256 bin, uint256 index) = ids[i].getTokenBinIndex();\n if (lastBin == MAX_UINT256) {\n lastBin = bin;\n balFrom = fromPack[bin].updateTokenBalance(index, amounts[i], ObjectLib32.Operations.SUB);\n supply = _packedSupplies[bin].updateTokenBalance(index, amounts[i], ObjectLib32.Operations.SUB);\n } else {\n if (bin != lastBin) {\n fromPack[lastBin] = balFrom;\n balFrom = fromPack[bin];\n _packedSupplies[lastBin] = supply;\n supply = _packedSupplies[bin];\n lastBin = bin;\n }\n\n balFrom = balFrom.updateTokenBalance(index, amounts[i], ObjectLib32.Operations.SUB);\n supply = supply.updateTokenBalance(index, amounts[i], ObjectLib32.Operations.SUB);\n }\n _erc20s[ids[i]].emitTransferEvent(from, address(0), amounts[i]);\n }\n }\n if (lastBin != MAX_UINT256) {\n fromPack[lastBin] = balFrom;\n _packedSupplies[lastBin] = supply;\n }\n }\n\n function _burn(\n address from,\n uint256 id,\n uint256 value\n ) internal {\n ERC20SubToken erc20 = _erc20s[id];\n (uint256 bin, uint256 index) = id.getTokenBinIndex();\n mapping(uint256 => uint256) storage fromPack = _packedTokenBalance[from];\n fromPack[bin] = ObjectLib32.updateTokenBalance(fromPack[bin], index, value, ObjectLib32.Operations.SUB);\n _packedSupplies[bin] = ObjectLib32.updateTokenBalance(_packedSupplies[bin], index, value, ObjectLib32.Operations.SUB);\n erc20.emitTransferEvent(from, address(0), value);\n }\n\n function _addSubToken(ERC20SubToken subToken) internal returns (uint256 id) {\n id = _erc20s.length;\n require(subToken.groupAddress() == address(this), \"INVALID_GROUP\");\n require(subToken.groupTokenId() == id, \"INVALID_ID\");\n _erc20s.push(subToken);\n emit SubToken(subToken);\n }\n\n function _setApprovalForAll(\n address sender,\n address operator,\n bool approved\n ) internal {\n require(!_superOperators[operator], \"INVALID_SUPER_OPERATOR\");\n _operatorsForAll[sender][operator] = approved;\n emit ApprovalForAll(sender, operator, approved);\n }\n\n function _setMinter(address minter, bool enabled) internal {\n _minters[minter] = enabled;\n emit Minter(minter, enabled);\n }\n\n // ///////////////// UTILITIES /////////////////////////\n using AddressUtils for address;\n using ObjectLib32 for ObjectLib32.Operations;\n using ObjectLib32 for uint256;\n using SafeMath for uint256;\n\n // ////////////////// DATA ///////////////////////////////\n mapping(uint256 => uint256) internal _packedSupplies;\n mapping(address => mapping(uint256 => uint256)) internal _packedTokenBalance;\n mapping(address => mapping(address => bool)) internal _operatorsForAll;\n ERC20SubToken[] internal _erc20s;\n mapping(address => bool) internal _minters;\n\n // ////////////// CONSTRUCTOR ////////////////////////////\n\n struct SubTokenData {\n string name;\n string symbol;\n }\n\n constructor(\n address metaTransactionContract,\n address admin,\n address initialMinter\n ) internal {\n _admin = admin;\n _setMetaTransactionProcessor(metaTransactionContract, true);\n _setMinter(initialMinter, true);\n }\n}\n" + }, + "src/solc_0.6/BaseWithStorage/ERC20SubToken.sol": { + "content": "pragma solidity 0.6.5;\n\nimport \"../common/Libraries/SafeMathWithRequire.sol\";\nimport \"../common/BaseWithStorage/SuperOperators.sol\";\nimport \"../common/BaseWithStorage/MetaTransactionReceiver.sol\";\n\nimport \"./ERC20Group.sol\";\n\n\ncontract ERC20SubToken {\n // TODO add natspec, currently blocked by solidity compiler issue\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n // TODO add natspec, currently blocked by solidity compiler issue\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /// @notice A descriptive name for the tokens\n /// @return name of the tokens\n function name() public view returns (string memory) {\n return _name;\n }\n\n /// @notice An abbreviated name for the tokens\n /// @return symbol of the tokens\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n /// @notice the tokenId in ERC20Group\n /// @return the tokenId in ERC20Group\n function groupTokenId() external view returns (uint256) {\n return _index;\n }\n\n /// @notice the ERC20Group address\n /// @return the address of the group\n function groupAddress() external view returns (address) {\n return address(_group);\n }\n\n function totalSupply() external view returns (uint256) {\n return _group.supplyOf(_index);\n }\n\n function balanceOf(address who) external view returns (uint256) {\n return _group.balanceOf(who, _index);\n }\n\n function decimals() external pure returns (uint8) {\n return uint8(0);\n }\n\n function transfer(address to, uint256 amount) external returns (bool success) {\n _transfer(msg.sender, to, amount);\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) external returns (bool success) {\n if (msg.sender != from && !_group.isAuthorizedToTransfer(from, msg.sender)) {\n uint256 allowance = _mAllowed[from][msg.sender];\n if (allowance != ~uint256(0)) {\n // save gas when allowance is maximal by not reducing it (see https://github.com/ethereum/EIPs/issues/717)\n require(allowance >= amount, \"NOT_AUTHOIZED_ALLOWANCE\");\n _mAllowed[from][msg.sender] = allowance - amount;\n }\n }\n _transfer(from, to, amount);\n return true;\n }\n\n function approve(address spender, uint256 amount) external returns (bool success) {\n _approveFor(msg.sender, spender, amount);\n return true;\n }\n\n function approveFor(\n address from,\n address spender,\n uint256 amount\n ) external returns (bool success) {\n require(msg.sender == from || _group.isAuthorizedToApprove(msg.sender), \"NOT_AUTHORIZED\");\n _approveFor(from, spender, amount);\n return true;\n }\n\n function emitTransferEvent(\n address from,\n address to,\n uint256 amount\n ) external {\n require(msg.sender == address(_group), \"NOT_AUTHORIZED_GROUP_ONLY\");\n emit Transfer(from, to, amount);\n }\n\n // /////////////////// INTERNAL ////////////////////////\n\n function _approveFor(\n address owner,\n address spender,\n uint256 amount\n ) internal {\n require(owner != address(0) && spender != address(0), \"INVALID_FROM_OR_SPENDER\");\n _mAllowed[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n function allowance(address owner, address spender) external view returns (uint256 remaining) {\n return _mAllowed[owner][spender];\n }\n\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal {\n _group.singleTransferFrom(from, to, _index, amount);\n }\n\n // ///////////////////// UTILITIES ///////////////////////\n using SafeMathWithRequire for uint256;\n\n // //////////////////// CONSTRUCTOR /////////////////////\n constructor(\n ERC20Group group,\n uint256 index,\n string memory tokenName,\n string memory tokenSymbol\n ) public {\n _group = group;\n _index = index;\n _name = tokenName;\n _symbol = tokenSymbol;\n }\n\n // ////////////////////// DATA ///////////////////////////\n ERC20Group internal immutable _group;\n uint256 internal immutable _index;\n mapping(address => mapping(address => uint256)) internal _mAllowed;\n string internal _name;\n string internal _symbol;\n}\n" + }, + "src/solc_0.6/BaseWithStorage/ERC721BaseToken.sol": { + "content": "/* solhint-disable func-order, code-complexity */\npragma solidity 0.6.5;\n\nimport \"../common/Libraries/AddressUtils.sol\";\nimport \"../common/Interfaces/ERC721TokenReceiver.sol\";\nimport \"../common/Interfaces/ERC721Events.sol\";\nimport \"../common/BaseWithStorage/SuperOperators.sol\";\nimport \"../common/BaseWithStorage/MetaTransactionReceiver.sol\";\nimport \"../common/Interfaces/ERC721MandatoryTokenReceiver.sol\";\n\n\ncontract ERC721BaseToken is ERC721Events, SuperOperators, MetaTransactionReceiver {\n using AddressUtils for address;\n\n bytes4 internal constant _ERC721_RECEIVED = 0x150b7a02;\n bytes4 internal constant _ERC721_BATCH_RECEIVED = 0x4b808c46;\n\n bytes4 internal constant ERC165ID = 0x01ffc9a7;\n bytes4 internal constant ERC721_MANDATORY_RECEIVER = 0x5e8bf644;\n\n mapping(address => uint256) internal _numNFTPerAddress;\n mapping(uint256 => uint256) internal _owners;\n mapping(address => mapping(address => bool)) internal _operatorsForAll;\n mapping(uint256 => address) internal _operators;\n\n constructor(address metaTransactionContract, address admin) internal {\n _admin = admin;\n _setMetaTransactionProcessor(metaTransactionContract, true);\n }\n\n function _transferFrom(\n address from,\n address to,\n uint256 id\n ) internal {\n _numNFTPerAddress[from]--;\n _numNFTPerAddress[to]++;\n _owners[id] = uint256(to);\n emit Transfer(from, to, id);\n }\n\n /**\n * @notice Return the number of Land owned by an address\n * @param owner The address to look for\n * @return The number of Land token owned by the address\n */\n function balanceOf(address owner) external view returns (uint256) {\n require(owner != address(0), \"owner is zero address\");\n return _numNFTPerAddress[owner];\n }\n\n function _ownerOf(uint256 id) internal virtual view returns (address) {\n uint256 data = _owners[id];\n if ((data & (2**160)) == 2**160) {\n return address(0);\n }\n return address(data);\n }\n\n function _ownerAndOperatorEnabledOf(uint256 id) internal view returns (address owner, bool operatorEnabled) {\n uint256 data = _owners[id];\n if ((data & (2**160)) == 2**160) {\n owner = address(0);\n } else {\n owner = address(data);\n }\n operatorEnabled = (data / 2**255) == 1;\n }\n\n /**\n * @notice Return the owner of a Land\n * @param id The id of the Land\n * @return owner The address of the owner\n */\n function ownerOf(uint256 id) external view returns (address owner) {\n owner = _ownerOf(id);\n require(owner != address(0), \"token does not exist\");\n }\n\n function _approveFor(\n address owner,\n address operator,\n uint256 id\n ) internal {\n if (operator == address(0)) {\n _owners[id] = _owners[id] & (2**255 - 1); // no need to resset the operator, it will be overriden next time\n } else {\n _owners[id] = _owners[id] | (2**255);\n _operators[id] = operator;\n }\n emit Approval(owner, operator, id);\n }\n\n /**\n * @notice Approve an operator to spend tokens on the sender behalf\n * @param sender The address giving the approval\n * @param operator The address receiving the approval\n * @param id The id of the token\n */\n function approveFor(\n address sender,\n address operator,\n uint256 id\n ) external {\n address owner = _ownerOf(id);\n require(sender != address(0), \"sender is zero address\");\n require(\n msg.sender == sender || _metaTransactionContracts[msg.sender] || _superOperators[msg.sender] || _operatorsForAll[sender][msg.sender],\n \"not authorized to approve\"\n );\n require(owner == sender, \"owner != sender\");\n _approveFor(owner, operator, id);\n }\n\n /**\n * @notice Approve an operator to spend tokens on the sender behalf\n * @param operator The address receiving the approval\n * @param id The id of the token\n */\n function approve(address operator, uint256 id) external {\n address owner = _ownerOf(id);\n require(owner != address(0), \"token does not exist\");\n require(owner == msg.sender || _superOperators[msg.sender] || _operatorsForAll[owner][msg.sender], \"not authorized to approve\");\n _approveFor(owner, operator, id);\n }\n\n /**\n * @notice Get the approved operator for a specific token\n * @param id The id of the token\n * @return The address of the operator\n */\n function getApproved(uint256 id) external view returns (address) {\n (address owner, bool operatorEnabled) = _ownerAndOperatorEnabledOf(id);\n require(owner != address(0), \"token does not exist\");\n if (operatorEnabled) {\n return _operators[id];\n } else {\n return address(0);\n }\n }\n\n function _checkTransfer(\n address from,\n address to,\n uint256 id\n ) internal view returns (bool isMetaTx) {\n (address owner, bool operatorEnabled) = _ownerAndOperatorEnabledOf(id);\n require(owner != address(0), \"token does not exist\");\n require(owner == from, \"not owner in _checkTransfer\");\n require(to != address(0), \"can't send to zero address\");\n isMetaTx = msg.sender != from && _metaTransactionContracts[msg.sender];\n if (msg.sender != from && !isMetaTx) {\n require(\n _superOperators[msg.sender] || _operatorsForAll[from][msg.sender] || (operatorEnabled && _operators[id] == msg.sender),\n \"not approved to transfer\"\n );\n }\n }\n\n function _checkInterfaceWith10000Gas(address _contract, bytes4 interfaceId) internal view returns (bool) {\n bool success;\n bool result;\n bytes memory call_data = abi.encodeWithSelector(ERC165ID, interfaceId);\n // solium-disable-next-line security/no-inline-assembly\n assembly {\n let call_ptr := add(0x20, call_data)\n let call_size := mload(call_data)\n let output := mload(0x40) // Find empty storage location using \"free memory pointer\"\n mstore(output, 0x0)\n success := staticcall(10000, _contract, call_ptr, call_size, output, 0x20) // 32 bytes\n result := mload(output)\n }\n // (10000 / 63) \"not enough for supportsInterface(...)\" // consume all gas, so caller can potentially know that there was not enough gas\n assert(gasleft() > 158);\n return success && result;\n }\n\n /**\n * @notice Transfer a token between 2 addresses\n * @param from The sender of the token\n * @param to The recipient of the token\n * @param id The id of the token\n */\n function transferFrom(\n address from,\n address to,\n uint256 id\n ) external {\n bool metaTx = _checkTransfer(from, to, id);\n _transferFrom(from, to, id);\n if (to.isContract() && _checkInterfaceWith10000Gas(to, ERC721_MANDATORY_RECEIVER)) {\n require(_checkOnERC721Received(metaTx ? from : msg.sender, from, to, id, \"\"), \"erc721 transfer rejected by to\");\n }\n }\n\n /**\n * @notice Transfer a token between 2 addresses letting the receiver knows of the transfer\n * @param from The sender of the token\n * @param to The recipient of the token\n * @param id The id of the token\n * @param data Additional data\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 id,\n bytes memory data\n ) public {\n bool metaTx = _checkTransfer(from, to, id);\n _transferFrom(from, to, id);\n if (to.isContract()) {\n require(_checkOnERC721Received(metaTx ? from : msg.sender, from, to, id, data), \"ERC721: transfer rejected by to\");\n }\n }\n\n /**\n * @notice Transfer a token between 2 addresses letting the receiver knows of the transfer\n * @param from The send of the token\n * @param to The recipient of the token\n * @param id The id of the token\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 id\n ) external {\n safeTransferFrom(from, to, id, \"\");\n }\n\n /**\n * @notice Transfer many tokens between 2 addresses\n * @param from The sender of the token\n * @param to The recipient of the token\n * @param ids The ids of the tokens\n * @param data additional data\n */\n function batchTransferFrom(\n address from,\n address to,\n uint256[] calldata ids,\n bytes calldata data\n ) external {\n _batchTransferFrom(from, to, ids, data, false);\n }\n\n function _batchTransferFrom(\n address from,\n address to,\n uint256[] memory ids,\n bytes memory data,\n bool safe\n ) internal {\n bool metaTx = msg.sender != from && _metaTransactionContracts[msg.sender];\n bool authorized = msg.sender == from || metaTx || _superOperators[msg.sender] || _operatorsForAll[from][msg.sender];\n\n require(from != address(0), \"from is zero address\");\n require(to != address(0), \"can't send to zero address\");\n\n uint256 numTokens = ids.length;\n for (uint256 i = 0; i < numTokens; i++) {\n uint256 id = ids[i];\n (address owner, bool operatorEnabled) = _ownerAndOperatorEnabledOf(id);\n require(owner == from, \"not owner in batchTransferFrom\");\n require(authorized || (operatorEnabled && _operators[id] == msg.sender), \"not authorized\");\n _owners[id] = uint256(to);\n emit Transfer(from, to, id);\n }\n if (from != to) {\n _numNFTPerAddress[from] -= numTokens;\n _numNFTPerAddress[to] += numTokens;\n }\n\n if (to.isContract() && (safe || _checkInterfaceWith10000Gas(to, ERC721_MANDATORY_RECEIVER))) {\n require(_checkOnERC721BatchReceived(metaTx ? from : msg.sender, from, to, ids, data), \"erc721 batch transfer rejected by to\");\n }\n }\n\n /**\n * @notice Transfer many tokens between 2 addresses ensuring the receiving contract has a receiver method\n * @param from The sender of the token\n * @param to The recipient of the token\n * @param ids The ids of the tokens\n * @param data additional data\n */\n function safeBatchTransferFrom(\n address from,\n address to,\n uint256[] calldata ids,\n bytes calldata data\n ) external {\n _batchTransferFrom(from, to, ids, data, true);\n }\n\n /**\n * @notice Check if the contract supports an interface\n * 0x01ffc9a7 is ERC-165\n * 0x80ac58cd is ERC-721\n * @param id The id of the interface\n * @return True if the interface is supported\n */\n function supportsInterface(bytes4 id) public virtual pure returns (bool) {\n return id == 0x01ffc9a7 || id == 0x80ac58cd;\n }\n\n /**\n * @notice Set the approval for an operator to manage all the tokens of the sender\n * @param sender The address giving the approval\n * @param operator The address receiving the approval\n * @param approved The determination of the approval\n */\n function setApprovalForAllFor(\n address sender,\n address operator,\n bool approved\n ) external {\n require(sender != address(0), \"Invalid sender address\");\n require(msg.sender == sender || _metaTransactionContracts[msg.sender] || _superOperators[msg.sender], \"not authorized to approve for all\");\n\n _setApprovalForAll(sender, operator, approved);\n }\n\n /**\n * @notice Set the approval for an operator to manage all the tokens of the sender\n * @param operator The address receiving the approval\n * @param approved The determination of the approval\n */\n function setApprovalForAll(address operator, bool approved) external {\n _setApprovalForAll(msg.sender, operator, approved);\n }\n\n function _setApprovalForAll(\n address sender,\n address operator,\n bool approved\n ) internal {\n require(!_superOperators[operator], \"super operator can't have their approvalForAll changed\");\n _operatorsForAll[sender][operator] = approved;\n\n emit ApprovalForAll(sender, operator, approved);\n }\n\n /**\n * @notice Check if the sender approved the operator\n * @param owner The address of the owner\n * @param operator The address of the operator\n * @return isOperator The status of the approval\n */\n function isApprovedForAll(address owner, address operator) external view returns (bool isOperator) {\n return _operatorsForAll[owner][operator] || _superOperators[operator];\n }\n\n function _burn(\n address from,\n address owner,\n uint256 id\n ) internal {\n require(from == owner, \"not owner\");\n _owners[id] = (_owners[id] & (2**255 - 1)) | (2**160); // record as non owner but keep track of last owner\n _numNFTPerAddress[from]--;\n emit Transfer(from, address(0), id);\n }\n\n /// @notice Burns token `id`.\n /// @param id token which will be burnt.\n function burn(uint256 id) external virtual {\n _burn(msg.sender, _ownerOf(id), id);\n }\n\n /// @notice Burn token`id` from `from`.\n /// @param from address whose token is to be burnt.\n /// @param id token which will be burnt.\n function burnFrom(address from, uint256 id) external virtual {\n require(from != address(0), \"Invalid sender address\");\n (address owner, bool operatorEnabled) = _ownerAndOperatorEnabledOf(id);\n require(\n msg.sender == from ||\n _metaTransactionContracts[msg.sender] ||\n (operatorEnabled && _operators[id] == msg.sender) ||\n _superOperators[msg.sender] ||\n _operatorsForAll[from][msg.sender],\n \"not authorized to burn\"\n );\n _burn(from, owner, id);\n }\n\n function _checkOnERC721Received(\n address operator,\n address from,\n address to,\n uint256 tokenId,\n bytes memory _data\n ) internal returns (bool) {\n bytes4 retval = ERC721TokenReceiver(to).onERC721Received(operator, from, tokenId, _data);\n return (retval == _ERC721_RECEIVED);\n }\n\n function _checkOnERC721BatchReceived(\n address operator,\n address from,\n address to,\n uint256[] memory ids,\n bytes memory _data\n ) internal returns (bool) {\n bytes4 retval = ERC721MandatoryTokenReceiver(to).onERC721BatchReceived(operator, from, ids, _data);\n return (retval == _ERC721_BATCH_RECEIVED);\n }\n}\n" + }, + "src/solc_0.6/Catalyst/CatalystDataBase.sol": { + "content": "pragma solidity 0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"./CatalystValue.sol\";\n\n\ncontract CatalystDataBase is CatalystValue {\n event CatalystConfiguration(uint256 indexed id, uint16 minQuantity, uint16 maxQuantity, uint256 sandMintingFee, uint256 sandUpdateFee);\n\n function _setMintData(uint256 id, MintData memory data) internal {\n _data[id] = data;\n _emitConfiguration(id, data.minQuantity, data.maxQuantity, data.sandMintingFee, data.sandUpdateFee);\n }\n\n function _setValueOverride(uint256 id, CatalystValue valueOverride) internal {\n _valueOverrides[id] = valueOverride;\n }\n\n function _setConfiguration(\n uint256 id,\n uint16 minQuantity,\n uint16 maxQuantity,\n uint256 sandMintingFee,\n uint256 sandUpdateFee\n ) internal {\n _data[id].minQuantity = minQuantity;\n _data[id].maxQuantity = maxQuantity;\n _data[id].sandMintingFee = uint88(sandMintingFee);\n _data[id].sandUpdateFee = uint88(sandUpdateFee);\n _emitConfiguration(id, minQuantity, maxQuantity, sandMintingFee, sandUpdateFee);\n }\n\n function _emitConfiguration(\n uint256 id,\n uint16 minQuantity,\n uint16 maxQuantity,\n uint256 sandMintingFee,\n uint256 sandUpdateFee\n ) internal {\n emit CatalystConfiguration(id, minQuantity, maxQuantity, sandMintingFee, sandUpdateFee);\n }\n\n ///@dev compute a random value between min to 25.\n //. example: 1-25, 6-25, 11-25, 16-25\n function _computeValue(\n uint256 seed,\n uint256 gemId,\n bytes32 blockHash,\n uint256 slotIndex,\n uint32 min\n ) internal pure returns (uint32) {\n return min + uint16(uint256(keccak256(abi.encodePacked(gemId, seed, blockHash, slotIndex))) % (26 - min));\n }\n\n function getValues(\n uint256 catalystId,\n uint256 seed,\n GemEvent[] calldata events,\n uint32 totalNumberOfGemTypes\n ) external override view returns (uint32[] memory values) {\n CatalystValue valueOverride = _valueOverrides[catalystId];\n if (address(valueOverride) != address(0)) {\n return valueOverride.getValues(catalystId, seed, events, totalNumberOfGemTypes);\n }\n values = new uint32[](totalNumberOfGemTypes);\n\n uint32 numGems;\n for (uint256 i = 0; i < events.length; i++) {\n numGems += uint32(events[i].gemIds.length);\n }\n require(numGems <= MAX_UINT32, \"TOO_MANY_GEMS\");\n uint32 minValue = (numGems - 1) * 5 + 1;\n\n uint256 numGemsSoFar = 0;\n for (uint256 i = 0; i < events.length; i++) {\n numGemsSoFar += events[i].gemIds.length;\n for (uint256 j = 0; j < events[i].gemIds.length; j++) {\n uint256 gemId = events[i].gemIds[j];\n uint256 slotIndex = numGemsSoFar - events[i].gemIds.length + j;\n if (values[gemId] == 0) {\n // first gem : value = roll between ((numGemsSoFar-1)*5+1) and 25\n values[gemId] = _computeValue(seed, gemId, events[i].blockHash, slotIndex, (uint32(numGemsSoFar) - 1) * 5 + 1);\n // bump previous values:\n if (values[gemId] < minValue) {\n values[gemId] = minValue;\n }\n } else {\n // further gem, previous roll are overriden with 25 and new roll between 1 and 25\n uint32 newRoll = _computeValue(seed, gemId, events[i].blockHash, slotIndex, 1);\n values[gemId] = (((values[gemId] - 1) / 25) + 1) * 25 + newRoll;\n }\n }\n }\n }\n\n function getMintData(uint256 catalystId)\n external\n view\n returns (\n uint16 maxGems,\n uint16 minQuantity,\n uint16 maxQuantity,\n uint256 sandMintingFee,\n uint256 sandUpdateFee\n )\n {\n maxGems = _data[catalystId].maxGems;\n minQuantity = _data[catalystId].minQuantity;\n maxQuantity = _data[catalystId].maxQuantity;\n sandMintingFee = _data[catalystId].sandMintingFee;\n sandUpdateFee = _data[catalystId].sandUpdateFee;\n }\n\n struct MintData {\n uint88 sandMintingFee;\n uint88 sandUpdateFee;\n uint16 minQuantity;\n uint16 maxQuantity;\n uint16 maxGems;\n }\n\n uint32 internal constant MAX_UINT32 = 2**32 - 1;\n\n mapping(uint256 => MintData) internal _data;\n mapping(uint256 => CatalystValue) internal _valueOverrides;\n}\n" + }, + "src/solc_0.6/Catalyst/CatalystToken.sol": { + "content": "pragma solidity 0.6.5;\npragma experimental ABIEncoderV2;\n\n\ninterface CatalystToken {\n function getMintData(uint256 catalystId)\n external\n view\n returns (\n uint16 maxGems,\n uint16 minQuantity,\n uint16 maxQuantity,\n uint256 sandMintingFee,\n uint256 sandUpdateFee\n );\n\n function batchBurnFrom(\n address from,\n uint256[] calldata ids,\n uint256[] calldata amounts\n ) external;\n\n function burnFrom(\n address from,\n uint256 id,\n uint256 amount\n ) external;\n}\n" + }, + "src/solc_0.6/Catalyst/CatalystValue.sol": { + "content": "pragma solidity 0.6.5;\npragma experimental ABIEncoderV2;\n\n\ninterface CatalystValue {\n struct GemEvent {\n uint256[] gemIds;\n bytes32 blockHash;\n }\n\n function getValues(\n uint256 catalystId,\n uint256 seed,\n GemEvent[] calldata events,\n uint32 totalNumberOfGemTypes\n ) external view returns (uint32[] memory values);\n}\n" + }, + "src/solc_0.6/Catalyst/ERC20GroupCatalyst.sol": { + "content": "pragma solidity 0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"../BaseWithStorage/ERC20Group.sol\";\nimport \"./CatalystDataBase.sol\";\nimport \"../BaseWithStorage/ERC20SubToken.sol\";\nimport \"./CatalystValue.sol\";\n\n\ncontract ERC20GroupCatalyst is CatalystDataBase, ERC20Group {\n /// @dev add Catalyst, if one of the catalyst to be added in the batch need to have a value override, all catalyst added in that batch need to have override\n /// if this is not desired, they can be added in a separated batch\n /// if no override are needed, the valueOverrides can be left emopty\n function addCatalysts(\n ERC20SubToken[] memory catalysts,\n MintData[] memory mintData,\n CatalystValue[] memory valueOverrides\n ) public {\n require(msg.sender == _admin, \"NOT_AUTHORIZED_ADMIN\");\n require(catalysts.length == mintData.length, \"INVALID_INCONSISTENT_LENGTH\");\n for (uint256 i = 0; i < mintData.length; i++) {\n uint256 id = _addSubToken(catalysts[i]);\n _setMintData(id, mintData[i]);\n if (valueOverrides.length > i) {\n _setValueOverride(id, valueOverrides[i]);\n }\n }\n }\n\n function addCatalyst(\n ERC20SubToken catalyst,\n MintData memory mintData,\n CatalystValue valueOverride\n ) public {\n require(msg.sender == _admin, \"NOT_AUTHORIZED_ADMIN\");\n uint256 id = _addSubToken(catalyst);\n _setMintData(id, mintData);\n _setValueOverride(id, valueOverride);\n }\n\n function setConfiguration(\n uint256 id,\n uint16 minQuantity,\n uint16 maxQuantity,\n uint256 sandMintingFee,\n uint256 sandUpdateFee\n ) external {\n // CatalystMinter hardcode the value for efficiency purpose, so a change here would require a new deployment of CatalystMinter\n require(msg.sender == _admin, \"NOT_AUTHORIZED_ADMIN\");\n _setConfiguration(id, minQuantity, maxQuantity, sandMintingFee, sandUpdateFee);\n }\n\n constructor(\n address metaTransactionContract,\n address admin,\n address initialMinter\n ) public ERC20Group(metaTransactionContract, admin, initialMinter) {}\n}\n" + }, + "src/solc_0.6/Catalyst/ERC20GroupGem.sol": { + "content": "pragma solidity 0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"../BaseWithStorage/ERC20Group.sol\";\n\n\ncontract ERC20GroupGem is ERC20Group {\n function addGems(ERC20SubToken[] calldata catalysts) external {\n require(msg.sender == _admin, \"NOT_AUTHORIZED_ADMIN\");\n for (uint256 i = 0; i < catalysts.length; i++) {\n _addSubToken(catalysts[i]);\n }\n }\n\n constructor(\n address metaTransactionContract,\n address admin,\n address initialMinter\n ) public ERC20Group(metaTransactionContract, admin, initialMinter) {}\n}\n" + }, + "src/solc_0.6/Catalyst/GemToken.sol": { + "content": "pragma solidity 0.6.5;\n\n\ninterface GemToken {\n function batchBurnFrom(\n address from,\n uint256[] calldata ids,\n uint256[] calldata amounts\n ) external;\n}\n" + }, + "src/solc_0.6/CatalystMinter.sol": { + "content": "pragma solidity 0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"./Interfaces/AssetToken.sol\";\nimport \"./common/Interfaces/ERC20.sol\";\nimport \"./Interfaces/ERC20Extended.sol\";\nimport \"./common/BaseWithStorage/MetaTransactionReceiver.sol\";\nimport \"./common/Libraries/SafeMathWithRequire.sol\";\nimport \"./Catalyst/GemToken.sol\";\nimport \"./Catalyst/CatalystToken.sol\";\nimport \"./CatalystRegistry.sol\";\nimport \"./BaseWithStorage/ERC20Group.sol\";\n\n\n/// @notice Gateway to mint Asset with Catalyst, Gems and Sand\ncontract CatalystMinter is MetaTransactionReceiver {\n /// @dev emitted when fee collector (that receive the sand fee) get changed\n /// @param newCollector address of the new collector, address(0) means the fee will be burned\n event FeeCollector(address newCollector);\n\n function setFeeCollector(address newCollector) external {\n require(msg.sender == _admin, \"NOT_AUTHORIZED_ADMIN\");\n _setFeeCollector(newCollector);\n }\n\n event GemAdditionFee(uint256 newFee);\n\n function setGemAdditionFee(uint256 newFee) external {\n require(msg.sender == _admin, \"NOT_AUTHORIZED_ADMIN\");\n _setGemAdditionFee(newFee);\n }\n\n /// @notice mint one Asset token.\n /// @param from address creating the Asset, need to be the tx sender or meta tx signer.\n /// @param packId unused packId that will let you predict the resulting tokenId.\n /// @param metadataHash cidv1 ipfs hash of the folder where 0.json file contains the metadata.\n /// @param catalystId address of the Catalyst ERC20 token to burn.\n /// @param gemIds list of gem ids to burn in the catalyst.\n /// @param quantity asset supply to mint\n /// @param to destination address receiving the minted tokens.\n /// @param data extra data.\n function mint(\n address from,\n uint40 packId,\n bytes32 metadataHash,\n uint256 catalystId,\n uint256[] calldata gemIds,\n uint256 quantity,\n address to,\n bytes calldata data\n ) external returns (uint256) {\n _checkAuthorization(from, to);\n _burnCatalyst(from, catalystId);\n uint16 maxGems = _checkQuantityAndBurnSandAndGems(from, catalystId, gemIds, quantity);\n uint256 id = _asset.mint(from, packId, metadataHash, quantity, 0, to, data);\n _catalystRegistry.setCatalyst(id, catalystId, maxGems, gemIds);\n return id;\n }\n\n /// @notice associate a catalyst to a fungible Asset token by extracting it as ERC721 first.\n /// @param from address from which the Asset token belongs to.\n /// @param assetId tokenId of the Asset being extracted.\n /// @param catalystId address of the catalyst token to use and burn.\n /// @param gemIds list of gems to socket into the catalyst (burned).\n /// @param to destination address receiving the extracted and upgraded ERC721 Asset token.\n function extractAndChangeCatalyst(\n address from,\n uint256 assetId,\n uint256 catalystId,\n uint256[] calldata gemIds,\n address to\n ) external returns (uint256 tokenId) {\n _checkAuthorization(from, to);\n tokenId = _asset.extractERC721From(from, assetId, from);\n _changeCatalyst(from, tokenId, catalystId, gemIds, to);\n }\n\n /// @notice associate a new catalyst to a non-fungible Asset token.\n /// @param from address from which the Asset token belongs to.\n /// @param assetId tokenId of the Asset being updated.\n /// @param catalystId address of the catalyst token to use and burn.\n /// @param gemIds list of gems to socket into the catalyst (burned).\n /// @param to destination address receiving the Asset token.\n function changeCatalyst(\n address from,\n uint256 assetId,\n uint256 catalystId,\n uint256[] calldata gemIds,\n address to\n ) external returns (uint256 tokenId) {\n _checkAuthorization(from, to);\n _changeCatalyst(from, assetId, catalystId, gemIds, to);\n return assetId;\n }\n\n /// @notice add gems to a fungible Asset token by extracting it as ERC721 first.\n /// @param from address from which the Asset token belongs to.\n /// @param assetId tokenId of the Asset being extracted.\n /// @param gemIds list of gems to socket into the existing catalyst (burned).\n /// @param to destination address receiving the extracted and upgraded ERC721 Asset token.\n function extractAndAddGems(\n address from,\n uint256 assetId,\n uint256[] calldata gemIds,\n address to\n ) external returns (uint256 tokenId) {\n _checkAuthorization(from, to);\n tokenId = _asset.extractERC721From(from, assetId, from);\n _addGems(from, tokenId, gemIds, to);\n }\n\n /// @notice add gems to a non-fungible Asset token.\n /// @param from address from which the Asset token belongs to.\n /// @param assetId tokenId of the Asset to which the gems will be added to.\n /// @param gemIds list of gems to socket into the existing catalyst (burned).\n /// @param to destination address receiving the extracted and upgraded ERC721 Asset token.\n function addGems(\n address from,\n uint256 assetId,\n uint256[] calldata gemIds,\n address to\n ) external {\n _checkAuthorization(from, to);\n _addGems(from, assetId, gemIds, to);\n }\n\n struct AssetData {\n uint256[] gemIds;\n uint256 quantity;\n uint256 catalystId;\n }\n\n /// @notice mint multiple Asset tokens.\n /// @param from address creating the Asset, need to be the tx sender or meta tx signer.\n /// @param packId unused packId that will let you predict the resulting tokenId.\n /// @param metadataHash cidv1 ipfs hash of the folder where 0.json file contains the metadata.\n /// @param gemsQuantities quantities of gems to be used for each id in order\n /// @param catalystsQuantities quantities of catalyst to be used for each id in order\n /// @param assets contains the data to associate catalyst and gems to the assets.\n /// @param to destination address receiving the minted tokens.\n /// @param data extra data.\n function mintMultiple(\n address from,\n uint40 packId,\n bytes32 metadataHash,\n uint256[] memory gemsQuantities,\n uint256[] memory catalystsQuantities,\n AssetData[] memory assets,\n address to,\n bytes memory data\n ) public returns (uint256[] memory ids) {\n require(assets.length != 0, \"INVALID_0_ASSETS\");\n _checkAuthorization(from, to);\n return _mintMultiple(from, packId, metadataHash, gemsQuantities, catalystsQuantities, assets, to, data);\n }\n\n // //////////////////// INTERNALS ////////////////////\n\n function _checkQuantityAndBurnSandAndGems(\n address from,\n uint256 catalystId,\n uint256[] memory gemIds,\n uint256 quantity\n ) internal returns (uint16) {\n (uint16 maxGems, uint16 minQuantity, uint16 maxQuantity, uint256 sandMintingFee, ) = _getMintData(catalystId);\n require(minQuantity <= quantity && quantity <= maxQuantity, \"INVALID_QUANTITY\");\n require(gemIds.length <= maxGems, \"INVALID_GEMS_TOO_MANY\");\n _burnSingleGems(from, gemIds);\n _chargeSand(from, quantity.mul(sandMintingFee));\n return maxGems;\n }\n\n function _mintMultiple(\n address from,\n uint40 packId,\n bytes32 metadataHash,\n uint256[] memory gemsQuantities,\n uint256[] memory catalystsQuantities,\n AssetData[] memory assets,\n address to,\n bytes memory data\n ) internal returns (uint256[] memory) {\n (uint256 totalSandFee, uint256[] memory supplies, uint16[] memory maxGemsList) = _handleMultipleCatalysts(\n from,\n gemsQuantities,\n catalystsQuantities,\n assets\n );\n\n _chargeSand(from, totalSandFee);\n\n return _mintAssets(from, packId, metadataHash, assets, supplies, maxGemsList, to, data);\n }\n\n function _chargeSand(address from, uint256 sandFee) internal {\n address feeCollector = _feeCollector;\n if (feeCollector != address(0) && sandFee != 0) {\n if (feeCollector == address(BURN_ADDRESS)) {\n // special address for burn\n _sand.burnFor(from, sandFee);\n } else {\n _sand.transferFrom(from, _feeCollector, sandFee);\n }\n }\n }\n\n function _extractMintData(uint256 data)\n internal\n pure\n returns (\n uint16 maxGems,\n uint16 minQuantity,\n uint16 maxQuantity,\n uint256 sandMintingFee,\n uint256 sandUpdateFee\n )\n {\n maxGems = uint16(data >> 240);\n minQuantity = uint16((data >> 224) % 2**16);\n maxQuantity = uint16((data >> 208) % 2**16);\n sandMintingFee = uint256((data >> 120) % 2**88);\n sandUpdateFee = uint256(data % 2**88);\n }\n\n function _getMintData(uint256 catalystId)\n internal\n view\n returns (\n uint16,\n uint16,\n uint16,\n uint256,\n uint256\n )\n {\n if (catalystId == 0) {\n return _extractMintData(_common_mint_data);\n } else if (catalystId == 1) {\n return _extractMintData(_rare_mint_data);\n } else if (catalystId == 2) {\n return _extractMintData(_epic_mint_data);\n } else if (catalystId == 3) {\n return _extractMintData(_legendary_mint_data);\n }\n return _catalysts.getMintData(catalystId);\n }\n\n function _handleMultipleCatalysts(\n address from,\n uint256[] memory gemsQuantities,\n uint256[] memory catalystsQuantities,\n AssetData[] memory assets\n )\n internal\n returns (\n uint256 totalSandFee,\n uint256[] memory supplies,\n uint16[] memory maxGemsList\n )\n {\n _burnCatalysts(from, catalystsQuantities);\n _burnGems(from, gemsQuantities);\n\n supplies = new uint256[](assets.length);\n maxGemsList = new uint16[](assets.length);\n\n for (uint256 i = 0; i < assets.length; i++) {\n require(catalystsQuantities[assets[i].catalystId] != 0, \"INVALID_CATALYST_NOT_ENOUGH\");\n catalystsQuantities[assets[i].catalystId]--;\n gemsQuantities = _checkGemsQuantities(gemsQuantities, assets[i].gemIds);\n (uint16 maxGems, uint16 minQuantity, uint16 maxQuantity, uint256 sandMintingFee, ) = _getMintData(assets[i].catalystId);\n require(minQuantity <= assets[i].quantity && assets[i].quantity <= maxQuantity, \"INVALID_QUANTITY\");\n require(assets[i].gemIds.length <= maxGems, \"INVALID_GEMS_TOO_MANY\");\n maxGemsList[i] = maxGems;\n supplies[i] = assets[i].quantity;\n totalSandFee = totalSandFee.add(sandMintingFee.mul(assets[i].quantity));\n }\n }\n\n function _checkGemsQuantities(uint256[] memory gemsQuantities, uint256[] memory gemIds) internal pure returns (uint256[] memory) {\n for (uint256 i = 0; i < gemIds.length; i++) {\n require(gemsQuantities[gemIds[i]] != 0, \"INVALID_GEMS_NOT_ENOUGH\");\n gemsQuantities[gemIds[i]]--;\n }\n return gemsQuantities;\n }\n\n function _burnCatalysts(address from, uint256[] memory catalystsQuantities) internal {\n uint256[] memory ids = new uint256[](catalystsQuantities.length);\n for (uint256 i = 0; i < ids.length; i++) {\n ids[i] = i;\n }\n _catalysts.batchBurnFrom(from, ids, catalystsQuantities);\n }\n\n function _burnGems(address from, uint256[] memory gemsQuantities) internal {\n uint256[] memory ids = new uint256[](gemsQuantities.length);\n for (uint256 i = 0; i < ids.length; i++) {\n ids[i] = i;\n }\n _gems.batchBurnFrom(from, ids, gemsQuantities);\n }\n\n function _mintAssets(\n address from,\n uint40 packId,\n bytes32 metadataHash,\n AssetData[] memory assets,\n uint256[] memory supplies,\n uint16[] memory maxGemsList,\n address to,\n bytes memory data\n ) internal returns (uint256[] memory tokenIds) {\n tokenIds = _asset.mintMultiple(from, packId, metadataHash, supplies, \"\", to, data);\n for (uint256 i = 0; i < tokenIds.length; i++) {\n _catalystRegistry.setCatalyst(tokenIds[i], assets[i].catalystId, maxGemsList[i], assets[i].gemIds);\n }\n }\n\n function _changeCatalyst(\n address from,\n uint256 assetId,\n uint256 catalystId,\n uint256[] memory gemIds,\n address to\n ) internal {\n require(assetId & IS_NFT != 0, \"INVALID_NOT_NFT\"); // Asset (ERC1155ERC721.sol) ensure NFT will return true here and non-NFT will return false\n _burnCatalyst(from, catalystId);\n (uint16 maxGems, , , , uint256 sandUpdateFee) = _getMintData(catalystId);\n require(gemIds.length <= maxGems, \"INVALID_GEMS_TOO_MANY\");\n _burnGems(from, gemIds);\n _chargeSand(from, sandUpdateFee);\n\n _catalystRegistry.setCatalyst(assetId, catalystId, maxGems, gemIds);\n\n _transfer(from, to, assetId);\n }\n\n function _addGems(\n address from,\n uint256 assetId,\n uint256[] memory gemIds,\n address to\n ) internal {\n require(assetId & IS_NFT != 0, \"INVALID_NOT_NFT\"); // Asset (ERC1155ERC721.sol) ensure NFT will return true here and non-NFT will return false\n _catalystRegistry.addGems(assetId, gemIds);\n _chargeSand(from, gemIds.length.mul(_gemAdditionFee));\n _transfer(from, to, assetId);\n }\n\n function _transfer(\n address from,\n address to,\n uint256 assetId\n ) internal {\n if (from != to) {\n _asset.safeTransferFrom(from, to, assetId);\n }\n }\n\n function _checkAuthorization(address from, address to) internal view {\n require(to != address(0), \"INVALID_TO_ZERO_ADDRESS\");\n require(from == msg.sender || _metaTransactionContracts[msg.sender], \"NOT_SENDER\");\n }\n\n function _burnSingleGems(address from, uint256[] memory gemIds) internal {\n uint256[] memory amounts = new uint256[](gemIds.length);\n for (uint256 i = 0; i < gemIds.length; i++) {\n amounts[i] = 1;\n }\n _gems.batchBurnFrom(from, gemIds, amounts);\n }\n\n function _burnCatalyst(address from, uint256 catalystId) internal {\n _catalysts.burnFrom(from, catalystId, 1);\n }\n\n function _setFeeCollector(address newCollector) internal {\n _feeCollector = newCollector;\n emit FeeCollector(newCollector);\n }\n\n function _setGemAdditionFee(uint256 newFee) internal {\n _gemAdditionFee = newFee;\n emit GemAdditionFee(newFee);\n }\n\n // /////////////////// UTILITIES /////////////////////\n using SafeMathWithRequire for uint256;\n\n // //////////////////////// DATA /////////////////////\n uint256 private constant IS_NFT = 0x0000000000000000000000000000000000000000800000000000000000000000;\n address private constant BURN_ADDRESS = 0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF;\n\n ERC20Extended internal immutable _sand;\n AssetToken internal immutable _asset;\n GemToken internal immutable _gems;\n CatalystToken internal immutable _catalysts;\n CatalystRegistry internal immutable _catalystRegistry;\n address internal _feeCollector;\n\n uint256 internal immutable _common_mint_data;\n uint256 internal immutable _rare_mint_data;\n uint256 internal immutable _epic_mint_data;\n uint256 internal immutable _legendary_mint_data;\n\n uint256 internal _gemAdditionFee;\n\n // /////////////////// CONSTRUCTOR ////////////////////\n constructor(\n CatalystRegistry catalystRegistry,\n ERC20Extended sand,\n AssetToken asset,\n GemToken gems,\n address metaTx,\n address admin,\n address feeCollector,\n uint256 gemAdditionFee,\n CatalystToken catalysts,\n uint256[4] memory bakedInMintdata\n ) public {\n _catalystRegistry = catalystRegistry;\n _sand = sand;\n _asset = asset;\n _gems = gems;\n _catalysts = catalysts;\n _admin = admin;\n _setGemAdditionFee(gemAdditionFee);\n _setFeeCollector(feeCollector);\n _setMetaTransactionProcessor(metaTx, true);\n _common_mint_data = bakedInMintdata[0];\n _rare_mint_data = bakedInMintdata[1];\n _epic_mint_data = bakedInMintdata[2];\n _legendary_mint_data = bakedInMintdata[3];\n }\n}\n" + }, + "src/solc_0.6/CatalystRegistry.sol": { + "content": "pragma solidity 0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"./Interfaces/AssetToken.sol\";\nimport \"./common/BaseWithStorage/Admin.sol\";\nimport \"./Catalyst/CatalystValue.sol\";\n\n\ncontract CatalystRegistry is Admin, CatalystValue {\n event Minter(address indexed newMinter);\n event CatalystApplied(uint256 indexed assetId, uint256 indexed catalystId, uint256 seed, uint256[] gemIds, uint64 blockNumber);\n event GemsAdded(uint256 indexed assetId, uint256 seed, uint256[] gemIds, uint64 blockNumber);\n\n function getCatalyst(uint256 assetId) external view returns (bool exists, uint256 catalystId) {\n CatalystStored memory catalyst = _catalysts[assetId];\n if (catalyst.set != 0) {\n return (true, catalyst.catalystId);\n }\n if (assetId & IS_NFT != 0) {\n catalyst = _catalysts[_getCollectionId(assetId)];\n return (catalyst.set != 0, catalyst.catalystId);\n }\n return (false, 0);\n }\n\n function setCatalyst(\n uint256 assetId,\n uint256 catalystId,\n uint256 maxGems,\n uint256[] calldata gemIds\n ) external {\n require(msg.sender == _minter, \"NOT_AUTHORIZED_MINTER\");\n require(gemIds.length <= maxGems, \"INVALID_GEMS_TOO_MANY\");\n uint256 emptySockets = maxGems - gemIds.length;\n _catalysts[assetId] = CatalystStored(uint64(emptySockets), uint64(catalystId), 1);\n uint64 blockNumber = _getBlockNumber();\n emit CatalystApplied(assetId, catalystId, assetId, gemIds, blockNumber);\n }\n\n function addGems(uint256 assetId, uint256[] calldata gemIds) external {\n require(msg.sender == _minter, \"NOT_AUTHORIZED_MINTER\");\n require(assetId & IS_NFT != 0, \"INVALID_NOT_NFT\");\n require(gemIds.length != 0, \"INVALID_GEMS_0\");\n (uint256 emptySockets, uint256 seed) = _getSocketData(assetId);\n require(emptySockets >= gemIds.length, \"INVALID_GEMS_TOO_MANY\");\n emptySockets -= gemIds.length;\n _catalysts[assetId].emptySockets = uint64(emptySockets);\n uint64 blockNumber = _getBlockNumber();\n emit GemsAdded(assetId, seed, gemIds, blockNumber);\n }\n\n /// @dev Set the Minter that will be the only address able to create Estate\n /// @param minter address of the minter\n function setMinter(address minter) external {\n require(msg.sender == _admin, \"NOT_AUTHORIZED_ADMIN\");\n require(minter != _minter, \"INVALID_MINTER_SAME_ALREADY_SET\");\n _minter = minter;\n emit Minter(minter);\n }\n\n /// @dev return the current minter\n function getMinter() external view returns (address) {\n return _minter;\n }\n\n function getValues(\n uint256 catalystId,\n uint256 seed,\n GemEvent[] calldata events,\n uint32 totalNumberOfGemTypes\n ) external override view returns (uint32[] memory values) {\n return _catalystValue.getValues(catalystId, seed, events, totalNumberOfGemTypes);\n }\n\n // ///////// INTERNAL ////////////\n\n uint256 private constant IS_NFT = 0x0000000000000000000000000000000000000000800000000000000000000000;\n uint256 private constant NOT_IS_NFT = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFFFFFFFFFFFFFF;\n uint256 private constant NOT_NFT_INDEX = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF800000007FFFFFFFFFFFFFFF;\n\n function _getSocketData(uint256 assetId) internal view returns (uint256 emptySockets, uint256 seed) {\n seed = assetId;\n CatalystStored memory catalyst = _catalysts[assetId];\n if (catalyst.set != 0) {\n // the gems are added to an asset who already get a specific catalyst.\n // the seed is its id\n return (catalyst.emptySockets, seed);\n }\n // else the asset is only adding gems while keeping the same seed (that of the original assetId)\n seed = _getCollectionId(assetId);\n catalyst = _catalysts[seed];\n return (catalyst.emptySockets, seed);\n }\n\n function _getBlockNumber() internal view returns (uint64 blockNumber) {\n blockNumber = uint64(block.number + 1);\n }\n\n function _getCollectionId(uint256 assetId) internal pure returns (uint256) {\n return assetId & NOT_NFT_INDEX & NOT_IS_NFT; // compute the same as Asset to get collectionId\n }\n\n // CONSTRUCTOR ////\n constructor(CatalystValue catalystValue, address admin) public {\n _admin = admin;\n _catalystValue = catalystValue;\n }\n\n /// DATA ////////\n\n struct CatalystStored {\n uint64 emptySockets;\n uint64 catalystId;\n uint64 set;\n }\n address internal _minter;\n CatalystValue internal immutable _catalystValue;\n mapping(uint256 => CatalystStored) internal _catalysts;\n}\n" + }, + "src/solc_0.6/common/BaseWithStorage/Admin.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.6.5;\n\n\ncontract Admin {\n address internal _admin;\n\n /// @dev emitted when the contract administrator is changed.\n /// @param oldAdmin address of the previous administrator.\n /// @param newAdmin address of the new administrator.\n event AdminChanged(address oldAdmin, address newAdmin);\n\n /// @dev gives the current administrator of this contract.\n /// @return the current administrator of this contract.\n function getAdmin() external view returns (address) {\n return _admin;\n }\n\n /// @dev change the administrator to be `newAdmin`.\n /// @param newAdmin address of the new administrator.\n function changeAdmin(address newAdmin) external {\n require(msg.sender == _admin, \"only admin can change admin\");\n require(_admin != newAdmin, \"already admin\");\n emit AdminChanged(_admin, newAdmin);\n _admin = newAdmin;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == _admin, \"only admin allowed\");\n _;\n }\n}\n" + }, + "src/solc_0.6/common/BaseWithStorage/MetaTransactionReceiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.6.5;\n\nimport \"./Admin.sol\";\n\ncontract MetaTransactionReceiver is Admin {\n mapping(address => bool) internal _metaTransactionContracts;\n\n /// @dev emiited when a meta transaction processor is enabled/disabled\n /// @param metaTransactionProcessor address that will be given/removed metaTransactionProcessor rights.\n /// @param enabled set whether the metaTransactionProcessor is enabled or disabled.\n event MetaTransactionProcessor(address metaTransactionProcessor, bool enabled);\n\n /// @dev Enable or disable the ability of `metaTransactionProcessor` to perform meta-tx (metaTransactionProcessor rights).\n /// @param metaTransactionProcessor address that will be given/removed metaTransactionProcessor rights.\n /// @param enabled set whether the metaTransactionProcessor is enabled or disabled.\n function setMetaTransactionProcessor(address metaTransactionProcessor, bool enabled) public onlyAdmin {\n _setMetaTransactionProcessor(metaTransactionProcessor, enabled);\n }\n\n function _setMetaTransactionProcessor(address metaTransactionProcessor, bool enabled) internal {\n require(metaTransactionProcessor != address(0), \"MetaTransactionReceiver: zero address\");\n _metaTransactionContracts[metaTransactionProcessor] = enabled;\n emit MetaTransactionProcessor(metaTransactionProcessor, enabled);\n }\n\n /// @dev check whether address `who` is given meta-transaction execution rights.\n /// @param who The address to query.\n /// @return whether the address has meta-transaction execution rights.\n function isMetaTransactionProcessor(address who) external view returns (bool) {\n return _metaTransactionContracts[who];\n }\n}\n" + }, + "src/solc_0.6/common/BaseWithStorage/Ownable.sol": { + "content": "pragma solidity 0.6.5;\n\n\n/**\n * @title Ownable\n * @dev The Ownable contract has an owner address, and provides basic authorization control\n * functions, this simplifies the implementation of \"user permissions\".\n */\ncontract Ownable {\n address payable public owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev The Ownable constructor sets the original `owner` of the contract to the sender\n * account.\n */\n constructor(address payable _owner) public {\n owner = _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(msg.sender == owner);\n _;\n }\n\n // /**\n // * @dev Allows the current owner to relinquish control of the contract.\n // * @notice Renouncing to ownership will leave the contract without an owner.\n // * It will not be possible to call the functions with the `onlyOwner`\n // * modifier anymore.\n // */\n // function renounceOwnership() public onlyOwner {\n // emit OwnershipRenounced(owner);\n // owner = address(0);\n // }\n\n /**\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\n * @param _newOwner The address to transfer ownership to.\n */\n function transferOwnership(address payable _newOwner) public onlyOwner {\n _transferOwnership(_newOwner);\n }\n\n /**\n * @dev Transfers control of the contract to a newOwner.\n * @param _newOwner The address to transfer ownership to.\n */\n function _transferOwnership(address payable _newOwner) internal {\n require(_newOwner != address(0));\n emit OwnershipTransferred(owner, _newOwner);\n owner = _newOwner;\n }\n}\n" + }, + "src/solc_0.6/common/BaseWithStorage/SuperOperators.sol": { + "content": "pragma solidity 0.6.5;\n\nimport \"./Admin.sol\";\n\n\ncontract SuperOperators is Admin {\n mapping(address => bool) internal _superOperators;\n\n event SuperOperator(address superOperator, bool enabled);\n\n /// @notice Enable or disable the ability of `superOperator` to transfer tokens of all (superOperator rights).\n /// @param superOperator address that will be given/removed superOperator right.\n /// @param enabled set whether the superOperator is enabled or disabled.\n function setSuperOperator(address superOperator, bool enabled) external {\n require(msg.sender == _admin, \"only admin is allowed to add super operators\");\n _superOperators[superOperator] = enabled;\n emit SuperOperator(superOperator, enabled);\n }\n\n /// @notice check whether address `who` is given superOperator rights.\n /// @param who The address to query.\n /// @return whether the address has superOperator rights.\n function isSuperOperator(address who) public view returns (bool) {\n return _superOperators[who];\n }\n}\n" + }, + "src/solc_0.6/common/Interfaces/ERC1155.sol": { + "content": "pragma solidity 0.6.5;\n\n\n/**\n @title ERC-1155 Multi Token Standard\n @dev See https://eips.ethereum.org/EIPS/eip-1155\n Note: The ERC-165 identifier for this interface is 0xd9b67a26.\n */\ninterface ERC1155 {\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\n\n event TransferBatch(address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values);\n\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n event URI(string value, uint256 indexed id);\n\n /**\n @notice Transfers `value` amount of an `id` from `from` to `to` (with safety call).\n @dev Caller must be approved to manage the tokens being transferred out of the `from` account (see \"Approval\" section of the standard).\n MUST revert if `to` is the zero address.\n MUST revert if balance of holder for token `id` is lower than the `value` sent.\n MUST revert on any other error.\n MUST emit the `TransferSingle` event to reflect the balance change (see \"Safe Transfer Rules\" section of the standard).\n After the above conditions are met, this function MUST check if `to` is a smart contract (e.g. code size > 0). If so, it MUST call `onERC1155Received` on `to` and act appropriately (see \"Safe Transfer Rules\" section of the standard).\n @param from Source address\n @param to Target address\n @param id ID of the token type\n @param value Transfer amount\n @param data Additional data with no specified format, MUST be sent unaltered in call to `onERC1155Received` on `to`\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 id,\n uint256 value,\n bytes calldata data\n ) external;\n\n /**\n @notice Transfers `values` amount(s) of `ids` from the `from` address to the `to` address specified (with safety call).\n @dev Caller must be approved to manage the tokens being transferred out of the `from` account (see \"Approval\" section of the standard).\n MUST revert if `to` is the zero address.\n MUST revert if length of `ids` is not the same as length of `values`.\n MUST revert if any of the balance(s) of the holder(s) for token(s) in `ids` is lower than the respective amount(s) in `values` sent to the recipient.\n MUST revert on any other error.\n MUST emit `TransferSingle` or `TransferBatch` event(s) such that all the balance changes are reflected (see \"Safe Transfer Rules\" section of the standard).\n Balance changes and events MUST follow the ordering of the arrays (_ids[0]/_values[0] before _ids[1]/_values[1], etc).\n After the above conditions for the transfer(s) in the batch are met, this function MUST check if `to` is a smart contract (e.g. code size > 0). If so, it MUST call the relevant `ERC1155TokenReceiver` hook(s) on `to` and act appropriately (see \"Safe Transfer Rules\" section of the standard).\n @param from Source address\n @param to Target address\n @param ids IDs of each token type (order and length must match _values array)\n @param values Transfer amounts per token type (order and length must match _ids array)\n @param data Additional data with no specified format, MUST be sent unaltered in call to the `ERC1155TokenReceiver` hook(s) on `to`\n */\n function safeBatchTransferFrom(\n address from,\n address to,\n uint256[] calldata ids,\n uint256[] calldata values,\n bytes calldata data\n ) external;\n\n /**\n @notice Get the balance of an account's tokens.\n @param owner The address of the token holder\n @param id ID of the token\n @return The _owner's balance of the token type requested\n */\n function balanceOf(address owner, uint256 id) external view returns (uint256);\n\n /**\n @notice Get the balance of multiple account/token pairs\n @param owners The addresses of the token holders\n @param ids ID of the tokens\n @return The _owner's balance of the token types requested (i.e. balance for each (owner, id) pair)\n */\n function balanceOfBatch(address[] calldata owners, uint256[] calldata ids) external view returns (uint256[] memory);\n\n /**\n @notice Enable or disable approval for a third party (\"operator\") to manage all of the caller's tokens.\n @dev MUST emit the ApprovalForAll event on success.\n @param operator Address to add to the set of authorized operators\n @param approved True if the operator is approved, false to revoke approval\n */\n function setApprovalForAll(address operator, bool approved) external;\n\n /**\n @notice Queries the approval status of an operator for a given owner.\n @param owner The owner of the tokens\n @param operator Address of authorized operator\n @return True if the operator is approved, false if not\n */\n function isApprovedForAll(address owner, address operator) external view returns (bool);\n}\n" + }, + "src/solc_0.6/common/Interfaces/ERC1271.sol": { + "content": "pragma solidity 0.6.5;\n\n\ninterface ERC1271 {\n /**\n * @dev Should return whether the signature provided is valid for the provided data\n * @param data Arbitrary length data signed on the behalf of address(this)\n * @param signature Signature byte array associated with _data\n * @return magicValue\n * MUST return the bytes4 magic value 0x20c13b0b when function passes.\n * MUST NOT modify state (using STATICCALL for solc < 0.5, view modifier for solc > 0.5)\n * MUST allow external calls\n */\n function isValidSignature(bytes calldata data, bytes calldata signature) external view returns (bytes4 magicValue);\n}\n" + }, + "src/solc_0.6/common/Interfaces/ERC1271Constants.sol": { + "content": "pragma solidity 0.6.5;\n\n\ncontract ERC1271Constants {\n bytes4 internal constant ERC1271_MAGICVALUE = 0x20c13b0b;\n}\n" + }, + "src/solc_0.6/common/Interfaces/ERC165.sol": { + "content": "pragma solidity 0.6.5;\n\n\n/**\n * @title ERC165\n * @dev https://eips.ethereum.org/EIPS/eip-165\n */\ninterface ERC165 {\n /**\n * @notice Query if a contract implements interface `interfaceId`\n * @param interfaceId The interface identifier, as specified in ERC-165\n * @dev Interface identification is specified in ERC-165. This function\n * uses less than 30,000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "src/solc_0.6/common/Interfaces/ERC1654.sol": { + "content": "pragma solidity 0.6.5;\n\n\ninterface ERC1654 {\n /**\n * @dev Should return whether the signature provided is valid for the provided hash\n * @param hash 32 bytes hash to be signed\n * @param signature Signature byte array associated with hash\n * @return magicValue 0x1626ba7e if valid else 0x00000000\n */\n function isValidSignature(bytes32 hash, bytes calldata signature) external view returns (bytes4 magicValue);\n}\n" + }, + "src/solc_0.6/common/Interfaces/ERC1654Constants.sol": { + "content": "pragma solidity 0.6.5;\n\n\ncontract ERC1654Constants {\n bytes4 internal constant ERC1654_MAGICVALUE = 0x1626ba7e;\n}\n" + }, + "src/solc_0.6/common/Interfaces/ERC20.sol": { + "content": "pragma solidity 0.6.5;\n\n\n/// @dev see https://eips.ethereum.org/EIPS/eip-20\ninterface ERC20 {\n /// @notice emitted when tokens are transfered from one address to another.\n /// @param from address from which the token are transfered from (zero means tokens are minted).\n /// @param to destination address which the token are transfered to (zero means tokens are burnt).\n /// @param value amount of tokens transferred.\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /// @notice emitted when owner grant transfer rights to another address\n /// @param owner address allowing its token to be transferred.\n /// @param spender address allowed to spend on behalf of `owner`\n /// @param value amount of tokens allowed.\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /// @notice return the current total amount of tokens owned by all holders.\n /// @return supply total number of tokens held.\n function totalSupply() external view returns (uint256 supply);\n\n /// @notice return the number of tokens held by a particular address.\n /// @param who address being queried.\n /// @return balance number of token held by that address.\n function balanceOf(address who) external view returns (uint256 balance);\n\n /// @notice transfer tokens to a specific address.\n /// @param to destination address receiving the tokens.\n /// @param value number of tokens to transfer.\n /// @return success whether the transfer succeeded.\n function transfer(address to, uint256 value) external returns (bool success);\n\n /// @notice transfer tokens from one address to another.\n /// @param from address tokens will be sent from.\n /// @param to destination address receiving the tokens.\n /// @param value number of tokens to transfer.\n /// @return success whether the transfer succeeded.\n function transferFrom(\n address from,\n address to,\n uint256 value\n ) external returns (bool success);\n\n /// @notice approve an address to spend on your behalf.\n /// @param spender address entitled to transfer on your behalf.\n /// @param value amount allowed to be transfered.\n /// @param success whether the approval succeeded.\n function approve(address spender, uint256 value) external returns (bool success);\n\n /// @notice return the current allowance for a particular owner/spender pair.\n /// @param owner address allowing spender.\n /// @param spender address allowed to spend.\n /// @return amount number of tokens `spender` can spend on behalf of `owner`.\n function allowance(address owner, address spender) external view returns (uint256 amount);\n}\n" + }, + "src/solc_0.6/common/Interfaces/ERC20WithMetadata.sol": { + "content": "/* This Source Code Form is subject to the terms of the Mozilla external\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n * This code has not been reviewed.\n * Do not use or deploy this code before reviewing it personally first.\n */\n// solhint-disable-next-line compiler-fixed\npragma solidity 0.6.5;\n\nimport \"./ERC20.sol\";\n\n\ninterface ERC20WithMetadata is ERC20 {\n function name() external view returns (string memory);\n\n function symbol() external view returns (string memory);\n\n function decimals() external view returns (uint8);\n}\n" + }, + "src/solc_0.6/common/Interfaces/ERC721.sol": { + "content": "pragma solidity 0.6.5;\n\nimport \"./ERC165.sol\";\nimport \"./ERC721Events.sol\";\n\n\n/**\n * @title ERC721 Non-Fungible Token Standard basic interface\n * @dev see https://eips.ethereum.org/EIPS/eip-721\n */\n\ninterface ERC721 is ERC165, ERC721Events {\n function balanceOf(address owner) external view returns (uint256 balance);\n\n function ownerOf(uint256 tokenId) external view returns (address owner);\n\n // function exists(uint256 tokenId) external view returns (bool exists);\n\n function approve(address to, uint256 tokenId) external;\n\n function getApproved(uint256 tokenId) external view returns (address operator);\n\n function setApprovalForAll(address operator, bool approved) external;\n\n function isApprovedForAll(address owner, address operator) external view returns (bool);\n\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes calldata data\n ) external;\n}\n" + }, + "src/solc_0.6/common/Interfaces/ERC721Events.sol": { + "content": "pragma solidity 0.6.5;\n\n\n/**\n * @title ERC721 Non-Fungible Token Standard basic interface\n * @dev see https://eips.ethereum.org/EIPS/eip-721\n */\ninterface ERC721Events {\n event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId);\n event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId);\n event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);\n}\n" + }, + "src/solc_0.6/common/Interfaces/ERC721MandatoryTokenReceiver.sol": { + "content": "pragma solidity 0.6.5;\n\n\n/// @dev Note: The ERC-165 identifier for this interface is 0x5e8bf644.\ninterface ERC721MandatoryTokenReceiver {\n function onERC721BatchReceived(\n address operator,\n address from,\n uint256[] calldata ids,\n bytes calldata data\n ) external returns (bytes4); // needs to return 0x4b808c46\n\n function onERC721Received(\n address operator,\n address from,\n uint256 tokenId,\n bytes calldata data\n ) external returns (bytes4); // needs to return 0x150b7a02\n\n // needs to implements EIP-165\n // function supportsInterface(bytes4 interfaceId)\n // external\n // view\n // returns (bool);\n}\n" + }, + "src/solc_0.6/common/Interfaces/ERC721TokenReceiver.sol": { + "content": "/* This Source Code Form is subject to the terms of the Mozilla external\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n * This code has not been reviewed.\n * Do not use or deploy this code before reviewing it personally first.\n */\n// solhint-disable-next-line compiler-fixed\npragma solidity 0.6.5;\n\n\ninterface ERC721TokenReceiver {\n function onERC721Received(\n address operator,\n address from,\n uint256 tokenId,\n bytes calldata data\n ) external returns (bytes4);\n}\n" + }, + "src/solc_0.6/common/Interfaces/Medianizer.sol": { + "content": "pragma solidity 0.6.5;\n\n\n/**\n * @title Medianizer contract\n * @dev From MakerDAO (https://etherscan.io/address/0x729D19f657BD0614b4985Cf1D82531c67569197B#code)\n */\ninterface Medianizer {\n function read() external view returns (bytes32);\n}\n" + }, + "src/solc_0.6/common/Libraries/AddressUtils.sol": { + "content": "pragma solidity 0.6.5;\n\n\nlibrary AddressUtils {\n function toPayable(address _address) internal pure returns (address payable _payable) {\n return address(uint160(_address));\n }\n\n function isContract(address addr) internal view returns (bool) {\n // for accounts without code, i.e. `keccak256('')`:\n bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\n\n bytes32 codehash;\n // solium-disable-next-line security/no-inline-assembly\n assembly {\n codehash := extcodehash(addr)\n }\n return (codehash != 0x0 && codehash != accountHash);\n }\n}\n" + }, + "src/solc_0.6/common/Libraries/BytesUtil.sol": { + "content": "pragma solidity 0.6.5;\n\n\nlibrary BytesUtil {\n function memcpy(\n uint256 dest,\n uint256 src,\n uint256 len\n ) internal pure {\n // Copy word-length chunks while possible\n for (; len >= 32; len -= 32) {\n assembly {\n mstore(dest, mload(src))\n }\n dest += 32;\n src += 32;\n }\n\n // Copy remaining bytes\n uint256 mask = 256**(32 - len) - 1;\n assembly {\n let srcpart := and(mload(src), not(mask))\n let destpart := and(mload(dest), mask)\n mstore(dest, or(destpart, srcpart))\n }\n }\n\n function pointerToBytes(uint256 src, uint256 len) internal pure returns (bytes memory) {\n bytes memory ret = new bytes(len);\n uint256 retptr;\n assembly {\n retptr := add(ret, 32)\n }\n\n memcpy(retptr, src, len);\n return ret;\n }\n\n function addressToBytes(address a) internal pure returns (bytes memory b) {\n assembly {\n let m := mload(0x40)\n mstore(add(m, 20), xor(0x140000000000000000000000000000000000000000, a))\n mstore(0x40, add(m, 52))\n b := m\n }\n }\n\n function uint256ToBytes(uint256 a) internal pure returns (bytes memory b) {\n assembly {\n let m := mload(0x40)\n mstore(add(m, 32), a)\n mstore(0x40, add(m, 64))\n b := m\n }\n }\n\n function doFirstParamEqualsAddress(bytes memory data, address _address) internal pure returns (bool) {\n if (data.length < (36 + 32)) {\n return false;\n }\n uint256 value;\n assembly {\n value := mload(add(data, 36))\n }\n return value == uint256(_address);\n }\n\n function doParamEqualsUInt256(\n bytes memory data,\n uint256 i,\n uint256 value\n ) internal pure returns (bool) {\n if (data.length < (36 + (i + 1) * 32)) {\n return false;\n }\n uint256 offset = 36 + i * 32;\n uint256 valuePresent;\n assembly {\n valuePresent := mload(add(data, offset))\n }\n return valuePresent == value;\n }\n\n function overrideFirst32BytesWithAddress(bytes memory data, address _address) internal pure returns (bytes memory) {\n uint256 dest;\n assembly {\n dest := add(data, 48)\n } // 48 = 32 (offset) + 4 (func sig) + 12 (address is only 20 bytes)\n\n bytes memory addressBytes = addressToBytes(_address);\n uint256 src;\n assembly {\n src := add(addressBytes, 32)\n }\n\n memcpy(dest, src, 20);\n return data;\n }\n\n function overrideFirstTwo32BytesWithAddressAndInt(\n bytes memory data,\n address _address,\n uint256 _value\n ) internal pure returns (bytes memory) {\n uint256 dest;\n uint256 src;\n\n assembly {\n dest := add(data, 48)\n } // 48 = 32 (offset) + 4 (func sig) + 12 (address is only 20 bytes)\n bytes memory bbytes = addressToBytes(_address);\n assembly {\n src := add(bbytes, 32)\n }\n memcpy(dest, src, 20);\n\n assembly {\n dest := add(data, 68)\n } // 48 = 32 (offset) + 4 (func sig) + 32 (next slot)\n bbytes = uint256ToBytes(_value);\n assembly {\n src := add(bbytes, 32)\n }\n memcpy(dest, src, 32);\n\n return data;\n }\n}\n" + }, + "src/solc_0.6/common/Libraries/ObjectLib.sol": { + "content": "pragma solidity 0.6.5;\n\nimport \"./SafeMathWithRequire.sol\";\n\n\nlibrary ObjectLib {\n using SafeMathWithRequire for uint256;\n enum Operations {ADD, SUB, REPLACE}\n // Constants regarding bin or chunk sizes for balance packing\n uint256 constant TYPES_BITS_SIZE = 16; // Max size of each object\n uint256 constant TYPES_PER_UINT256 = 256 / TYPES_BITS_SIZE; // Number of types per uint256\n\n //\n // Objects and Tokens Functions\n //\n\n /**\n * @dev Return the bin number and index within that bin where ID is\n * @param _tokenId Object type\n * @return bin Bin number\n * @return index ID's index within that bin\n */\n function getTokenBinIndex(uint256 _tokenId) internal pure returns (uint256 bin, uint256 index) {\n bin = (_tokenId * TYPES_BITS_SIZE) / 256;\n index = _tokenId % TYPES_PER_UINT256;\n return (bin, index);\n }\n\n /**\n * @dev update the balance of a type provided in _binBalances\n * @param _binBalances Uint256 containing the balances of objects\n * @param _index Index of the object in the provided bin\n * @param _amount Value to update the type balance\n * @param _operation Which operation to conduct :\n * Operations.REPLACE : Replace type balance with _amount\n * Operations.ADD : ADD _amount to type balance\n * Operations.SUB : Substract _amount from type balance\n */\n function updateTokenBalance(\n uint256 _binBalances,\n uint256 _index,\n uint256 _amount,\n Operations _operation\n ) internal pure returns (uint256 newBinBalance) {\n uint256 objectBalance = 0;\n if (_operation == Operations.ADD) {\n objectBalance = getValueInBin(_binBalances, _index);\n newBinBalance = writeValueInBin(_binBalances, _index, objectBalance.add(_amount));\n } else if (_operation == Operations.SUB) {\n objectBalance = getValueInBin(_binBalances, _index);\n newBinBalance = writeValueInBin(_binBalances, _index, objectBalance.sub(_amount));\n } else if (_operation == Operations.REPLACE) {\n newBinBalance = writeValueInBin(_binBalances, _index, _amount);\n } else {\n revert(\"Invalid operation\"); // Bad operation\n }\n\n return newBinBalance;\n }\n\n /*\n * @dev return value in _binValue at position _index\n * @param _binValue uint256 containing the balances of TYPES_PER_UINT256 types\n * @param _index index at which to retrieve value\n * @return Value at given _index in _bin\n */\n function getValueInBin(uint256 _binValue, uint256 _index) internal pure returns (uint256) {\n // Mask to retrieve data for a given binData\n uint256 mask = (uint256(1) << TYPES_BITS_SIZE) - 1;\n\n // Shift amount\n uint256 rightShift = 256 - TYPES_BITS_SIZE * (_index + 1);\n return (_binValue >> rightShift) & mask;\n }\n\n /**\n * @dev return the updated _binValue after writing _amount at _index\n * @param _binValue uint256 containing the balances of TYPES_PER_UINT256 types\n * @param _index Index at which to retrieve value\n * @param _amount Value to store at _index in _bin\n * @return Value at given _index in _bin\n */\n function writeValueInBin(\n uint256 _binValue,\n uint256 _index,\n uint256 _amount\n ) internal pure returns (uint256) {\n require(_amount < 2**TYPES_BITS_SIZE, \"Amount to write in bin is too large\");\n\n // Mask to retrieve data for a given binData\n uint256 mask = (uint256(1) << TYPES_BITS_SIZE) - 1;\n\n // Shift amount\n uint256 leftShift = 256 - TYPES_BITS_SIZE * (_index + 1);\n return (_binValue & ~(mask << leftShift)) | (_amount << leftShift);\n }\n}\n" + }, + "src/solc_0.6/common/Libraries/ObjectLib32.sol": { + "content": "pragma solidity 0.6.5;\n\nimport \"./SafeMathWithRequire.sol\";\n\n\nlibrary ObjectLib32 {\n using SafeMathWithRequire for uint256;\n enum Operations {ADD, SUB, REPLACE}\n // Constants regarding bin or chunk sizes for balance packing\n uint256 constant TYPES_BITS_SIZE = 32; // Max size of each object\n uint256 constant TYPES_PER_UINT256 = 256 / TYPES_BITS_SIZE; // Number of types per uint256\n\n //\n // Objects and Tokens Functions\n //\n\n /**\n * @dev Return the bin number and index within that bin where ID is\n * @param tokenId Object type\n * @return bin Bin number\n * @return index ID's index within that bin\n */\n function getTokenBinIndex(uint256 tokenId) internal pure returns (uint256 bin, uint256 index) {\n bin = (tokenId * TYPES_BITS_SIZE) / 256;\n index = tokenId % TYPES_PER_UINT256;\n return (bin, index);\n }\n\n /**\n * @dev update the balance of a type provided in binBalances\n * @param binBalances Uint256 containing the balances of objects\n * @param index Index of the object in the provided bin\n * @param amount Value to update the type balance\n * @param operation Which operation to conduct :\n * Operations.REPLACE : Replace type balance with amount\n * Operations.ADD : ADD amount to type balance\n * Operations.SUB : Substract amount from type balance\n */\n function updateTokenBalance(\n uint256 binBalances,\n uint256 index,\n uint256 amount,\n Operations operation\n ) internal pure returns (uint256 newBinBalance) {\n uint256 objectBalance = 0;\n if (operation == Operations.ADD) {\n objectBalance = getValueInBin(binBalances, index);\n newBinBalance = writeValueInBin(binBalances, index, objectBalance.add(amount));\n } else if (operation == Operations.SUB) {\n objectBalance = getValueInBin(binBalances, index);\n require(objectBalance >= amount, \"can't substract more than there is\");\n newBinBalance = writeValueInBin(binBalances, index, objectBalance.sub(amount));\n } else if (operation == Operations.REPLACE) {\n newBinBalance = writeValueInBin(binBalances, index, amount);\n } else {\n revert(\"Invalid operation\"); // Bad operation\n }\n\n return newBinBalance;\n }\n\n /*\n * @dev return value in binValue at position index\n * @param binValue uint256 containing the balances of TYPES_PER_UINT256 types\n * @param index index at which to retrieve value\n * @return Value at given index in bin\n */\n function getValueInBin(uint256 binValue, uint256 index) internal pure returns (uint256) {\n // Mask to retrieve data for a given binData\n uint256 mask = (uint256(1) << TYPES_BITS_SIZE) - 1;\n\n // Shift amount\n uint256 rightShift = 256 - TYPES_BITS_SIZE * (index + 1);\n return (binValue >> rightShift) & mask;\n }\n\n /**\n * @dev return the updated binValue after writing amount at index\n * @param binValue uint256 containing the balances of TYPES_PER_UINT256 types\n * @param index Index at which to retrieve value\n * @param amount Value to store at index in bin\n * @return Value at given index in bin\n */\n function writeValueInBin(\n uint256 binValue,\n uint256 index,\n uint256 amount\n ) internal pure returns (uint256) {\n require(amount < 2**TYPES_BITS_SIZE, \"Amount to write in bin is too large\");\n\n // Mask to retrieve data for a given binData\n uint256 mask = (uint256(1) << TYPES_BITS_SIZE) - 1;\n\n // Shift amount\n uint256 leftShift = 256 - TYPES_BITS_SIZE * (index + 1);\n return (binValue & ~(mask << leftShift)) | (amount << leftShift);\n }\n}\n" + }, + "src/solc_0.6/common/Libraries/ObjectLib64.sol": { + "content": "pragma solidity 0.6.5;\n\nimport \"./SafeMathWithRequire.sol\";\n\n\nlibrary ObjectLib64 {\n using SafeMathWithRequire for uint256;\n enum Operations {ADD, SUB, REPLACE}\n // Constants regarding bin or chunk sizes for balance packing\n uint256 constant TYPES_BITS_SIZE = 64; // Max size of each object\n uint256 constant TYPES_PER_UINT256 = 256 / TYPES_BITS_SIZE; // Number of types per uint256\n\n //\n // Objects and Tokens Functions\n //\n\n /**\n * @dev Return the bin number and index within that bin where ID is\n * @param _tokenId Object type\n * @return bin Bin number\n * @return index ID's index within that bin\n */\n function getTokenBinIndex(uint256 _tokenId) internal pure returns (uint256 bin, uint256 index) {\n bin = (_tokenId * TYPES_BITS_SIZE) / 256;\n index = _tokenId % TYPES_PER_UINT256;\n return (bin, index);\n }\n\n /**\n * @dev update the balance of a type provided in _binBalances\n * @param _binBalances Uint256 containing the balances of objects\n * @param _index Index of the object in the provided bin\n * @param _amount Value to update the type balance\n * @param _operation Which operation to conduct :\n * Operations.REPLACE : Replace type balance with _amount\n * Operations.ADD : ADD _amount to type balance\n * Operations.SUB : Substract _amount from type balance\n */\n function updateTokenBalance(\n uint256 _binBalances,\n uint256 _index,\n uint256 _amount,\n Operations _operation\n ) internal pure returns (uint256 newBinBalance) {\n uint256 objectBalance = 0;\n if (_operation == Operations.ADD) {\n objectBalance = getValueInBin(_binBalances, _index);\n newBinBalance = writeValueInBin(_binBalances, _index, objectBalance.add(_amount));\n } else if (_operation == Operations.SUB) {\n objectBalance = getValueInBin(_binBalances, _index);\n newBinBalance = writeValueInBin(_binBalances, _index, objectBalance.sub(_amount));\n } else if (_operation == Operations.REPLACE) {\n newBinBalance = writeValueInBin(_binBalances, _index, _amount);\n } else {\n revert(\"Invalid operation\"); // Bad operation\n }\n\n return newBinBalance;\n }\n\n /*\n * @dev return value in _binValue at position _index\n * @param _binValue uint256 containing the balances of TYPES_PER_UINT256 types\n * @param _index index at which to retrieve value\n * @return Value at given _index in _bin\n */\n function getValueInBin(uint256 _binValue, uint256 _index) internal pure returns (uint256) {\n // Mask to retrieve data for a given binData\n uint256 mask = (uint256(1) << TYPES_BITS_SIZE) - 1;\n\n // Shift amount\n uint256 rightShift = 256 - TYPES_BITS_SIZE * (_index + 1);\n return (_binValue >> rightShift) & mask;\n }\n\n /**\n * @dev return the updated _binValue after writing _amount at _index\n * @param _binValue uint256 containing the balances of TYPES_PER_UINT256 types\n * @param _index Index at which to retrieve value\n * @param _amount Value to store at _index in _bin\n * @return Value at given _index in _bin\n */\n function writeValueInBin(\n uint256 _binValue,\n uint256 _index,\n uint256 _amount\n ) internal pure returns (uint256) {\n require(_amount < 2**TYPES_BITS_SIZE, \"Amount to write in bin is too large\");\n\n // Mask to retrieve data for a given binData\n uint256 mask = (uint256(1) << TYPES_BITS_SIZE) - 1;\n\n // Shift amount\n uint256 leftShift = 256 - TYPES_BITS_SIZE * (_index + 1);\n return (_binValue & ~(mask << leftShift)) | (_amount << leftShift);\n }\n}\n" + }, + "src/solc_0.6/common/Libraries/PriceUtil.sol": { + "content": "pragma solidity 0.6.5;\n\nimport \"./SafeMathWithRequire.sol\";\n\n\nlibrary PriceUtil {\n using SafeMathWithRequire for uint256;\n\n function calculateCurrentPrice(\n uint256 startingPrice,\n uint256 endingPrice,\n uint256 duration,\n uint256 secondsPassed\n ) internal pure returns (uint256) {\n if (secondsPassed > duration) {\n return endingPrice;\n }\n if (endingPrice == startingPrice) {\n return endingPrice;\n } else if (endingPrice > startingPrice) {\n return startingPrice.add((endingPrice.sub(startingPrice)).mul(secondsPassed).div(duration));\n } else {\n return startingPrice.sub((startingPrice.sub(endingPrice)).mul(secondsPassed).div(duration));\n }\n }\n\n function calculateFee(uint256 price, uint256 fee10000th) internal pure returns (uint256) {\n // _fee < 10000, so the result will be <= price\n return (price.mul(fee10000th)) / 10000;\n }\n}\n" + }, + "src/solc_0.6/common/Libraries/SafeMath.sol": { + "content": "pragma solidity 0.6.5;\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {\n // Gas optimization: this is cheaper than asserting 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522\n if (a == 0) {\n return 0;\n }\n\n c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n // uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return a / b;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256 c) {\n c = a + b;\n assert(c >= a);\n return c;\n }\n}\n" + }, + "src/solc_0.6/common/Libraries/SafeMathWithRequire.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.6.5;\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that revert\n */\nlibrary SafeMathWithRequire {\n using SafeMathWithRequire for uint256;\n\n uint256 constant DECIMALS_18 = 1000000000000000000;\n uint256 constant DECIMALS_12 = 1000000000000;\n uint256 constant DECIMALS_9 = 1000000000;\n uint256 constant DECIMALS_6 = 1000000;\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {\n // Gas optimization: this is cheaper than asserting 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522\n if (a == 0) {\n return 0;\n }\n\n c = a * b;\n require(c / a == b, \"overflow\");\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b != 0, \"divbyzero\");\n return a / b;\n }\n\n /**\n * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b <= a, \"underflow\");\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256 c) {\n c = a + b;\n require(c >= a, \"overflow\");\n return c;\n }\n\n function sqrt6(uint256 a) internal pure returns (uint256 c) {\n a = a.mul(DECIMALS_12);\n uint256 tmp = a.add(1) / 2;\n c = a;\n // tmp cannot be zero unless a = 0 which skip the loop\n while (tmp < c) {\n c = tmp;\n tmp = ((a / tmp) + tmp) / 2;\n }\n }\n\n function sqrt3(uint256 a) internal pure returns (uint256 c) {\n a = a.mul(DECIMALS_6);\n uint256 tmp = a.add(1) / 2;\n c = a;\n // tmp cannot be zero unless a = 0 which skip the loop\n while (tmp < c) {\n c = tmp;\n tmp = ((a / tmp) + tmp) / 2;\n }\n }\n\n function cbrt6(uint256 a) internal pure returns (uint256 c) {\n a = a.mul(DECIMALS_18);\n uint256 tmp = a.add(2) / 3;\n c = a;\n // tmp cannot be zero unless a = 0 which skip the loop\n while (tmp < c) {\n c = tmp;\n uint256 tmpSquare = tmp**2;\n require(tmpSquare > tmp, \"overflow\");\n tmp = ((a / tmpSquare) + (tmp * 2)) / 3;\n }\n return c;\n }\n\n function cbrt3(uint256 a) internal pure returns (uint256 c) {\n a = a.mul(DECIMALS_9);\n uint256 tmp = a.add(2) / 3;\n c = a;\n // tmp cannot be zero unless a = 0 which skip the loop\n while (tmp < c) {\n c = tmp;\n uint256 tmpSquare = tmp**2;\n require(tmpSquare > tmp, \"overflow\");\n tmp = ((a / tmpSquare) + (tmp * 2)) / 3;\n }\n return c;\n }\n\n function rt6_3(uint256 a) internal pure returns (uint256 c) {\n a = a.mul(DECIMALS_18);\n uint256 tmp = a.add(5) / 6;\n c = a;\n // tmp cannot be zero unless a = 0 which skip the loop\n while (tmp < c) {\n c = tmp;\n uint256 tmpFive = tmp**5;\n require(tmpFive > tmp, \"overflow\");\n tmp = ((a / tmpFive) + (tmp * 5)) / 6;\n }\n }\n}\n" + }, + "src/solc_0.6/common/Libraries/SigUtil.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.6.5;\n\n\nlibrary SigUtil {\n function recover(bytes32 hash, bytes memory sig) internal pure returns (address recovered) {\n require(sig.length == 65);\n\n bytes32 r;\n bytes32 s;\n uint8 v;\n assembly {\n r := mload(add(sig, 32))\n s := mload(add(sig, 64))\n v := byte(0, mload(add(sig, 96)))\n }\n\n // Version of signature should be 27 or 28, but 0 and 1 are also possible versions\n if (v < 27) {\n v += 27;\n }\n require(v == 27 || v == 28);\n\n recovered = ecrecover(hash, v, r, s);\n require(recovered != address(0));\n }\n\n function recoverWithZeroOnFailure(bytes32 hash, bytes memory sig) internal pure returns (address) {\n if (sig.length != 65) {\n return (address(0));\n }\n\n bytes32 r;\n bytes32 s;\n uint8 v;\n assembly {\n r := mload(add(sig, 32))\n s := mload(add(sig, 64))\n v := byte(0, mload(add(sig, 96)))\n }\n\n // Version of signature should be 27 or 28, but 0 and 1 are also possible versions\n if (v < 27) {\n v += 27;\n }\n\n if (v != 27 && v != 28) {\n return (address(0));\n } else {\n return ecrecover(hash, v, r, s);\n }\n }\n\n // Builds a prefixed hash to mimic the behavior of eth_sign.\n function prefixed(bytes32 hash) internal pure returns (bytes memory) {\n return abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash);\n }\n}\n" + }, + "src/solc_0.6/EstateSale/AuthValidator.sol": { + "content": "//SPDX-License-Identifier: MIT\npragma solidity 0.6.5;\n\nimport \"@openzeppelin/contracts-0.6/cryptography/ECDSA.sol\";\nimport \"../common/BaseWithStorage/Admin.sol\";\n\ncontract AuthValidator is Admin {\n address public _signingAuthWallet;\n\n event SigningWallet(address indexed signingWallet);\n\n constructor(address adminWallet, address initialSigningWallet) public {\n require(adminWallet != address(0), \"AuthValidator: zero address\");\n\n _admin = adminWallet;\n _updateSigningAuthWallet(initialSigningWallet);\n }\n\n function updateSigningAuthWallet(address newSigningWallet) external onlyAdmin {\n _updateSigningAuthWallet(newSigningWallet);\n }\n\n function _updateSigningAuthWallet(address newSigningWallet) internal {\n require(newSigningWallet != address(0), \"AuthValidator: INVALID_SIGNING_WALLET\");\n _signingAuthWallet = newSigningWallet;\n emit SigningWallet(newSigningWallet);\n }\n\n function isAuthValid(bytes memory signature, bytes32 hashedData) public view returns (bool) {\n address signer = ECDSA.recover(ECDSA.toEthSignedMessageHash(hashedData), signature);\n return signer == _signingAuthWallet;\n }\n}\n" + }, + "src/solc_0.6/EstateSale/EstateSaleWithAuth.sol": { + "content": "/* solhint-disable not-rely-on-time, func-order */\npragma solidity 0.6.5;\n\nimport \"@openzeppelin/contracts-0.6/utils/ReentrancyGuard.sol\";\nimport \"@openzeppelin/contracts-0.6/math/SafeMath.sol\";\nimport \"@openzeppelin/contracts-0.6/utils/Address.sol\";\nimport \"@openzeppelin/contracts-0.6/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts-0.6/token/ERC1155/IERC1155.sol\";\nimport \"./ILandToken.sol\";\nimport \"../common/BaseWithStorage/MetaTransactionReceiver.sol\";\nimport \"../ReferralValidator/ReferralValidator.sol\";\nimport \"./AuthValidator.sol\";\n\n/// @title Estate Sale contract with referral\n/// @notice This contract manages the sale of our lands as Estates\ncontract EstateSaleWithAuth is ReentrancyGuard, MetaTransactionReceiver, ReferralValidator {\n using SafeMath for uint256;\n using Address for address;\n using SafeERC20 for IERC20;\n\n event LandQuadPurchased(\n address indexed buyer,\n address indexed to,\n uint256 indexed topCornerId,\n uint256 size,\n uint256 price,\n address token,\n uint256 amountPaid\n );\n\n event NewReceivingWallet(address indexed newWallet);\n\n /// @notice set the wallet receiving the proceeds\n /// @param newWallet address of the new receiving wallet\n function setReceivingWallet(address payable newWallet) external {\n require(newWallet != address(0), \"ZERO_ADDRESS\");\n require(msg.sender == _admin, \"NOT_AUTHORIZED\");\n _wallet = newWallet;\n\n emit NewReceivingWallet(newWallet);\n }\n\n /// @notice buy Land with SAND using the merkle proof associated with it\n /// @param buyer address that perform the payment\n /// @param to address that will own the purchased Land\n /// @param reserved the reserved address (if any)\n /// @param info [X_INDEX=0] x coordinate of the Land [Y_INDEX=1] y coordinate of the Land [SIZE_INDEX=2] size of the pack of Land to purchase [PRICE_INDEX=3] price in SAND to purchase that Land\n /// @param salt The salt submitted for verification.\n /// @param assetIds asset ids (lands) that will be bought\n /// @param proof merkleProof for that particular Land\n /// @param referral referral id\n /// @param signature A signed message specifying tx details\n function buyLandWithSand(\n address buyer,\n address to,\n address reserved,\n uint256[] calldata info,\n bytes32 salt,\n uint256[] calldata assetIds,\n bytes32[] calldata proof,\n bytes calldata referral,\n bytes calldata signature\n ) external nonReentrant {\n _checkAddressesAndExpiryTime(buyer, reserved);\n _checkAuthAndProofValidity(to, reserved, info, salt, assetIds, proof, signature);\n _handleFeeAndReferral(buyer, info[PRICE_INDEX], referral);\n _mint(buyer, to, info);\n _sendAssets(to, assetIds);\n }\n\n /// @notice Gets the expiry time for the current sale\n /// @return The expiry time, as a unix epoch\n function getExpiryTime() external view returns (uint256) {\n return _expiryTime;\n }\n\n /// @notice Gets the Merkle root associated with the current sale\n /// @return The Merkle root, as a bytes32 hash\n function getMerkleRoot() external view returns (bytes32) {\n return _merkleRoot;\n }\n\n /// @notice enable Admin to withdraw remaining assets from EstateSaleWithFee contract\n /// @param to intended recipient of the asset tokens\n /// @param assetIds the assetIds to be transferred\n /// @param values the quantities of the assetIds to be transferred\n function withdrawAssets(\n address to,\n uint256[] calldata assetIds,\n uint256[] calldata values\n ) external {\n require(msg.sender == _admin, \"NOT_AUTHORIZED\");\n _asset.safeBatchTransferFrom(address(this), to, assetIds, values, \"\");\n }\n\n function onERC1155Received(\n address, /*operator*/\n address, /*from*/\n uint256, /*id*/\n uint256, /*value*/\n bytes calldata /*data*/\n ) external pure returns (bytes4) {\n return 0xf23a6e61;\n }\n\n function onERC1155BatchReceived(\n address, /*operator*/\n address, /*from*/\n uint256[] calldata, /*ids*/\n uint256[] calldata, /*values*/\n bytes calldata /*data*/\n ) external pure returns (bytes4) {\n return 0xbc197c81;\n }\n\n function _sendAssets(address to, uint256[] memory assetIds) internal {\n uint256[] memory values = new uint256[](assetIds.length);\n for (uint256 i = 0; i < assetIds.length; i++) {\n values[i] = 1;\n }\n _asset.safeBatchTransferFrom(address(this), to, assetIds, values, \"\");\n }\n\n // NOTE: _checkAddressesAndExpiryTime & _checkAuthAndProofValidity were split due to a stack too deep issue\n function _checkAddressesAndExpiryTime(address buyer, address reserved) internal view {\n /* solium-disable-next-line security/no-block-members */\n require(block.timestamp < _expiryTime, \"SALE_IS_OVER\");\n require(buyer == msg.sender || _metaTransactionContracts[msg.sender], \"NOT_AUTHORIZED\");\n require(reserved == address(0) || reserved == buyer, \"RESERVED_LAND\");\n }\n\n // NOTE: _checkAddressesAndExpiryTime & _checkAuthAndProofValidity were split due to a stack too deep issue\n function _checkAuthAndProofValidity(\n address to,\n address reserved,\n uint256[] memory info,\n bytes32 salt,\n uint256[] memory assetIds,\n bytes32[] memory proof,\n bytes memory signature\n ) internal view {\n bytes32 hashedData = keccak256(\n abi.encodePacked(\n to,\n reserved,\n info[X_INDEX],\n info[Y_INDEX],\n info[SIZE_INDEX],\n info[PRICE_INDEX],\n salt,\n keccak256(abi.encodePacked(assetIds)),\n keccak256(abi.encodePacked(proof))\n )\n );\n require(_authValidator.isAuthValid(signature, hashedData), \"INVALID_AUTH\");\n\n bytes32 leaf = _generateLandHash(\n info[X_INDEX],\n info[Y_INDEX],\n info[SIZE_INDEX],\n info[PRICE_INDEX],\n reserved,\n salt,\n assetIds\n );\n require(_verify(proof, leaf), \"INVALID_LAND\");\n }\n\n function _mint(\n address buyer,\n address to,\n uint256[] memory info\n ) internal {\n if (info[SIZE_INDEX] == 1 || _estate == address(0)) {\n _land.mintQuad(to, info[SIZE_INDEX], info[X_INDEX], info[Y_INDEX], \"\");\n } else {\n _land.mintQuad(_estate, info[SIZE_INDEX], info[X_INDEX], info[Y_INDEX], abi.encode(to));\n }\n emit LandQuadPurchased(\n buyer,\n to,\n info[X_INDEX] + (info[Y_INDEX] * GRID_SIZE),\n info[SIZE_INDEX],\n info[PRICE_INDEX],\n address(_sand),\n info[PRICE_INDEX]\n );\n }\n\n function _generateLandHash(\n uint256 x,\n uint256 y,\n uint256 size,\n uint256 price,\n address reserved,\n bytes32 salt,\n uint256[] memory assetIds\n ) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(x, y, size, price, reserved, salt, assetIds));\n }\n\n function _verify(bytes32[] memory proof, bytes32 leaf) internal view returns (bool) {\n bytes32 computedHash = leaf;\n\n for (uint256 i = 0; i < proof.length; i++) {\n bytes32 proofElement = proof[i];\n\n if (computedHash < proofElement) {\n computedHash = keccak256(abi.encodePacked(computedHash, proofElement));\n } else {\n computedHash = keccak256(abi.encodePacked(proofElement, computedHash));\n }\n }\n\n return computedHash == _merkleRoot;\n }\n\n function _handleFeeAndReferral(\n address buyer,\n uint256 priceInSand,\n bytes memory referral\n ) internal {\n // send 5% fee to a specially configured instance of FeeDistributor.sol\n uint256 remainingAmountInSand = _handleSandFee(buyer, priceInSand);\n\n // calculate referral based on 95% of original priceInSand\n handleReferralWithERC20(buyer, remainingAmountInSand, referral, _wallet, address(_sand));\n }\n\n function _handleSandFee(address buyer, uint256 priceInSand) internal returns (uint256) {\n uint256 feeAmountInSand = priceInSand.mul(FEE).div(100);\n _sand.safeTransferFrom(buyer, address(_feeDistributor), feeAmountInSand);\n return priceInSand.sub(feeAmountInSand);\n }\n\n uint256 internal constant GRID_SIZE = 408; // 408 is the size of the Land\n\n IERC1155 internal immutable _asset;\n ILandToken internal immutable _land;\n IERC20 internal immutable _sand;\n address internal immutable _estate;\n address internal immutable _feeDistributor;\n\n address payable internal _wallet;\n AuthValidator internal _authValidator;\n uint256 internal immutable _expiryTime;\n bytes32 internal immutable _merkleRoot;\n\n uint256 private constant FEE = 5; // percentage of land sale price to be diverted to a specially configured instance of FeeDistributor, shown as an integer\n // buyLandWithSand info indexes\n uint256 private constant X_INDEX = 0;\n uint256 private constant Y_INDEX = 1;\n uint256 private constant SIZE_INDEX = 2;\n uint256 private constant PRICE_INDEX = 3;\n\n constructor(\n address landAddress,\n address sandContractAddress,\n address initialMetaTx,\n address admin,\n address payable initialWalletAddress,\n bytes32 merkleRoot,\n uint256 expiryTime,\n address initialSigningWallet,\n uint256 initialMaxCommissionRate,\n address estate,\n address asset,\n address feeDistributor,\n address authValidator\n ) public ReferralValidator(initialSigningWallet, initialMaxCommissionRate) {\n require(landAddress.isContract(), \"EstateSaleWithAuth: is not a contract\");\n require(sandContractAddress.isContract(), \"EstateSaleWithAuth: is not a contract\");\n require(initialMetaTx != address(0), \"EstateSaleWithAuth: zero address\");\n require(admin != address(0), \"EstateSaleWithAuth: zero address\");\n require(initialWalletAddress != address(0), \"EstateSaleWithAuth: zero address\");\n require(asset.isContract(), \"EstateSaleWithAuth: is not a contract\");\n require(feeDistributor != address(0), \"EstateSaleWithAuth: zero address\");\n require(authValidator.isContract(), \"EstateSaleWithAuth: is not a contract\");\n\n\n _land = ILandToken(landAddress);\n _sand = IERC20(sandContractAddress);\n _setMetaTransactionProcessor(initialMetaTx, true);\n _wallet = initialWalletAddress;\n _merkleRoot = merkleRoot;\n _expiryTime = expiryTime;\n _admin = admin;\n _estate = estate;\n _asset = IERC1155(asset);\n _feeDistributor = feeDistributor;\n _authValidator = AuthValidator(authValidator);\n }\n}\n" + }, + "src/solc_0.6/EstateSale/EstateSaleWithFee.sol": { + "content": "/* solhint-disable not-rely-on-time, func-order */\npragma solidity 0.6.5;\n\nimport \"../common/Libraries/SafeMathWithRequire.sol\";\nimport \"./ILandToken.sol\";\nimport \"../common/Interfaces/ERC1155.sol\";\nimport \"../common/Interfaces/ERC20.sol\";\nimport \"../common/BaseWithStorage/MetaTransactionReceiver.sol\";\nimport \"../ReferralValidator/ReferralValidator.sol\";\n\n\n/// @title Estate Sale contract with referral\n/// @notice This contract manages the sale of our lands as Estates\ncontract EstateSaleWithFee is MetaTransactionReceiver, ReferralValidator {\n using SafeMathWithRequire for uint256;\n\n event LandQuadPurchased(\n address indexed buyer,\n address indexed to,\n uint256 indexed topCornerId,\n uint256 size,\n uint256 price,\n address token,\n uint256 amountPaid\n );\n\n /// @notice set the wallet receiving the proceeds\n /// @param newWallet address of the new receiving wallet\n function setReceivingWallet(address payable newWallet) external {\n require(newWallet != address(0), \"ZERO_ADDRESS\");\n require(msg.sender == _admin, \"NOT_AUTHORIZED\");\n _wallet = newWallet;\n }\n\n function rebalanceSand(uint256 newMultiplier) external {\n require(msg.sender == _admin, \"NOT_AUTHORIZED\");\n _multiplier = newMultiplier;\n }\n\n function getSandMultiplier() external view returns (uint256) {\n return _multiplier;\n }\n\n /// @notice buy Land with SAND using the merkle proof associated with it\n /// @param buyer address that perform the payment\n /// @param to address that will own the purchased Land\n /// @param reserved the reserved address (if any)\n /// @param x x coordinate of the Land\n /// @param y y coordinate of the Land\n /// @param size size of the pack of Land to purchase\n /// @param priceInSand price in SAND to purchase that Land\n /// @param proof merkleProof for that particular Land\n function buyLandWithSand(\n address buyer,\n address to,\n address reserved,\n uint256 x,\n uint256 y,\n uint256 size,\n uint256 priceInSand,\n uint256 adjustedPriceInSand,\n bytes32 salt,\n uint256[] calldata assetIds,\n bytes32[] calldata proof,\n bytes calldata referral\n ) external {\n _checkPrices(priceInSand, adjustedPriceInSand);\n _checkValidity(buyer, reserved, x, y, size, priceInSand, salt, assetIds, proof);\n _handleFeeAndReferral(buyer, adjustedPriceInSand, referral);\n _mint(buyer, to, x, y, size, adjustedPriceInSand, address(_sand), adjustedPriceInSand);\n _sendAssets(to, assetIds);\n }\n\n /// @notice Gets the expiry time for the current sale\n /// @return The expiry time, as a unix epoch\n function getExpiryTime() external view returns (uint256) {\n return _expiryTime;\n }\n\n /// @notice Gets the Merkle root associated with the current sale\n /// @return The Merkle root, as a bytes32 hash\n function getMerkleRoot() external view returns (bytes32) {\n return _merkleRoot;\n }\n\n /// @notice enable Admin to withdraw remaining assets from EstateSaleWithFee contract\n /// @param to intended recipient of the asset tokens\n /// @param assetIds the assetIds to be transferred\n /// @param values the quantities of the assetIds to be transferred\n function withdrawAssets(\n address to,\n uint256[] calldata assetIds,\n uint256[] calldata values\n ) external {\n require(msg.sender == _admin, \"NOT_AUTHORIZED\");\n // require(block.timestamp > _expiryTime, \"SALE_NOT_OVER\"); // removed to recover in case of misconfigured sales\n _asset.safeBatchTransferFrom(address(this), to, assetIds, values, \"\");\n }\n\n function onERC1155Received(\n address, /*operator*/\n address, /*from*/\n uint256, /*id*/\n uint256, /*value*/\n bytes calldata /*data*/\n ) external pure returns (bytes4) {\n return 0xf23a6e61;\n }\n\n function onERC1155BatchReceived(\n address, /*operator*/\n address, /*from*/\n uint256[] calldata, /*ids*/\n uint256[] calldata, /*values*/\n bytes calldata /*data*/\n ) external pure returns (bytes4) {\n return 0xbc197c81;\n }\n\n function _sendAssets(address to, uint256[] memory assetIds) internal {\n uint256[] memory values = new uint256[](assetIds.length);\n for (uint256 i = 0; i < assetIds.length; i++) {\n values[i] = 1;\n }\n _asset.safeBatchTransferFrom(address(this), to, assetIds, values, \"\");\n }\n\n function _checkPrices(uint256 priceInSand, uint256 adjustedPriceInSand) internal view {\n require(adjustedPriceInSand == priceInSand.mul(_multiplier).div(MULTIPLIER_DECIMALS), \"INVALID_PRICE\");\n }\n\n function _checkValidity(\n address buyer,\n address reserved,\n uint256 x,\n uint256 y,\n uint256 size,\n uint256 price,\n bytes32 salt,\n uint256[] memory assetIds,\n bytes32[] memory proof\n ) internal view {\n /* solium-disable-next-line security/no-block-members */\n require(block.timestamp < _expiryTime, \"SALE_IS_OVER\");\n require(buyer == msg.sender || _metaTransactionContracts[msg.sender], \"NOT_AUTHORIZED\");\n require(reserved == address(0) || reserved == buyer, \"RESERVED_LAND\");\n bytes32 leaf = _generateLandHash(x, y, size, price, reserved, salt, assetIds);\n\n require(_verify(proof, leaf), \"INVALID_LAND\");\n }\n\n function _mint(\n address buyer,\n address to,\n uint256 x,\n uint256 y,\n uint256 size,\n uint256 price,\n address token,\n uint256 tokenAmount\n ) internal {\n if (size == 1 || _estate == address(0)) {\n _land.mintQuad(to, size, x, y, \"\");\n } else {\n _land.mintQuad(_estate, size, x, y, abi.encode(to));\n }\n emit LandQuadPurchased(buyer, to, x + (y * GRID_SIZE), size, price, token, tokenAmount);\n }\n\n function _generateLandHash(\n uint256 x,\n uint256 y,\n uint256 size,\n uint256 price,\n address reserved,\n bytes32 salt,\n uint256[] memory assetIds\n ) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(x, y, size, price, reserved, salt, assetIds));\n }\n\n function _verify(bytes32[] memory proof, bytes32 leaf) internal view returns (bool) {\n bytes32 computedHash = leaf;\n\n for (uint256 i = 0; i < proof.length; i++) {\n bytes32 proofElement = proof[i];\n\n if (computedHash < proofElement) {\n computedHash = keccak256(abi.encodePacked(computedHash, proofElement));\n } else {\n computedHash = keccak256(abi.encodePacked(proofElement, computedHash));\n }\n }\n\n return computedHash == _merkleRoot;\n }\n\n function _handleFeeAndReferral(\n address buyer,\n uint256 priceInSand,\n bytes memory referral\n ) internal {\n // send 5% fee to a specially configured instance of FeeDistributor.sol\n uint256 remainingAmountInSand = _handleSandFee(buyer, priceInSand);\n\n // calculate referral based on 95% of original priceInSand\n handleReferralWithERC20(buyer, remainingAmountInSand, referral, _wallet, address(_sand));\n }\n\n function _handleSandFee(address buyer, uint256 priceInSand) internal returns (uint256) {\n uint256 feeAmountInSand = priceInSand.mul(FEE).div(100);\n require(_sand.transferFrom(buyer, address(_feeDistributor), feeAmountInSand), \"FEE_TRANSFER_FAILED\");\n return priceInSand.sub(feeAmountInSand);\n }\n\n uint256 internal constant GRID_SIZE = 408; // 408 is the size of the Land\n\n ERC1155 internal immutable _asset;\n ILandToken internal immutable _land;\n ERC20 internal immutable _sand;\n address internal immutable _estate;\n address internal immutable _feeDistributor;\n\n address payable internal _wallet;\n uint256 internal immutable _expiryTime;\n bytes32 internal immutable _merkleRoot;\n\n uint256 private constant FEE = 5; // percentage of land sale price to be diverted to a specially configured instance of FeeDistributor, shown as an integer\n\n uint256 private _multiplier = 1000; // multiplier used for rebalancing SAND values, 3 decimal places\n uint256 private constant MULTIPLIER_DECIMALS = 1000;\n\n constructor(\n address landAddress,\n address sandContractAddress,\n address initialMetaTx,\n address admin,\n address payable initialWalletAddress,\n bytes32 merkleRoot,\n uint256 expiryTime,\n address initialSigningWallet,\n uint256 initialMaxCommissionRate,\n address estate,\n address asset,\n address feeDistributor\n ) public ReferralValidator(initialSigningWallet, initialMaxCommissionRate) {\n _land = ILandToken(landAddress);\n _sand = ERC20(sandContractAddress);\n _setMetaTransactionProcessor(initialMetaTx, true);\n _wallet = initialWalletAddress;\n _merkleRoot = merkleRoot;\n _expiryTime = expiryTime;\n _admin = admin;\n _estate = estate;\n _asset = ERC1155(asset);\n _feeDistributor = feeDistributor;\n }\n}\n" + }, + "src/solc_0.6/EstateSale/ILandToken.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.6.5;\n\n\ninterface ILandToken {\n function mintQuad(\n address to,\n uint256 size,\n uint256 x,\n uint256 y,\n bytes calldata data\n ) external;\n}\n" + }, + "src/solc_0.6/FeeDistributor/FeeDistributor.sol": { + "content": "pragma solidity 0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"../common/Libraries/SafeMathWithRequire.sol\";\nimport \"@openzeppelin/contracts-0.6/token/ERC20/SafeERC20.sol\";\n\n/// @title Fee distributor\n/// @notice Distributes all fees collected from platform activities to stakeholders\ncontract FeeDistributor {\n using SafeERC20 for IERC20;\n event Deposit(address token, address from, uint256 amount);\n event Withdrawal(IERC20 token, address to, uint256 amount);\n mapping(address => uint256) public recipientsShares;\n\n /// @notice Enables fee holder to withdraw its share\n /// @notice Zero address reserved for ether withdrawal\n /// @param token the token that fee should be distributed in\n /// @param beneficiary the address that will receive fees\n /// @return amount had withdrawn\n function withdraw(IERC20 token, address payable beneficiary) external returns (uint256 amount) {\n if (address(token) == address(0)) {\n amount = _etherWithdrawal(beneficiary);\n } else {\n amount = _tokenWithdrawal(token, beneficiary);\n }\n if (amount != 0) {\n emit Withdrawal(token, msg.sender, amount);\n }\n }\n\n receive() external payable {\n emit Deposit(address(0), msg.sender, msg.value);\n }\n\n // //////////////////// INTERNALS ////////////////////\n function _etherWithdrawal(address payable beneficiary) private returns (uint256) {\n uint256 amount = _calculateWithdrawalAmount(address(this).balance, address(0));\n if (amount > 0) {\n beneficiary.transfer(amount);\n }\n return amount;\n }\n\n function _tokenWithdrawal(IERC20 token, address payable beneficiary) private returns (uint256) {\n uint256 amount = _calculateWithdrawalAmount(token.balanceOf(address(this)), address(token));\n if (amount > 0) {\n token.safeTransfer(beneficiary, amount);\n }\n return amount;\n }\n\n function _calculateWithdrawalAmount(uint256 currentBalance, address token) private returns (uint256) {\n uint256 totalReceived = _tokensState[token].totalReceived;\n uint256 lastBalance = _tokensState[token].lastBalance;\n uint256 amountAlreadyGiven = _tokensState[token].amountAlreadyGiven[msg.sender];\n uint256 _currentBalance = currentBalance;\n totalReceived = totalReceived.add(_currentBalance.sub(lastBalance));\n _tokensState[token].totalReceived = totalReceived;\n uint256 amountDue = ((totalReceived.mul(recipientsShares[msg.sender])).div(10**DECIMALS)).sub(\n amountAlreadyGiven\n );\n if (amountDue == 0) {\n return amountDue;\n }\n amountAlreadyGiven = amountAlreadyGiven.add(amountDue);\n _tokensState[token].amountAlreadyGiven[msg.sender] = amountAlreadyGiven;\n _tokensState[token].lastBalance = _currentBalance.sub(amountDue);\n return amountDue;\n }\n\n // /////////////////// UTILITIES /////////////////////\n using SafeMathWithRequire for uint256;\n\n // //////////////////////// DATA /////////////////////\n struct TokenState {\n uint256 totalReceived;\n mapping(address => uint256) amountAlreadyGiven;\n uint256 lastBalance;\n }\n mapping(address => TokenState) private _tokensState;\n uint256 private constant DECIMALS = 4;\n\n // /////////////////// CONSTRUCTOR ////////////////////\n /// @notice Assign each recipient with its corresponding share.\n /// @notice Percentages are 4 decimal points, e.g. 1 % = 100\n /// @param recipients fee recipients\n /// @param shares the corresponding share (from total fees held by the contract) for a recipient\n constructor(address payable[] memory recipients, uint256[] memory shares) public {\n require(recipients.length == shares.length, \"ARRAYS_LENGTHS_SHOULD_BE_EQUAL\");\n uint256 totalPercentage = 0;\n for (uint256 i = 0; i < recipients.length; i++) {\n require(recipientsShares[recipients[i]] == 0, \"NO_DUPLICATE_ADDRESSES\");\n uint256 share = shares[i];\n recipientsShares[recipients[i]] = share;\n totalPercentage = totalPercentage.add(share);\n }\n require(totalPercentage == 10**DECIMALS, \"PERCENTAGES_ARRAY_SHOULD_SUM_TO_100%\");\n }\n}\n" + }, + "src/solc_0.6/FeeDistributor/FeeTimeVault.sol": { + "content": "pragma solidity 0.6.5;\npragma experimental ABIEncoderV2;\nimport \"./FeeDistributor.sol\";\nimport \"../common/Libraries/SafeMathWithRequire.sol\";\nimport \"../common/BaseWithStorage/Ownable.sol\";\nimport \"@openzeppelin/contracts-0.6/token/ERC20/SafeERC20.sol\";\n\n/// @title Fee Time Vault\n/// @notice Holds tokens collected from fees in a locked state for a certain period of time\ncontract FeeTimeVault is Ownable {\n using SafeERC20 for IERC20;\n mapping(uint256 => uint256) public accumulatedAmountPerDay;\n FeeDistributor public feeDistributor;\n\n /// @notice Updates the total amount of fees collected alongside with the due date\n function sync() external returns (uint256) {\n uint256 timestamp = now;\n uint256 day = ((timestamp - _startTime) / 1 days);\n uint256 amount = feeDistributor.withdraw(_sandToken, address(this));\n accumulatedAmountPerDay[day] = accumulatedAmountPerDay[_lastDaySaved].add(amount);\n _lastDaySaved = day;\n return amount;\n }\n\n /// @notice Enables fee holder to withdraw its share after lock period expired\n /// @param beneficiary the address that will receive fees\n function withdraw(address payable beneficiary) external onlyOwner returns (uint256) {\n uint256 day = ((now - _startTime) / 1 days);\n uint256 lockPeriod = _lockPeriod;\n uint256 amount = lockPeriod > day ? 0 : accumulatedAmountPerDay[day - lockPeriod];\n if (amount != 0) {\n uint256 withdrawnAmount = _withdrawnAmount;\n amount = amount.sub(withdrawnAmount);\n _withdrawnAmount = withdrawnAmount.add(amount);\n _sandToken.safeTransfer(beneficiary, amount);\n }\n return amount;\n }\n\n /// @notice Enables fee holder to withdraw token fees with no time-lock for tokens other than SAND\n /// @param token the token that fees are collected in\n /// @param beneficiary the address that will receive fees\n function withdrawNoTimeLock(IERC20 token, address payable beneficiary) external onlyOwner returns (uint256) {\n require(token != _sandToken, \"SAND_TOKEN_WITHDRWAL_NOT_ALLOWED\");\n uint256 amount = feeDistributor.withdraw(token, beneficiary);\n return amount;\n }\n\n function setFeeDistributor(FeeDistributor _feeDistributor) external onlyOwner {\n require(address(feeDistributor) == address(0), \"FEE_DISTRIBUTOR_ALREADY_SET\");\n require(address(_feeDistributor) != address(0), \"FEE_DISTRIBUTOR_ZERO_ADDRESS\");\n feeDistributor = _feeDistributor;\n }\n\n receive() external payable {}\n\n // /////////////////// UTILITIES /////////////////////\n using SafeMathWithRequire for uint256;\n // //////////////////////// DATA /////////////////////\n\n uint256 private _lockPeriod;\n IERC20 private _sandToken;\n uint256 private _lastDaySaved;\n uint256 private _withdrawnAmount;\n uint256 private _startTime;\n\n // /////////////////// CONSTRUCTOR ////////////////////\n /// @param lockPeriod lockPeriod measured in days, e.g. lockPeriod = 10 => 10 days\n /// @param token sand token contract address\n /// @param owner the account that can make a withdrawal\n constructor(\n uint256 lockPeriod,\n IERC20 token,\n address payable owner\n ) public Ownable(owner) {\n _lockPeriod = lockPeriod;\n _sandToken = token;\n _startTime = now;\n }\n}\n" + }, + "src/solc_0.6/Interfaces/AssetToken.sol": { + "content": "pragma solidity 0.6.5;\n\n\ninterface AssetToken {\n function mint(\n address creator,\n uint40 packId,\n bytes32 hash,\n uint256 supply,\n uint8 rarity,\n address owner,\n bytes calldata data\n ) external returns (uint256 id);\n\n function mintMultiple(\n address creator,\n uint40 packId,\n bytes32 hash,\n uint256[] calldata supplies,\n bytes calldata rarityPack,\n address owner,\n bytes calldata data\n ) external returns (uint256[] memory ids);\n\n // fails on non-NFT or nft who do not have collection (was a mistake)\n function collectionOf(uint256 id) external view returns (uint256);\n\n function balanceOf(address owner, uint256 id) external view returns (uint256);\n\n // return true for Non-NFT ERC1155 tokens which exists\n function isCollection(uint256 id) external view returns (bool);\n\n function collectionIndexOf(uint256 id) external view returns (uint256);\n\n function extractERC721From(\n address sender,\n uint256 id,\n address to\n ) external returns (uint256 newId);\n\n function transferFrom(\n address from,\n address to,\n uint256 id\n ) external;\n\n function safeTransferFrom(\n address from,\n address to,\n uint256 id\n ) external;\n\n function safeTransferFrom(\n address from,\n address to,\n uint256 id,\n uint256 value,\n bytes calldata data\n ) external;\n\n function safeBatchTransferFrom(\n address from,\n address to,\n uint256[] calldata ids,\n bytes calldata data\n ) external;\n\n function safeBatchTransferFrom(\n address from,\n address to,\n uint256[] calldata ids,\n uint256[] calldata values,\n bytes calldata data\n ) external;\n}\n" + }, + "src/solc_0.6/Interfaces/ERC20Extended.sol": { + "content": "pragma solidity 0.6.5;\n\nimport \"../common/Interfaces/ERC20.sol\";\n\n\ninterface ERC20Extended is ERC20 {\n function burnFor(address from, uint256 amount) external;\n\n function burn(uint256 amount) external;\n\n function approveFor(\n address owner,\n address spender,\n uint256 amount\n ) external returns (bool success);\n}\n" + }, + "src/solc_0.6/LiquidityMining/Goerli/GoerliSANDRewardPool.sol": { + "content": "pragma solidity 0.6.5;\n\nimport \"@openzeppelin/contracts-0.6/math/Math.sol\";\nimport \"@openzeppelin/contracts-0.6/math/SafeMath.sol\";\nimport \"@openzeppelin/contracts-0.6/access/Ownable.sol\";\nimport \"@openzeppelin/contracts-0.6/token/ERC20/SafeERC20.sol\";\nimport \"../IRewardDistributionRecipient.sol\";\n\ncontract LPTokenWrapper {\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n\n IERC20 public _uniTest; // deploy a Goerli Uniswap SAND-ETH pair\n\n uint256 private _totalSupply;\n mapping(address => uint256) private _balances;\n\n function totalSupply() public view returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n function stake(uint256 amount) public virtual {\n _totalSupply = _totalSupply.add(amount);\n _balances[msg.sender] = _balances[msg.sender].add(amount);\n _uniTest.safeTransferFrom(msg.sender, address(this), amount);\n }\n\n function withdraw(uint256 amount) public virtual {\n _totalSupply = _totalSupply.sub(amount);\n _balances[msg.sender] = _balances[msg.sender].sub(amount);\n _uniTest.safeTransfer(msg.sender, amount);\n }\n}\n\ncontract GoerliSANDRewardPool is LPTokenWrapper, IRewardDistributionRecipient {\n constructor(address uniTest) public {\n _uniTest = IERC20(uniTest); // constructor for Goerli UniswapPair address\n }\n\n IERC20 public sand = IERC20(0x200814fe1B8F947084D810C099176685496e5d14); // Reward token: Goerli SAND\n uint256 public constant DURATION = 1 hours; // Reward period\n\n uint256 public periodFinish = 0;\n uint256 public rewardRate = 0;\n uint256 public lastUpdateTime;\n uint256 public rewardPerTokenStored;\n mapping(address => uint256) public userRewardPerTokenPaid;\n mapping(address => uint256) public rewards;\n\n event RewardAdded(uint256 reward);\n event Staked(address indexed user, uint256 amount);\n event Withdrawn(address indexed user, uint256 amount);\n event RewardPaid(address indexed user, uint256 reward);\n\n modifier updateReward(address account) {\n rewardPerTokenStored = rewardPerToken();\n lastUpdateTime = lastTimeRewardApplicable();\n if (account != address(0)) {\n rewards[account] = earned(account);\n userRewardPerTokenPaid[account] = rewardPerTokenStored;\n }\n _;\n }\n\n function lastTimeRewardApplicable() public view returns (uint256) {\n return Math.min(block.timestamp, periodFinish);\n }\n\n function rewardPerToken() public view returns (uint256) {\n if (totalSupply() == 0) {\n return rewardPerTokenStored;\n }\n return\n rewardPerTokenStored.add(\n lastTimeRewardApplicable().sub(lastUpdateTime).mul(rewardRate).mul(1e18).div(totalSupply())\n );\n }\n\n function earned(address account) public view returns (uint256) {\n return\n balanceOf(account).mul(rewardPerToken().sub(userRewardPerTokenPaid[account])).div(1e18).add(\n rewards[account]\n );\n }\n\n // stake visibility is public as overriding LPTokenWrapper's stake() function\n function stake(uint256 amount) public override updateReward(msg.sender) {\n require(amount > 0, \"Cannot stake 0\");\n super.stake(amount);\n emit Staked(msg.sender, amount);\n }\n\n function withdraw(uint256 amount) public override updateReward(msg.sender) {\n require(amount > 0, \"Cannot withdraw 0\");\n super.withdraw(amount);\n emit Withdrawn(msg.sender, amount);\n }\n\n function exit() external {\n withdraw(balanceOf(msg.sender));\n getReward();\n }\n\n function getReward() public updateReward(msg.sender) {\n uint256 reward = earned(msg.sender);\n if (reward > 0) {\n rewards[msg.sender] = 0;\n sand.safeTransfer(msg.sender, reward);\n emit RewardPaid(msg.sender, reward);\n }\n }\n\n function notifyRewardAmount(uint256 reward) external override onlyRewardDistribution updateReward(address(0)) {\n if (block.timestamp >= periodFinish) {\n rewardRate = reward.div(DURATION);\n } else {\n uint256 remaining = periodFinish.sub(block.timestamp);\n uint256 leftover = remaining.mul(rewardRate);\n rewardRate = reward.add(leftover).div(DURATION);\n }\n lastUpdateTime = block.timestamp;\n periodFinish = block.timestamp.add(DURATION);\n emit RewardAdded(reward);\n }\n}\n" + }, + "src/solc_0.6/LiquidityMining/IRewardDistributionRecipient.sol": { + "content": "pragma solidity 0.6.5;\n\nimport \"@openzeppelin/contracts-0.6/access/Ownable.sol\";\n\nabstract contract IRewardDistributionRecipient is Ownable {\n address public rewardDistribution;\n\n function notifyRewardAmount(uint256 reward) external virtual;\n\n modifier onlyRewardDistribution() {\n require(_msgSender() == rewardDistribution, \"Caller is not reward distribution\");\n _;\n }\n\n function setRewardDistribution(address _rewardDistribution) external onlyOwner {\n rewardDistribution = _rewardDistribution;\n }\n}\n" + }, + "src/solc_0.6/LiquidityMining/LandWeightedSANDRewardPool.sol": { + "content": "pragma solidity 0.6.5;\n\nimport \"@openzeppelin/contracts-0.6/math/Math.sol\";\nimport \"@openzeppelin/contracts-0.6/access/Ownable.sol\";\nimport \"@openzeppelin/contracts-0.6/token/ERC20/SafeERC20.sol\";\nimport \"./IRewardDistributionRecipient.sol\";\nimport \"../common/Interfaces/ERC721.sol\";\nimport \"../common/Libraries/SafeMathWithRequire.sol\";\n\ncontract LPTokenWrapper {\n using SafeMathWithRequire for uint256;\n using SafeERC20 for IERC20;\n\n uint256 internal constant DECIMALS_18 = 1000000000000000000;\n\n IERC20 internal immutable _stakeToken;\n\n uint256 private _totalSupply;\n mapping(address => uint256) private _balances;\n\n constructor(IERC20 stakeToken) public {\n _stakeToken = stakeToken;\n }\n\n function totalSupply() public view returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n function stake(uint256 amount) public virtual {\n _totalSupply = _totalSupply.add(amount);\n _balances[msg.sender] = _balances[msg.sender].add(amount);\n _stakeToken.safeTransferFrom(msg.sender, address(this), amount);\n }\n\n function withdraw(uint256 amount) public virtual {\n _totalSupply = _totalSupply.sub(amount);\n _balances[msg.sender] = _balances[msg.sender].sub(amount);\n _stakeToken.safeTransfer(msg.sender, amount);\n }\n}\n\n///@notice Reward Pool based on unipool contract : https://github.com/Synthetixio/Unipool/blob/master/contracts/Unipool.sol\n//with the addition of NFT multiplier reward\ncontract LandWeightedSANDRewardPool is LPTokenWrapper, IRewardDistributionRecipient {\n using SafeMathWithRequire for uint256;\n\n event RewardAdded(uint256 reward);\n event Staked(address indexed user, uint256 amount);\n event Withdrawn(address indexed user, uint256 amount);\n event RewardPaid(address indexed user, uint256 reward);\n\n uint256 public immutable duration;\n\n uint256 public periodFinish = 0;\n uint256 public rewardRate = 0;\n uint256 public lastUpdateTime;\n uint256 public rewardPerTokenStored;\n mapping(address => uint256) public userRewardPerTokenPaid;\n mapping(address => uint256) public rewards;\n\n uint256 internal constant DECIMALS_9 = 1000000000;\n uint256 internal constant MIDPOINT_9 = 500000000;\n uint256 internal constant NFT_FACTOR_6 = 10000;\n uint256 internal constant NFT_CONSTANT_3 = 9000;\n uint256 internal constant ROOT3_FACTOR = 697;\n\n IERC20 internal immutable _rewardToken;\n ERC721 internal immutable _multiplierNFToken;\n\n uint256 internal _totalContributions;\n mapping(address => uint256) internal _contributions;\n\n constructor(\n IERC20 stakeToken,\n IERC20 rewardToken,\n ERC721 multiplierNFToken,\n uint256 rewardDuration\n ) public LPTokenWrapper(stakeToken) {\n _rewardToken = rewardToken;\n _multiplierNFToken = multiplierNFToken;\n duration = rewardDuration;\n }\n\n function totalContributions() public view returns (uint256) {\n return _totalContributions;\n }\n\n function contributionOf(address account) public view returns (uint256) {\n return _contributions[account];\n }\n\n modifier updateReward(address account) {\n rewardPerTokenStored = rewardPerToken();\n\n if (block.timestamp >= periodFinish || _totalContributions != 0) {\n // ensure reward past the first staker do not get lost\n lastUpdateTime = lastTimeRewardApplicable();\n }\n if (account != address(0)) {\n rewards[account] = earned(account);\n userRewardPerTokenPaid[account] = rewardPerTokenStored;\n }\n _;\n }\n\n function lastTimeRewardApplicable() public view returns (uint256) {\n return Math.min(block.timestamp, periodFinish);\n }\n\n function rewardPerToken() public view returns (uint256) {\n if (totalContributions() == 0) {\n return rewardPerTokenStored;\n }\n return\n rewardPerTokenStored.add(\n lastTimeRewardApplicable().sub(lastUpdateTime).mul(rewardRate).mul(1e24).div(totalContributions())\n );\n }\n\n function earned(address account) public view returns (uint256) {\n return\n contributionOf(account).mul(rewardPerToken().sub(userRewardPerTokenPaid[account])).div(1e24).add(\n rewards[account]\n );\n }\n\n function computeContribution(uint256 amountStaked, uint256 numLands) public pure returns (uint256) {\n if (numLands == 0) {\n return amountStaked;\n }\n uint256 nftContrib = NFT_FACTOR_6.mul(NFT_CONSTANT_3.add(numLands.sub(1).mul(ROOT3_FACTOR).add(1).cbrt3()));\n if (nftContrib > MIDPOINT_9) {\n nftContrib = MIDPOINT_9.add(nftContrib.sub(MIDPOINT_9).div(10));\n }\n return amountStaked.add(amountStaked.mul(nftContrib).div(DECIMALS_9));\n }\n\n function stake(uint256 amount) public override updateReward(msg.sender) {\n require(amount > 0, \"Cannot stake 0\");\n uint256 contribution = computeContribution(amount, _multiplierNFToken.balanceOf(msg.sender));\n _totalContributions = _totalContributions.add(contribution);\n _contributions[msg.sender] = _contributions[msg.sender].add(contribution);\n super.stake(amount);\n emit Staked(msg.sender, amount);\n }\n\n function withdraw(uint256 amount) public override updateReward(msg.sender) {\n require(amount > 0, \"Cannot withdraw 0\");\n uint256 balance = balanceOf(msg.sender);\n uint256 ratio = amount.mul(DECIMALS_18).div(balance);\n uint256 currentContribution = contributionOf(msg.sender);\n uint256 contributionReduction = currentContribution.mul(ratio).div(DECIMALS_18);\n _contributions[msg.sender] = currentContribution.sub(contributionReduction);\n _totalContributions = _totalContributions.sub(contributionReduction);\n super.withdraw(amount);\n emit Withdrawn(msg.sender, amount);\n }\n\n function exit() external {\n withdraw(balanceOf(msg.sender));\n getReward();\n }\n\n function getReward() public updateReward(msg.sender) {\n uint256 reward = rewards[msg.sender];\n if (reward > 0) {\n rewards[msg.sender] = 0;\n _rewardToken.safeTransfer(msg.sender, reward);\n emit RewardPaid(msg.sender, reward);\n }\n }\n\n ///@notice to be called after the amount of reward tokens (specified by the reward parameter) has been sent to the contract\n // Note that the reward should be divisible by the duration to avoid reward token lost\n ///@param reward number of token to be distributed over the duration\n function notifyRewardAmount(uint256 reward) external override onlyRewardDistribution updateReward(address(0)) {\n if (block.timestamp >= periodFinish) {\n rewardRate = reward.div(duration);\n } else {\n uint256 remaining = periodFinish.sub(block.timestamp);\n uint256 leftover = remaining.mul(rewardRate);\n rewardRate = reward.add(leftover).div(duration);\n }\n lastUpdateTime = block.timestamp;\n periodFinish = block.timestamp.add(duration);\n emit RewardAdded(reward);\n }\n}\n" + }, + "src/solc_0.6/LiquidityMining/Mainnet/SANDRewardPool.sol": { + "content": "pragma solidity 0.6.5;\n\nimport \"@openzeppelin/contracts-0.6/math/Math.sol\";\nimport \"@openzeppelin/contracts-0.6/math/SafeMath.sol\";\nimport \"@openzeppelin/contracts-0.6/access/Ownable.sol\";\nimport \"@openzeppelin/contracts-0.6/token/ERC20/SafeERC20.sol\";\nimport \"../IRewardDistributionRecipient.sol\";\n\ncontract LPTokenWrapper {\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n\n IERC20 public uni = IERC20(0x3dd49f67E9d5Bc4C5E6634b3F70BfD9dc1b6BD74); // lpToken contract address, currently set to the SAND-ETH pool contract address\n\n uint256 private _totalSupply;\n mapping(address => uint256) private _balances;\n\n function totalSupply() public view returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n function stake(uint256 amount) public virtual {\n _totalSupply = _totalSupply.add(amount);\n _balances[msg.sender] = _balances[msg.sender].add(amount);\n uni.safeTransferFrom(msg.sender, address(this), amount);\n }\n\n function withdraw(uint256 amount) public virtual {\n _totalSupply = _totalSupply.sub(amount);\n _balances[msg.sender] = _balances[msg.sender].sub(amount);\n uni.safeTransfer(msg.sender, amount);\n }\n}\n\ncontract SANDRewardPool is LPTokenWrapper, IRewardDistributionRecipient {\n IERC20 public sand = IERC20(0x3845badAde8e6dFF049820680d1F14bD3903a5d0); // Reward token: SAND\n uint256 public constant DURATION = 30 days; // Reward period\n\n uint256 public periodFinish = 0;\n uint256 public rewardRate = 0;\n uint256 public lastUpdateTime;\n uint256 public rewardPerTokenStored;\n mapping(address => uint256) public userRewardPerTokenPaid;\n mapping(address => uint256) public rewards;\n\n event RewardAdded(uint256 reward);\n event Staked(address indexed user, uint256 amount);\n event Withdrawn(address indexed user, uint256 amount);\n event RewardPaid(address indexed user, uint256 reward);\n\n modifier updateReward(address account) {\n rewardPerTokenStored = rewardPerToken();\n lastUpdateTime = lastTimeRewardApplicable();\n if (account != address(0)) {\n rewards[account] = earned(account);\n userRewardPerTokenPaid[account] = rewardPerTokenStored;\n }\n _;\n }\n\n function lastTimeRewardApplicable() public view returns (uint256) {\n return Math.min(block.timestamp, periodFinish);\n }\n\n function rewardPerToken() public view returns (uint256) {\n if (totalSupply() == 0) {\n return rewardPerTokenStored;\n }\n return\n rewardPerTokenStored.add(\n lastTimeRewardApplicable().sub(lastUpdateTime).mul(rewardRate).mul(1e18).div(totalSupply())\n );\n }\n\n function earned(address account) public view returns (uint256) {\n return\n balanceOf(account).mul(rewardPerToken().sub(userRewardPerTokenPaid[account])).div(1e18).add(\n rewards[account]\n );\n }\n\n // stake visibility is public as overriding LPTokenWrapper's stake() function\n function stake(uint256 amount) public override updateReward(msg.sender) {\n require(amount > 0, \"Cannot stake 0\");\n super.stake(amount);\n emit Staked(msg.sender, amount);\n }\n\n function withdraw(uint256 amount) public override updateReward(msg.sender) {\n require(amount > 0, \"Cannot withdraw 0\");\n super.withdraw(amount);\n emit Withdrawn(msg.sender, amount);\n }\n\n function exit() external {\n withdraw(balanceOf(msg.sender));\n getReward();\n }\n\n function getReward() public updateReward(msg.sender) {\n uint256 reward = earned(msg.sender);\n if (reward > 0) {\n rewards[msg.sender] = 0;\n sand.safeTransfer(msg.sender, reward);\n emit RewardPaid(msg.sender, reward);\n }\n }\n\n function notifyRewardAmount(uint256 reward) external override onlyRewardDistribution updateReward(address(0)) {\n if (block.timestamp >= periodFinish) {\n rewardRate = reward.div(DURATION);\n } else {\n uint256 remaining = periodFinish.sub(block.timestamp);\n uint256 leftover = remaining.mul(rewardRate);\n rewardRate = reward.add(leftover).div(DURATION);\n }\n lastUpdateTime = block.timestamp;\n periodFinish = block.timestamp.add(DURATION);\n emit RewardAdded(reward);\n }\n}\n" + }, + "src/solc_0.6/LiquidityMining/Rinkeby/RinkebySANDRewardPool.sol": { + "content": "pragma solidity 0.6.5;\n\nimport \"@openzeppelin/contracts-0.6/math/Math.sol\";\nimport \"@openzeppelin/contracts-0.6/math/SafeMath.sol\";\nimport \"@openzeppelin/contracts-0.6/access/Ownable.sol\";\nimport \"@openzeppelin/contracts-0.6/token/ERC20/SafeERC20.sol\";\nimport \"../IRewardDistributionRecipient.sol\";\n\ncontract LPTokenWrapper {\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n\n IERC20 public _uniTest; // deploy a Rinkeby Uniswap SAND-ETH pair\n\n uint256 private _totalSupply;\n mapping(address => uint256) private _balances;\n\n function totalSupply() public view returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n function stake(uint256 amount) public virtual {\n _totalSupply = _totalSupply.add(amount);\n _balances[msg.sender] = _balances[msg.sender].add(amount);\n _uniTest.safeTransferFrom(msg.sender, address(this), amount);\n }\n\n function withdraw(uint256 amount) public virtual {\n _totalSupply = _totalSupply.sub(amount);\n _balances[msg.sender] = _balances[msg.sender].sub(amount);\n _uniTest.safeTransfer(msg.sender, amount);\n }\n}\n\ncontract RinkebySANDRewardPool is LPTokenWrapper, IRewardDistributionRecipient {\n constructor(address uniTest) public {\n _uniTest = IERC20(uniTest); // constructor for Rinkeby UniswapPair address\n }\n\n IERC20 public sand = IERC20(0xCc933a862fc15379E441F2A16Cb943D385a4695f); // Reward token: Rinkeby SAND\n uint256 public constant DURATION = 30 days; // Reward period\n\n uint256 public periodFinish = 0;\n uint256 public rewardRate = 0;\n uint256 public lastUpdateTime;\n uint256 public rewardPerTokenStored;\n mapping(address => uint256) public userRewardPerTokenPaid;\n mapping(address => uint256) public rewards;\n\n event RewardAdded(uint256 reward);\n event Staked(address indexed user, uint256 amount);\n event Withdrawn(address indexed user, uint256 amount);\n event RewardPaid(address indexed user, uint256 reward);\n\n modifier updateReward(address account) {\n rewardPerTokenStored = rewardPerToken();\n lastUpdateTime = lastTimeRewardApplicable();\n if (account != address(0)) {\n rewards[account] = earned(account);\n userRewardPerTokenPaid[account] = rewardPerTokenStored;\n }\n _;\n }\n\n function lastTimeRewardApplicable() public view returns (uint256) {\n return Math.min(block.timestamp, periodFinish);\n }\n\n function rewardPerToken() public view returns (uint256) {\n if (totalSupply() == 0) {\n return rewardPerTokenStored;\n }\n return\n rewardPerTokenStored.add(\n lastTimeRewardApplicable().sub(lastUpdateTime).mul(rewardRate).mul(1e18).div(totalSupply())\n );\n }\n\n function earned(address account) public view returns (uint256) {\n return\n balanceOf(account).mul(rewardPerToken().sub(userRewardPerTokenPaid[account])).div(1e18).add(\n rewards[account]\n );\n }\n\n // stake visibility is public as overriding LPTokenWrapper's stake() function\n function stake(uint256 amount) public override updateReward(msg.sender) {\n require(amount > 0, \"Cannot stake 0\");\n super.stake(amount);\n emit Staked(msg.sender, amount);\n }\n\n function withdraw(uint256 amount) public override updateReward(msg.sender) {\n require(amount > 0, \"Cannot withdraw 0\");\n super.withdraw(amount);\n emit Withdrawn(msg.sender, amount);\n }\n\n function exit() external {\n withdraw(balanceOf(msg.sender));\n getReward();\n }\n\n function getReward() public updateReward(msg.sender) {\n uint256 reward = earned(msg.sender);\n if (reward > 0) {\n rewards[msg.sender] = 0;\n sand.safeTransfer(msg.sender, reward);\n emit RewardPaid(msg.sender, reward);\n }\n }\n\n function notifyRewardAmount(uint256 reward) external override onlyRewardDistribution updateReward(address(0)) {\n if (block.timestamp >= periodFinish) {\n rewardRate = reward.div(DURATION);\n } else {\n uint256 remaining = periodFinish.sub(block.timestamp);\n uint256 leftover = remaining.mul(rewardRate);\n rewardRate = reward.add(leftover).div(DURATION);\n }\n lastUpdateTime = block.timestamp;\n periodFinish = block.timestamp.add(DURATION);\n emit RewardAdded(reward);\n }\n}\n" + }, + "src/solc_0.6/metatx/forwarder/Forwarder.sol": { + "content": "// SPDX-License-Identifier:MIT\npragma solidity ^0.6.2;\npragma experimental ABIEncoderV2;\n\nimport \"@openzeppelin/contracts-0.6/cryptography/ECDSA.sol\";\nimport \"./IForwarder.sol\";\n\ncontract Forwarder is IForwarder {\n using ECDSA for bytes32;\n\n string public constant GENERIC_PARAMS = \"address from,address to,uint256 value,uint256 gas,uint256 nonce,bytes data\";\n\n string public constant EIP712_DOMAIN_TYPE = \"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\";\n\n mapping(bytes32 => bool) public typeHashes;\n mapping(bytes32 => bool) public domains;\n\n // Nonces of senders, used to prevent replay attacks\n mapping(address => uint256) private nonces;\n\n // solhint-disable-next-line no-empty-blocks\n receive() external payable {}\n\n function getNonce(address from)\n public view override\n returns (uint256) {\n return nonces[from];\n }\n\n constructor() public {\n\n string memory requestType = string(abi.encodePacked(\"ForwardRequest(\", GENERIC_PARAMS, \")\"));\n registerRequestTypeInternal(requestType);\n }\n\n function verify(\n ForwardRequest memory req,\n bytes32 domainSeparator,\n bytes32 requestTypeHash,\n bytes memory suffixData,\n bytes memory sig)\n public override view {\n\n _verifyNonce(req);\n _verifySig(req, domainSeparator, requestTypeHash, suffixData, sig);\n }\n\n function execute(\n ForwardRequest memory req,\n bytes32 domainSeparator,\n bytes32 requestTypeHash,\n bytes memory suffixData,\n bytes memory sig\n )\n public payable\n override\n returns (bool success, bytes memory ret) {\n _verifyNonce(req);\n _verifySig(req, domainSeparator, requestTypeHash, suffixData, sig);\n _updateNonce(req);\n\n // solhint-disable-next-line avoid-low-level-calls\n (success,ret) = req.to.call{gas : req.gas, value : req.value}(abi.encodePacked(req.data, req.from));\n if ( address(this).balance>0 ) {\n //can't fail: req.from signed (off-chain) the request, so it must be an EOA...\n payable(req.from).transfer(address(this).balance);\n }\n return (success,ret);\n }\n\n\n function _verifyNonce(ForwardRequest memory req) internal view {\n require(nonces[req.from] == req.nonce, \"nonce mismatch\");\n }\n\n function _updateNonce(ForwardRequest memory req) internal {\n nonces[req.from]++;\n }\n\n function registerRequestType(string calldata typeName, string calldata typeSuffix) external override {\n\n for (uint i = 0; i < bytes(typeName).length; i++) {\n bytes1 c = bytes(typeName)[i];\n require(c != \"(\" && c != \")\", \"invalid typename\");\n }\n\n string memory requestType = string(abi.encodePacked(typeName, \"(\", GENERIC_PARAMS, \",\", typeSuffix));\n registerRequestTypeInternal(requestType);\n }\n\n function registerDomainSeparator(string calldata name, string calldata version) external override {\n uint256 chainId;\n /* solhint-disable-next-line no-inline-assembly */\n assembly { chainId := chainid() }\n\n bytes memory domainValue = abi.encode(\n keccak256(bytes(EIP712_DOMAIN_TYPE)),\n keccak256(bytes(name)),\n keccak256(bytes(version)),\n chainId,\n address(this));\n\n bytes32 domainHash = keccak256(domainValue);\n\n domains[domainHash] = true;\n emit DomainRegistered(domainHash, domainValue);\n }\n\n function registerRequestTypeInternal(string memory requestType) internal {\n\n bytes32 requestTypehash = keccak256(bytes(requestType));\n typeHashes[requestTypehash] = true;\n emit RequestTypeRegistered(requestTypehash, requestType);\n }\n\n event DomainRegistered(bytes32 indexed domainSeparator, bytes domainValue);\n\n event RequestTypeRegistered(bytes32 indexed typeHash, string typeStr);\n\n\n function _verifySig(\n ForwardRequest memory req,\n bytes32 domainSeparator,\n bytes32 requestTypeHash,\n bytes memory suffixData,\n bytes memory sig)\n internal\n view\n {\n require(domains[domainSeparator], \"unregistered domain separator\");\n require(typeHashes[requestTypeHash], \"unregistered request typehash\");\n bytes32 digest = keccak256(abi.encodePacked(\n \"\\x19\\x01\", domainSeparator,\n keccak256(_getEncoded(req, requestTypeHash, suffixData))\n ));\n require(digest.recover(sig) == req.from, \"signature mismatch\");\n }\n\n function _getEncoded(\n ForwardRequest memory req,\n bytes32 requestTypeHash,\n bytes memory suffixData\n )\n public\n pure\n returns (\n bytes memory\n ) {\n return abi.encodePacked(\n requestTypeHash,\n abi.encode(\n req.from,\n req.to,\n req.value,\n req.gas,\n req.nonce,\n keccak256(req.data)\n ),\n suffixData\n );\n }\n}" + }, + "src/solc_0.6/metatx/forwarder/IForwarder.sol": { + "content": "// SPDX-License-Identifier:MIT\npragma solidity ^0.6.2;\npragma experimental ABIEncoderV2;\n\ninterface IForwarder {\n\n struct ForwardRequest {\n address from;\n address to;\n uint256 value;\n uint256 gas;\n uint256 nonce;\n bytes data;\n }\n\n function getNonce(address from)\n external view\n returns(uint256);\n\n /**\n * verify the transaction would execute.\n * validate the signature and the nonce of the request.\n * revert if either signature or nonce are incorrect.\n */\n function verify(\n ForwardRequest calldata forwardRequest,\n bytes32 domainSeparator,\n bytes32 requestTypeHash,\n bytes calldata suffixData,\n bytes calldata signature\n ) external view;\n\n /**\n * execute a transaction\n * @param forwardRequest - all transaction parameters\n * @param domainSeparator - domain used when signing this request\n * @param requestTypeHash - request type used when signing this request.\n * @param suffixData - the extension data used when signing this request.\n * @param signature - signature to validate.\n *\n * the transaction is verified, and then executed.\n * the success and ret of \"call\" are returned.\n * This method would revert only verification errors. target errors\n * are reported using the returned \"success\" and ret string\n */\n function execute(\n ForwardRequest calldata forwardRequest,\n bytes32 domainSeparator,\n bytes32 requestTypeHash,\n bytes calldata suffixData,\n bytes calldata signature\n )\n external payable\n returns (bool success, bytes memory ret);\n\n /**\n * Register a new Request typehash.\n * @param typeName - the name of the request type.\n * @param typeSuffix - anything after the generic params can be empty string (if no extra fields are needed)\n * if it does contain a value, then a comma is added first.\n */\n function registerRequestType(string calldata typeName, string calldata typeSuffix) external;\n\n /**\n * Register a new domain separator.\n * The domain separator must have the following fields: name,version,chainId, verifyingContract.\n * the chainId is the current network's chainId, and the verifyingContract is this forwarder.\n * This method is given the domain name and version to create and register the domain separator value.\n * @param name the domain's display name\n * @param version the domain/protocol version\n */\n function registerDomainSeparator(string calldata name, string calldata version) external;\n}" + }, + "src/solc_0.6/P2PERC721Sale/P2PERC721Sale.sol": { + "content": "pragma solidity 0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"../common/BaseWithStorage/Admin.sol\";\nimport \"../common/Libraries/SigUtil.sol\";\nimport \"../common/Libraries/PriceUtil.sol\";\nimport \"../common/BaseWithStorage/MetaTransactionReceiver.sol\";\nimport \"../common/Interfaces/ERC721.sol\";\nimport \"../common/Interfaces/ERC20.sol\";\nimport \"../common/Interfaces/ERC1271.sol\";\nimport \"../common/Interfaces/ERC1271Constants.sol\";\nimport \"../common/Interfaces/ERC1654.sol\";\nimport \"../common/Interfaces/ERC1654Constants.sol\";\nimport \"../common/Libraries/SafeMathWithRequire.sol\";\n\nimport \"../Base/TheSandbox712.sol\";\n\n\ncontract P2PERC721Sale is Admin, ERC1654Constants, ERC1271Constants, TheSandbox712, MetaTransactionReceiver {\n using SafeMathWithRequire for uint256;\n\n enum SignatureType {DIRECT, EIP1654, EIP1271}\n\n mapping(address => mapping(uint256 => uint256)) public claimed;\n\n uint256 private constant MAX_UINT256 = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;\n ERC20 internal _sand;\n uint256 internal _fee;\n address internal _feeCollector;\n\n struct Auction {\n uint256 id;\n address tokenAddress; // TODO support bundle : tokenAddress and tokenId should be arrays\n uint256 tokenId;\n address seller;\n uint256 startingPrice; // TODO support any ERC20 or ethereum as payment\n uint256 endingPrice;\n uint256 startedAt;\n uint256 duration;\n }\n\n event OfferClaimed(\n address indexed seller,\n address indexed buyer,\n uint256 indexed offerId,\n address tokenAddress,\n uint256 tokenId,\n uint256 pricePaid,\n uint256 feePaid\n );\n\n event OfferCancelled(address indexed seller, uint256 indexed offerId);\n\n event FeeSetup(address feeCollector, uint256 fee10000th);\n\n constructor(\n address sand,\n address admin,\n address feeCollector,\n uint256 fee,\n address initialMetaTx\n ) public {\n _sand = ERC20(sand);\n _admin = admin;\n\n _fee = fee;\n _feeCollector = feeCollector;\n emit FeeSetup(feeCollector, fee);\n\n _setMetaTransactionProcessor(initialMetaTx, true);\n }\n\n function setFee(address feeCollector, uint256 fee) external {\n require(msg.sender == _admin, \"Sender not admin\");\n _feeCollector = feeCollector;\n _fee = fee;\n emit FeeSetup(feeCollector, fee);\n }\n\n function _verifyParameters(address buyer, Auction memory auction) internal view {\n require(buyer == msg.sender || _metaTransactionContracts[msg.sender], \"not authorized\"); // if support any ERC20 :(token != address(0) &&\n\n require(claimed[auction.seller][auction.id] != MAX_UINT256, \"Auction canceled\");\n\n require(auction.startedAt <= now, \"Auction has not started yet\");\n\n require(auction.startedAt.add(auction.duration) > now, \"Auction finished\");\n }\n\n function claimSellerOffer(\n address buyer,\n address to,\n Auction calldata auction,\n bytes calldata signature,\n SignatureType signatureType,\n bool eip712\n ) external {\n _verifyParameters(buyer, auction);\n _ensureCorrectSigner(auction, signature, signatureType, eip712);\n _executeDeal(auction, buyer, to);\n }\n\n function _executeDeal(\n Auction memory auction,\n address buyer,\n address to\n ) internal {\n uint256 offer = PriceUtil.calculateCurrentPrice(\n auction.startingPrice,\n auction.endingPrice,\n auction.duration,\n now.sub(auction.startedAt)\n );\n\n claimed[auction.seller][auction.id] = offer;\n\n uint256 fee = 0;\n\n if (_fee > 0) {\n fee = PriceUtil.calculateFee(offer, _fee);\n }\n\n require(_sand.transferFrom(buyer, auction.seller, offer.sub(fee)), \"Funds transfer failed\"); // TODO feeCollector\n\n ERC721 token = ERC721(auction.tokenAddress);\n\n token.safeTransferFrom(auction.seller, to, auction.tokenId); // TODO test safeTransferFrom fail\n }\n\n function cancelSellerOffer(uint256 id) external {\n claimed[msg.sender][id] = MAX_UINT256;\n emit OfferCancelled(msg.sender, id);\n }\n\n function _ensureCorrectSigner(\n Auction memory auction,\n bytes memory signature,\n SignatureType signatureType,\n bool eip712\n ) internal view returns (address) {\n bytes memory dataToHash;\n\n if (eip712) {\n dataToHash = abi.encodePacked(\"\\x19\\x01\", DOMAIN_SEPARATOR, _hashAuction(auction));\n } else {\n dataToHash = _encodeBasicSignatureHash(auction);\n }\n\n if (signatureType == SignatureType.EIP1271) {\n require(\n ERC1271(auction.seller).isValidSignature(dataToHash, signature) == ERC1271_MAGICVALUE,\n \"Invalid 1271 sig\"\n );\n } else if (signatureType == SignatureType.EIP1654) {\n require(\n ERC1654(auction.seller).isValidSignature(keccak256(dataToHash), signature) == ERC1654_MAGICVALUE,\n \"Invalid 1654 sig\"\n );\n } else {\n address signer = SigUtil.recover(keccak256(dataToHash), signature);\n require(signer == auction.seller, \"Invalid sig\");\n }\n }\n\n function _encodeBasicSignatureHash(Auction memory auction) internal view returns (bytes memory) {\n return\n SigUtil.prefixed(\n keccak256(\n abi.encodePacked(\n address(this),\n auction.id,\n auction.tokenAddress,\n auction.tokenId,\n auction.seller,\n auction.startingPrice,\n auction.endingPrice,\n auction.startedAt,\n auction.duration\n )\n )\n );\n }\n\n function _hashAuction(Auction memory auction) internal pure returns (bytes32) {\n return\n keccak256(\n abi.encode(\n auction.id,\n auction.tokenAddress,\n auction.tokenId,\n auction.seller,\n auction.startingPrice,\n auction.endingPrice,\n auction.startedAt,\n auction.duration\n )\n );\n }\n}\n" + }, + "src/solc_0.6/ReferralValidator/ReferralValidator.sol": { + "content": "/* solhint-disable not-rely-on-time, func-order */\n\n// SPDX-License-Identifier: MIT\n\npragma solidity 0.6.5;\n\nimport \"@openzeppelin/contracts-0.6/utils/Address.sol\";\nimport \"@openzeppelin/contracts-0.6/cryptography/ECDSA.sol\";\nimport \"@openzeppelin/contracts-0.6/token/ERC20/SafeERC20.sol\";\nimport \"@openzeppelin/contracts-0.6/math/SafeMath.sol\";\nimport \"../common/BaseWithStorage/Admin.sol\";\n\n\n/// @dev This contract verifies if a referral is valid\ncontract ReferralValidator is Admin {\n using Address for address;\n using SafeERC20 for IERC20;\n\n address private _signingWallet;\n uint256 private _maxCommissionRate;\n\n mapping(address => uint256) private _previousSigningWallets;\n uint256 constant private _previousSigningDelay = 10 days;\n\n event ReferralUsed(\n address indexed referrer,\n address indexed referee,\n address indexed token,\n uint256 amount,\n uint256 commission,\n uint256 commissionRate\n );\n\n event SigningWalletUpdated(address indexed newSigningWallet);\n event MaxCommissionRateUpdated(uint256 indexed newMaxCommissionRate);\n\n constructor(address initialSigningWallet, uint256 initialMaxCommissionRate) public {\n require(initialSigningWallet != address(0), \"ReferralValidator: zero address\");\n\n _signingWallet = initialSigningWallet;\n _maxCommissionRate = initialMaxCommissionRate;\n }\n\n /**\n * @dev Update the signing wallet\n * The previous wallet is still valid for a grace period (_previousSigningDelay). If you want to\n * disable the previous wallet, use the disablePreviousSigningWallet function.\n * @param newSigningWallet The new address of the signing wallet\n */\n function updateSigningWallet(address newSigningWallet) external onlyAdmin {\n require(newSigningWallet != address(0), \"ReferralValidator: zero address\");\n _previousSigningWallets[_signingWallet] = now + _previousSigningDelay;\n _signingWallet = newSigningWallet;\n\n emit SigningWalletUpdated(newSigningWallet);\n }\n\n /**\n * @dev Disable compromised signing wallet\n * @param disableWallet The wallet address to be disabled\n */\n function disablePreviousSigningWallet(address disableWallet) external {\n require(_admin == msg.sender, \"ReferralValidator: Sender not admin\");\n require(disableWallet != address(0), \"ReferralValidator: zero address\");\n _previousSigningWallets[disableWallet] = 0;\n }\n\n /**\n * @dev signing wallet authorized for referral\n * @return the address of the signing wallet\n */\n function getSigningWallet() external view returns (address) {\n return _signingWallet;\n }\n\n /**\n * @notice the max commission rate\n * @return the maximum commission rate that a referral can give\n */\n function getMaxCommissionRate() external view returns (uint256) {\n return _maxCommissionRate;\n }\n\n /**\n * @dev Update the maximum commission rate\n * @param newMaxCommissionRate The new maximum commission rate\n */\n function updateMaxCommissionRate(uint256 newMaxCommissionRate) external onlyAdmin {\n _maxCommissionRate = newMaxCommissionRate;\n\n emit MaxCommissionRateUpdated(newMaxCommissionRate);\n }\n\n function handleReferralWithETH(\n uint256 amount,\n bytes memory referral,\n address payable destination\n ) internal {\n uint256 amountForDestination = amount;\n\n require(msg.value >= amount, \"ReferralValidator: insufficient funds\");\n\n if (referral.length > 0) {\n (bytes memory signature, address referrer, address referee, uint256 expiryTime, uint256 commissionRate) = decodeReferral(referral);\n\n require(commissionRate < 10000, \"ReferralValidator: invalid commisionRate\");\n\n uint256 commission = 0;\n\n if (isReferralValid(signature, referrer, referee, expiryTime, commissionRate)) {\n commission = SafeMath.div(SafeMath.mul(amount, commissionRate), 10000);\n\n emit ReferralUsed(referrer, referee, address(0), amount, commission, commissionRate);\n amountForDestination = SafeMath.sub(amountForDestination, commission);\n }\n\n if (commission > 0) {\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, ) = payable(referrer).call{value:commission}(\"\");\n require(success, \"ReferralValidator: Transfer failed.\");\n }\n }\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, ) = destination.call{value:amountForDestination}(\"\");\n require(success, \"ReferralValidator: Transfer failed.\");\n }\n\n function handleReferralWithERC20(\n address buyer,\n uint256 amount,\n bytes memory referral,\n address payable destination,\n address tokenAddress\n ) internal {\n IERC20 token = IERC20(tokenAddress);\n uint256 amountForDestination = amount;\n\n if (referral.length > 0) {\n (bytes memory signature, address referrer, address referee, uint256 expiryTime, uint256 commissionRate) = decodeReferral(referral);\n\n uint256 commission = 0;\n\n if (isReferralValid(signature, referrer, referee, expiryTime, commissionRate)) {\n commission = SafeMath.div(SafeMath.mul(amount, commissionRate), 10000);\n\n emit ReferralUsed(referrer, referee, tokenAddress, amount, commission, commissionRate);\n amountForDestination = SafeMath.sub(amountForDestination, commission);\n }\n\n if (commission > 0) {\n token.safeTransferFrom(buyer, referrer, commission);\n }\n }\n\n token.safeTransferFrom(buyer, destination, amountForDestination);\n }\n\n /**\n * @notice Check if a referral is valid\n * @param signature The signature to check (signed referral)\n * @param referrer The address of the referrer\n * @param referee The address of the referee\n * @param expiryTime The expiry time of the referral\n * @param commissionRate The commissionRate of the referral\n * @return True if the referral is valid\n */\n function isReferralValid(\n bytes memory signature,\n address referrer,\n address referee,\n uint256 expiryTime,\n uint256 commissionRate\n ) public view returns (bool) {\n if (commissionRate > _maxCommissionRate || referrer == referee || now > expiryTime) {\n return false;\n }\n\n bytes32 hashedData = keccak256(abi.encodePacked(referrer, referee, expiryTime, commissionRate));\n\n address signer = ECDSA.recover(keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hashedData)), signature);\n\n if (_previousSigningWallets[signer] >= now) {\n return true;\n }\n\n return _signingWallet == signer;\n }\n\n function decodeReferral(bytes memory referral)\n public\n pure\n returns (\n bytes memory,\n address,\n address,\n uint256,\n uint256\n )\n {\n (bytes memory signature, address referrer, address referee, uint256 expiryTime, uint256 commissionRate) = abi.decode(\n referral,\n (bytes, address, address, uint256, uint256)\n );\n\n return (signature, referrer, referee, expiryTime, commissionRate);\n }\n}\n" + }, + "src/solc_0.6/StarterPack/PurchaseValidator.sol": { + "content": "pragma solidity 0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"../common/Libraries/SigUtil.sol\";\nimport \"../common/BaseWithStorage/Admin.sol\";\n\n\ncontract PurchaseValidator is Admin {\n address private _signingWallet;\n\n // A parallel-queue mapping to nonces.\n mapping(address => mapping(uint128 => uint128)) public queuedNonces;\n\n /// @notice Function to get the nonce for a given address and queue ID\n /// @param _buyer The address of the starterPack purchaser\n /// @param _queueId The ID of the nonce queue for the given address.\n /// The default is queueID=0, and the max is queueID=2**128-1\n /// @return uint128 representing the requestied nonce\n function getNonceByBuyer(address _buyer, uint128 _queueId) external view returns (uint128) {\n return queuedNonces[_buyer][_queueId];\n }\n\n /// @notice Check if a purchase message is valid\n /// @param buyer The address paying for the purchase & receiving tokens\n /// @param catalystIds The catalyst IDs to be purchased\n /// @param catalystQuantities The quantities of the catalysts to be purchased\n /// @param gemIds The gem IDs to be purchased\n /// @param gemQuantities The quantities of the gems to be purchased\n /// @param nonce The current nonce for the user. This is represented as a\n /// uint256 value, but is actually 2 packed uint128's (queueId + nonce)\n /// @param signature A signed message specifying tx details\n /// @return True if the purchase is valid\n function isPurchaseValid(\n address buyer,\n uint256[] memory catalystIds,\n uint256[] memory catalystQuantities,\n uint256[] memory gemIds,\n uint256[] memory gemQuantities,\n uint256 nonce,\n bytes memory signature\n ) public returns (bool) {\n require(_checkAndUpdateNonce(buyer, nonce), \"INVALID_NONCE\");\n bytes32 hashedData = keccak256(abi.encodePacked(catalystIds, catalystQuantities, gemIds, gemQuantities, buyer, nonce));\n\n address signer = SigUtil.recover(keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hashedData)), signature);\n return signer == _signingWallet;\n }\n\n /// @notice Get the wallet authorized for signing purchase-messages.\n /// @return the address of the signing wallet\n function getSigningWallet() external view returns (address) {\n return _signingWallet;\n }\n\n /// @notice Update the signing wallet address\n /// @param newSigningWallet The new address of the signing wallet\n function updateSigningWallet(address newSigningWallet) external {\n require(_admin == msg.sender, \"SENDER_NOT_ADMIN\");\n _signingWallet = newSigningWallet;\n }\n\n /// @dev Function for validating the nonce for a user.\n /// @param _buyer The address for which we want to check the nonce\n /// @param _packedValue The queueId + nonce, packed together.\n /// EG: for queueId=42 nonce=7, pass: \"0x0000000000000000000000000000002A00000000000000000000000000000007\"\n function _checkAndUpdateNonce(address _buyer, uint256 _packedValue) private returns (bool) {\n uint128 queueId = uint128(_packedValue / 2**128);\n uint128 nonce = uint128(_packedValue % 2**128);\n uint128 currentNonce = queuedNonces[_buyer][queueId];\n if (nonce == currentNonce) {\n queuedNonces[_buyer][queueId] = currentNonce + 1;\n return true;\n }\n return false;\n }\n\n constructor(address initialSigningWallet) public {\n _signingWallet = initialSigningWallet;\n }\n}\n" + }, + "src/solc_0.6/StarterPack/StarterPackV1.sol": { + "content": "pragma solidity 0.6.5;\npragma experimental ABIEncoderV2;\n\nimport \"../common/Libraries/SafeMathWithRequire.sol\";\nimport \"../common/Interfaces/ERC20.sol\";\nimport \"../common/BaseWithStorage/MetaTransactionReceiver.sol\";\nimport \"../common/Interfaces/Medianizer.sol\";\nimport \"../common/BaseWithStorage/Admin.sol\";\nimport \"../Catalyst/ERC20GroupCatalyst.sol\";\nimport \"../Catalyst/ERC20GroupGem.sol\";\nimport \"./PurchaseValidator.sol\";\n\n\n/// @title StarterPack contract that supports SAND, DAI and ETH as payment\n/// @notice This contract manages the purchase and distribution of StarterPacks (bundles of Catalysts and Gems)\ncontract StarterPackV1 is Admin, MetaTransactionReceiver, PurchaseValidator {\n using SafeMathWithRequire for uint256;\n uint256 internal constant DAI_PRICE = 44000000000000000;\n uint256 private constant DECIMAL_PLACES = 1 ether;\n\n ERC20 internal immutable _sand;\n Medianizer private immutable _medianizer;\n ERC20 private immutable _dai;\n ERC20Group internal immutable _erc20GroupCatalyst;\n ERC20Group internal immutable _erc20GroupGem;\n\n bool _sandEnabled;\n bool _etherEnabled;\n bool _daiEnabled;\n\n uint256[] private _starterPackPrices;\n uint256[] private _previousStarterPackPrices;\n uint256 private _gemPrice;\n uint256 private _previousGemPrice;\n\n // The timestamp of the last pricechange\n uint256 private _priceChangeTimestamp;\n\n address payable internal _wallet;\n\n // The delay between calling setPrices() and when the new prices come into effect.\n // Minimizes the effect of price changes on pending TXs\n uint256 private constant PRICE_CHANGE_DELAY = 1 hours;\n\n event Purchase(address indexed buyer, Message message, uint256 price, address token, uint256 amountPaid);\n\n event SetPrices(uint256[] prices, uint256 gemPrice);\n\n struct Message {\n uint256[] catalystIds;\n uint256[] catalystQuantities;\n uint256[] gemIds;\n uint256[] gemQuantities;\n uint256 nonce;\n }\n\n // ////////////////////////// Functions ////////////////////////\n\n /// @notice Set the wallet receiving the proceeds\n /// @param newWallet Address of the new receiving wallet\n function setReceivingWallet(address payable newWallet) external {\n require(newWallet != address(0), \"WALLET_ZERO_ADDRESS\");\n require(msg.sender == _admin, \"NOT_AUTHORIZED\");\n _wallet = newWallet;\n }\n\n /// @notice Enable / disable DAI payment for StarterPacks\n /// @param enabled Whether to enable or disable\n function setDAIEnabled(bool enabled) external {\n require(msg.sender == _admin, \"NOT_AUTHORIZED\");\n _daiEnabled = enabled;\n }\n\n /// @notice Return whether DAI payments are enabled\n /// @return Whether DAI payments are enabled\n function isDAIEnabled() external view returns (bool) {\n return _daiEnabled;\n }\n\n /// @notice Enable / disable ETH payment for StarterPacks\n /// @param enabled Whether to enable or disable\n function setETHEnabled(bool enabled) external {\n require(msg.sender == _admin, \"NOT_AUTHORIZED\");\n _etherEnabled = enabled;\n }\n\n /// @notice Return whether ETH payments are enabled\n /// @return Whether ETH payments are enabled\n function isETHEnabled() external view returns (bool) {\n return _etherEnabled;\n }\n\n /// @dev Enable / disable the specific SAND payment for StarterPacks\n /// @param enabled Whether to enable or disable\n function setSANDEnabled(bool enabled) external {\n require(msg.sender == _admin, \"NOT_AUTHORIZED\");\n _sandEnabled = enabled;\n }\n\n /// @notice Return whether SAND payments are enabled\n /// @return Whether SAND payments are enabled\n function isSANDEnabled() external view returns (bool) {\n return _sandEnabled;\n }\n\n /// @notice Purchase StarterPacks with SAND\n /// @param buyer The destination address for the purchased Catalysts and Gems and the address that will pay for the purchase; if not metaTx then buyer must be equal to msg.sender\n /// @param message A message containing information about the Catalysts and Gems to be purchased\n /// @param signature A signed message specifying tx details\n\n function purchaseWithSand(\n address buyer,\n Message calldata message,\n bytes calldata signature\n ) external {\n require(msg.sender == buyer || _metaTransactionContracts[msg.sender], \"INVALID_SENDER\");\n require(_sandEnabled, \"SAND_IS_NOT_ENABLED\");\n require(buyer != address(0), \"DESTINATION_ZERO_ADDRESS\");\n require(\n isPurchaseValid(buyer, message.catalystIds, message.catalystQuantities, message.gemIds, message.gemQuantities, message.nonce, signature),\n \"INVALID_PURCHASE\"\n );\n\n uint256 amountInSand = _calculateTotalPriceInSand(message.catalystIds, message.catalystQuantities, message.gemQuantities);\n _handlePurchaseWithERC20(buyer, _wallet, address(_sand), amountInSand);\n _erc20GroupCatalyst.batchTransferFrom(address(this), buyer, message.catalystIds, message.catalystQuantities);\n _erc20GroupGem.batchTransferFrom(address(this), buyer, message.gemIds, message.gemQuantities);\n emit Purchase(buyer, message, amountInSand, address(_sand), amountInSand);\n }\n\n /// @notice Purchase StarterPacks with Ether\n /// @param buyer The destination address for the purchased Catalysts and Gems and the address that will pay for the purchase; if not metaTx then buyer must be equal to msg.sender\n /// @param message A message containing information about the Catalysts and Gems to be purchased\n /// @param signature A signed message specifying tx details\n function purchaseWithETH(\n address buyer,\n Message calldata message,\n bytes calldata signature\n ) external payable {\n require(msg.sender == buyer || _metaTransactionContracts[msg.sender], \"INVALID_SENDER\");\n require(_etherEnabled, \"ETHER_IS_NOT_ENABLED\");\n require(buyer != address(0), \"DESTINATION_ZERO_ADDRESS\");\n require(buyer != address(this), \"DESTINATION_STARTERPACKV1_CONTRACT\");\n require(\n isPurchaseValid(buyer, message.catalystIds, message.catalystQuantities, message.gemIds, message.gemQuantities, message.nonce, signature),\n \"INVALID_PURCHASE\"\n );\n\n uint256 amountInSand = _calculateTotalPriceInSand(message.catalystIds, message.catalystQuantities, message.gemQuantities);\n uint256 ETHRequired = getEtherAmountWithSAND(amountInSand);\n require(msg.value >= ETHRequired, \"NOT_ENOUGH_ETHER_SENT\");\n\n _wallet.transfer(ETHRequired);\n _erc20GroupCatalyst.batchTransferFrom(address(this), buyer, message.catalystIds, message.catalystQuantities);\n _erc20GroupGem.batchTransferFrom(address(this), buyer, message.gemIds, message.gemQuantities);\n emit Purchase(buyer, message, amountInSand, address(0), ETHRequired);\n\n if (msg.value - ETHRequired > 0) {\n // refund extra\n (bool success, ) = msg.sender.call{value: msg.value - ETHRequired}(\"\");\n require(success, \"REFUND_FAILED\");\n }\n }\n\n /// @notice Purchase StarterPacks with DAI\n /// @param buyer The destination address for the purchased Catalysts and Gems and the address that will pay for the purchase; if not metaTx then buyer must be equal to msg.sender\n /// @param message A message containing information about the Catalysts and Gems to be purchased\n /// @param signature A signed message specifying tx details\n function purchaseWithDAI(\n address buyer,\n Message calldata message,\n bytes calldata signature\n ) external {\n require(msg.sender == buyer || _metaTransactionContracts[msg.sender], \"INVALID_SENDER\");\n require(_daiEnabled, \"DAI_IS_NOT_ENABLED\");\n require(buyer != address(0), \"DESTINATION_ZERO_ADDRESS\");\n require(buyer != address(this), \"DESTINATION_STARTERPACKV1_CONTRACT\");\n require(\n isPurchaseValid(buyer, message.catalystIds, message.catalystQuantities, message.gemIds, message.gemQuantities, message.nonce, signature),\n \"INVALID_PURCHASE\"\n );\n\n uint256 amountInSand = _calculateTotalPriceInSand(message.catalystIds, message.catalystQuantities, message.gemQuantities);\n uint256 DAIRequired = amountInSand.mul(DAI_PRICE).div(DECIMAL_PLACES);\n _handlePurchaseWithERC20(buyer, _wallet, address(_dai), DAIRequired);\n _erc20GroupCatalyst.batchTransferFrom(address(this), buyer, message.catalystIds, message.catalystQuantities);\n _erc20GroupGem.batchTransferFrom(address(this), buyer, message.gemIds, message.gemQuantities);\n emit Purchase(buyer, message, amountInSand, address(_dai), DAIRequired);\n }\n\n /// @notice Enables admin to withdraw all remaining tokens\n /// @param to The destination address for the purchased Catalysts and Gems\n /// @param catalystIds The IDs of the catalysts to be transferred\n /// @param gemIds The IDs of the gems to be transferred\n function withdrawAll(\n address to,\n uint256[] calldata catalystIds,\n uint256[] calldata gemIds\n ) external {\n require(msg.sender == _admin, \"NOT_AUTHORIZED\");\n\n address[] memory catalystAddresses = new address[](catalystIds.length);\n for (uint256 i = 0; i < catalystIds.length; i++) {\n catalystAddresses[i] = address(this);\n }\n address[] memory gemAddresses = new address[](gemIds.length);\n for (uint256 i = 0; i < gemIds.length; i++) {\n gemAddresses[i] = address(this);\n }\n uint256[] memory unsoldCatalystQuantities = _erc20GroupCatalyst.balanceOfBatch(catalystAddresses, catalystIds);\n uint256[] memory unsoldGemQuantities = _erc20GroupGem.balanceOfBatch(gemAddresses, gemIds);\n\n _erc20GroupCatalyst.batchTransferFrom(address(this), to, catalystIds, unsoldCatalystQuantities);\n _erc20GroupGem.batchTransferFrom(address(this), to, gemIds, unsoldGemQuantities);\n }\n\n /// @notice Enables admin to change the prices of the StarterPack bundles\n /// @param prices Array of new prices that will take effect after a delay period\n /// @param gemPrice New price for gems that will take effect after a delay period\n\n function setPrices(uint256[] calldata prices, uint256 gemPrice) external {\n require(msg.sender == _admin, \"NOT_AUTHORIZED\");\n _previousStarterPackPrices = _starterPackPrices;\n _starterPackPrices = prices;\n _previousGemPrice = _gemPrice;\n _gemPrice = gemPrice;\n _priceChangeTimestamp = now;\n emit SetPrices(prices, gemPrice);\n }\n\n /// @notice Get current StarterPack prices\n /// @return pricesBeforeSwitch Array of prices before price change\n /// @return pricesAfterSwitch Array of prices after price change\n /// @return gemPriceBeforeSwitch Gem price before price change\n /// @return gemPriceAfterSwitch Gem price after price change\n /// @return switchTime The time the latest price change will take effect, being the time of the price change plus the price change delay\n\n function getPrices()\n external\n view\n returns (\n uint256[] memory pricesBeforeSwitch,\n uint256[] memory pricesAfterSwitch,\n uint256 gemPriceBeforeSwitch,\n uint256 gemPriceAfterSwitch,\n uint256 switchTime\n )\n {\n switchTime = 0;\n if (_priceChangeTimestamp != 0) {\n switchTime = _priceChangeTimestamp + PRICE_CHANGE_DELAY;\n }\n return (_previousStarterPackPrices, _starterPackPrices, _previousGemPrice, _gemPrice, switchTime);\n }\n\n /// @notice Returns the amount of ETH for a specific amount of SAND\n /// @param sandAmount An amount of SAND\n /// @return The amount of ETH\n function getEtherAmountWithSAND(uint256 sandAmount) public view returns (uint256) {\n uint256 ethUsdPair = _getEthUsdPair();\n return sandAmount.mul(DAI_PRICE).div(ethUsdPair);\n }\n\n // ////////////////////////// Internal ////////////////////////\n\n /// @dev Gets the ETHUSD pair from the Medianizer contract\n /// @return The pair as an uint256\n function _getEthUsdPair() internal view returns (uint256) {\n bytes32 pair = _medianizer.read();\n return uint256(pair);\n }\n\n /// @dev Function to calculate the total price in SAND of the StarterPacks to be purchased\n /// @dev The price of each StarterPack relates to the catalystId\n /// @param catalystIds Array of catalystIds to be purchase\n /// @param catalystQuantities Array of quantities of those catalystIds to be purchased\n /// @return Total price in SAND\n function _calculateTotalPriceInSand(\n uint256[] memory catalystIds,\n uint256[] memory catalystQuantities,\n uint256[] memory gemQuantities\n ) internal returns (uint256) {\n require(catalystIds.length == catalystQuantities.length, \"INVALID_INPUT\");\n (uint256[] memory prices, uint256 gemPrice) = _priceSelector();\n uint256 totalPrice;\n for (uint256 i = 0; i < catalystIds.length; i++) {\n uint256 id = catalystIds[i];\n uint256 quantity = catalystQuantities[i];\n totalPrice = totalPrice.add(prices[id].mul(quantity));\n }\n for (uint256 i = 0; i < gemQuantities.length; i++) {\n uint256 quantity = gemQuantities[i];\n totalPrice = totalPrice.add(gemPrice.mul(quantity));\n }\n return totalPrice;\n }\n\n /// @dev Function to determine whether to use old or new prices\n /// @return Array of prices\n\n function _priceSelector() internal returns (uint256[] memory, uint256) {\n uint256[] memory prices;\n uint256 gemPrice;\n // No price change:\n if (_priceChangeTimestamp == 0) {\n prices = _starterPackPrices;\n gemPrice = _gemPrice;\n } else {\n // Price change delay has expired.\n if (now > _priceChangeTimestamp + PRICE_CHANGE_DELAY) {\n _priceChangeTimestamp = 0;\n prices = _starterPackPrices;\n gemPrice = _gemPrice;\n } else {\n // Price change has occured:\n prices = _previousStarterPackPrices;\n gemPrice = _previousGemPrice;\n }\n }\n return (prices, gemPrice);\n }\n\n /// @dev Function to handle purchase with SAND or DAI\n function _handlePurchaseWithERC20(\n address buyer,\n address payable paymentRecipient,\n address tokenAddress,\n uint256 amount\n ) internal {\n ERC20 token = ERC20(tokenAddress);\n uint256 amountForDestination = amount;\n require(token.transferFrom(buyer, paymentRecipient, amountForDestination), \"PAYMENT_TRANSFER_FAILED\");\n }\n\n // /////////////////// CONSTRUCTOR ////////////////////\n\n constructor(\n address starterPackAdmin,\n address sandContractAddress,\n address initialMetaTx,\n address payable initialWalletAddress,\n address medianizerContractAddress,\n address daiTokenContractAddress,\n address erc20GroupCatalystAddress,\n address erc20GroupGemAddress,\n address initialSigningWallet,\n uint256[] memory initialStarterPackPrices,\n uint256 initialGemPrice\n ) public PurchaseValidator(initialSigningWallet) {\n _setMetaTransactionProcessor(initialMetaTx, true);\n _wallet = initialWalletAddress;\n _admin = starterPackAdmin;\n _sand = ERC20(sandContractAddress);\n _medianizer = Medianizer(medianizerContractAddress);\n _dai = ERC20(daiTokenContractAddress);\n _erc20GroupCatalyst = ERC20Group(erc20GroupCatalystAddress);\n _erc20GroupGem = ERC20Group(erc20GroupGemAddress);\n _starterPackPrices = initialStarterPackPrices;\n _previousStarterPackPrices = initialStarterPackPrices;\n _gemPrice = initialGemPrice;\n _previousGemPrice = initialGemPrice;\n _sandEnabled = true; // Sand is enabled by default\n _etherEnabled = true; // Ether is enabled by default\n }\n}\n" + }, + "src/solc_0.6/test/LandWeightedSANDRewardPoolNFTTest.sol": { + "content": "pragma solidity 0.6.5;\n\nimport \"../LiquidityMining/LandWeightedSANDRewardPool.sol\";\n\n\ncontract LandWeightedSANDRewardPoolNFTTest is LandWeightedSANDRewardPool {\n constructor(\n address stakeTokenContract,\n address rewardTokenContract,\n address nftContract,\n uint256 rewardDuration\n ) public LandWeightedSANDRewardPool(IERC20(stakeTokenContract), IERC20(rewardTokenContract), ERC721(nftContract), rewardDuration) {}\n}\n" + }, + "src/solc_0.6/test/MockERC20.sol": { + "content": "pragma solidity 0.6.5;\nimport \"../common/Libraries/SafeMathWithRequire.sol\";\nimport \"../common/BaseWithStorage/Ownable.sol\";\nimport \"../common/Interfaces/ERC20.sol\";\n\n\ncontract ERC20Impl is ERC20 {\n using SafeMathWithRequire for uint256;\n\n mapping(address => uint256) public _balances;\n\n mapping(address => mapping(address => uint256)) public _allowances;\n\n uint256 public _totalSupply;\n\n function totalSupply() public override view returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public override view returns (uint256) {\n return _balances[account];\n }\n\n function transfer(address recipient, uint256 amount) public override returns (bool) {\n _transfer(msg.sender, recipient, amount);\n return true;\n }\n\n function allowance(address owner, address spender) public override view returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(address spender, uint256 amount) public override returns (bool) {\n _approve(msg.sender, spender, amount);\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public override returns (bool) {\n _transfer(sender, recipient, amount);\n _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount));\n return true;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _balances[sender] = _balances[sender].sub(amount);\n _balances[recipient] = _balances[recipient].add(amount);\n emit Transfer(sender, recipient, amount);\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n}\n\n\ncontract MintableToken is ERC20Impl, Ownable {\n function mint(address account, uint256 amount) public onlyOwner {\n require(account != address(0), \"ERC20: mint to the zero address\");\n _totalSupply = _totalSupply.add(amount);\n _balances[account] = _balances[account].add(amount);\n emit Transfer(address(0), account, amount);\n }\n\n constructor() public Ownable(msg.sender) {}\n}\n\n\ncontract MockERC20 is MintableToken {\n string public constant name = \"Mock Token\";\n string public constant symbol = \"MCK\";\n uint8 public constant decimals = 18;\n}\n" + }, + "src/solc_0.6/test/MockLand.sol": { + "content": "pragma solidity 0.6.5;\n\nimport \"../common/Libraries/AddressUtils.sol\";\nimport \"../common/Interfaces/ERC721.sol\";\nimport \"../common/Interfaces/ERC721TokenReceiver.sol\";\nimport \"../common/Interfaces/ERC721MandatoryTokenReceiver.sol\";\nimport \"../common/BaseWithStorage/SuperOperators.sol\";\nimport \"../common/BaseWithStorage/MetaTransactionReceiver.sol\";\n\n\ncontract MockERC721 is ERC721, SuperOperators, MetaTransactionReceiver {\n using AddressUtils for address;\n\n bytes4 internal constant _ERC721_RECEIVED = 0x150b7a02;\n bytes4 internal constant _ERC721_BATCH_RECEIVED = 0x4b808c46;\n\n bytes4 internal constant ERC165ID = 0x01ffc9a7;\n bytes4 internal constant ERC721_MANDATORY_RECEIVER = 0x5e8bf644;\n\n mapping(address => uint256) public _numNFTPerAddress;\n mapping(uint256 => uint256) public _owners;\n mapping(address => mapping(address => bool)) public _operatorsForAll;\n mapping(uint256 => address) public _operators;\n\n constructor(address metaTransactionContract, address admin) internal {\n _admin = admin;\n _setMetaTransactionProcessor(metaTransactionContract, true);\n }\n\n function _transferFrom(\n address from,\n address to,\n uint256 id\n ) internal {\n _numNFTPerAddress[from]--;\n _numNFTPerAddress[to]++;\n _owners[id] = uint256(to);\n emit Transfer(from, to, id);\n }\n\n function balanceOf(address owner) public override view returns (uint256) {\n require(owner != address(0), \"owner is zero address\");\n return _numNFTPerAddress[owner];\n }\n\n function _ownerOf(uint256 id) internal view returns (address) {\n return address(_owners[id]);\n }\n\n function _ownerAndOperatorEnabledOf(uint256 id) internal view returns (address owner, bool operatorEnabled) {\n uint256 data = _owners[id];\n owner = address(data);\n operatorEnabled = (data / 2**255) == 1;\n }\n\n function ownerOf(uint256 id) public override view returns (address owner) {\n // TODO: does not return owner\n owner = _ownerOf(id);\n require(owner != address(0), \"token does not exist\");\n }\n\n function _approveFor(\n address owner,\n address operator,\n uint256 id\n ) internal {\n if (operator == address(0)) {\n _owners[id] = uint256(owner); // no need to resset the operator, it will be overriden next time\n } else {\n _owners[id] = uint256(owner) + 2**255;\n _operators[id] = operator;\n }\n emit Approval(owner, operator, id);\n }\n\n function approveFor(\n address sender,\n address operator,\n uint256 id\n ) public {\n address owner = _ownerOf(id);\n require(sender != address(0), \"sender is zero address\");\n require(\n msg.sender == sender || _metaTransactionContracts[msg.sender] || _superOperators[msg.sender] || _operatorsForAll[sender][msg.sender],\n \"not authorized to approve\"\n );\n require(owner == sender, \"owner != sender\");\n _approveFor(owner, operator, id);\n }\n\n function approve(address operator, uint256 id) public override {\n address owner = _ownerOf(id);\n require(owner != address(0), \"token does not exist\");\n require(owner == msg.sender || _superOperators[msg.sender] || _operatorsForAll[owner][msg.sender], \"not authorized to approve\");\n _approveFor(owner, operator, id);\n }\n\n function getApproved(uint256 id) public override view returns (address) {\n (address owner, bool operatorEnabled) = _ownerAndOperatorEnabledOf(id);\n require(owner != address(0), \"token does not exist\");\n if (operatorEnabled) {\n return _operators[id];\n } else {\n return address(0);\n }\n }\n\n function _checkTransfer(\n address from,\n address to,\n uint256 id\n ) internal view returns (bool isMetaTx) {\n (address owner, bool operatorEnabled) = _ownerAndOperatorEnabledOf(id);\n require(owner != address(0), \"token does not exist\");\n require(owner == from, \"not owner in _checkTransfer\");\n require(to != address(0), \"can't send to zero address\");\n isMetaTx = msg.sender != from && _metaTransactionContracts[msg.sender];\n if (msg.sender != from && !isMetaTx) {\n require(\n _superOperators[msg.sender] || _operatorsForAll[from][msg.sender] || (operatorEnabled && _operators[id] == msg.sender),\n \"not approved to transfer\"\n );\n }\n }\n\n function _checkInterfaceWith10000Gas(address _contract, bytes4 interfaceId) internal view returns (bool) {\n bool success;\n bool result;\n bytes memory call_data = abi.encodeWithSelector(ERC165ID, interfaceId);\n // solium-disable-next-line security/no-inline-assembly\n assembly {\n let call_ptr := add(0x20, call_data)\n let call_size := mload(call_data)\n let output := mload(0x40) // Find empty storage location using \"free memory pointer\"\n mstore(output, 0x0)\n success := staticcall(10000, _contract, call_ptr, call_size, output, 0x20) // 32 bytes\n result := mload(output)\n }\n // (10000 / 63) \"not enough for supportsInterface(...)\" // consume all gas, so caller can potentially know that there was not enough gas\n assert(gasleft() > 158);\n return success && result;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 id\n ) public override {\n bool metaTx = _checkTransfer(from, to, id);\n _transferFrom(from, to, id);\n if (to.isContract() && _checkInterfaceWith10000Gas(to, ERC721_MANDATORY_RECEIVER)) {\n require(_checkOnERC721Received(metaTx ? from : msg.sender, from, to, id, \"\"), \"erc721 transfer rejected by to\");\n }\n }\n\n function safeTransferFrom(\n address from,\n address to,\n uint256 id,\n bytes memory data\n ) public override {\n bool metaTx = _checkTransfer(from, to, id);\n _transferFrom(from, to, id);\n if (to.isContract()) {\n require(_checkOnERC721Received(metaTx ? from : msg.sender, from, to, id, data), \"ERC721: transfer rejected by to\");\n }\n }\n\n function safeTransferFrom(\n address from,\n address to,\n uint256 id\n ) public override {\n safeTransferFrom(from, to, id, \"\");\n }\n\n function batchTransferFrom(\n address from,\n address to,\n uint256[] memory ids,\n bytes memory data\n ) public {\n _batchTransferFrom(from, to, ids, data, false);\n }\n\n function _batchTransferFrom(\n address from,\n address to,\n uint256[] memory ids,\n bytes memory data,\n bool safe\n ) internal {\n bool metaTx = msg.sender != from && _metaTransactionContracts[msg.sender];\n bool authorized = msg.sender == from || metaTx || _superOperators[msg.sender] || _operatorsForAll[from][msg.sender];\n\n require(from != address(0), \"from is zero address\");\n require(to != address(0), \"can't send to zero address\");\n\n uint256 numTokens = ids.length;\n for (uint256 i = 0; i < numTokens; i++) {\n uint256 id = ids[i];\n (address owner, bool operatorEnabled) = _ownerAndOperatorEnabledOf(id);\n require(owner == from, \"not owner in batchTransferFrom\");\n require(authorized || (operatorEnabled && _operators[id] == msg.sender), \"not authorized\");\n _owners[id] = uint256(to);\n emit Transfer(from, to, id);\n }\n if (from != to) {\n _numNFTPerAddress[from] -= numTokens;\n _numNFTPerAddress[to] += numTokens;\n }\n\n if (to.isContract() && (safe || _checkInterfaceWith10000Gas(to, ERC721_MANDATORY_RECEIVER))) {\n require(_checkOnERC721BatchReceived(metaTx ? from : msg.sender, from, to, ids, data), \"erc721 batch transfer rejected by to\");\n }\n }\n\n function safeBatchTransferFrom(\n address from,\n address to,\n uint256[] memory ids,\n bytes memory data\n ) public {\n _batchTransferFrom(from, to, ids, data, true);\n }\n\n function supportsInterface(bytes4 id) public override view returns (bool) {\n return id == 0x01ffc9a7 || id == 0x80ac58cd;\n }\n\n function setApprovalForAllFor(\n address sender,\n address operator,\n bool approved\n ) public {\n require(sender != address(0), \"Invalid sender address\");\n require(msg.sender == sender || _metaTransactionContracts[msg.sender] || _superOperators[msg.sender], \"not authorized to approve for all\");\n\n _setApprovalForAll(sender, operator, approved);\n }\n\n function setApprovalForAll(address operator, bool approved) public override {\n _setApprovalForAll(msg.sender, operator, approved);\n }\n\n function _setApprovalForAll(\n address sender,\n address operator,\n bool approved\n ) internal {\n require(!_superOperators[operator], \"super operator can't have their approvalForAll changed\");\n _operatorsForAll[sender][operator] = approved;\n\n emit ApprovalForAll(sender, operator, approved);\n }\n\n function isApprovedForAll(address owner, address operator) public override view returns (bool isOperator) {\n return _operatorsForAll[owner][operator] || _superOperators[operator];\n }\n\n function _burn(\n address from,\n address owner,\n uint256 id\n ) public {\n require(from == owner, \"not owner\");\n _owners[id] = 2**160; // cannot mint it again\n _numNFTPerAddress[from]--;\n emit Transfer(from, address(0), id);\n }\n\n function burn(uint256 id) public {\n _burn(msg.sender, _ownerOf(id), id);\n }\n\n function burnFrom(address from, uint256 id) public {\n require(from != address(0), \"Invalid sender address\");\n (address owner, bool operatorEnabled) = _ownerAndOperatorEnabledOf(id);\n require(\n msg.sender == from ||\n _metaTransactionContracts[msg.sender] ||\n (operatorEnabled && _operators[id] == msg.sender) ||\n _superOperators[msg.sender] ||\n _operatorsForAll[from][msg.sender],\n \"not authorized to burn\"\n );\n _burn(from, owner, id);\n }\n\n function _checkOnERC721Received(\n address operator,\n address from,\n address to,\n uint256 tokenId,\n bytes memory _data\n ) internal returns (bool) {\n bytes4 retval = ERC721TokenReceiver(to).onERC721Received(operator, from, tokenId, _data);\n return (retval == _ERC721_RECEIVED);\n }\n\n function _checkOnERC721BatchReceived(\n address operator,\n address from,\n address to,\n uint256[] memory ids,\n bytes memory _data\n ) internal returns (bool) {\n bytes4 retval = ERC721MandatoryTokenReceiver(to).onERC721BatchReceived(operator, from, ids, _data);\n return (retval == _ERC721_BATCH_RECEIVED);\n }\n\n function mint(address to, uint256 tokenId) public {\n require(to != address(0), \"to is zero address\");\n require(_owners[tokenId] == 0, \"Already minted\");\n emit Transfer(address(0), to, tokenId);\n _owners[tokenId] = uint256(to);\n _numNFTPerAddress[to] += 1;\n }\n}\n\n\ncontract MockLand is MockERC721 {\n constructor(address metaTransactionContract, address admin) public MockERC721(metaTransactionContract, admin) {}\n\n function name() external pure returns (string memory) {\n return \"Mock LANDs\";\n }\n\n function symbol() external pure returns (string memory) {\n return \"MOCKLAND\";\n }\n}\n" + }, + "src/solc_0.6/test/MockRootChainManager.sol": { + "content": "//SPDX-License-Identifier: MIT\n// solhint-disable-next-line compiler-version\npragma solidity 0.6.5;\nimport \"./MockSandPredicate.sol\";\n\ncontract MockRootChainManager {\n address internal immutable _predicateAddress;\n\n constructor(address predicateAddress) public {\n _predicateAddress = predicateAddress;\n }\n\n function depositFor(\n address user,\n address rootToken,\n bytes calldata depositData\n ) external {\n MockSandPredicate(_predicateAddress).lockTokens(msg.sender, user, rootToken, depositData);\n }\n}\n" + }, + "src/solc_0.6/test/MockSandPredicate.sol": { + "content": "//SPDX-License-Identifier: MIT\n// solhint-disable-next-line compiler-version\npragma solidity 0.6.5;\nimport \"../Interfaces/ERC20Extended.sol\";\n\ncontract MockSandPredicate {\n event LockedERC20(\n address indexed depositor,\n address indexed depositReceiver,\n address indexed rootToken,\n uint256 amount\n );\n\n function lockTokens(\n address depositor,\n address depositReceiver,\n address rootToken,\n bytes calldata depositData\n ) external {\n uint256 amount = abi.decode(depositData, (uint256));\n emit LockedERC20(depositor, depositReceiver, rootToken, amount);\n ERC20Extended(rootToken).transferFrom(depositor, address(this), amount);\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 2000 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file