tx · 4QzDetcMM3TWoDSczY5Foq3ZdoJNuK1yYf6jWVNFyw2z 3N9R7u449Z1b76QpJp9u3gzPjMYQYnp3V7r: -0.04000000 Waves 2022.01.15 04:31 [1879413] smart account 3N9R7u449Z1b76QpJp9u3gzPjMYQYnp3V7r > SELF 0.00000000 Waves
{ "type": 13, "id": "4QzDetcMM3TWoDSczY5Foq3ZdoJNuK1yYf6jWVNFyw2z", "fee": 4000000, "feeAssetId": null, "timestamp": 1642210337235, "version": 2, "chainId": 84, "sender": "3N9R7u449Z1b76QpJp9u3gzPjMYQYnp3V7r", "senderPublicKey": "GUHw1jkstNWTs9SX1KM3pMtq9HXjupvxiTd1urNhNoyY", "proofs": [ "3K9BtG15zCkwKkiuysQqRku2w9zFemE8dCGC757dzQs5TfXGw1Z7AhzxgrUdhtKjtfePjHciGspSrhpyjLBDfaYj" ], "script": "base64:AAIFAAAAAAAAAXQIAhIFCgMICAgSAwoBCBoQCgFhEgtkYXBwQWRkcmVzcxoXCgFiEhJob2xkaW5nc0FkZHJlc3NTdHIaFgoBYxIRaG9sZGluZ3NQdWJsaWNLZXkaFAoBZBIPaG9sZGluZ3NBZGRyZXNzGhQKAWUSD3RyYW5zZmVyQ29zdFBjdBoGCgFmEgFpGgwKAWcSB293bmVySWQaDAoBaBIHYXNzZXRJZBoLCgFpEgZhbW91bnQaDAoBahIHJG1hdGNoMBoGCgFrEgF4GhIKAWwSDXBheW1lbnRBbW91bnQaDwoBbRIKZEFwcFVwZGF0ZRoMCgFuEgdkYXRhS2V5GgYKAW8SAWEaDQoBcBIIdHJhbnNmZXIaHQoBcRIYYW1vdW50VG9SZW1haW5JbkhvbGRpbmdzGhwKAXISF2Ftb3VudFRvVHJhbnNmZXJUb093bmVyGhEKAXMSDG93bmVyQWRkcmVzcxoHCgF0EgJ0eBoLCgF1EgZ2ZXJpZnkAAAAFAAAAAAFhAgAAACMzTjR2cVVYV3c4dGYyM0xEV0RiU0VwSlpINmRlbnQzRVRGdQAAAAABYg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QWRkcmVzcwAAAAEJAAJZAAAAAQUAAAABZwkABE4AAAACBQAAAAFwCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAAAXMFAAAAAXIFAAAABHVuaXQFAAAAA25pbAUAAAABcAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAABAAAAAXQBAAAAAXUAAAAACQAB9AAAAAMIBQAAAAF0AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAABdAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAF0AAAAD3NlbmRlclB1YmxpY0tleWz5pLY=", "height": 1879413, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Aad4hQWXYVbtVfmKtxEXVDjdX9r6wPmi2nzyNG4MBtBK Next: J4Jf4gZR4uP67JtLGLaEAEAsskbowD5dR5FdhPdEGfXm Diff:
Old | New | Differences | |
---|---|---|---|
7 | 7 | ||
8 | 8 | let c = base58'GUHw1jkstNWTs9SX1KM3pMtq9HXjupvxiTd1urNhNoyY' | |
9 | 9 | ||
10 | - | let d = | |
10 | + | let d = Address(fromBase58String(b)) | |
11 | 11 | ||
12 | 12 | let e = 25 | |
13 | 13 | ||
48 | 48 | else (i > l)) | |
49 | 49 | then throw(((("Payment and amount do not match. This assets costs " + toString(i)) + "but you sent ") + toString(l))) | |
50 | 50 | else { | |
51 | - | let m = invoke(Address(fromBase58String(a)), "finalizeSale", [h, g], [AttachedPayment(unit, | |
51 | + | let m = invoke(Address(fromBase58String(a)), "finalizeSale", [h, g], [AttachedPayment(unit, 0)]) | |
52 | 52 | if ((m == m)) | |
53 | 53 | then { | |
54 | 54 | let n = { |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "3N4vqUXWw8tf23LDWDbSEpJZH6dent3ETFu" | |
5 | 5 | ||
6 | 6 | let b = "3N9R7u449Z1b76QpJp9u3gzPjMYQYnp3V7r" | |
7 | 7 | ||
8 | 8 | let c = base58'GUHw1jkstNWTs9SX1KM3pMtq9HXjupvxiTd1urNhNoyY' | |
9 | 9 | ||
10 | - | let d = | |
10 | + | let d = Address(fromBase58String(b)) | |
11 | 11 | ||
12 | 12 | let e = 25 | |
13 | 13 | ||
14 | 14 | @Callable(f) | |
15 | 15 | func addOwnerAndAmount (g,h,i) = [StringEntry((("sale_" + h) + "_originalOwner"), g), StringEntry((("sale_" + h) + "_amount"), i)] | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | ||
19 | 19 | @Callable(f) | |
20 | 20 | func buyFromHoldings (h) = { | |
21 | 21 | let g = { | |
22 | 22 | let j = getString(this, (("sale_" + h) + "_originalOwner")) | |
23 | 23 | if ($isInstanceOf(j, "Unit")) | |
24 | 24 | then "unset" | |
25 | 25 | else if ($isInstanceOf(j, "String")) | |
26 | 26 | then { | |
27 | 27 | let k = j | |
28 | 28 | k | |
29 | 29 | } | |
30 | 30 | else throw("Match error") | |
31 | 31 | } | |
32 | 32 | let l = valueOrElse(f.payments[0].amount, 0) | |
33 | 33 | let i = { | |
34 | 34 | let j = getString(this, (("sale_" + h) + "_amount")) | |
35 | 35 | if ($isInstanceOf(j, "Unit")) | |
36 | 36 | then 0 | |
37 | 37 | else if ($isInstanceOf(j, "String")) | |
38 | 38 | then { | |
39 | 39 | let k = j | |
40 | 40 | (valueOrElse(parseInt(k), 0) * 100000000) | |
41 | 41 | } | |
42 | 42 | else throw("Match error") | |
43 | 43 | } | |
44 | 44 | if ((g == "unset")) | |
45 | 45 | then throw("Original owner not found ") | |
46 | 46 | else if (if ((i == 0)) | |
47 | 47 | then true | |
48 | 48 | else (i > l)) | |
49 | 49 | then throw(((("Payment and amount do not match. This assets costs " + toString(i)) + "but you sent ") + toString(l))) | |
50 | 50 | else { | |
51 | - | let m = invoke(Address(fromBase58String(a)), "finalizeSale", [h, g], [AttachedPayment(unit, | |
51 | + | let m = invoke(Address(fromBase58String(a)), "finalizeSale", [h, g], [AttachedPayment(unit, 0)]) | |
52 | 52 | if ((m == m)) | |
53 | 53 | then { | |
54 | 54 | let n = { | |
55 | 55 | let j = m | |
56 | 56 | if ($isInstanceOf(j, "String")) | |
57 | 57 | then { | |
58 | 58 | let o = j | |
59 | 59 | o | |
60 | 60 | } | |
61 | 61 | else throw("Unexpected result from finalizing purcahse") | |
62 | 62 | } | |
63 | 63 | let p = [ScriptTransfer(f.caller, 1, fromBase58String(h))] | |
64 | 64 | if ((g != b)) | |
65 | 65 | then { | |
66 | 66 | let q = (l * (e / 1000)) | |
67 | 67 | let r = (l - q) | |
68 | 68 | let s = Address(fromBase58String(g)) | |
69 | 69 | (p ++ [ScriptTransfer(s, r, unit)]) | |
70 | 70 | } | |
71 | 71 | else p | |
72 | 72 | } | |
73 | 73 | else throw("Strict value is not equal to itself.") | |
74 | 74 | } | |
75 | 75 | } | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | @Verifier(t) | |
79 | 79 | func u () = sigVerify(t.bodyBytes, t.proofs[0], t.senderPublicKey) | |
80 | 80 |
github/deemru/w8io/169f3d6 26.82 ms ◑