tx · 8naZKkzpkU555BJxX7wum3cGmcNTiZPLRNR268sit86d 3MrVzinNYTCphQHQowiqaDKZGNXBvdsQ19x: -0.01400000 Waves 2019.11.02 17:06 [747348] smart account 3MrVzinNYTCphQHQowiqaDKZGNXBvdsQ19x > SELF 0.00000000 Waves
{ "type": 13, "id": "8naZKkzpkU555BJxX7wum3cGmcNTiZPLRNR268sit86d", "fee": 1400000, "feeAssetId": null, "timestamp": 1572703621866, "version": 1, "sender": "3MrVzinNYTCphQHQowiqaDKZGNXBvdsQ19x", "senderPublicKey": "GHL5KX3KCQWE7WjM498wMBnHuK3GS39bUxXhdgF2aXYp", "proofs": [ "2QsLuHbyKTXdta4vAFV1WVtGQ7Urk7oeFXb3cJK49YQdWep1WBRB1SVThM7dwFQGpJ7d4g4Efq3t5cnbPi4e14WQ" ], "script": "base64:AAIDAAAAAAAAAA4IARIECgIICBIECgIIAQAAAAMBAAAABWdlS2V5AAAAAQAAAAdvcmRlcklECQABLAAAAAIJAAEsAAAAAgIAAAAMSU5BUlRFX2NlcnRfBQAAAAdvcmRlcklEAgAAAAFfAQAAABFnZXRLZXlDZXJ0aWZpY2F0bwAAAAIAAAAIc3VwcGxpZXIAAAAHb3JkZXJJRAkAASwAAAACCQEAAAAFZ2VLZXkAAAABBQAAAAdvcmRlcklECQACWAAAAAEJAAH3AAAAAQkAAZsAAAABBQAAAAhzdXBwbGllcgAAAAAVb3duZXJBY2NvdW50UHVibGljS2V5AQAAACAvV6qONSFt1iqZXzmpD37qR4aC5rjrm/jLW6PpAlgwYQAAAAIAAAABaQEAAAAOYWRkQ2VydGlmaWNhdG8AAAACAAAAB29yZGVySUQAAAAEZGF0YQQAAAAPc3VwcGxpZXJBZGRyZXNzCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAABGl0ZW0JAQAAABFnZXRLZXlDZXJ0aWZpY2F0bwAAAAIFAAAAD3N1cHBsaWVyQWRkcmVzcwUAAAAHb3JkZXJJRAkBA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AAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAFW93bmVyQWNjb3VudFB1YmxpY0tleQZgdbIk", "chainId": 84, "height": 747348, "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 geKey (orderID) = (("INARTE_cert_" + orderID) + "_") | |
5 | + | ||
6 | + | ||
7 | + | func getKeyCertificato (supplier,orderID) = (geKey(orderID) + toBase58String(sha256(toBytes(supplier)))) | |
8 | + | ||
9 | + | ||
10 | + | let ownerAccountPublicKey = base58'4BohGUWWjpoip4DRcSDk8zNdy5QMiQQ2uQMcNjdBmBXn' | |
11 | + | ||
12 | + | @Callable(i) | |
13 | + | func addCertificato (orderID,data) = { | |
14 | + | let supplierAddress = toBase58String(i.caller.bytes) | |
15 | + | let item = getKeyCertificato(supplierAddress, orderID) | |
16 | + | WriteSet([DataEntry(item, data)]) | |
17 | + | } | |
18 | + | ||
19 | + | ||
20 | + | ||
21 | + | @Callable(i) | |
22 | + | func votaCertificato (orderID,stelle) = { | |
23 | + | let chiaveVoti = (("INARTE_voti_" + orderID) + "_") | |
24 | + | let chiaveVotanti = (("INARTE_votanti_" + orderID) + "_") | |
25 | + | let votiAttuali = match getInteger(this, chiaveVoti) { | |
26 | + | case a: Int => | |
27 | + | a | |
28 | + | case _ => | |
29 | + | 0 | |
30 | + | } | |
31 | + | let votantiAttuali = match getInteger(this, chiaveVotanti) { | |
32 | + | case a: Int => | |
33 | + | a | |
34 | + | case _ => | |
35 | + | 0 | |
36 | + | } | |
37 | + | WriteSet([DataEntry(chiaveVoti, (votiAttuali + stelle)), DataEntry(chiaveVotanti, (votantiAttuali + 1))]) | |
38 | + | } | |
39 | + | ||
40 | + | ||
41 | + | @Verifier(tx) | |
42 | + | func verify () = match tx { | |
43 | + | case d: SetScriptTransaction => | |
44 | + | sigVerify(tx.bodyBytes, tx.proofs[0], ownerAccountPublicKey) | |
45 | + | case _ => | |
46 | + | true | |
47 | + | } | |
48 | + |
github/deemru/w8io/026f985 14.26 ms ◑