tx · DC4ZrYkFz6w1y7sHQbL9NiE3ePrFfe7dvSdfdsWjRCXz 3MrcyedG2j6tbHVVuz9NX35W3pH3msoyFx9: -0.01000000 Waves 2019.07.05 23:24 [572686] smart account 3MrcyedG2j6tbHVVuz9NX35W3pH3msoyFx9 > SELF 0.00000000 Waves
{ "type": 13, "id": "DC4ZrYkFz6w1y7sHQbL9NiE3ePrFfe7dvSdfdsWjRCXz", "fee": 1000000, "feeAssetId": null, "timestamp": 1562358260025, "version": 1, "sender": "3MrcyedG2j6tbHVVuz9NX35W3pH3msoyFx9", "senderPublicKey": "8UV4eabrtAA9gekYHs82KZh3LqNaaFzJMDfzea2oSAv4", "proofs": [ "5mcebpT6Zk7bqSrFN5BBeAp5kKDB1yV3AbGohotdPipLtcaJ8cmshLREsz7JWtUwSbV4JSL7RVx5VALgKn5a7rsP" ], "script": "base64:AAIDAAAAAAAAAAAAAAABAAAAAAF1AQAAABoBVNHjVc5bKe92es96JRDP/yfcbI+eDemLtQAAAAIAAAABaQEAAAAHZGVwb3NpdAAAAAAEAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50AwkBAAAAAiE9AAAAAggFAAAAA3BtdAAAAAdhc3NldElkBQAAAAF1CQAAAgAAAAECAAAACGFzYXNhc2FzBAAAAARjS2V5CQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAAA2NBbQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAARjS2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAEAAAAA25BbQkAAGQAAAACBQAAAANjQW0IBQAAAANwbXQAAAAGYW1vdW50CQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAAARjS2V5BQAAAANuQW0FAAAAA25pbAAAAAFpAQAAAAh3aXRoZHJhdwAAAAEAAAAGYW1vdW50BAAAAARjS2V5CQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAAA2NBbQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAARjS2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAEAAAAA25BbQkAAGUAAAACBQAAAANjQW0FAAAABmFtb3VudAMJAABmAAAAAgAAAAAAAAAAAAUAAAAGYW1vdW50CQAAAgAAAAECAAAAHWNhbid0IHdpdGhkcmF3IG5lZ2F0aXZlIGFtb3V0AwkAAGYAAAACAAAAAAAAAAAABQAAAANuQW0JAAACAAAAAQIAAAAQbm90IG5vdWdoIGJhbGFjZQkBAAAADFNjcmlwdFJlc3VsdAAAAAIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAABGNLZXkFAAAAA25BbQUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAGYW1vdW50BQAAAAF1BQAAAANuaWwAAAAAXCCFNw==", "chainId": 84, "height": 572686, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = base58'3N93sLYBAH7kxZ8KKBspQtTZvUw1byVwqrk' | |
5 | + | ||
6 | + | @Callable(b) | |
7 | + | func deposit () = { | |
8 | + | let c = extract(b.payment) | |
9 | + | if ((c.assetId != a)) | |
10 | + | then throw("asasasas") | |
11 | + | else { | |
12 | + | let d = toBase58String(b.caller.bytes) | |
13 | + | let e = { | |
14 | + | let f = getInteger(this, d) | |
15 | + | if ($isInstanceOf(f, "Int")) | |
16 | + | then { | |
17 | + | let g = f | |
18 | + | g | |
19 | + | } | |
20 | + | else 0 | |
21 | + | } | |
22 | + | let h = (e + c.amount) | |
23 | + | WriteSet([DataEntry(d, h)]) | |
24 | + | } | |
25 | + | } | |
26 | + | ||
27 | + | ||
28 | + | ||
29 | + | @Callable(b) | |
30 | + | func withdraw (i) = { | |
31 | + | let d = toBase58String(b.caller.bytes) | |
32 | + | let e = { | |
33 | + | let f = getInteger(this, d) | |
34 | + | if ($isInstanceOf(f, "Int")) | |
35 | + | then { | |
36 | + | let g = f | |
37 | + | g | |
38 | + | } | |
39 | + | else 0 | |
40 | + | } | |
41 | + | let h = (e - i) | |
42 | + | if ((0 > i)) | |
43 | + | then throw("can't withdraw negative amout") | |
44 | + | else if ((0 > h)) | |
45 | + | then throw("not nough balace") | |
46 | + | else ScriptResult(WriteSet([DataEntry(d, h)]), TransferSet([ScriptTransfer(b.caller, i, a)])) | |
47 | + | } | |
48 | + | ||
49 | + |
github/deemru/w8io/169f3d6 18.28 ms ◑