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