tx · F4kaSrEMsqAehw56mSzyLpgPFbdLnki5pGRWoaWjxib6

3MrdV3AP4zfU77ifesNStoDZmL1Cfx13eDc:  -0.05000000 Waves

2019.12.17 16:53 [812996] smart account 3MrdV3AP4zfU77ifesNStoDZmL1Cfx13eDc > SELF 0.00000000 Waves

{ "type": 13, "id": "F4kaSrEMsqAehw56mSzyLpgPFbdLnki5pGRWoaWjxib6", "fee": 5000000, "feeAssetId": null, "timestamp": 1576590870800, "version": 1, "sender": "3MrdV3AP4zfU77ifesNStoDZmL1Cfx13eDc", "senderPublicKey": "5M79Anear5ntQk2bbDdFA2goiPXkv7Xy2UpV4n5RKRv", "proofs": [ "3jRjYYna9RkzyztTpWn5GVbhezAq3GjwwyLNh6JA3uixdUJ35gkWmJgMkSLftxSuuBPcJGrsyKnFPb4JDURMEg13" ], "script": "base64:AAIDAAAAAAAAAAoIARIAEgQKAgEIAAAACAAAAAASV0JFVFJFU0VSVkFUSU9OS0VZAgAAABUkV0JFVF9SRVNFUlZFRF9BTU9VTlQAAAAAE1JPWUFMUkVTRVJWQVRJT05LRVkCAAAAFiRST1lBTF9SRVNFUlZFRF9BTU9VTlQAAAAABFdCRVQBAAAAIIa0Nqh40w7M2PAXrUsuLAQfB5+6yrkWqUrXbyWtm9B2AAAAAAVST1lBTAEAAAAgQ+mKgsIl2XSclXwgUknGo5qQsraVX2JiXso4iYkMaRwBAAAAFkV4dHJhY3RXQkVUUmVzZXJ2ZWRBbXQAAAAABAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAEldCRVRSRVNFUlZBVElPTktFWQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAAAQAAABdFeHRyYWN0Uk9ZQUxSZXNlcnZlZEFtdAAAAAAEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAATUk9ZQUxSRVNFUlZBVElPTktFWQMJAAABAAAAAg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FBsYXllckJhbGFuY2UAAAACBQAAABNuZXdQbGF5ZXJXQkVUQW1vdW50BQAAAAtyb3lhbEFtb3VudAUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABBQAAAANuaWwDCQAAAAAAAAIFAAAABWFzc2V0AgAAAAVST1lBTAMJAABmAAAAAgUAAAAGYW1vdW50BQAAAAtyb3lhbEFtb3VudAkAAAIAAAABAgAAAD5Zb3UgZG9udCBoYXZlIGVub3VnaCBiYWxhbmNlIHRvIHdpdGhkcmF3IHRoZSBhbW91bnQgcmVxdWVzdGVkLgQAAAAVbmV3V0JFVFJlc2VydmVkQW1vdW50CQAAZQAAAAIJAQAAABZFeHRyYWN0V0JFVFJlc2VydmVkQW10AAAAAAUAAAAGYW1vdW50BAAAABNuZXdQbGF5ZXJXQkVUQW1vdW50CQAAZQAAAAIFAAAACndiZXRBbW91bnQFAAAABmFtb3VudAkBAAAADFNjcmlwdFJlc3VsdAAAAAIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAAEldCRVRSRVNFUlZBVElPTktFWQUAAAAVbmV3V0JFVFJlc2VydmVkQW1vdW50CQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAAAZ3YWxsZXQJAQAAABNGb3JtYXRQbGF5ZXJCYWxhbmNlAAAAAgUAAAATbmV3UGxheWVyV0JFVEFtb3VudAUAAAALcm95YWxBbW91bnQFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQUAAAADbmlsCQAAAgAAAAECAAAADWludmFsaXQgYXNzZXQAAAAApVSk3A==", "chainId": 84, "height": 812996, "spentComplexity": 0 } View: original | compacted Prev: 7pXoo3jJYSPViuvNza3dnFPmnkDAbYEnGa23tPWxaS1e Next: HbUVALNH7EwidabbKb8jRpQYdfgR6rP4qmgeBYpauaXP Diff:
OldNewDifferences
7878 @Callable(o)
7979 func unlock (x,y) = {
8080 let j = toString(o.caller)
81- let p = extract(o.payment)
8281 let q = split(i(j), "_")
8382 let r = parseIntValue(q[0])
8483 let s = parseIntValue(q[1])
8685 then if ((x > r))
8786 then throw("You dont have enough balance to withdraw the amount requested.")
8887 else {
89- let t = (e() - p.amount)
90- let u = (r - p.amount)
88+ let t = (e() - x)
89+ let u = (r - x)
9190 ScriptResult(WriteSet([DataEntry(a, t), DataEntry(j, l(u, s))]), TransferSet(nil))
9291 }
9392 else if ((y == "ROYAL"))
9493 then if ((x > s))
9594 then throw("You dont have enough balance to withdraw the amount requested.")
9695 else {
97- let t = (e() - p.amount)
98- let u = (r - p.amount)
96+ let t = (e() - x)
97+ let u = (r - x)
9998 ScriptResult(WriteSet([DataEntry(a, t), DataEntry(j, l(u, s))]), TransferSet(nil))
10099 }
101100 else throw("invalit asset")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "$WBET_RESERVED_AMOUNT"
55
66 let b = "$ROYAL_RESERVED_AMOUNT"
77
88 let c = base58'A4q1mYKo11yuH9gmvDodeJoksagcyQzeFE9JtphMWddw'
99
1010 let d = base58'5a6rvDEiVwvhTvTH6ce2qFwqdCt3VKaHKXEpwLXXVvyy'
1111
1212 func e () = {
1313 let f = getInteger(this, a)
1414 if ($isInstanceOf(f, "Int"))
1515 then {
1616 let g = f
1717 g
1818 }
1919 else 0
2020 }
2121
2222
2323 func h () = {
2424 let f = getInteger(this, b)
2525 if ($isInstanceOf(f, "Int"))
2626 then {
2727 let g = f
2828 g
2929 }
3030 else 0
3131 }
3232
3333
3434 func i (j) = {
3535 let f = getString(this, j)
3636 if ($isInstanceOf(f, "String"))
3737 then {
3838 let k = f
3939 k
4040 }
4141 else "0_0"
4242 }
4343
4444
4545 func l (m,n) = ((toString(m) + "_") + toString(n))
4646
4747
4848 @Callable(o)
4949 func lock () = {
5050 let p = extract(o.payment)
5151 if (if ((p.assetId != c))
5252 then (p.assetId != d)
5353 else false)
5454 then throw("Token should be WBET or ROYAL.")
5555 else {
5656 let j = toString(o.caller)
5757 let q = split(i(j), "_")
5858 let r = parseIntValue(q[0])
5959 let s = parseIntValue(q[1])
6060 if ((p.assetId == c))
6161 then {
6262 let t = (e() + p.amount)
6363 let u = (r + p.amount)
6464 ScriptResult(WriteSet([DataEntry(a, t), DataEntry(j, l(u, s))]), TransferSet(nil))
6565 }
6666 else if ((p.assetId == d))
6767 then {
6868 let v = (h() + p.amount)
6969 let w = (s + p.amount)
7070 ScriptResult(WriteSet([DataEntry(b, v), DataEntry(j, l(r, w))]), TransferSet(nil))
7171 }
7272 else throw("error")
7373 }
7474 }
7575
7676
7777
7878 @Callable(o)
7979 func unlock (x,y) = {
8080 let j = toString(o.caller)
81- let p = extract(o.payment)
8281 let q = split(i(j), "_")
8382 let r = parseIntValue(q[0])
8483 let s = parseIntValue(q[1])
8584 if ((y == "WBET"))
8685 then if ((x > r))
8786 then throw("You dont have enough balance to withdraw the amount requested.")
8887 else {
89- let t = (e() - p.amount)
90- let u = (r - p.amount)
88+ let t = (e() - x)
89+ let u = (r - x)
9190 ScriptResult(WriteSet([DataEntry(a, t), DataEntry(j, l(u, s))]), TransferSet(nil))
9291 }
9392 else if ((y == "ROYAL"))
9493 then if ((x > s))
9594 then throw("You dont have enough balance to withdraw the amount requested.")
9695 else {
97- let t = (e() - p.amount)
98- let u = (r - p.amount)
96+ let t = (e() - x)
97+ let u = (r - x)
9998 ScriptResult(WriteSet([DataEntry(a, t), DataEntry(j, l(u, s))]), TransferSet(nil))
10099 }
101100 else throw("invalit asset")
102101 }
103102
104103

github/deemru/w8io/026f985 
34.62 ms