tx · 9QQT4ivj4637gfPh12oHSaAwMa15KAJjVUnCHZ7DTtAN 3MxedECbCgJzLLpPMm78Vhj8QnaAKGNkVe5: -0.01000000 Waves 2021.08.11 17:00 [1653802] smart account 3MxedECbCgJzLLpPMm78Vhj8QnaAKGNkVe5 > SELF 0.00000000 Waves
{ "type": 13, "id": "9QQT4ivj4637gfPh12oHSaAwMa15KAJjVUnCHZ7DTtAN", "fee": 1000000, "feeAssetId": null, "timestamp": 1628690460829, "version": 2, "chainId": 84, "sender": "3MxedECbCgJzLLpPMm78Vhj8QnaAKGNkVe5", "senderPublicKey": "58UtpEU7kPv8rLxiE5pk4qYzpC7mVDaZUbDaP8CKV9pc", "proofs": [ "61GU1CiHkCAjZjaH2VQZph4AKXQ2s9pzD5eYgNpHbaQwsGJt1nHuct7ULo936m6R7XZQ8wX68UDWtAn4jdrEfcMn" ], "script": "base64:AAIFAAAAAAAAAIcIAhIDCgEBEgAaDwoCYTESCVBPU0lUSU9OUxoQCgJhMhIKcmFuZG9taXplchoJCgJhMxIDaW52GgoKAmE0EgRyYW5kGg4KAmE1EghzYXZlRGF0YRoJCgJhNhIDcG9zGgsKAmE3EgVzdGF0cxoLCgJhOBIFYXNzZXQaDQoCYTkSB2Fzc2V0SWQAAAADAAAAAAJhMQkABEwAAAACAgAAAAJHSwkABEwAAAACAgAAAAJMRAkABEwAAAACAgAAAAJDRAkABEwAAAACAgAAAAJSRAkABEwAAAACAgAAAAJETQkABEwAAAACAgAAAAJMTQkABEwAAAACAgAAAAJDTQkABEwAAAACAgAAAAJSTQkABEwAAAACAgAAAAJBTQkABEwAAAACAgAAAAJMRgkABEwAAAACAgAAAAJSRgkABEwAAAACAgAAAAJDRgUAAAADbmlsAQAAAAJhMgAAAAEAAAACYTMEAAAAAmE0CQAAywAAAAIJAADLAAAAAgkAAMsAAAACCQAAywAAAAIIBQAAAAJhMwAAAA10cmFuc2FjdGlvbklkCAUAAAACYTMAAAAPY2FsbGVyUHVibGljS2V5CAUAAAA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"applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GahjL4JrHn51YGqhUt8P3wPuMt8Vm5VSn3zVwpoayfEC Next: none Diff:
Old | New | Differences | |
---|---|---|---|
10 | 10 | ||
11 | 11 | ||
12 | 12 | func saveData (inv,pos) = { | |
13 | - | let stats = (("{ | |
14 | - | let asset = Issue(" | |
13 | + | let stats = (("{position:" + POSITIONS[pos]) + ", stats: {'stamina': 200, 'speed': 120, 'shot': 12, 'offence': 1, 'defence': 1}, skills: {'horse_lungs': 1}, talents: {'hard_trainings': 1}, 'age': 32}") | |
14 | + | let asset = Issue("Named token", toBase64String(toBytes(stats)), 1, 0, false, unit, 0) | |
15 | 15 | let assetId = calculateAssetId(asset) | |
16 | 16 | [StringEntry(((toBase58String(inv.caller.bytes) + "_") + toString(toInt(randomizer(inv)))), toBase64String(toBytes(stats))), asset, ScriptTransfer(inv.caller, 1, assetId)] | |
17 | 17 | } | |
21 | 21 | func start (pos) = saveData(inv, pos) | |
22 | 22 | ||
23 | 23 | ||
24 | + | ||
25 | + | @Callable(inv) | |
26 | + | func updateStats () = nil | |
27 | + | ||
28 | + |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let POSITIONS = ["GK", "LD", "CD", "RD", "DM", "LM", "CM", "RM", "AM", "LF", "RF", "CF"] | |
5 | 5 | ||
6 | 6 | func randomizer (inv) = { | |
7 | 7 | let rand = ((((inv.transactionId + inv.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height)) | |
8 | 8 | sha256(rand) | |
9 | 9 | } | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | func saveData (inv,pos) = { | |
13 | - | let stats = (("{ | |
14 | - | let asset = Issue(" | |
13 | + | let stats = (("{position:" + POSITIONS[pos]) + ", stats: {'stamina': 200, 'speed': 120, 'shot': 12, 'offence': 1, 'defence': 1}, skills: {'horse_lungs': 1}, talents: {'hard_trainings': 1}, 'age': 32}") | |
14 | + | let asset = Issue("Named token", toBase64String(toBytes(stats)), 1, 0, false, unit, 0) | |
15 | 15 | let assetId = calculateAssetId(asset) | |
16 | 16 | [StringEntry(((toBase58String(inv.caller.bytes) + "_") + toString(toInt(randomizer(inv)))), toBase64String(toBytes(stats))), asset, ScriptTransfer(inv.caller, 1, assetId)] | |
17 | 17 | } | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | @Callable(inv) | |
21 | 21 | func start (pos) = saveData(inv, pos) | |
22 | 22 | ||
23 | 23 | ||
24 | + | ||
25 | + | @Callable(inv) | |
26 | + | func updateStats () = nil | |
27 | + | ||
28 | + |
github/deemru/w8io/026f985 27.84 ms ◑