tx · 9tih9QUyoYcE4Upfv9Eq3z3T4d1EVnt1rEcgTy7GLCvX

3MwPsLy9F1mUQrdP37sCAKvHuE5HvPE674Y:  -0.04000000 Waves

2022.04.20 01:15 [2016027] smart account 3MwPsLy9F1mUQrdP37sCAKvHuE5HvPE674Y > SELF 0.00000000 Waves

{ "type": 13, "id": "9tih9QUyoYcE4Upfv9Eq3z3T4d1EVnt1rEcgTy7GLCvX", "fee": 4000000, "feeAssetId": null, "timestamp": 1650406564982, "version": 2, "chainId": 84, "sender": "3MwPsLy9F1mUQrdP37sCAKvHuE5HvPE674Y", "senderPublicKey": "AyAwWbMPM7a4VYkn1bhEBftC5WZgfvUXgrYDe98mvLsv", "proofs": [ "3dFkrWnnabaXdfMo3rj8s5SLXGVwwuftvAVC89FQTVmrwjFqSVUsQXqtyLBDaeVxazFK1uNVG2gXHb17wn81zPVQ" ], "script": "base64:AAIFAAAAAAAAABkIAhIFCgMICAESAwoBCBIECgIICBIDCgEIAAAACAAAAAAOZEFwcEFkZHJlc3NTdHICAAAAIzNON0o2bU1Na2pWVmlCUkV6OXk1M0ptY1g3cjdLWlJYUXBMAAAAAA1kQXBwUHVibGljS2V5AQAAACDgTQYFOGrUwRh8WaYap6j/gLstB4hjfa6yi718/WSaLAAAAAALZEFwcEFkZHJlc3MJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEFAAAADWRBcHBQdWJsaWNLZXkAAAAAEmhvbGRpbmdzQWRkcmVzc1N0cgIAAAAjM013UHNMeTlGMW1VUXJkUDM3c0NBS3ZIdUU1SHZQRTY3NFkAAAAAEWhvbGRpbmdzUHVibGljS2V5AQAAACCUHPJXjFSZKhe4nfSREpS677760EMCVtx/1OcRvCWqHQAAAAAPaG9sZGluZ3NBZGRyZXNzCQEAAAAUYWRkcmVzc0Zyb21QdWJsaWNLZXkAAAABBQAAABFob2xkaW5nc1B1YmxpY0tleQAAAAAPdHJhbnNmZXJDb3N0UGN0AAAAAAAAAAAyAQAAAAhidX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AAAAAAAYQAAAAAAAAAAYgAAAAAAAAAAYwAAAAAAAAAAZAAAAAAAAAAAZQAAAAAAAAAAZgAAAAAAAAAAZwAAAAAAAAAAaAAAAAAAAAAAaQAAAAAAAAAAagAAAAAAAAAAawAAAAAAAAAAbAAAAAAAAAAAbQAAAAAAAAAAbgAAAAAAAAAAbwAAAAAAAAAAcAAAAAAAAAAAcQAAAAAAAAAAcgAAAAAAAAAAcwAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAADAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkGCQAAAAAAAAIJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkFAAAAD2hvbGRpbmdzQWRkcmVzcwYJAAAAAAAAAgkBAAAAFGFkZHJlc3NGcm9tUHVibGljS2V5AAAAAQgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQUAAAALZEFwcEFkZHJlc3M8KSEV", "height": 2016027, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Gm8JB9YSrucif8a1X7rGkWvFp4WvTpU4yStdyxKeenVr Next: 5JuRprkaNi8XDMkwvBM7yyEs7nvg5tRPGNMRCBi8WaYQ Diff:
OldNewDifferences
1414 let holdingsAddress = addressFromPublicKey(holdingsPublicKey)
1515
1616 let transferCostPct = 50
17+
18+func burnFold (accum,next) = {
19+ let resolvedNext = match next {
20+ case _: Unit =>
21+ "unset"
22+ case val: String =>
23+ val
24+ case _ =>
25+ throw("Match error")
26+ }
27+ if ((resolvedNext == "unset"))
28+ then accum
29+ else {
30+ let assetId = match getString(this, (resolvedNext + "_assetId")) {
31+ case _: Unit =>
32+ "unset"
33+ case val: String =>
34+ val
35+ case _ =>
36+ throw("Match error")
37+ }
38+ if ((assetId == "unset"))
39+ then accum
40+ else (accum ++ [Burn(fromBase58String(assetId), 1)])
41+ }
42+ }
43+
1744
1845 @Callable(i)
1946 func addOwnerAndAmount (ownerId,assetId,amount) = [StringEntry((("sale_" + assetId) + "_originalOwner"), ownerId), IntegerEntry((("sale_" + assetId) + "_amount"), amount)]
87114
88115
89116 @Callable(i)
90-func burnTest (assetId) = [Burn(fromBase58String(assetId), 1)]
117+func burnSquares (coordsToBurn) = {
118+ let callerId = toBase58String(i.caller.bytes)
119+ if (if ((callerId != holdingsAddressStr))
120+ then (callerId != dAppAddressStr)
121+ else false)
122+ then throw("This can only be triggering internally")
123+ else {
124+ let $l = split(coordsToBurn, "|")
125+ let $s = size($l)
126+ let $acc0 = nil
127+ func $f0_1 ($a,$i) = if (($i >= $s))
128+ then $a
129+ else burnFold($a, $l[$i])
130+
131+ func $f0_2 ($a,$i) = if (($i >= $s))
132+ then $a
133+ else throw("List size exceeds 115")
134+
135+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100), 101), 102), 103), 104), 105), 106), 107), 108), 109), 110), 111), 112), 113), 114), 115)
136+ }
137+ }
91138
92139
93140 @Verifier(tx)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let dAppAddressStr = "3N7J6mMMkjVViBREz9y53JmcX7r7KZRXQpL"
55
66 let dAppPublicKey = base58'G6aSmaqLJ4p7jzm7BnQcZuqa2NRRLVtzqdYNjYErnEZZ'
77
88 let dAppAddress = addressFromPublicKey(dAppPublicKey)
99
1010 let holdingsAddressStr = "3MwPsLy9F1mUQrdP37sCAKvHuE5HvPE674Y"
1111
1212 let holdingsPublicKey = base58'AyAwWbMPM7a4VYkn1bhEBftC5WZgfvUXgrYDe98mvLsv'
1313
1414 let holdingsAddress = addressFromPublicKey(holdingsPublicKey)
1515
1616 let transferCostPct = 50
17+
18+func burnFold (accum,next) = {
19+ let resolvedNext = match next {
20+ case _: Unit =>
21+ "unset"
22+ case val: String =>
23+ val
24+ case _ =>
25+ throw("Match error")
26+ }
27+ if ((resolvedNext == "unset"))
28+ then accum
29+ else {
30+ let assetId = match getString(this, (resolvedNext + "_assetId")) {
31+ case _: Unit =>
32+ "unset"
33+ case val: String =>
34+ val
35+ case _ =>
36+ throw("Match error")
37+ }
38+ if ((assetId == "unset"))
39+ then accum
40+ else (accum ++ [Burn(fromBase58String(assetId), 1)])
41+ }
42+ }
43+
1744
1845 @Callable(i)
1946 func addOwnerAndAmount (ownerId,assetId,amount) = [StringEntry((("sale_" + assetId) + "_originalOwner"), ownerId), IntegerEntry((("sale_" + assetId) + "_amount"), amount)]
2047
2148
2249
2350 @Callable(i)
2451 func revokeForSale (assetId) = {
2552 let callerId = toBase58String(i.caller.bytes)
2653 let ownerId = match getString(this, (("sale_" + assetId) + "_originalOwner")) {
2754 case _: Unit =>
2855 "unset"
2956 case x: String =>
3057 x
3158 case _ =>
3259 throw("Match error")
3360 }
3461 if ((callerId != ownerId))
3562 then throw("Owners do not match")
3663 else [StringEntry((("sale_" + assetId) + "_originalOwner"), ""), IntegerEntry((("sale_" + assetId) + "_amount"), 0), ScriptTransfer(i.caller, 1, fromBase58String(assetId))]
3764 }
3865
3966
4067
4168 @Callable(i)
4269 func buyFromHoldings (assetId,userText) = {
4370 let ownerId = match getString(this, (("sale_" + assetId) + "_originalOwner")) {
4471 case _: Unit =>
4572 "unset"
4673 case x: String =>
4774 x
4875 case _ =>
4976 throw("Match error")
5077 }
5178 let paymentAmount = valueOrElse(i.payments[0].amount, 0)
5279 let amount = match getInteger(this, (("sale_" + assetId) + "_amount")) {
5380 case _: Unit =>
5481 0
5582 case x: Int =>
5683 x
5784 case _ =>
5885 throw("Match error")
5986 }
6087 if (if ((ownerId == "unset"))
6188 then true
6289 else (ownerId == ""))
6390 then throw("Original owner not found ")
6491 else if (if ((amount == 0))
6592 then true
6693 else (amount > paymentAmount))
6794 then throw(((("Payment and amount do not match. This assets costs " + toString(amount)) + "but you sent ") + toString(paymentAmount)))
6895 else {
6996 let callerId = toBase58String(i.caller.bytes)
7097 let res = invoke(dAppAddress, "finalizeSale", [assetId, callerId, userText], [AttachedPayment(unit, 0)])
7198 if ((res == res))
7299 then {
73100 let transfer = [ScriptTransfer(i.caller, 1, fromBase58String(assetId)), StringEntry((("sale_" + assetId) + "_originalOwner"), ""), IntegerEntry((("sale_" + assetId) + "_amount"), 0)]
74101 if ((ownerId != holdingsAddressStr))
75102 then {
76103 let amountToRemainInHoldings = (paymentAmount / transferCostPct)
77104 let amountToTransferToOwner = (paymentAmount - amountToRemainInHoldings)
78105 let ownerAddress = Address(fromBase58String(ownerId))
79106 (transfer ++ [ScriptTransfer(ownerAddress, amountToTransferToOwner, unit)])
80107 }
81108 else transfer
82109 }
83110 else throw("Strict value is not equal to itself.")
84111 }
85112 }
86113
87114
88115
89116 @Callable(i)
90-func burnTest (assetId) = [Burn(fromBase58String(assetId), 1)]
117+func burnSquares (coordsToBurn) = {
118+ let callerId = toBase58String(i.caller.bytes)
119+ if (if ((callerId != holdingsAddressStr))
120+ then (callerId != dAppAddressStr)
121+ else false)
122+ then throw("This can only be triggering internally")
123+ else {
124+ let $l = split(coordsToBurn, "|")
125+ let $s = size($l)
126+ let $acc0 = nil
127+ func $f0_1 ($a,$i) = if (($i >= $s))
128+ then $a
129+ else burnFold($a, $l[$i])
130+
131+ func $f0_2 ($a,$i) = if (($i >= $s))
132+ then $a
133+ else throw("List size exceeds 115")
134+
135+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100), 101), 102), 103), 104), 105), 106), 107), 108), 109), 110), 111), 112), 113), 114), 115)
136+ }
137+ }
91138
92139
93140 @Verifier(tx)
94141 func verify () = if (if (sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey))
95142 then true
96143 else (addressFromPublicKey(tx.senderPublicKey) == holdingsAddress))
97144 then true
98145 else (addressFromPublicKey(tx.senderPublicKey) == dAppAddress)
99146

github/deemru/w8io/169f3d6 
31.44 ms