tx · CXrwsBCHoc9zzcCq2u8bxuduwUtTFRvdQDUJJBtyKR39 3MpKvUfNxrgF7QotPjFwi8thMagSveNScKe: -0.01400000 Waves 2020.11.03 14:42 [1249069] smart account 3MpKvUfNxrgF7QotPjFwi8thMagSveNScKe > SELF 0.00000000 Waves
{ "type": 13, "id": "CXrwsBCHoc9zzcCq2u8bxuduwUtTFRvdQDUJJBtyKR39", "fee": 1400000, "feeAssetId": null, "timestamp": 1604403728964, "version": 2, "chainId": 84, "sender": "3MpKvUfNxrgF7QotPjFwi8thMagSveNScKe", "senderPublicKey": "9GE2xN4fms9YNDxR1hGg52RynqDd8125TA42g4X29ZV7", "proofs": [ "3CsjxWcgrFrd2Mh3SEv15uEm2fKD8ESgVfcDYQhfcF2y7NVnFPHfh2z6sZ1dvKvPuddUV6Le95eLRdUSTZciARSa" ], "script": "base64:AAIEAAAAAAAAABUIAhIGCgQIAQEIEgQKAggIEgMKAQgAAAAEAAAAAAJjZgkBAAAAFGFkZHJlc3NGcm9tUHVibGljS2V5AAAAAQkAAlkAAAABAgAAACxKN3Z5b1VBOEdkNVFNcTRZVnRlZHB2MTlkd0NZcm9aRVlyTjhiS2dMenFWOAAAAAAEb3BicgEAAAAg8w+nJ903R+IZ8oK5CbdbBTqw7e4xxmj9cHNLUMCmE7gBAAAAEGdldEFsbG93ZWRUb2tlbnMAAAABAAAAB3Rva2VuSWQEAAAABWFsbG93BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAB3Rva2VuSWQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQcFAAAABWFsbG93AQAAAAtjb21wYXJlSGFzaAAAAAIAAAABYwAAAAFoCQAAAAAAAAIJAAH1AAAAAQkAAfYAAAABCQABmwAAAAEFAAAAAWMJAAJZAAAAAQUAAAABaAAAAAMAAAABaQEAAAAHb3BickJ1eQAAAAQAAAAHdG9rZW5JZAAAAANxdGQAAA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bGV0ZUVudHJ5AAAAAQUAAAAHdG9rZW5JZAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAJjZgAAAAAAAJiWgAUAAAAEdW5pdAUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXmwYfzP", "height": 1249069, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GwgbSWqtibdHZnHL7UujJPBY1hjEi4v7QAoBpDVgHUb9 Next: A3zUQAMN52oDDVDcmChLRTMxfVz8ir2ZJU65egy6Mwed Diff:
Old | New | Differences | |
---|---|---|---|
53 | 53 | func tokenList (d,r) = { | |
54 | 54 | let s = toBase58String(k.caller.bytes) | |
55 | 55 | if (if ((s != toString(this))) | |
56 | - | then | |
57 | - | else | |
56 | + | then (s != toString(a)) | |
57 | + | else false) | |
58 | 58 | then throw("The address is not authorized to list tokens") | |
59 | 59 | else [StringEntry(d, r), ScriptTransfer(a, 1000000, unit)] | |
60 | 60 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = addressFromPublicKey(fromBase58String("J7vyoUA8Gd5QMq4YVtedpv19dwCYroZEYrN8bKgLzqV8")) | |
5 | 5 | ||
6 | 6 | let b = base58'HMov2457acf5MEJr85fvXYL3vrTEevFpsEQkHh1yfdUT' | |
7 | 7 | ||
8 | 8 | func c (d) = { | |
9 | 9 | let e = { | |
10 | 10 | let f = getString(this, d) | |
11 | 11 | if ($isInstanceOf(f, "String")) | |
12 | 12 | then { | |
13 | 13 | let g = f | |
14 | 14 | g | |
15 | 15 | } | |
16 | 16 | else false | |
17 | 17 | } | |
18 | 18 | e | |
19 | 19 | } | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func h (i,j) = (keccak256(blake2b256(toBytes(i))) == fromBase58String(j)) | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | @Callable(k) | |
26 | 26 | func opbrBuy (d,l,m,n) = { | |
27 | 27 | let o = toBase58String(k.caller.bytes) | |
28 | 28 | let p = k.payments | |
29 | 29 | let q = c(d) | |
30 | 30 | if ((size(p) == 0)) | |
31 | 31 | then throw("Payment for exchange is mandatory") | |
32 | 32 | else if ((size(p) == 2)) | |
33 | 33 | then throw("Only one payment per transaction is allowed") | |
34 | 34 | else if (!(h((d + toString(((l + m) + p[0].amount))), n))) | |
35 | 35 | then throw("Purchase information is incompatible") | |
36 | 36 | else if (if (isDefined(p[0].assetId)) | |
37 | 37 | then (q == false) | |
38 | 38 | else false) | |
39 | 39 | then throw("The used token is not accepted") | |
40 | 40 | else if (if (isDefined(p[0].assetId)) | |
41 | 41 | then (fromBase58String(d) != p[0].assetId) | |
42 | 42 | else false) | |
43 | 43 | then throw("declared token is different from submitted token") | |
44 | 44 | else { | |
45 | 45 | let i = fraction(1, p[0].amount, 100) | |
46 | 46 | [ScriptTransfer(k.caller, l, b), ScriptTransfer(a, i, p[0].assetId)] | |
47 | 47 | } | |
48 | 48 | } | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | ||
52 | 52 | @Callable(k) | |
53 | 53 | func tokenList (d,r) = { | |
54 | 54 | let s = toBase58String(k.caller.bytes) | |
55 | 55 | if (if ((s != toString(this))) | |
56 | - | then | |
57 | - | else | |
56 | + | then (s != toString(a)) | |
57 | + | else false) | |
58 | 58 | then throw("The address is not authorized to list tokens") | |
59 | 59 | else [StringEntry(d, r), ScriptTransfer(a, 1000000, unit)] | |
60 | 60 | } | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | ||
64 | 64 | @Callable(k) | |
65 | 65 | func tokenDelist (d) = { | |
66 | 66 | let s = toBase58String(k.caller.bytes) | |
67 | 67 | if (if ((s != toString(this))) | |
68 | 68 | then true | |
69 | 69 | else (s != toString(a))) | |
70 | 70 | then throw("The address is not authorized to delist tokens") | |
71 | 71 | else [DeleteEntry(d), ScriptTransfer(a, 10000000, unit)] | |
72 | 72 | } | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | @Verifier(t) | |
76 | 76 | func u () = sigVerify(t.bodyBytes, t.proofs[0], t.senderPublicKey) | |
77 | 77 |
github/deemru/w8io/169f3d6 30.24 ms ◑