tx · 9o7L7r7NrfZjPb4KyAXiJzGdBMwZK6BBbSvNLCPJnUsx

3N5817sxSDYjf2ZLXWeg7CeTTL5eb5RUGfZ:  -0.01000000 Waves

2021.07.24 03:45 [1627024] smart account 3N5817sxSDYjf2ZLXWeg7CeTTL5eb5RUGfZ > SELF 0.00000000 Waves

{ "type": 13, "id": "9o7L7r7NrfZjPb4KyAXiJzGdBMwZK6BBbSvNLCPJnUsx", "fee": 1000000, "feeAssetId": null, "timestamp": 1627087704054, "version": 2, "chainId": 84, "sender": "3N5817sxSDYjf2ZLXWeg7CeTTL5eb5RUGfZ", "senderPublicKey": "J7rxZzeYSPADJy4erG5pvXRfkEStFn2ytek6F4Xx2VPY", "proofs": [ "4T1pJZoa83nL6oHE47mcRYi9uRyxDCbAdATs5LbtNaqnshWUr79rqu9i21gAHMR9FqEi3fYRT9GmkKSx5HBT2WG2" ], "script": "base64:AAIDAAAAAAAABIQIARIFCgMBAQEaCgoCYTESBGdhbWUaDQoCYTISByRtYXRjaDAaBwoCYTMSAXMaHwoCYTQSGXJhbmRvbWl6ZXJTb2xkaWVyUGxheWVyMDEaCQoCYTUSA2ludhoZCgJhNhITcmFuZFNvbGRpZXJQbGF5ZXIwMRoeCgJhNxIYcmFuZG9taXplckh1bnRlclBsYXllcjAxGhgKAmE4EhJyYW5kSHVudGVyUGxheWVyMDEaHAoCYTkSFnJhbmRvbWl6ZXJCb3NzUGxheWVyMDEaFgoCYjESEHJhbmRCb3NzUGxheWVyMDEaHwoCYjISGXJhbmRvbWl6ZXJTb2xkaWVyUGxheWVyMDIaGQoCYjMSE3JhbmRTb2xkaWVyUGxheWVyMDIaHgoCYjQSGHJhbmRvbWl6ZXJIdW50ZXJQbGF5ZXIwMhoYCgJiNRIScmFuZEh1bnRlclBsYXllcjAyGhwKAmI2EhZyYW5kb21pemVyQm9zc1BsYXllcjAyGgoKAmI3EgRyYW5kGhgKAmI4EhJpbmRleFNvbGRpZXJCdWZmZXIaFwoCYjkSEWluZGV4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AAAAAAAATiAAAAAAAAAAAAAQAAAACZTUJAABkAAAAAgkAAGQAAAACCQAAZAAAAAIJAABkAAAAAgkAAGQAAAACBQAAAAJkNQUAAAACZDYFAAAAAmQ3BQAAAAJlMgUAAAACZTMFAAAAAmU0BAAAAAJlNgMJAAAAAAAAAgUAAAACYjgFAAAAAmQyAAAAAAAAAAAyAAAAAAAAAAAABAAAAAJlNwMJAAAAAAAAAgUAAAACYjkFAAAAAmQzAAAAAAAAAAH0AAAAAAAAAAAABAAAAAJlOAMJAAAAAAAAAgUAAAACYzEFAAAAAmQ0AAAAAAAAABOIAAAAAAAAAAAABAAAAAJlOQkAAGQAAAACCQAAZAAAAAIJAABkAAAAAgkAAGQAAAACCQAAZAAAAAIFAAAAAmQ1BQAAAAJkNgUAAAACZDcFAAAAAmU2BQAAAAJlNwUAAAACZTgEAAAAAmYxAwkAAGYAAAACBQAAAAJlNQUAAAACZTkCAAAAEVBsYXllciAwMSBHYW5ob3UhAgAAABFQbGF5ZXIgMDIgR2FuaG91IQkAAAIAAAABCQABpAAAAAEIBQAAAAlsYXN0QmxvY2sAAAAJdGltZXN0YW1wAAAAAObg2wY=", "height": 1627024, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6ADEvnmt4tLqb7sAE2o55PGcSatqj1bioiyTFkgsGcng Next: H8bY78AyRNnz5GmdMT9HU2kmRYrodANELTwLTyQNrLd9 Diff:
OldNewDifferences
128128 let battle = if ((totalSoldierHunterBossPlayer01 > totalSoldierHunterBossPlayer02))
129129 then "Player 01 Ganhou!"
130130 else "Player 02 Ganhou!"
131- WriteSet([DataEntry("kingOftheArena", currentKeyBytes), DataEntry("btcAmount", btcAmount.amount), DataEntry("indexSoldierBuffer", indexSoldierBuffer), DataEntry("indexHunterBuffer", indexHunterBuffer), DataEntry("indexBossBuffer", indexBossBuffer), DataEntry("Resultado", battle)])
131+ throw(toString(lastBlock.timestamp))
132132 }
133133 }
134134
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let game = match getBinary(this, "game") {
55 case s: ByteVector =>
66 s
77 case _: Unit =>
88 base58'GGvfcHWwd2azCVLaeeQzr6Ccyn'
99 case _ =>
1010 throw("Match error")
1111 }
1212
1313 func randomizerSoldierPlayer01 (inv) = {
1414 let randSoldierPlayer01 = ((((game + inv.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height))
1515 sha256(randSoldierPlayer01)
1616 }
1717
1818
1919 func randomizerHunterPlayer01 (inv) = {
2020 let randHunterPlayer01 = ((((game + inv.transactionId) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height))
2121 sha256(randHunterPlayer01)
2222 }
2323
2424
2525 func randomizerBossPlayer01 (inv) = {
2626 let randBossPlayer01 = ((((game + inv.transactionId) + inv.callerPublicKey) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height))
2727 sha256(randBossPlayer01)
2828 }
2929
3030
3131 func randomizerSoldierPlayer02 (inv) = {
3232 let randSoldierPlayer02 = ((((game + inv.transactionId) + inv.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.height))
3333 sha256(randSoldierPlayer02)
3434 }
3535
3636
3737 func randomizerHunterPlayer02 (inv) = {
3838 let randHunterPlayer02 = ((((game + inv.transactionId) + inv.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp))
3939 sha256(randHunterPlayer02)
4040 }
4141
4242
4343 func randomizerBossPlayer02 (inv) = {
4444 let rand = (((inv.callerPublicKey + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height))
4545 sha256(rand)
4646 }
4747
4848
4949 @Callable(inv)
5050 func play (indexSoldierBuffer,indexHunterBuffer,indexBossBuffer) = {
5151 let currentKey = inv.caller
5252 let btcAmount = extract(inv.payment)
5353 let currentKeyBytes = toBase58String(inv.caller.bytes)
5454 let undead = base58'DdM4S3gFdTGCTPeNH1xRE3KjaUNDosoXCKvEY76VfP4o'
5555 let kingOftheArena = match getString(this, "kingOftheArena") {
5656 case a: String =>
5757 a
5858 case _ =>
5959 ""
6060 }
6161 if ((0 > assetBalance(currentKey, undead)))
6262 then throw("E necessário ter o token do deck em sua carteira! Para adquirir, realize a troca em Swap Decks.")
6363 else if ((kingOftheArena == ""))
6464 then WriteSet([DataEntry("kingOftheArena", currentKeyBytes), DataEntry("btcAmount", btcAmount.amount), DataEntry("indexSoldierBuffer", indexSoldierBuffer), DataEntry("indexHunterBuffer", indexHunterBuffer), DataEntry("indexBossBuffer", indexBossBuffer)])
6565 else {
6666 let soldierRandomPlayer01 = (toInt(randomizerSoldierPlayer01(inv)) % 4)
6767 let hunterRandomPlayer01 = (toInt(randomizerHunterPlayer01(inv)) % 4)
6868 let bossRandomPlayer01 = (toInt(randomizerBossPlayer01(inv)) % 2)
6969 let soldierRandomPlayer02 = (toInt(randomizerSoldierPlayer02(inv)) % 4)
7070 let hunterRandomPlayer02 = (toInt(randomizerHunterPlayer02(inv)) % 4)
7171 let bossRandomPlayer02 = (toInt(randomizerBossPlayer02(inv)) % 2)
7272 let soldier = match getInteger(this, ("soldier0" + toString(soldierRandomPlayer01))) {
7373 case a: Int =>
7474 a
7575 case _ =>
7676 0
7777 }
7878 let hunter = match getInteger(this, ("hunter0" + toString(hunterRandomPlayer01))) {
7979 case a: Int =>
8080 a
8181 case _ =>
8282 0
8383 }
8484 let boss = match getInteger(this, ("boss0" + toString(bossRandomPlayer01))) {
8585 case a: Int =>
8686 a
8787 case _ =>
8888 0
8989 }
9090 let indexSoldierBufferPlayer01 = match getInteger(this, "indexSoldierBuffer") {
9191 case a: Int =>
9292 a
9393 case _ =>
9494 0
9595 }
9696 let indexHunterBufferPlayer01 = match getInteger(this, "indexHunterBuffer") {
9797 case a: Int =>
9898 a
9999 case _ =>
100100 0
101101 }
102102 let indexBossBufferPlayer01 = match getInteger(this, "indexBossBuffer") {
103103 case a: Int =>
104104 a
105105 case _ =>
106106 0
107107 }
108108 let powerSoldierBufferPlayer01 = if ((indexSoldierBufferPlayer01 == soldierRandomPlayer01))
109109 then 50
110110 else 0
111111 let powerHunterBufferPlayer01 = if ((indexHunterBufferPlayer01 == hunterRandomPlayer01))
112112 then 500
113113 else 0
114114 let powerBossBufferPlayer01 = if ((indexBossBufferPlayer01 == bossRandomPlayer01))
115115 then 5000
116116 else 0
117117 let totalSoldierHunterBossPlayer01 = (((((soldier + hunter) + boss) + powerSoldierBufferPlayer01) + powerHunterBufferPlayer01) + powerBossBufferPlayer01)
118118 let powerSoldierBufferPlayer02 = if ((indexSoldierBuffer == soldierRandomPlayer02))
119119 then 50
120120 else 0
121121 let powerHunterBufferPlayer02 = if ((indexHunterBuffer == hunterRandomPlayer02))
122122 then 500
123123 else 0
124124 let powerBossBufferPlayer02 = if ((indexBossBuffer == bossRandomPlayer02))
125125 then 5000
126126 else 0
127127 let totalSoldierHunterBossPlayer02 = (((((soldier + hunter) + boss) + powerSoldierBufferPlayer02) + powerHunterBufferPlayer02) + powerBossBufferPlayer02)
128128 let battle = if ((totalSoldierHunterBossPlayer01 > totalSoldierHunterBossPlayer02))
129129 then "Player 01 Ganhou!"
130130 else "Player 02 Ganhou!"
131- WriteSet([DataEntry("kingOftheArena", currentKeyBytes), DataEntry("btcAmount", btcAmount.amount), DataEntry("indexSoldierBuffer", indexSoldierBuffer), DataEntry("indexHunterBuffer", indexHunterBuffer), DataEntry("indexBossBuffer", indexBossBuffer), DataEntry("Resultado", battle)])
131+ throw(toString(lastBlock.timestamp))
132132 }
133133 }
134134
135135

github/deemru/w8io/026f985 
44.08 ms