tx · Aad4hQWXYVbtVfmKtxEXVDjdX9r6wPmi2nzyNG4MBtBK

3N9R7u449Z1b76QpJp9u3gzPjMYQYnp3V7r:  -0.04000000 Waves

2022.01.14 04:53 [1877990] smart account 3N9R7u449Z1b76QpJp9u3gzPjMYQYnp3V7r > SELF 0.00000000 Waves

{ "type": 13, "id": "Aad4hQWXYVbtVfmKtxEXVDjdX9r6wPmi2nzyNG4MBtBK", "fee": 4000000, "feeAssetId": null, "timestamp": 1642125274087, "version": 2, "chainId": 84, "sender": "3N9R7u449Z1b76QpJp9u3gzPjMYQYnp3V7r", "senderPublicKey": "GUHw1jkstNWTs9SX1KM3pMtq9HXjupvxiTd1urNhNoyY", "proofs": [ "4mGCJCMPbTSZwFgRnjKQAwuYNWaLm7yoTko9bNHnv5sT63NkeKCg23YmCv4PsSoQqBuFJF8qzVUTDcWxjtouX8Eg" ], "script": "base64:AAIFAAAAAAAAAXQIAhIFCgMICAgSAwoBCBoQCgFhEgtkYXBwQWRkcmVzcxoXCgFiEhJob2xkaW5nc0FkZHJlc3NTdHIaFgoBYxIRaG9sZGluZ3NQdWJsaWNLZXkaFAoBZBIPaG9sZGluZ3NBZGRyZXNzGhQKAWUSD3RyYW5zZmVyQ29zdFBjdBoGCgFmEgFpGgwKAWcSB293bmVySWQaDAoBaBIHYXNzZXRJZBoLCgFpEgZhbW91bnQaDAoBahIHJG1hdGNoMBoGCgFrEgF4GhIKAWwSDXBheW1lbnRBbW91bnQaDwoBbRIKZEFwcFVwZGF0ZRoMCgFuEgdkYXRhS2V5GgYKAW8SAWEaDQoBcBIIdHJhbnNmZXIaHQoBcRIYYW1vdW50VG9SZW1haW5JbkhvbGRpbmdzGhwKAXISF2Ftb3VudFRvVHJhbnNmZXJUb093bmVyGhEKAXMSDG93bmVyQWRkcmVzcxoHCgF0EgJ0eBoLCgF1EgZ2ZXJpZnkAAAAFAAAAAAFhAgAAACMzTjR2cVVYV3c4dGYyM0xEV0RiU0VwSlpINmRlbnQzRVRGdQ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AAAAXMJAQAAAAdBZGRyZXNzAAAAAQkAAlkAAAABBQAAAAFnCQAETgAAAAIFAAAAAXAJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAABcwUAAAABcgUAAAAEdW5pdAUAAAADbmlsBQAAAAFwCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAAAAEAAAABdAEAAAABdQAAAAAJAAH0AAAAAwgFAAAAAXQAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAF0AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAXQAAAAPc2VuZGVyUHVibGljS2V5ZvyhBQ==", "height": 1877990, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DT1QFW3cn7yjMrqJAARvMdkh2ww2LpMqqrK9zcfR1ndp Next: 4QzDetcMM3TWoDSczY5Foq3ZdoJNuK1yYf6jWVNFyw2z Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = "3N9R7u449Z1b76QpJp9u3gzPjMYQYnp3V7r"
4+let a = "3N4vqUXWw8tf23LDWDbSEpJZH6dent3ETFu"
55
6-let b = base58'GUHw1jkstNWTs9SX1KM3pMtq9HXjupvxiTd1urNhNoyY'
6+let b = "3N9R7u449Z1b76QpJp9u3gzPjMYQYnp3V7r"
77
8-let c = addressFromPublicKey(b)
8+let c = base58'GUHw1jkstNWTs9SX1KM3pMtq9HXjupvxiTd1urNhNoyY'
99
10-let d = 25
10+let d = addressFromPublicKey(c)
1111
12-@Callable(e)
13-func addOwnerAndAmount (f,g,h) = [StringEntry((("sale_" + g) + "_originalOwner"), f), StringEntry((("sale_" + g) + "_amount"), h)]
12+let e = 25
13+
14+@Callable(f)
15+func addOwnerAndAmount (g,h,i) = [StringEntry((("sale_" + h) + "_originalOwner"), g), StringEntry((("sale_" + h) + "_amount"), i)]
1416
1517
1618
17-@Callable(e)
18-func buyFromHoldings (g) = {
19- let f = {
20- let i = getString(this, (("sale_" + g) + "_originalOwner"))
21- if ($isInstanceOf(i, "Unit"))
19+@Callable(f)
20+func buyFromHoldings (h) = {
21+ let g = {
22+ let j = getString(this, (("sale_" + h) + "_originalOwner"))
23+ if ($isInstanceOf(j, "Unit"))
2224 then "unset"
23- else if ($isInstanceOf(i, "String"))
25+ else if ($isInstanceOf(j, "String"))
2426 then {
25- let j = i
26- j
27+ let k = j
28+ k
2729 }
2830 else throw("Match error")
2931 }
30- let k = valueOrElse(e.payments[0].amount, 0)
31- let h = {
32- let i = getString(this, (("sale_" + g) + "_amount"))
33- if ($isInstanceOf(i, "Unit"))
32+ let l = valueOrElse(f.payments[0].amount, 0)
33+ let i = {
34+ let j = getString(this, (("sale_" + h) + "_amount"))
35+ if ($isInstanceOf(j, "Unit"))
3436 then 0
35- else if ($isInstanceOf(i, "String"))
37+ else if ($isInstanceOf(j, "String"))
3638 then {
37- let j = i
38- (valueOrElse(parseInt(j), 0) * 100000000)
39+ let k = j
40+ (valueOrElse(parseInt(k), 0) * 100000000)
3941 }
4042 else throw("Match error")
4143 }
42- if ((f == "unset"))
44+ if ((g == "unset"))
4345 then throw("Original owner not found ")
44- else if (if ((h == 0))
46+ else if (if ((i == 0))
4547 then true
46- else (h > k))
47- then throw(((("Payment and amount do not match. This assets costs " + toString(h)) + "but you sent ") + toString(k)))
48+ else (i > l))
49+ then throw(((("Payment and amount do not match. This assets costs " + toString(i)) + "but you sent ") + toString(l)))
4850 else {
49- let l = (k * (d / 1000))
50- let m = (k - l)
51- let n = [ScriptTransfer(e.caller, 1, fromBase58String(g))]
52- if ((f != a))
51+ let m = invoke(Address(fromBase58String(a)), "finalizeSale", [h, g], [AttachedPayment(unit, 1000000)])
52+ if ((m == m))
5353 then {
54- let o = Address(fromBase58String(f))
55- (n ++ [ScriptTransfer(o, m, unit)])
54+ let n = {
55+ let j = m
56+ if ($isInstanceOf(j, "String"))
57+ then {
58+ let o = j
59+ o
60+ }
61+ else throw("Unexpected result from finalizing purcahse")
62+ }
63+ let p = [ScriptTransfer(f.caller, 1, fromBase58String(h))]
64+ if ((g != b))
65+ then {
66+ let q = (l * (e / 1000))
67+ let r = (l - q)
68+ let s = Address(fromBase58String(g))
69+ (p ++ [ScriptTransfer(s, r, unit)])
70+ }
71+ else p
5672 }
57- else n
73+ else throw("Strict value is not equal to itself.")
5874 }
5975 }
6076
6177
62-@Verifier(p)
63-func q () = sigVerify(p.bodyBytes, p.proofs[0], p.senderPublicKey)
78+@Verifier(t)
79+func u () = sigVerify(t.bodyBytes, t.proofs[0], t.senderPublicKey)
6480

github/deemru/w8io/169f3d6 
65.57 ms