tx · BitvkqbbQRgzr88RdzzueqqtV7HERcbqE8iPA8keQta5

3N3zK9Xg7d3QD2sYmufkH8RwfqJBS6UNtv4:  -0.05000000 Waves

2023.05.07 05:21 [2566823] smart account 3N3zK9Xg7d3QD2sYmufkH8RwfqJBS6UNtv4 > SELF 0.00000000 Waves

{ "type": 13, "id": "BitvkqbbQRgzr88RdzzueqqtV7HERcbqE8iPA8keQta5", "fee": 5000000, "feeAssetId": null, "timestamp": 1683426115951, "version": 2, "chainId": 84, "sender": "3N3zK9Xg7d3QD2sYmufkH8RwfqJBS6UNtv4", "senderPublicKey": "56zinHFJSYYBPx7s5gFUziCFxLNevABDB67aLXj8E3do", "proofs": [ "3UuELzyM3fnsby9F9HQdhiE9E5twYvaXpgvDvKoBFWPW2UCxtLzJQneypym1S1dVZmRcdigNxzYP7WVux8PwAkWU" ], "script": "base64:AAIFAAAAAAAAAA4IAhIECgIBCBIECgIECAAAAAMAAAAAGWJpZ0ludEhhc2hEaXZpc29yQ29pbkZMaXAJAABsAAAABgAAAAAAAAAACgAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAGSEFMRlVQAAAAABhiaWdJbnRIYXNoRGl2aXNvckNvaW5CZXQJAABsAAAABgAAAAAAAAAACgAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAGSEFMRlVQAQAAAAppc05lZ2F0aXZlAAAAAQAAAAFuAwkAAGYAAAACAAAAAAAAAAAABQAAAAFuCQAAaAAAAAIFAAAAAW4A//////////8FAAAAAW4AAAACAAAAAWkBAAAAC2JldFRvTnVtYmVyAAAAAgAAAAZudW1iZXIAAAADcmVmAwMJAABmAAAAAgAAAAAAAAGGoAgJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAAAAAGYW1vdW50BgkAAGYAAAACCAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAAAAAZhbW91bnQ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AAAZoZWlnaHQJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgIAAAAQbGFzdF90eF9jb2luZmxpcAkAAlgAAAABCAUAAAABaQAAAA10cmFuc2FjdGlvbklkCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwIAAAAFX2JldF8JAAGkAAAAAQkAAGQAAAACBQAAAAF4AAAAAAAAAAABAgAAAA9faGVhZHNfb3JfdGFpbHMFAAAACHJlc3VsdF93CQAETAAAAAIFAAAABXJlZnR4CQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwIAAAAFX2JldF8JAAGkAAAAAQkAAGQAAAACBQAAAAF4AAAAAAAAAAABAgAAAAdfcmVzdWx0BQAAAAZyZXN1bHQJAARMAAAAAgUAAAAFdHhQYXkFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V55t65Xw==", "height": 2566823, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Dcwjvx74x4QsFSr1M1UXE17BWMj2wMr5aDpXDz2ypanK Next: 6rpwmyD7my3b2qnNqmrZ2EGGnSJgvMru3qMiQzb2XVMh Diff:
OldNewDifferences
3939 let result = if ((f > number))
4040 then "win"
4141 else "loss"
42- let transfer = if ((result == "win"))
43- then ((99 / (99 - number)) * i.payments[0].amount)
42+ let transfr = if ((result == "win"))
43+ then (9900000000 / (99 - number))
4444 else 0
45+ let transfer = ((i.payments[0].amount * transfr) / 100000000)
4546 let txPay = if ((transfer == 0))
4647 then IntegerEntry(((toBase58String(this.bytes) + "_") + toBase58String(i.caller.bytes)), i.payments[0].amount)
4748 else ScriptTransfer(Address(i.caller.bytes), (i.payments[0].amount * 2), unit)
4849 let reftx = if ((ref1 == toBase58String(this.bytes)))
4950 then IntegerEntry((((toBase58String(this.bytes) + "_") + toBase58String(i.caller.bytes)) + "_ref"), toRef)
5051 else ScriptTransfer(Address(fromBase58String(ref1)), toRef, unit)
51-[IntegerEntry((((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))) + "_mult"), (99 / (99 - number))), IntegerEntry((toBase58String(i.caller.bytes) + "_bets"), (x + 1)), IntegerEntry((((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))) + "_value"), number), IntegerEntry((((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))) + "_result_number"), f), StringEntry(((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))), toBase58String(i.transactionId)), StringEntry((((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))) + "_ref"), ref1), IntegerEntry((((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))) + "_block"), height), IntegerEntry((((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))) + "_transfer_final"), transfer), StringEntry("last_tx_coinflip", toBase58String(i.transactionId)), reftx, StringEntry((((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))) + "_result"), result), txPay]
52+[IntegerEntry((((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))) + "_mult"), transfr), IntegerEntry((toBase58String(i.caller.bytes) + "_bets"), (x + 1)), IntegerEntry((((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))) + "_value"), number), IntegerEntry((((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))) + "_result_number"), f), StringEntry(((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))), toBase58String(i.transactionId)), StringEntry((((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))) + "_ref"), ref1), IntegerEntry((((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))) + "_block"), height), IntegerEntry((((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))) + "_transfer_final"), transfer), StringEntry("last_tx_coinflip", toBase58String(i.transactionId)), reftx, StringEntry((((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))) + "_result"), result), txPay]
5253 }
5354
5455
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let bigIntHashDivisorCoinFLip = pow(10, 0, 16, 0, 0, HALFUP)
55
66 let bigIntHashDivisorCoinBet = pow(10, 0, 16, 0, 0, HALFUP)
77
88 func isNegative (n) = if ((0 > n))
99 then (n * -1)
1010 else n
1111
1212
1313 @Callable(i)
1414 func betToNumber (number,ref) = if (if ((100000 > i.payments[0].amount))
1515 then true
1616 else (i.payments[0].amount > 1000000000))
1717 then throw("Invalid Waves amount. Min value: 0.1 Waves. Max Value: 10 Waves")
1818 else if ((i.payments[0].assetId != unit))
1919 then throw("Invalid assetId")
2020 else if (if ((0 >= number))
2121 then true
2222 else (number >= 99))
2323 then throw("Error: Invalid Number")
2424 else {
2525 let x = if (isDefined(getInteger((toBase58String(i.caller.bytes) + "_bets"))))
2626 then getIntegerValue((toBase58String(i.caller.bytes) + "_bets"))
2727 else 0
2828 let ref1 = if ((ref == ""))
2929 then toBase58String(this.bytes)
3030 else ref
3131 let toRef = ((i.payments[0].amount * 1) / 100)
3232 let lastTx = if (isDefined(getString("last_tx_bet")))
3333 then (isNegative(toInt(sha256(fromBase58String(getStringValue("last_tx_bet"))))) / bigIntHashDivisorCoinBet)
3434 else (isNegative(toInt(sha256(sha256(i.transactionId)))) / bigIntHashDivisorCoinBet)
3535 let txxz = (isNegative(toInt(sha256(i.transactionId))) / bigIntHashDivisorCoinBet)
3636 let f = if ((txxz > lastTx))
3737 then (txxz - lastTx)
3838 else (lastTx - txxz)
3939 let result = if ((f > number))
4040 then "win"
4141 else "loss"
42- let transfer = if ((result == "win"))
43- then ((99 / (99 - number)) * i.payments[0].amount)
42+ let transfr = if ((result == "win"))
43+ then (9900000000 / (99 - number))
4444 else 0
45+ let transfer = ((i.payments[0].amount * transfr) / 100000000)
4546 let txPay = if ((transfer == 0))
4647 then IntegerEntry(((toBase58String(this.bytes) + "_") + toBase58String(i.caller.bytes)), i.payments[0].amount)
4748 else ScriptTransfer(Address(i.caller.bytes), (i.payments[0].amount * 2), unit)
4849 let reftx = if ((ref1 == toBase58String(this.bytes)))
4950 then IntegerEntry((((toBase58String(this.bytes) + "_") + toBase58String(i.caller.bytes)) + "_ref"), toRef)
5051 else ScriptTransfer(Address(fromBase58String(ref1)), toRef, unit)
51-[IntegerEntry((((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))) + "_mult"), (99 / (99 - number))), IntegerEntry((toBase58String(i.caller.bytes) + "_bets"), (x + 1)), IntegerEntry((((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))) + "_value"), number), IntegerEntry((((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))) + "_result_number"), f), StringEntry(((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))), toBase58String(i.transactionId)), StringEntry((((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))) + "_ref"), ref1), IntegerEntry((((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))) + "_block"), height), IntegerEntry((((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))) + "_transfer_final"), transfer), StringEntry("last_tx_coinflip", toBase58String(i.transactionId)), reftx, StringEntry((((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))) + "_result"), result), txPay]
52+[IntegerEntry((((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))) + "_mult"), transfr), IntegerEntry((toBase58String(i.caller.bytes) + "_bets"), (x + 1)), IntegerEntry((((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))) + "_value"), number), IntegerEntry((((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))) + "_result_number"), f), StringEntry(((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))), toBase58String(i.transactionId)), StringEntry((((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))) + "_ref"), ref1), IntegerEntry((((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))) + "_block"), height), IntegerEntry((((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))) + "_transfer_final"), transfer), StringEntry("last_tx_coinflip", toBase58String(i.transactionId)), reftx, StringEntry((((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))) + "_result"), result), txPay]
5253 }
5354
5455
5556
5657 @Callable(i)
5758 func betCoinFlip (isHeads,ref) = if (if ((100000 > i.payments[0].amount))
5859 then true
5960 else (i.payments[0].amount > 1000000000))
6061 then throw("Invalid Waves amount. Min value: 0.1 Waves. Max Value: 10 Waves")
6162 else if ((i.payments[0].assetId != unit))
6263 then throw("Invalid assetId")
6364 else {
6465 let x = if (isDefined(getInteger((toBase58String(i.caller.bytes) + "_bets"))))
6566 then getIntegerValue((toBase58String(i.caller.bytes) + "_bets"))
6667 else 0
6768 let ref1 = if ((ref == ""))
6869 then toBase58String(this.bytes)
6970 else ref
7071 let toRef = ((i.payments[0].amount * 1) / 100)
7172 let lastTx = if (isDefined(getString("last_tx_bet")))
7273 then (isNegative(toInt(sha256(fromBase58String(getStringValue("last_tx_bet"))))) / bigIntHashDivisorCoinFLip)
7374 else (isNegative(toInt(sha256(sha256(i.transactionId)))) / bigIntHashDivisorCoinFLip)
7475 let txxz = (isNegative(toInt(sha256(i.transactionId))) / bigIntHashDivisorCoinFLip)
7576 let f = if ((txxz > lastTx))
7677 then (txxz - lastTx)
7778 else (lastTx - txxz)
7879 let result_w = if (if (if (if (if ((f == 0))
7980 then true
8081 else (f == 2))
8182 then true
8283 else (f == 4))
8384 then true
8485 else (f == 6))
8586 then true
8687 else (f == 8))
8788 then "heads"
8889 else "tails"
8990 let result = if (if (if (isHeads)
9091 then if (if (if (if ((f == 0))
9192 then true
9293 else (f == 2))
9394 then true
9495 else (f == 4))
9596 then true
9697 else (f == 6))
9798 then true
9899 else (f == 8)
99100 else false)
100101 then true
101102 else if (!(isHeads))
102103 then if (if (if (if ((f == 1))
103104 then true
104105 else (f == 3))
105106 then true
106107 else (f == 5))
107108 then true
108109 else (f == 7))
109110 then true
110111 else (f == 9)
111112 else false)
112113 then "win"
113114 else "loss"
114115 let transfer = if ((result == "win"))
115116 then (i.payments[0].amount * 2)
116117 else 0
117118 let txPay = if ((transfer == 0))
118119 then IntegerEntry(((toBase58String(this.bytes) + "_") + toBase58String(i.caller.bytes)), i.payments[0].amount)
119120 else ScriptTransfer(Address(i.caller.bytes), (i.payments[0].amount * 2), unit)
120121 let reftx = if ((ref1 == toBase58String(this.bytes)))
121122 then IntegerEntry((((toBase58String(this.bytes) + "_") + toBase58String(i.caller.bytes)) + "_ref"), toRef)
122123 else ScriptTransfer(Address(fromBase58String(ref1)), toRef, unit)
123124 [IntegerEntry((toBase58String(i.caller.bytes) + "_bets"), (x + 1)), BooleanEntry((((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))) + "_value"), isHeads), StringEntry(((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))), toBase58String(i.transactionId)), StringEntry((((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))) + "_ref"), ref1), IntegerEntry((((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))) + "_block"), height), StringEntry("last_tx_coinflip", toBase58String(i.transactionId)), StringEntry((((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))) + "_heads_or_tails"), result_w), reftx, StringEntry((((toBase58String(i.caller.bytes) + "_bet_") + toString((x + 1))) + "_result"), result), txPay]
124125 }
125126
126127
127128 @Verifier(tx)
128129 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
129130

github/deemru/w8io/169f3d6 
43.26 ms