tx · BZK6oTX3xqVf9DB9UQaGTVUGMCuofT2qEN77vnR2ju64

3N5uzQBRwhLHDpXkQXKAKXLgsbfa9Sf2Hjf:  -0.05000000 Waves

2019.06.25 07:08 [557121] smart account 3N5uzQBRwhLHDpXkQXKAKXLgsbfa9Sf2Hjf > SELF 0.00000000 Waves

{ "type": 13, "id": "BZK6oTX3xqVf9DB9UQaGTVUGMCuofT2qEN77vnR2ju64", "fee": 5000000, "feeAssetId": null, "timestamp": 1561435681078, "version": 1, "sender": "3N5uzQBRwhLHDpXkQXKAKXLgsbfa9Sf2Hjf", "senderPublicKey": "35Xxuggtoeee4EV6BV6Y1s3pVar8eTJby7uFDU7i9tz6", "proofs": [ "Up9VocKxZioajytPwK9ks9K1UV2zbmY8zJY9i3Tn1TwyPrNaHZEEHx9Nqwoothfq8bh3Pr4hBVGVWt12dGVYhXX" ], "script": "base64:AAIDAAAAAAAAAAAAAAAAAAAAAgAAAAFpAQAAAAdkZXBvc2l0AAAAAAQAAAADcG10CQEAAAAHZXh0cmFjdAAAAAEIBQAAAAFpAAAAB3BheW1lbnQDCQEAAAAJaXNEZWZpbmVkAAAAAQgFAAAAA3BtdAAAAAdhc3NldElkCQAAAgAAAAECAAAAIWNhbiBob2xkIHdhdmVzIG9ubHkgYXQgdGhlIG1vbWVudAQAAAAKY3VycmVudEtleQkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAA1jdXJyZW50QW1vdW50BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAACmN1cnJlbnRLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAQAAAAJbmV3QW1vdW50CQAAZAAAAAIFAAAADWN1cnJlbnRBbW91bnQIBQAAAANwbXQAAAAGYW1vdW50CQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAAApjdXJyZW50S2V5BQAAAAluZXdBbW91bnQFAAAAA25pbAAAAAFpAQAAAAh3aXRoZHJhdwAAAAEAAAAGYW1vdW50BAAAAApjdXJyZW50S2V5CQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAADWN1cnJlbnRBbW91bnQEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAAKY3VycmVudEtleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABAAAAAluZXdBbW91bnQJAABlAAAAAgUAAAANY3VycmVudEFtb3VudAUAAAAGYW1vdW50AwkAAGYAAAACAAAAAAAAAAAABQAAAAZhbW91bnQJAAACAAAAAQIAAAAeQ2FuJ3Qgd2l0aGRyYXcgbmVnYXRpdmUgYW1vdW50AwkAAGYAAAACAAAAAAAAAAAABQAAAAluZXdBbW91bnQJAAACAAAAAQIAAAASTm90IGVub3VnaCBiYWxhbmNlCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAKY3VycmVudEtleQUAAAAJbmV3QW1vdW50BQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAZhbW91bnQFAAAABHVuaXQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5x8TPLg==", "chainId": 84, "height": 557121, "spentComplexity": 0 } View: original | compacted Prev: 8MqR2FkxTostrG7g5VUfzMZTo1AgWaXidkQhyhE7Ph7R Next: 2mEKx4MyAMWiZ2yq99TmeHrdCc4PbXvpdwzjUC5D5UTd Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-func a (b) = {
5- let c = {
6- let d = getBinary(this, "lastPlay")
7- if ($isInstanceOf(d, "ByteVector"))
8- then {
9- let e = d
10- e
4+
5+
6+@Callable(a)
7+func deposit () = {
8+ let b = extract(a.payment)
9+ if (isDefined(b.assetId))
10+ then throw("can hold waves only at the moment")
11+ else {
12+ let c = toBase58String(a.caller.bytes)
13+ let d = {
14+ let e = getInteger(this, c)
15+ if ($isInstanceOf(e, "Int"))
16+ then {
17+ let f = e
18+ f
19+ }
20+ else 0
1121 }
12- else if ($isInstanceOf(d, "Unit"))
13- then {
14- let f = d
15- base58'2ee4oFDYriWJ9EMeR'
16- }
17- else throw()
18- }
19- let g = (((((c + b.transactionId) + b.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height))
20- sha256(g)
22+ let g = (d + b.amount)
23+ WriteSet([DataEntry(c, g)])
24+ }
2125 }
2226
2327
24-func h (b) = {
25- let i = (wavesBalance(this) / 100)
26- let j = extract(b.payment)
27- if (!(isDefined(b.payment)))
28- then throw("Should be with Payment in Waves")
29- else if (isDefined(j.assetId))
30- then throw("Payment should be in Waves")
31- else if ((j.amount > i))
32- then throw(("Payment should be less than " + toString(i)))
33- else {
34- let k = a(b)
35- let l = TransferSet([ScriptTransfer(b.caller, ((j.amount * 190) / 100), unit)])
36- let m = WriteSet([DataEntry("lastPlay", k)])
37- if ((500 > (toInt(k) % 1000)))
38- then ScriptResult(m, l)
39- else ScriptResult(m, TransferSet(nil))
40- }
28+
29+@Callable(a)
30+func withdraw (h) = {
31+ let c = toBase58String(a.caller.bytes)
32+ let d = {
33+ let e = getInteger(this, c)
34+ if ($isInstanceOf(e, "Int"))
35+ then {
36+ let f = e
37+ f
38+ }
39+ else 0
40+ }
41+ let g = (d - h)
42+ if ((0 > h))
43+ then throw("Can't withdraw negative amount")
44+ else if ((0 > g))
45+ then throw("Not enough balance")
46+ else ScriptResult(WriteSet([DataEntry(c, g)]), TransferSet([ScriptTransfer(a.caller, h, unit)]))
4147 }
4248
4349
44-@Callable(b)
45-func lotto () = h(b)
46-
47-
48-
49-@Callable(b)
50-func default () = h(b)
51-
50+@Verifier(i)
51+func j () = sigVerify(i.bodyBytes, i.proofs[0], i.senderPublicKey)
5252

github/deemru/w8io/026f985 
23.93 ms