tx · 3YiTsHvqPnXTmkxcmqGAVdjwQf2G3TJ2oWfcAcaWUaJq

3MriZGLhQEu1jMDKDAbnsbh6TZuZueBAHSY:  -0.05000000 Waves

2021.03.16 01:35 [1439437] smart account 3MriZGLhQEu1jMDKDAbnsbh6TZuZueBAHSY > SELF 0.00000000 Waves

{ "type": 13, "id": "3YiTsHvqPnXTmkxcmqGAVdjwQf2G3TJ2oWfcAcaWUaJq", "fee": 5000000, "feeAssetId": null, "timestamp": 1615847717736, "version": 2, "chainId": 84, "sender": "3MriZGLhQEu1jMDKDAbnsbh6TZuZueBAHSY", "senderPublicKey": "3idTJAmqkivFDf1EUKZ85Tt43Rp22pZb3RDiVXTWrgBq", "proofs": [ "TWhJqXv8zr2Nsqj5fM3ikKa6SWKiG6J7MHu2yrEx3xUKUm9RvAWvzxodNfBs5TukhEvKgVJpyB5ySPphJeK9QaD" ], "script": "base64:AAIEAAAAAAAAAAsIAhIDCgEIEgASAAAAAAoAAAAAEXRhc2tTdGF0dXNEZWZhdWx0AgAAAAppbmNvbXBsZXRlAAAAABJ0YXNrU3RhdHVzQ29tcGxldGUCAAAACGNvbXBsZXRlAAAAAAxhZGRyQ29udHJhY3QJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVQeulVTb30gIatILq7oKevTQfmT23BHXzEAAAAADGFzc2V0V2F2ZXNJZAUAAAAEdW5pdAAAAAASYXNzZXROZnRJbml0QW1vdW50AAAAAAAAAAABAAAAABBhc3NldE5mdERlY2ltYWxzAAAAAAAAAAAAAAAAABJhc3NldE5mdFJlaXNzdWFibGUHAAAAABdhc3NldEFtb3VudE1pblRocmVzaG9sZAAAAAAAAAAD6AAAAAASZGVjaW1hbHNBc3NldFdhdmVzAAAAAAAAAAAIAAAAAA9sYWJlbFRhc2tJZExhc3QCAAAACnRhc2tJZExhc3QAAAADAAAAAWkBAAAAB3NldFRhc2sAAAABAAAACHRhc2tOYW1lBAAAAAp0YXNrTGFzdElkAwkBAAAACWlzRGVmaW5lZAA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Bhc3NldElucHV0QW1vdW50CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAWaW50QXNzZXRPdXRwdXRJZEFtb3VudAUAAAAMYXNzZXRXYXZlc0lkCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEFAAAAD2xhYmVsVGFza0Ftb3VudAkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABBQAAAA9sYWJlbFRhc2tTdGF0dXMJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQUAAAANbGFiZWxUYXNrTmFtZQUAAAADbmlsAwkAAAAAAAACBQAAABJ0YXNrU3RhdHVzQ29tcGxldGUFAAAACnRhc2tTdGF0dXMJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQUAAAAPbGFiZWxUYXNrQW1vdW50CQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEFAAAAD2xhYmVsVGFza1N0YXR1cwkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABBQAAAA1sYWJlbFRhc2tOYW1lBQAAAANuaWwJAAACAAAAAQIAAAAZVGFzayBoYXZlIGEgYnJva2VuIHN0YXR1cwkAAAIAAAABAgAAAB5BdHRhY2hlZCBhc3NldCBpcyBub3QgZXhwZWN0ZWQAAAAAGLr6Rg==", "height": 1439437, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 55yabRpXNicqUoA7bgc87tvCiPNHB74A1WG11EHxhFCs Next: 5b8jLEctJR1rknnbm34JeYmGnKJo26QytdtkkrzxTNfJ Diff:
OldNewDifferences
3838 then throw("One attached assets expected")
3939 else if ((k.payments[0].assetId != d))
4040 then throw("must be attached asset: WAVES")
41- else if (isDefined(s))
41+ else if (isDefined(getString(this, s)))
4242 then throw("Task with a specified name is already exists")
4343 else if ((h > k.payments[0].amount))
4444 then throw("amount must be greater than the minimum threshold: 0.0001 WAVES")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "incomplete"
55
66 let b = "complete"
77
88 let c = Address(base58'3MriZGLhQEu1jMDKDAbnsbh6TZuZueBAHSY')
99
1010 let d = unit
1111
1212 let e = 1
1313
1414 let f = 0
1515
1616 let g = false
1717
1818 let h = 1000
1919
2020 let i = 8
2121
2222 let j = "taskIdLast"
2323
2424 @Callable(k)
2525 func setTask (l) = {
2626 let m = if (isDefined(getInteger(this, j)))
2727 then (getIntegerValue(this, j) + 1)
2828 else 1
2929 let n = ("task #" + toString(m))
3030 let o = ("NFT-token of task manager from" + toString(this))
3131 let p = k.payments[0].amount
3232 let q = Issue(n, o, e, f, g)
3333 let r = toBase58String(calculateAssetId(q))
3434 let s = ("taskName_" + r)
3535 let t = ("taskStatus_" + r)
3636 let u = ("taskAmount_" + r)
3737 if ((size(k.payments) > 1))
3838 then throw("One attached assets expected")
3939 else if ((k.payments[0].assetId != d))
4040 then throw("must be attached asset: WAVES")
41- else if (isDefined(s))
41+ else if (isDefined(getString(this, s)))
4242 then throw("Task with a specified name is already exists")
4343 else if ((h > k.payments[0].amount))
4444 then throw("amount must be greater than the minimum threshold: 0.0001 WAVES")
4545 else if ((k.caller == c))
4646 then throw("method may not be called from the contract")
4747 else [StringEntry(s, l), StringEntry(t, a), q, ScriptTransfer(k.caller, e, fromBase58String(r)), StringEntry(t, a), ScriptTransfer(c, p, d), IntegerEntry(u, p), IntegerEntry(j, m)]
4848 }
4949
5050
5151
5252 @Callable(k)
5353 func completeTask () = {
5454 let v = $Tuple2(k.payments[0].amount, value(k.payments[0].assetId))
5555 let w = v._1
5656 let x = v._2
5757 let t = ("taskStatus_" + toBase58String(x))
5858 let u = ("taskAmount_" + toBase58String(x))
5959 let y = toBase58String(value(k.payments[0].assetId))
6060 let z = valueOrErrorMessage(assetInfo(value(k.payments[0].assetId)), (("Asset " + y) + " doesn't exist"))
6161 let A = getIntegerValue(this, u)
6262 if ((size(k.payments) > 1))
6363 then throw("One attached assets expected")
6464 else if ((k.caller == c))
6565 then throw("method may not be called from the contract")
6666 else if (if (if (if ((value(k.payments[0].amount) == e))
6767 then (value(z.decimals) == f)
6868 else false)
6969 then (value(z.reissuable) == g)
7070 else false)
7171 then isDefined(getString(this, t))
7272 else false)
7373 then [StringEntry(t, b), Burn(x, w), ScriptTransfer(k.caller, A, d)]
7474 else throw("Attached asset is not expected")
7575 }
7676
7777
7878
7979 @Callable(k)
8080 func removeTask () = {
8181 let B = $Tuple2(k.payments[0].amount, value(k.payments[0].assetId))
8282 let w = B._1
8383 let x = B._2
8484 let u = ("taskAmount_" + toBase58String(x))
8585 let t = ("taskStatus_" + toBase58String(x))
8686 let s = ("taskName_" + toBase58String(x))
8787 let y = toBase58String(value(k.payments[0].assetId))
8888 let z = valueOrErrorMessage(assetInfo(value(k.payments[0].assetId)), (("Asset " + y) + " doesn't exist"))
8989 if ((size(k.payments) > 1))
9090 then throw("One attached assets expected")
9191 else if ((k.caller == c))
9292 then throw("method may not be called from the contract")
9393 else if (if (if ((value(z.decimals) == f))
9494 then (value(z.reissuable) == g)
9595 else false)
9696 then isDefined(getString(this, t))
9797 else false)
9898 then {
9999 let C = getString(this, t)
100100 if (if ((C == a))
101101 then (value(k.payments[0].amount) == e)
102102 else false)
103103 then {
104104 let A = pow(getIntegerValue(this, u), 0, 1, 0, i, DOWN)
105105 [Burn(x, w), ScriptTransfer(k.caller, A, d), DeleteEntry(u), DeleteEntry(t), DeleteEntry(s)]
106106 }
107107 else if ((b == C))
108108 then [DeleteEntry(u), DeleteEntry(t), DeleteEntry(s)]
109109 else throw("Task have a broken status")
110110 }
111111 else throw("Attached asset is not expected")
112112 }
113113
114114

github/deemru/w8io/026f985 
32.37 ms