tx · 9jHDd1mj7QcayiMLTVCCUUNV2MbXrzJRvVEELaTacM1X 3N4rovwXctuBvH4zzS8oo4FiygovuUw3ddF: -0.01000000 Waves 2020.05.29 19:45 [1020007] smart account 3N4rovwXctuBvH4zzS8oo4FiygovuUw3ddF > SELF 0.00000000 Waves
{ "type": 13, "id": "9jHDd1mj7QcayiMLTVCCUUNV2MbXrzJRvVEELaTacM1X", "fee": 1000000, "feeAssetId": null, "timestamp": 1590770814012, "version": 1, "sender": "3N4rovwXctuBvH4zzS8oo4FiygovuUw3ddF", "senderPublicKey": "GEThsXS8AHtxNJ89UANnUAkDpCrLysQ4brijA5J55ZSW", "proofs": [ "6jM87z7iBN1FLFHY1nKak1xEyAU8z4QkRjKzDGNajoXm6zDevrvWfSF825WyuF5hBDmUdP7v5mBZNJBapHsYobe" ], "script": "base64:AAIDAAAAAAAAAAwIARIDCgEIEgMKAQgAAAAEAQAAAA9nZXRCb29sZWFuQnlLZXkAAAABAAAAA2tleQQAAAAEYm9vbAQAAAAHJG1hdGNoMAkABBsAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAB0Jvb2xlYW4EAAAAAWIFAAAAByRtYXRjaDAFAAAAAWIHBQAAAARib29sAQAAAApnZXRLZXlGdW5kAAAAAQAAAAtmdW5kQWRkcmVzcwkAASwAAAACAgAAAAVmdW5kXwUAAAALZnVuZEFkZHJlc3MBAAAADGdldFZhbHVlRnVuZAAAAAEAAAALZnVuZEFkZHJlc3MJAQAAAA9nZXRCb29sZWFuQnlLZXkAAAABCQEAAAAKZ2V0S2V5RnVuZAAAAAEFAAAAC2Z1bmRBZGRyZXNzAAAAAAREU0JBAgAAAAxEU0JBIGFkZHJlc3MAAAACAAAAAWkBAAAACGxpc3RGdW5kAAAAAQAAAAtmdW5kQWRkcmVzcwQAAAAGY2FsbGVyCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMDCQEAAAACIT0AAAACBQAAAAZjYWxsZXIFAAAABERTQkEJAAACAAAAAQIAAAAgb25seSBEU0JBIGNhbiBjYWxsIHRoaXMgZnVuY3Rpb24DCQEAAAAMZ2V0VmFsdWVGdW5kAAAAAQUAAAALZnVuZEFkZHJlc3MJAAACAAAAAQIAAAAhdGhpcyBmdW5kIGhhcyBhbHJlYWR5IGJlZW4gbGlzdGVkCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQEAAAAKZ2V0S2V5RnVuZAAAAAEFAAAAC2Z1bmRBZGRyZXNzBgUAAAADbmlsAAAAAWkBAAAACmRlbGlzdEZ1bmQAAAABAAAAC2Z1bmRBZGRyZXNzBAAAAAZjYWxsZXIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwMJAQAAAAIhPQAAAAIFAAAABmNhbGxlcgUAAAAERFNCQQkAAAIAAAABAgAAACBvbmx5IERTQkEgY2FuIGNhbGwgdGhpcyBmdW5jdGlvbgMJAQAAAAEhAAAAAQkBAAAADGdldFZhbHVlRnVuZAAAAAEFAAAAC2Z1bmRBZGRyZXNzCQAAAgAAAAECAAAAF3RoaXMgZnVuZCBpcyBub3QgbGlzdGVkCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQEAAAAKZ2V0S2V5RnVuZAAAAAEFAAAAC2Z1bmRBZGRyZXNzBwUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgHaQ3NAQ==", "chainId": 84, "height": 1020007, "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 | + | func getBooleanByKey (key) = { | |
5 | + | let bool = match getBoolean(this, key) { | |
6 | + | case b: Boolean => | |
7 | + | b | |
8 | + | case _ => | |
9 | + | false | |
10 | + | } | |
11 | + | bool | |
12 | + | } | |
13 | + | ||
14 | + | ||
15 | + | func getKeyFund (fundAddress) = ("fund_" + fundAddress) | |
16 | + | ||
17 | + | ||
18 | + | func getValueFund (fundAddress) = getBooleanByKey(getKeyFund(fundAddress)) | |
19 | + | ||
20 | + | ||
21 | + | let DSBA = "DSBA address" | |
22 | + | ||
23 | + | @Callable(i) | |
24 | + | func listFund (fundAddress) = { | |
25 | + | let caller = toBase58String(i.caller.bytes) | |
26 | + | if ((caller != DSBA)) | |
27 | + | then throw("only DSBA can call this function") | |
28 | + | else if (getValueFund(fundAddress)) | |
29 | + | then throw("this fund has already been listed") | |
30 | + | else WriteSet([DataEntry(getKeyFund(fundAddress), true)]) | |
31 | + | } | |
32 | + | ||
33 | + | ||
34 | + | ||
35 | + | @Callable(i) | |
36 | + | func delistFund (fundAddress) = { | |
37 | + | let caller = toBase58String(i.caller.bytes) | |
38 | + | if ((caller != DSBA)) | |
39 | + | then throw("only DSBA can call this function") | |
40 | + | else if (!(getValueFund(fundAddress))) | |
41 | + | then throw("this fund is not listed") | |
42 | + | else WriteSet([DataEntry(getKeyFund(fundAddress), false)]) | |
43 | + | } | |
44 | + | ||
45 | + | ||
46 | + | @Verifier(tx) | |
47 | + | func verify () = match tx { | |
48 | + | case _ => | |
49 | + | false | |
50 | + | } | |
51 | + |
github/deemru/w8io/026f985 17.24 ms ◑