tx · Zqv9AQM9HfxAzK254JMMKKUoQDmyDZRouZHFUdyXfZY 3MucnifgqjCVTQDsVvyBbDfUYL4NzUJme6c: -0.01400000 Waves 2022.02.04 14:02 [1908776] smart account 3MucnifgqjCVTQDsVvyBbDfUYL4NzUJme6c > SELF 0.00000000 Waves
{ "type": 13, "id": "Zqv9AQM9HfxAzK254JMMKKUoQDmyDZRouZHFUdyXfZY", "fee": 1400000, "feeAssetId": null, "timestamp": 1643972559701, "version": 2, "chainId": 84, "sender": "3MucnifgqjCVTQDsVvyBbDfUYL4NzUJme6c", "senderPublicKey": "5VeehaC8J2hY5k7GyMevtfCSC4on8kxpPvqqQqNe5erh", "proofs": [ "oTEwx2D6ThsECfQCVbSebKFL5NLWBj9xwwV8QYYNP23kGpfJur7UmbepYHCHV8gBAsg767Td4xBingFD4PTaTtB" ], "script": "base64:AAIFAAAAAAAAAA4IAhIAEggKBggBAQEBAQAAACQAAAAABnBhcmFtcwkBAAAAEUBleHRyTmF0aXZlKDEwNjIpAAAAAQIAAAAjM04yalphSDFqTFo1dWhLa05pazZnZUE1N0h6TUd3OThpZ1IAAAAADWtleUluaXRWMURvbmUCAAAADGluaXRfdjFfZG9uZQAAAAAKa2V5VG9rZW5JZAIAAAAHdG9rZW5JZAAAAAAba2V5SW5pdGlhbENoYXJDcmVhdGlvblN0YXRzAgAAABhpbml0aWFsQ2hhckNyZWF0aW9uU3RhdHMAAAAACXNlcGFyYXRvcgIAAAABXwAAAAAHa2V5TmFtZQIAAAAEbmFtZQAAAAAGa2V5U2V4AgAAAANzZXgAAAAAB2tleVJhbmsCAAAABHJhbmsAAAAAEGtleUhlYWx0aEN1cnJlbnQCAAAADWhlYWx0aEN1cnJlbnQAAAAADGtleUhlYWx0aE1heAIAAAAJaGVhbHRoTWF4AAAAABNrZXlNaW5IZWFsdGhQZXJSYW5rAgAAABBtaW5IZWFsdGhQZXJSYW5rAAAAABNrZXlNYXhIZWFsdGhQZXJSYW5rAgAAABBtYXhIZWFsdG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ETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQEAAAAEd2l0aAAAAAIFAAAAEmtleU1pblRlcnJhUGVyUmFuawUAAAAJY2hhcklkU3RyCQEAAAANcGFyc2VJbnRWYWx1ZQAAAAEJAAGRAAAAAgUAAAAMaW5pdGlhbFN0YXRzAAAAAAAAAAARCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQEAAAAEd2l0aAAAAAIFAAAAEmtleU1heFRlcnJhUGVyUmFuawUAAAAJY2hhcklkU3RyBQAAAAV0ZXJyYQkABEwAAAACBQAAAAljaGFySXNzdWUJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyAAAAAAAAAAABBQAAAAZjaGFySWQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5hrNkLg==", "height": 1908776, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BzeTnCraUVmkv1CjXGBf4SCKRChzVdt2frSCBTM17JXS Next: 8fY3U4PxoLoqrroMGTdBH1AsNyHh46iSPkuWz7cF2wQT Diff:
Old | New | Differences | |
---|---|---|---|
77 | 77 | ||
78 | 78 | @Callable(i) | |
79 | 79 | func testRand () = { | |
80 | - | let rand = randInt( | |
80 | + | let rand = randInt(100, i.transactionId, 0) | |
81 | 81 | [IntegerEntry("testRand", rand)] | |
82 | 82 | } | |
83 | 83 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let params = addressFromStringValue("3N2jZaH1jLZ5uhKkNik6geA57HzMGw98igR") | |
5 | 5 | ||
6 | 6 | let keyInitV1Done = "init_v1_done" | |
7 | 7 | ||
8 | 8 | let keyTokenId = "tokenId" | |
9 | 9 | ||
10 | 10 | let keyInitialCharCreationStats = "initialCharCreationStats" | |
11 | 11 | ||
12 | 12 | let separator = "_" | |
13 | 13 | ||
14 | 14 | let keyName = "name" | |
15 | 15 | ||
16 | 16 | let keySex = "sex" | |
17 | 17 | ||
18 | 18 | let keyRank = "rank" | |
19 | 19 | ||
20 | 20 | let keyHealthCurrent = "healthCurrent" | |
21 | 21 | ||
22 | 22 | let keyHealthMax = "healthMax" | |
23 | 23 | ||
24 | 24 | let keyMinHealthPerRank = "minHealthPerRank" | |
25 | 25 | ||
26 | 26 | let keyMaxHealthPerRank = "maxHealthPerRank" | |
27 | 27 | ||
28 | 28 | let keyHealthRegen = "healthRegen" | |
29 | 29 | ||
30 | 30 | let keyMinHealthRegenPerRank = "minHealthRegenPerRank" | |
31 | 31 | ||
32 | 32 | let keyMaxHealthRegenPerRank = "maxHealthRegenPerRank" | |
33 | 33 | ||
34 | 34 | let keyManaCurrent = "manaCurrent" | |
35 | 35 | ||
36 | 36 | let keyManaMax = "manaMax" | |
37 | 37 | ||
38 | 38 | let keyMinManaPerRank = "minManaPerRank" | |
39 | 39 | ||
40 | 40 | let keyMaxManaPerRank = "maxManaPerRank" | |
41 | 41 | ||
42 | 42 | let keyManaRegen = "manaRegen" | |
43 | 43 | ||
44 | 44 | let keyMinManaRegenPerRank = "minManaRegenPerRank" | |
45 | 45 | ||
46 | 46 | let keyMaxManaRegenPerRank = "maxManaRegenPerRank" | |
47 | 47 | ||
48 | 48 | let keyPyro = "pyro" | |
49 | 49 | ||
50 | 50 | let keyMinPyroPerRank = "minPyroPerRank" | |
51 | 51 | ||
52 | 52 | let keyMaxPyroPerRank = "maxPyroPerRank" | |
53 | 53 | ||
54 | 54 | let keyAero = "aero" | |
55 | 55 | ||
56 | 56 | let keyMinAeroPerRank = "minAeroPerRank" | |
57 | 57 | ||
58 | 58 | let keyMaxAeroPerRank = "maxAeroPerRank" | |
59 | 59 | ||
60 | 60 | let keyAqua = "aqua" | |
61 | 61 | ||
62 | 62 | let keyMinAquaPerRank = "minAquaPerRank" | |
63 | 63 | ||
64 | 64 | let keyMaxAquaPerRank = "maxAquaPerRank" | |
65 | 65 | ||
66 | 66 | let keyTerra = "terra" | |
67 | 67 | ||
68 | 68 | let keyMinTerraPerRank = "minTerraPerRank" | |
69 | 69 | ||
70 | 70 | let keyMaxTerraPerRank = "maxTerraPerRank" | |
71 | 71 | ||
72 | 72 | func with (str1,str2) = ((str1 + separator) + str2) | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func randInt (max,txId,nonce) = (toInt(sha256_16Kb((value(value(blockInfoByHeight(height)).vrf) + txId)), nonce) % max) | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | @Callable(i) | |
79 | 79 | func testRand () = { | |
80 | - | let rand = randInt( | |
80 | + | let rand = randInt(100, i.transactionId, 0) | |
81 | 81 | [IntegerEntry("testRand", rand)] | |
82 | 82 | } | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | ||
86 | 86 | @Callable(i) | |
87 | 87 | func create (name,sex,pyro,aero,aqua,terra) = { | |
88 | 88 | let initialStats = split(getStringValue(params, keyInitialCharCreationStats), separator) | |
89 | 89 | let nameSize = size(name) | |
90 | 90 | if (if ((parseIntValue(initialStats[0]) > nameSize)) | |
91 | 91 | then true | |
92 | 92 | else (nameSize > parseIntValue(initialStats[1]))) | |
93 | 93 | then throw("Char name size not valid") | |
94 | 94 | else if (if (contains(name, " ")) | |
95 | 95 | then true | |
96 | 96 | else contains(name, separator)) | |
97 | 97 | then throw((("Whitespaces or " + separator) + " not allowed")) | |
98 | 98 | else if (if ((sex != 1)) | |
99 | 99 | then (sex != 2) | |
100 | 100 | else false) | |
101 | 101 | then throw("Somethings wrong with char sex") | |
102 | 102 | else if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (((((pyro + aero) + aqua) + terra) != 14)) | |
103 | 103 | then true | |
104 | 104 | else (2 > pyro)) | |
105 | 105 | then true | |
106 | 106 | else (pyro > 5)) | |
107 | 107 | then true | |
108 | 108 | else (2 > aero)) | |
109 | 109 | then true | |
110 | 110 | else (aero > 5)) | |
111 | 111 | then true | |
112 | 112 | else (2 > aqua)) | |
113 | 113 | then true | |
114 | 114 | else (aqua > 5)) | |
115 | 115 | then true | |
116 | 116 | else (2 > terra)) | |
117 | 117 | then true | |
118 | 118 | else (terra > 5)) | |
119 | 119 | then true | |
120 | 120 | else (pyro == aero)) | |
121 | 121 | then true | |
122 | 122 | else (pyro == aqua)) | |
123 | 123 | then true | |
124 | 124 | else (pyro == terra)) | |
125 | 125 | then true | |
126 | 126 | else (aero == aqua)) | |
127 | 127 | then true | |
128 | 128 | else (aero == terra)) | |
129 | 129 | then true | |
130 | 130 | else (aqua == terra)) | |
131 | 131 | then throw("Elem spec issue") | |
132 | 132 | else { | |
133 | 133 | let charIssue = Issue(name, "", 1, 0, false, unit, 0) | |
134 | 134 | let charId = calculateAssetId(charIssue) | |
135 | 135 | let charIdStr = toBase58String(charId) | |
136 | 136 | [StringEntry(with(keyName, charIdStr), name), IntegerEntry(with(keySex, charIdStr), sex), IntegerEntry(with(keyRank, charIdStr), 1), IntegerEntry(with(keyHealthCurrent, charIdStr), parseIntValue(initialStats[2])), IntegerEntry(with(keyHealthMax, charIdStr), parseIntValue(initialStats[2])), IntegerEntry(with(keyMinHealthPerRank, charIdStr), parseIntValue(initialStats[3])), IntegerEntry(with(keyMaxHealthPerRank, charIdStr), parseIntValue(initialStats[4])), IntegerEntry(with(keyHealthRegen, charIdStr), parseIntValue(initialStats[5])), IntegerEntry(with(keyMinHealthRegenPerRank, charIdStr), parseIntValue(initialStats[6])), IntegerEntry(with(keyMaxHealthRegenPerRank, charIdStr), parseIntValue(initialStats[7])), IntegerEntry(with(keyManaCurrent, charIdStr), parseIntValue(initialStats[8])), IntegerEntry(with(keyManaMax, charIdStr), parseIntValue(initialStats[8])), IntegerEntry(with(keyMinManaPerRank, charIdStr), parseIntValue(initialStats[9])), IntegerEntry(with(keyMaxManaPerRank, charIdStr), parseIntValue(initialStats[10])), IntegerEntry(with(keyManaRegen, charIdStr), parseIntValue(initialStats[11])), IntegerEntry(with(keyMinManaRegenPerRank, charIdStr), parseIntValue(initialStats[12])), IntegerEntry(with(keyMaxManaRegenPerRank, charIdStr), parseIntValue(initialStats[13])), IntegerEntry(with(keyPyro, charIdStr), pyro), IntegerEntry(with(keyMinPyroPerRank, charIdStr), parseIntValue(initialStats[14])), IntegerEntry(with(keyMaxPyroPerRank, charIdStr), pyro), IntegerEntry(with(keyAero, charIdStr), aero), IntegerEntry(with(keyMinAeroPerRank, charIdStr), parseIntValue(initialStats[15])), IntegerEntry(with(keyMaxAeroPerRank, charIdStr), aero), IntegerEntry(with(keyAqua, charIdStr), aqua), IntegerEntry(with(keyMinAquaPerRank, charIdStr), parseIntValue(initialStats[16])), IntegerEntry(with(keyMaxAquaPerRank, charIdStr), aqua), IntegerEntry(with(keyTerra, charIdStr), terra), IntegerEntry(with(keyMinTerraPerRank, charIdStr), parseIntValue(initialStats[17])), IntegerEntry(with(keyMaxTerraPerRank, charIdStr), terra), charIssue, ScriptTransfer(i.caller, 1, charId)] | |
137 | 137 | } | |
138 | 138 | } | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | @Verifier(tx) | |
142 | 142 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
143 | 143 |
github/deemru/w8io/169f3d6 38.81 ms ◑