tx · CgvD1Xr11vKjBV3QBvdg53vDeyTWtRUYq2kJXr2k3wri 3N7eEzkCtBoWaNRe4ZuTPrChbnjBLKDb9Bx: -0.01000000 Waves 2023.05.24 16:34 [2592125] smart account 3N7eEzkCtBoWaNRe4ZuTPrChbnjBLKDb9Bx > SELF 0.00000000 Waves
{ "type": 13, "id": "CgvD1Xr11vKjBV3QBvdg53vDeyTWtRUYq2kJXr2k3wri", "fee": 1000000, "feeAssetId": null, "timestamp": 1684935245642, "version": 2, "chainId": 84, "sender": "3N7eEzkCtBoWaNRe4ZuTPrChbnjBLKDb9Bx", "senderPublicKey": "2NK7BrUZMvnHzAoHnJfz3FuDBP5zYUNoxshB49AH2kbc", "proofs": [ "2KW7WDGtCM7aYDomgjSxeyZNSx67R24A1fixng4StTm1mM3g8ZyzuUiPKX5JC1X23PVn2M2PPsR4d845tFHBDr8L" ], "script": "base64:BgIOCAISBQoDCAEIEgMKAQEAAgFpAQNmb28DBWRBcHAxAWEEa2V5MQQDcmVzCQD9BwQFBHRoaXMCA2JhcgkAzAgCAAAFA25pbAUDbmlsAwkAAAIFA3JlcwUDcmVzBAlpdGVyYXRpb24AXwMJAGYCBQlpdGVyYXRpb24FAWEJAJQKAgUDbmlsBQNyZXMJAMwIAgkBDEludGVnZXJFbnRyeQICBGNhbGwFAWEFA25pbAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgFpAQNiYXIBAWEJAJQKAgUDbmlsCQBkAgUBYQABAE+K3EY=", "height": 2592125, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FnwxsSvoiCPq72r5QcjKBqLBMQv7VK8BZdWwdBKiLQVX Next: EiVKPKVFmcTfz5zzxvFuXYij1Nnx5TkuhryrS2uZv4BR Diff:
Old | New | Differences | |
---|---|---|---|
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | - | func roulette () = { | |
8 | - | let bet = i.payments[0].amount | |
9 | - | let assetID = i.payments[0].assetId | |
10 | - | let c = "Ride" | |
11 | - | let cToByte = toInt(toBigInt(fromBase58String(c))) | |
12 | - | let randomNum = (((((((cToByte + toInt(i.callerPublicKey)) + lastBlock.height) + lastBlock.timestamp) + lastBlock.baseTarget) + bet) + i.fee) % 100) | |
13 | - | let winProbability = 40 | |
14 | - | let winTransfer = [ScriptTransfer(i.caller, (bet * 2), assetID)] | |
15 | - | let writeLastPlay = [IntegerEntry("lastPlay", randomNum)] | |
16 | - | if (!(isDefined(i.payments))) | |
17 | - | then throw("Should be with Payment in Waves") | |
18 | - | else if ((winProbability > randomNum)) | |
19 | - | then $Tuple2(winTransfer, writeLastPlay) | |
20 | - | else $Tuple2([ScriptTransfer(i.caller, 0, assetID)], writeLastPlay) | |
7 | + | func foo (dApp1,a,key1) = { | |
8 | + | let res = reentrantInvoke(this, "bar", [0], nil) | |
9 | + | if ((res == res)) | |
10 | + | then { | |
11 | + | let iteration = 95 | |
12 | + | if ((iteration > a)) | |
13 | + | then $Tuple2(nil, res) | |
14 | + | else [IntegerEntry("call", a)] | |
15 | + | } | |
16 | + | else throw("Strict value is not equal to itself.") | |
21 | 17 | } | |
22 | 18 | ||
23 | 19 | ||
24 | - | @Verifier(tx) | |
25 | - | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
20 | + | ||
21 | + | @Callable(i) | |
22 | + | func bar (a) = $Tuple2(nil, (a + 1)) | |
23 | + | ||
26 | 24 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | - | func roulette () = { | |
8 | - | let bet = i.payments[0].amount | |
9 | - | let assetID = i.payments[0].assetId | |
10 | - | let c = "Ride" | |
11 | - | let cToByte = toInt(toBigInt(fromBase58String(c))) | |
12 | - | let randomNum = (((((((cToByte + toInt(i.callerPublicKey)) + lastBlock.height) + lastBlock.timestamp) + lastBlock.baseTarget) + bet) + i.fee) % 100) | |
13 | - | let winProbability = 40 | |
14 | - | let winTransfer = [ScriptTransfer(i.caller, (bet * 2), assetID)] | |
15 | - | let writeLastPlay = [IntegerEntry("lastPlay", randomNum)] | |
16 | - | if (!(isDefined(i.payments))) | |
17 | - | then throw("Should be with Payment in Waves") | |
18 | - | else if ((winProbability > randomNum)) | |
19 | - | then $Tuple2(winTransfer, writeLastPlay) | |
20 | - | else $Tuple2([ScriptTransfer(i.caller, 0, assetID)], writeLastPlay) | |
7 | + | func foo (dApp1,a,key1) = { | |
8 | + | let res = reentrantInvoke(this, "bar", [0], nil) | |
9 | + | if ((res == res)) | |
10 | + | then { | |
11 | + | let iteration = 95 | |
12 | + | if ((iteration > a)) | |
13 | + | then $Tuple2(nil, res) | |
14 | + | else [IntegerEntry("call", a)] | |
15 | + | } | |
16 | + | else throw("Strict value is not equal to itself.") | |
21 | 17 | } | |
22 | 18 | ||
23 | 19 | ||
24 | - | @Verifier(tx) | |
25 | - | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
20 | + | ||
21 | + | @Callable(i) | |
22 | + | func bar (a) = $Tuple2(nil, (a + 1)) | |
23 | + | ||
26 | 24 |
github/deemru/w8io/169f3d6 61.72 ms ◑