tx · CrRaeNfF6h2xFQubBKjKttb6NqBVfGwUpBLEKLb6CKxL

3N9R7u449Z1b76QpJp9u3gzPjMYQYnp3V7r:  -0.04000000 Waves

2022.01.13 17:27 [1877299] smart account 3N9R7u449Z1b76QpJp9u3gzPjMYQYnp3V7r > SELF 0.00000000 Waves

{ "type": 13, "id": "CrRaeNfF6h2xFQubBKjKttb6NqBVfGwUpBLEKLb6CKxL", "fee": 4000000, "feeAssetId": null, "timestamp": 1642084036778, "version": 2, "chainId": 84, "sender": "3N9R7u449Z1b76QpJp9u3gzPjMYQYnp3V7r", "senderPublicKey": "GUHw1jkstNWTs9SX1KM3pMtq9HXjupvxiTd1urNhNoyY", "proofs": [ "2yhFJdWvteAnptwbnSHdf6DV76bZFv1XoDWub25MT6jo7x9JRRdzGfT6gRjU2c5Fv7Uy36ebBVCwAgkejWR1ZUGP" ], "script": "base64:AAIFAAAAAAAAARMIAhIFCgMICAgSAwoBCBoWCgFhEhFob2xkaW5nc1B1YmxpY0tleRoUCgFiEg9ob2xkaW5nc0FkZHJlc3MaFAoBYxIPdHJhbnNmZXJDb3N0UGN0GgYKAWQSAWkaDAoBZRIHb3duZXJJZBoMCgFmEgdhc3NldElkGgsKAWcSBmFtb3VudBoMCgFoEgckbWF0Y2gwGgYKAWkSAXgaEgoBahINcGF5bWVudEFtb3VudBodCgFrEhhhbW91bnRUb1JlbWFpbkluSG9sZGluZ3MaHAoBbBIXYW1vdW50VG9UcmFuc2ZlclRvT3duZXIaEQoBbRIMb3duZXJBZGRyZXNzGgcKAW4SAnR4GgsKAW8SBnZlcmlmeQAAAAMAAAAAAWEBAAAAIOXdIUWzo+xH6Wo3eUXXdqXp3i8rCPbDs0z4AYmX0NtvAAAAAAFiCQEAAAAUYWRkcmVzc0Zyb21QdWJsaWNLZXkAAAABBQAAAAFhAAAAAAFjAAAAAAAAAAAZAAAAAgAAAAFkAQAAABFhZGRPd25lckFuZEFtb3VudAAAAAMAAAABZQAAAAFmAAAAAWcJAARMAA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CQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAADNQYXltZW50IGFuZCBhbW91bnQgZG8gbm90IG1hdGNoLiBUaGlzIGFzc2V0cyBjb3N0cyAJAAGkAAAAAQUAAAABZwIAAAANYnV0IHlvdSBzZW50IAkAAaQAAAABBQAAAAFqBAAAAAFrCQAAaAAAAAIFAAAAAWoJAABpAAAAAgUAAAABYwAAAAAAAAAD6AQAAAABbAkAAGUAAAACBQAAAAFqBQAAAAFrBAAAAAFtCQEAAAAHQWRkcmVzcwAAAAEJAAGbAAAAAQUAAAABZQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABZAAAAAZjYWxsZXIAAAAAAAAAAAEJAAJZAAAAAQUAAAABZgkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAFtBQAAAAFsBQAAAAR1bml0BQAAAANuaWwAAAABAAAAAW4BAAAAAW8AAAAACQAB9AAAAAMIBQAAAAFuAAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAABbgAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAFuAAAAD3NlbmRlclB1YmxpY0tleYp4Zzc=", "height": 1877299, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7dMDtT6L4yyeRuXyuu16FJLvBBSKkoP5FhVq4YamCtFD Next: C1AZcjvKCf1xw3vAhKY7KyP48cjTTcyd6utuYEFxna6v Diff:
OldNewDifferences
4141 then throw("Original owner not found")
4242 else if (if ((g == 0))
4343 then true
44- else (j >= g))
44+ else (g > j))
4545 then throw(((("Payment and amount do not match. This assets costs " + toString(g)) + "but you sent ") + toString(j)))
4646 else {
4747 let k = (j * (c / 1000))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'GUHw1jkstNWTs9SX1KM3pMtq9HXjupvxiTd1urNhNoyY'
55
66 let b = addressFromPublicKey(a)
77
88 let c = 25
99
1010 @Callable(d)
1111 func addOwnerAndAmount (e,f,g) = [StringEntry((("sale_" + f) + "_originalOwner"), e), StringEntry((("sale_" + f) + "_amount"), g)]
1212
1313
1414
1515 @Callable(d)
1616 func buyFromHoldings (f) = {
1717 let e = {
1818 let h = getString(this, (("sale_" + f) + "_originalOwner"))
1919 if ($isInstanceOf(h, "Unit"))
2020 then "unset"
2121 else if ($isInstanceOf(h, "String"))
2222 then {
2323 let i = h
2424 i
2525 }
2626 else throw("Match error")
2727 }
2828 let j = valueOrElse(d.payments[0].amount, 0)
2929 let g = {
3030 let h = getString(this, (("sale_" + f) + "_amount"))
3131 if ($isInstanceOf(h, "Unit"))
3232 then 0
3333 else if ($isInstanceOf(h, "String"))
3434 then {
3535 let i = h
3636 (valueOrElse(parseInt(i), 0) * 100000000)
3737 }
3838 else throw("Match error")
3939 }
4040 if ((e == "unset"))
4141 then throw("Original owner not found")
4242 else if (if ((g == 0))
4343 then true
44- else (j >= g))
44+ else (g > j))
4545 then throw(((("Payment and amount do not match. This assets costs " + toString(g)) + "but you sent ") + toString(j)))
4646 else {
4747 let k = (j * (c / 1000))
4848 let l = (j - k)
4949 let m = Address(toBytes(e))
5050 [ScriptTransfer(d.caller, 1, fromBase58String(f)), ScriptTransfer(m, l, unit)]
5151 }
5252 }
5353
5454
5555 @Verifier(n)
5656 func o () = sigVerify(n.bodyBytes, n.proofs[0], n.senderPublicKey)
5757

github/deemru/w8io/169f3d6 
28.77 ms