tx · APnetdAnvy1jYfaCQfBP8HEmtSjMGG2muNaKi29g8Ge 3Mt6UXYiypnA6WwKMJsiXMckF7iNe9kWQci: -0.01000000 Waves 2019.07.20 00:21 [593296] smart account 3Mt6UXYiypnA6WwKMJsiXMckF7iNe9kWQci > SELF 0.00000000 Waves
{ "type": 13, "id": "APnetdAnvy1jYfaCQfBP8HEmtSjMGG2muNaKi29g8Ge", "fee": 1000000, "feeAssetId": null, "timestamp": 1563571271011, "version": 1, "sender": "3Mt6UXYiypnA6WwKMJsiXMckF7iNe9kWQci", "senderPublicKey": "dTjHwyXGZRGo3Bk6xykECRRp6TeNkui1UV8qPq66UXA", "proofs": [ "2J68E6eerTiwW5xPc6Wfg4gYPpTCjgJBgwW7evSAKJGAcsZp2rTeMeXnjyXNmpsoprDMmAdypz4uH25cQaghEjEA" ], "script": "base64:AAIDAAAAAAAAAAAAAAADAAAAAA5vd25lclB1YmxpY0tleQEAAAAgfedb8gHq6MpA0xTx8E4brUvyXTxMUxGzgoeMhec7vFkBAAAAG2dldERlc3RpbmF0aW9uV2FsbGV0QWRkcmVzcwAAAAAEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwIAAAAdZGVzdGluYXRpb25fd2FsbGV0X3B1YmxpY19rZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABdgUAAAAHJG1hdGNoMAMJAAAAAAAAAgUAAAABdgIAAAAACQAAAgAAAAECAAAAKkRlc3RpbmF0aW9uIHdhbGxldCBhZGRyZXNzIGNhbm5vdCBiZSBlbXB0eQkBAAAAFGFkZHJlc3NGcm9tUHVibGljS2V5AAAAAQkAAZsAAAABBQAAAAF2CQAAAgAAAAECAAAAHERlc3RpbmF0aW9uIHdhbGxldCB1bmRlZmluZWQBAAAAD2dldExvb3RCb3hQcmljZQAAAAEAAAACaWQEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwkAASwAAAACAgAAAAlsb290X2JveF8JAAGkAAAAAQ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QWRkcmVzcwkBAAAAG2dldERlc3RpbmF0aW9uV2FsbGV0QWRkcmVzcwAAAAAEAAAAB3BheW1lbnQJAQAAAAdleHRyYWN0AAAAAQgFAAAAAWkAAAAHcGF5bWVudAQAAAAMbG9vdEJveFByaWNlCQEAAAAPZ2V0TG9vdEJveFByaWNlAAAAAQUAAAACaWQEAAAADHBsYXllclBheVN1bQgFAAAAB3BheW1lbnQAAAAGYW1vdW50AwkBAAAAAiE9AAAAAgUAAAAMcGxheWVyUGF5U3VtBQAAAAxsb290Qm94UHJpY2UJAAACAAAAAQkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAUUHJpY2UgbXVzdCBiZSBlcXVhbCAJAAGkAAAAAQUAAAAMbG9vdEJveFByaWNlAgAAABIgd2F2ZWxldHMsIGdpdmVuOiAJAAGkAAAAAQUAAAAMcGxheWVyUGF5U3VtCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAAGGRpc3RpbmF0aW9uV2FsbGV0QWRkcmVzcwUAAAAMcGxheWVyUGF5U3VtBQAAAAR1bml0BQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAXSW52b2tlU2NyaXB0VHJhbnNhY3Rpb24EAAAAAWkFAAAAByRtYXRjaDAGCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tlee0ZjGE=", "chainId": 84, "height": 593296, "spentComplexity": 0 } View: original | compacted Prev: Hy7MAWPc1BpC3nW9CUbV1TXhEUQbVq3Hq94NyPJaCpvm Next: FjfemqxoWEp9sKkpQm7oQfpEe1JVPyrRjFhVYJ3c9Nie Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = base58'9UUaVVahBUyLHLQo4HNuQsRMKY9QBH43Grojkbdf4wG4' | |
5 | + | ||
6 | + | func b () = { | |
7 | + | let c = getString(this, "destination_wallet_public_key") | |
8 | + | if ($isInstanceOf(c, "String")) | |
9 | + | then { | |
10 | + | let d = c | |
11 | + | if ((d == "")) | |
12 | + | then throw("Destination wallet address cannot be empty") | |
13 | + | else addressFromPublicKey(toBytes(d)) | |
14 | + | } | |
15 | + | else throw("Destination wallet undefined") | |
16 | + | } | |
17 | + | ||
18 | + | ||
19 | + | func e (f) = { | |
20 | + | let c = getInteger(this, ("loot_box_" + toString(f))) | |
21 | + | if ($isInstanceOf(c, "Int")) | |
22 | + | then { | |
23 | + | let d = c | |
24 | + | d | |
25 | + | } | |
26 | + | else throw("Loot box price undefined") | |
27 | + | } | |
28 | + | ||
29 | + | ||
30 | + | @Callable(g) | |
31 | + | func setDestinationWallet (h) = if ((g.callerPublicKey != a)) | |
32 | + | then throw("Only owner can call this method") | |
33 | + | else if ((h == "")) | |
34 | + | then throw("Public key cannot be empty") | |
35 | + | else WriteSet([DataEntry("destination_wallet_public_key", h)]) | |
36 | + | ||
37 | + | ||
38 | + | ||
39 | + | @Callable(g) | |
40 | + | func setLootBoxPrice (f,i) = if ((g.callerPublicKey != a)) | |
41 | + | then throw("Only owner can call this method") | |
42 | + | else if ((f == 0)) | |
43 | + | then throw("Loot id undefined") | |
44 | + | else if ((i == 0)) | |
45 | + | then throw("Price undefined") | |
46 | + | else WriteSet([DataEntry(("loot_box_" + toString(f)), i)]) | |
47 | + | ||
48 | + | ||
49 | + | ||
50 | + | @Callable(g) | |
51 | + | func buyLootBox (f) = { | |
52 | + | let j = b() | |
53 | + | let k = extract(g.payment) | |
54 | + | let l = e(f) | |
55 | + | let m = k.amount | |
56 | + | if ((m != l)) | |
57 | + | then throw(((("Price must be equal " + toString(l)) + " wavelets, given: ") + toString(m))) | |
58 | + | else TransferSet([ScriptTransfer(j, m, unit)]) | |
59 | + | } | |
60 | + | ||
61 | + | ||
62 | + | @Verifier(n) | |
63 | + | func o () = { | |
64 | + | let c = n | |
65 | + | if ($isInstanceOf(c, "InvokeScriptTransaction")) | |
66 | + | then { | |
67 | + | let g = c | |
68 | + | true | |
69 | + | } | |
70 | + | else sigVerify(n.bodyBytes, n.proofs[0], n.senderPublicKey) | |
71 | + | } | |
72 | + |
github/deemru/w8io/026f985 19.72 ms ◑