tx · 9GZX2QiM9Rquy8zeDhB7QBTauQwHsrg75JsTVp2MUjGQ

3NCUy4yewhhgobHrkdSBNiCYajzXApktxaK:  -0.04000000 Waves

2019.09.24 12:37 [690250] smart account 3NCUy4yewhhgobHrkdSBNiCYajzXApktxaK > SELF 0.00000000 Waves

{ "type": 13, "id": "9GZX2QiM9Rquy8zeDhB7QBTauQwHsrg75JsTVp2MUjGQ", "fee": 4000000, "feeAssetId": null, "timestamp": 1569317756742, "version": 1, "sender": "3NCUy4yewhhgobHrkdSBNiCYajzXApktxaK", "senderPublicKey": "AEBLjt3LBirAMqq8TDdsSedvidamCEi6fV1nhL2DEpew", "proofs": [ "TeR6oAsX37ViMihtog46MFkiZjdwejN87FuyJfAKHtZFJn2Ho7VmvxHXL9ZTW3mUgvzpYhEcme5zjtwicPtvcPo" ], "script": "base64:AAIDAAAAAAAAAAAAAAAKAAAAAA5vd25lclB1YmxpY0tleQEAAAAgkD7fCqmCHKVfL8+fGFXRYhqUJqS1aPUU7D38lld+FgAAAAAAH2Rlc3RpbmF0aW9uV2FsbGV0QWRkcmVzc0RhdGFLZXkCAAAAGmRlc3RpbmF0aW9uX3dhbGxldF9hZGRyZXNzAQAAABFnZXRMb290Qm94RGF0YUtleQAAAAEAAAACaWQJAAEsAAAAAgIAAAAJbG9vdF9ib3hfBQAAAAJpZAEAAAAWZ2V0TG9vdEJveFByaWNlRGF0YUtleQAAAAEAAAACaWQJAAEsAAAAAgkBAAAAEWdldExvb3RCb3hEYXRhS2V5AAAAAQUAAAACaWQCAAAABl9wcmljZQEAAAAWZ2V0TG9vdEJveExpbWl0RGF0YUtleQAAAAEAAAACaWQJAAEsAAAAAgkBAAAAEWdldExvb3RCb3hEYXRhS2V5AAAAAQUAAAACaWQCAAAABl9saW1pdAEAAAAZZ2V0TG9vdEJveEJ1eUNvdW50RGF0YUtleQAAAAEAAAACaWQJAAEsAAAAAgkBAAAAEWdldExvb3RCb3hEYXRhS2V5AAAAAQUAAAACaWQCAAAACl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GltaXQCAAAAISBpdGVtcyBkdWUgbGltaXQsIGN1cnJlbnQgY291bnQ6IAkAAaQAAAABBQAAAAhidXlDb3VudAkBAAAADFNjcmlwdFJlc3VsdAAAAAIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAABlnZXRMb290Qm94QnV5Q291bnREYXRhS2V5AAAAAQUAAAAFaWRTdHIFAAAAC25ld0J1eUNvdW50BQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAG2dldERlc3RpbmF0aW9uV2FsbGV0QWRkcmVzcwAAAAAFAAAADHBsYXllclBheVN1bQUAAAAEdW5pdAUAAAADbmlsAAAAADtayXE=", "chainId": 84, "height": 690250, "spentComplexity": 0 } View: original | compacted Prev: 3qomQQsHPbsF4SY7KxySSVT4iwvH8S8MFeHFGsEKzxSs Next: none Diff:
OldNewDifferences
9393 let r = toString(d)
9494 let s = extract(n.payment)
9595 if (isDefined(s.assetId))
96- then throw("Can hodl waves only at the moment")
96+ then throw("Can hold waves only at the moment")
9797 else {
9898 let t = m(r)
9999 let u = (t + 1)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'Ai5K72PXnQpuH5CCLZcpZWSPGyvSmuBY9PHhFEQStzX9'
55
66 let b = "destination_wallet_address"
77
88 func c (d) = ("loot_box_" + d)
99
1010
1111 func e (d) = (c(d) + "_price")
1212
1313
1414 func f (d) = (c(d) + "_limit")
1515
1616
1717 func g (d) = (c(d) + "_buy_count")
1818
1919
2020 func h () = {
2121 let i = getString(this, b)
2222 if ($isInstanceOf(i, "String"))
2323 then {
2424 let j = i
2525 if ((j == ""))
2626 then throw("Destination wallet address cannot be empty")
2727 else addressFromStringValue(j)
2828 }
2929 else throw("Destination wallet address undefined")
3030 }
3131
3232
3333 func k (d) = {
3434 let i = getInteger(this, e(d))
3535 if ($isInstanceOf(i, "Int"))
3636 then {
3737 let j = i
3838 j
3939 }
4040 else throw("Loot box price undefined")
4141 }
4242
4343
4444 func l (d) = {
4545 let i = getInteger(this, f(d))
4646 if ($isInstanceOf(i, "Int"))
4747 then {
4848 let j = i
4949 j
5050 }
5151 else throw("Loot box limit undefined")
5252 }
5353
5454
5555 func m (d) = {
5656 let i = getInteger(this, g(d))
5757 if ($isInstanceOf(i, "Int"))
5858 then {
5959 let j = i
6060 j
6161 }
6262 else 0
6363 }
6464
6565
6666 @Callable(n)
6767 func setDestinationWallet (o) = if ((n.callerPublicKey != a))
6868 then throw("Only owner can call this method")
6969 else if ((o == ""))
7070 then throw("Address cannot be empty")
7171 else WriteSet([DataEntry(b, o)])
7272
7373
7474
7575 @Callable(n)
7676 func setLootBoxInfo (d,p,q) = if ((n.callerPublicKey != a))
7777 then throw("Only owner can call this method")
7878 else if ((d == 0))
7979 then throw("Loot id undefined")
8080 else if ((p == 0))
8181 then throw("Price undefined")
8282 else if ((q == 0))
8383 then throw("Limit undefined")
8484 else {
8585 let r = toString(d)
8686 WriteSet([DataEntry(e(r), p), DataEntry(f(r), q)])
8787 }
8888
8989
9090
9191 @Callable(n)
9292 func buyLootBox (d) = {
9393 let r = toString(d)
9494 let s = extract(n.payment)
9595 if (isDefined(s.assetId))
96- then throw("Can hodl waves only at the moment")
96+ then throw("Can hold waves only at the moment")
9797 else {
9898 let t = m(r)
9999 let u = (t + 1)
100100 let v = l(r)
101101 let w = k(r)
102102 let x = s.amount
103103 if ((x != w))
104104 then throw(((("Price must be equal " + toString(w)) + " wavelets, given: ") + toString(x)))
105105 else if ((u > v))
106106 then throw(((("Cannot sale more " + toString(v)) + " items due limit, current count: ") + toString(t)))
107107 else ScriptResult(WriteSet([DataEntry(g(r), u)]), TransferSet([ScriptTransfer(h(), x, unit)]))
108108 }
109109 }
110110
111111

github/deemru/w8io/169f3d6 
35.49 ms