tx · FaGPrZiDHp9Uzs556SuNwAz9ajTkmMsUBvhiUmVNK24c 3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB: -0.01400000 Waves 2019.11.16 11:16 [767413] smart account 3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB > SELF 0.00000000 Waves
{ "type": 13, "id": "FaGPrZiDHp9Uzs556SuNwAz9ajTkmMsUBvhiUmVNK24c", "fee": 1400000, "feeAssetId": null, "timestamp": 1573892230891, "version": 1, "sender": "3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB", "senderPublicKey": "Gd5NihbWQoWuTnSvq25TuV2BYZG4U1e9KDqZn9zBPix7", "proofs": [ "5veukLigTcdGswbKJHcrm6GJUT6AzxmQN1zXydfR68E342biR5mfwFwqD7CfBUYXWhhLYymxvutY11HRYg4DPo25" ], "script": "base64:AAIDAAAAAAAAAAoIARIGCgQICAgIAAAAAgAAAAAIdmVyaWZpZXIJAQAAAAdleHRyYWN0AAAAAQkBAAAAEWFkZHJlc3NGcm9tU3RyaW5nAAAAAQIAAAAjM04yczVSdGFIUEJlbkNzeDJFQ2NvRlJiWUh4M25vWmhYVzEAAAAABGJhbmsCAAAAIzNOMUU2dFhkZFJvVmFSZlE5ZFEzdmc1TGFXMmZzZDhIS3ViAAAAAQAAAAZpbnZva2UBAAAAEWZpbGVDZXJ0aWZpY2F0aW9uAAAABAAAAARoYXNoAAAABXRpdGxlAAAABHV1aWQAAAAEZGF0YQQAAAAHcGF5bWVudAkBAAAAB2V4dHJhY3QAAAABCAUAAAAGaW52b2tlAAAAB3BheW1lbnQEAAAABmFtb3VudAMJAQAAAAlpc0RlZmluZWQAAAABCAUAAAAHcGF5bWVudAAAAAZhbW91bnQJAQAAAAdleHRyYWN0AAAAAQgFAAAAB3BheW1lbnQAAAAGYW1vdW50AAAAAAAAAAAABAAAAAJpZAkBAAAAB2V4dHJhY3QAAAABCAUAAAAGaW52b2tlAAAADXRyYW5zYWN0aW9uSWQEAAAACmVudHJ5RX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AAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAIZGF0YV9mY18JAAJYAAAAAQUAAAACaWQCAAAAAV8FAAAADWNhbGxlckFkZHJlc3MFAAAABGRhdGEFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCQEAAAAcQGV4dHJVc2VyKGFkZHJlc3NGcm9tU3RyaW5nKQAAAAEFAAAABGJhbmsFAAAABmFtb3VudAgFAAAAB3BheW1lbnQAAAAHYXNzZXRJZAUAAAADbmlsAAAAAEGQwn0=", "chainId": 84, "height": 767413, "spentComplexity": 0 } View: original | compacted Prev: CP6SxxxEfg3rDaHarwAMuJU9fE4uf7SPev1soTS3Yqjb Next: 3NNnoBLG7adtUQ2PBx4fXe27goJotiVVpVsLbD1zEkEy Diff:
Old | New | Differences | |
---|---|---|---|
8 | 8 | @Callable(c) | |
9 | 9 | func fileCertification (d,e,f,g) = { | |
10 | 10 | let h = extract(c.payment) | |
11 | - | let i = extract(h.amount) | |
11 | + | let i = if (isDefined(h.amount)) | |
12 | + | then extract(h.amount) | |
13 | + | else 0 | |
12 | 14 | let j = extract(c.transactionId) | |
13 | 15 | let k = { | |
14 | 16 | let l = getString(this, (d + f)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = extract(addressFromString("3N2s5RtaHPBenCsx2ECcoFRbYHx3noZhXW1")) | |
5 | 5 | ||
6 | 6 | let b = "3N1E6tXddRoVaRfQ9dQ3vg5LaW2fsd8HKub" | |
7 | 7 | ||
8 | 8 | @Callable(c) | |
9 | 9 | func fileCertification (d,e,f,g) = { | |
10 | 10 | let h = extract(c.payment) | |
11 | - | let i = extract(h.amount) | |
11 | + | let i = if (isDefined(h.amount)) | |
12 | + | then extract(h.amount) | |
13 | + | else 0 | |
12 | 14 | let j = extract(c.transactionId) | |
13 | 15 | let k = { | |
14 | 16 | let l = getString(this, (d + f)) | |
15 | 17 | if ($isInstanceOf(l, "String")) | |
16 | 18 | then { | |
17 | 19 | let m = l | |
18 | 20 | m | |
19 | 21 | } | |
20 | 22 | else "NONE" | |
21 | 23 | } | |
22 | 24 | let n = { | |
23 | 25 | let l = getString(this, f) | |
24 | 26 | if ($isInstanceOf(l, "String")) | |
25 | 27 | then { | |
26 | 28 | let m = l | |
27 | 29 | m | |
28 | 30 | } | |
29 | 31 | else "NONE" | |
30 | 32 | } | |
31 | 33 | let o = toBase58String(c.caller.bytes) | |
32 | 34 | let p = { | |
33 | 35 | let l = getInteger(this, ("addr_WHITELISTED_" + o)) | |
34 | 36 | if ($isInstanceOf(l, "Int")) | |
35 | 37 | then { | |
36 | 38 | let m = l | |
37 | 39 | m | |
38 | 40 | } | |
39 | 41 | else 0 | |
40 | 42 | } | |
41 | 43 | if ((k != "NONE")) | |
42 | 44 | then throw("This entry already exist") | |
43 | 45 | else if ((n != "NONE")) | |
44 | 46 | then throw("This uuid already exist") | |
45 | 47 | else if ((size(f) > 36)) | |
46 | 48 | then throw("Uuid is too long") | |
47 | 49 | else if ((size(d) > 64)) | |
48 | 50 | then throw("Hash is too long") | |
49 | 51 | else if ((size(e) > 64)) | |
50 | 52 | then throw("Title is too long") | |
51 | 53 | else { | |
52 | 54 | let q = if (isDefined(h.assetId)) | |
53 | 55 | then extract(h.assetId) | |
54 | 56 | else throw("Waves is not accepted as payment") | |
55 | 57 | let r = { | |
56 | 58 | let l = getString(a, ("white_list_token_" + toBase58String(extract(q)))) | |
57 | 59 | if ($isInstanceOf(l, "String")) | |
58 | 60 | then { | |
59 | 61 | let m = l | |
60 | 62 | m | |
61 | 63 | } | |
62 | 64 | else throw("This token is not accepted at the moment") | |
63 | 65 | } | |
64 | 66 | let s = getIntegerValue(a, ("certification_fee_" + toBase58String(extract(q)))) | |
65 | 67 | if ((r != "WHITELISTED")) | |
66 | 68 | then throw("This token is not accepted at the moment") | |
67 | 69 | else if (if ((i != s)) | |
68 | 70 | then (0 >= p) | |
69 | 71 | else false) | |
70 | 72 | then throw("The price is wrong") | |
71 | 73 | else if ((p > 0)) | |
72 | 74 | then ScriptResult(WriteSet([DataEntry(f, toBase58String(j)), DataEntry((d + f), toBase58String(j)), DataEntry((e + f), toBase58String(j)), DataEntry(("addr_WHITELISTED_" + o), (p - 1)), DataEntry(((("data_fc_" + toBase58String(j)) + "_") + o), g)]), TransferSet([ScriptTransfer(addressFromStringValue(b), i, h.assetId)])) | |
73 | 75 | else ScriptResult(WriteSet([DataEntry(f, toBase58String(j)), DataEntry((d + f), toBase58String(j)), DataEntry((e + f), toBase58String(j)), DataEntry(((("data_fc_" + toBase58String(j)) + "_") + o), g)]), TransferSet([ScriptTransfer(addressFromStringValue(b), i, h.assetId)])) | |
74 | 76 | } | |
75 | 77 | } | |
76 | 78 | ||
77 | 79 |
github/deemru/w8io/026f985 43.33 ms ◑