tx · Cywuu79rANfiK5GDK11a635kewLDUKcwxaC72JQRdcA5 3MrAGUHkAMXjcibuvNzmjETafSqp746gnFA: -0.01000000 Waves 2019.07.10 23:25 [580074] smart account 3MrAGUHkAMXjcibuvNzmjETafSqp746gnFA > SELF 0.00000000 Waves
{ "type": 13, "id": "Cywuu79rANfiK5GDK11a635kewLDUKcwxaC72JQRdcA5", "fee": 1000000, "feeAssetId": null, "timestamp": 1562790376174, "version": 1, "sender": "3MrAGUHkAMXjcibuvNzmjETafSqp746gnFA", "senderPublicKey": "JE2KcFqnbAasFewhvGghuxKQbUWbEdoUDUcXvAyBdeJo", "proofs": [ "46VYAW7ckfmZpCp8KY2dKTvRxsDDWAzYgHUAu5mZesW7xosSjUYotRMNi1XMC8jojBwrgoEB4w4pdTNCdhkCqR3i" ], "script": "base64:AAIDAAAAAAAAAAAAAAAEAQAAABdnZXRTdXBwbGllcldoaXRlTGlzdEtleQAAAAEAAAAIc3VwcGxpZXIJAAEsAAAAAgUAAAAIc3VwcGxpZXICAAAAEF92ZXJpZmllcl9zdGF0dXMAAAAACHZlcmlmaWVyAgAAACMzTXJBR1VIa0FNWGpjaWJ1dk56bWpFVGFmU3FwNzQ2Z25GQQAAAAAIVkVSSUZJRUQCAAAACHZlcmlmaWVkAAAAAAtCTEFDS0xJU1RFRAIAAAALYmxhY2tsaXN0ZWQAAAABAAAAAWkBAAAACXNldFN0YXR1cwAAAAIAAAAIc3VwcGxpZXIAAAAGc3RhdHVzBAAAAAZzZW5kZXIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwMJAQAAAAIhPQAAAAIFAAAABnNlbmRlcgUAAAAIdmVyaWZpZXIJAAACAAAAAQIAAAA2T25seSB2ZXJpZmllciBvcmFjbGVzIGFyZSBhYmxlIHRvIG1hbmFnZSB0aGUgd2hpdGVsaXN0AwMJAQAAAAIhPQAAAAIFAAAABnN0YXR1cwUAAAAIVkVSSUZJRUQJAQAAAAIhPQAAAAIFAAAABnN0YXR1cwUAAAALQkxBQ0tMSVNURUQHCQAAAgAAAAECAAAADkludmFsaWQgc3RhdHVzCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQEAAAAXZ2V0U3VwcGxpZXJXaGl0ZUxpc3RLZXkAAAABBQAAAAhzdXBwbGllcgUAAAAGc3RhdHVzBQAAAANuaWwAAAAAGObPEA==", "chainId": 84, "height": 580074, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | func getSupplierWhiteListKey (supplier) = (supplier + "_verifier_status") | |
5 | + | ||
6 | + | ||
7 | + | let verifier = "3MrAGUHkAMXjcibuvNzmjETafSqp746gnFA" | |
8 | + | ||
9 | + | let VERIFIED = "verified" | |
10 | + | ||
11 | + | let BLACKLISTED = "blacklisted" | |
12 | + | ||
13 | + | @Callable(i) | |
14 | + | func setStatus (supplier,status) = { | |
15 | + | let sender = toBase58String(i.caller.bytes) | |
16 | + | if ((sender != verifier)) | |
17 | + | then throw("Only verifier oracles are able to manage the whitelist") | |
18 | + | else if (if ((status != VERIFIED)) | |
19 | + | then (status != BLACKLISTED) | |
20 | + | else false) | |
21 | + | then throw("Invalid status") | |
22 | + | else WriteSet([DataEntry(getSupplierWhiteListKey(supplier), status)]) | |
23 | + | } | |
24 | + | ||
25 | + |
github/deemru/w8io/026f985 16.07 ms ◑