tx · 69uqQUYX3CDjQa1YTz3kwWB4iiXLFijMFh6UtraechMN 3NAnvjoguSgEnqeYSaimuvvZ1cQV5MfTKu9: -0.00100000 Waves 2023.11.17 21:53 [2847747] smart account 3NAnvjoguSgEnqeYSaimuvvZ1cQV5MfTKu9 > SELF 0.00000000 Waves
{ "type": 13, "id": "69uqQUYX3CDjQa1YTz3kwWB4iiXLFijMFh6UtraechMN", "fee": 100000, "feeAssetId": null, "timestamp": 1700247217655, "version": 2, "chainId": 84, "sender": "3NAnvjoguSgEnqeYSaimuvvZ1cQV5MfTKu9", "senderPublicKey": "DWzrw3KWtGYzmgpbp3eWY7KBhDZEjEsKETQEgWC7w6vE", "proofs": [ "5Zgud6BWuv1e6EmBUs6TdRxKdKMkcicn6i3XvbSStQk8DcUMNs4JuHDafUQ6QUa9VBfAJwhPMiSctuMXRsXZTY9J" ], "script": "base64:BgIGCAISABIACQACZDgAgMLXLwAGcG9vbElkARoBV4WdLDDV/AM+YcWt3pK/xSqR85muGkFACgAKcG9vbFN0cmluZwkA2AQBBQZwb29sSWQABXBvb2wyARoBV/VGaCeADWjfTiZ1erSh0ygx4Am/9Xl5NwAHbWF0Y2hlcgkBB0FkZHJlc3MBARoBVA5jVal2yGzWtJpEN1JpoXzm/FeDavNBwwAFeHRuSWQBILYmKcME9c5TkaQOS3UkL2SMUbH6369UKb1I0h0qsqrRAAlidXJueHRuSWQBICRPdXlqfjM5uPsM/4SpcVxeyi3eM6DEXWn56kQR7ExUAA1idXJueHRuU3RyaW5nCQDYBAEFCWJ1cm54dG5JZAAHd2F2ZXNJZAEEE6vZMwIBaQEKZHJhd1dpbm5lcgADCQECIT0CCAUBaQZjYWxsZXIFBHRoaXMJAAIBAhxhY2Nlc3Mgb25seSBieSBwcm9qZWN0IG93bmVyBARyYW5kCQDLAQIJAMsBAgkAywECCQDLAQIJAMsBAgkAywECCAUBaQ10cmFuc2FjdGlvbklkCAUBaQ9jYWxsZXJQdWJsaWNLZXkIBQlsYXN0QmxvY2sTZ2VuZXJhdGlvblNpZ25hdHVyZQkAmgMBCAUJbGFzdEJsb2NrCXRpbWVzdGFtcAkAmgMBBQZoZWlnaHQJAJoDAQkA8AcCBQR0aGlzBQlidXJueHRuSWQJAJoDAQgJAO8HAQUHbWF0Y2hlcglhdmFpbGFibGUECHJhbmRIYXNoCQD3AwEFBHJhbmQEC3JhbmRIYXNoSW50CQCxCQEFCHJhbmRIYXNoBAZyZXN1bHQDCQBmAgAABQtyYW5kSGFzaEludAkAaAIA////////////AQULcmFuZEhhc2hJbnQFC3JhbmRIYXNoSW50CQDMCAIJAQtCaW5hcnlFbnRyeQICBHJhbmQFBHJhbmQJAMwIAgkBC0JpbmFyeUVudHJ5AgIIcmFuZGhhc2gFCHJhbmRIYXNoCQDMCAIJAQxJbnRlZ2VyRW50cnkCAgxyYW5kaGFzaCBpbnQFBnJlc3VsdAkAzAgCCQEMSW50ZWdlckVudHJ5AgIQcmVzdWx0IHJlbWFpbmRlcgkAagIFBnJlc3VsdADoBwkAzAgCAwkAZgIA9AMJAGoCBQZyZXN1bHQA6AcJAQxCb29sZWFuRW50cnkCAgN3aW4GCQEMQm9vbGVhbkVudHJ5AgIDd2luBwUDbmlsAWkBC2J1eV9sb3R0ZXJ5AAQDcG10CQEFdmFsdWUBCQCRAwIIBQFpCHBheW1lbnRzAAAFA25pbABikwz5", "height": 2847747, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AbZ69hMdXbZxaZkHmpP1L4k7GNmYLVrZtsFBKWo6yMsw Next: none Diff:
Old | New | Differences | |
---|---|---|---|
23 | 23 | func drawWinner () = if ((j.caller != this)) | |
24 | 24 | then throw("access only by project owner") | |
25 | 25 | else { | |
26 | - | let k = invoke(Address(base58'3PE7NtJdmVq4yo47LKDqurQ8RLDCouvJCPB'), "claimIndexRewards", nil, nil) | |
27 | - | if ((k == k)) | |
28 | - | then { | |
29 | - | let l = ((((((j.transactionId + j.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(height)) + toBytes(assetBalance(this, g))) + toBytes(wavesBalance(e).available)) | |
30 | - | let m = sha256(l) | |
31 | - | let n = toInt(m) | |
32 | - | let o = if ((0 > n)) | |
33 | - | then (-1 * n) | |
34 | - | else n | |
35 | - | [BinaryEntry("rand", l), BinaryEntry("randhash", m), IntegerEntry("randhash int", o), IntegerEntry("result remainder", (o % 1000)), if ((500 > (o % 1000))) | |
36 | - | then BooleanEntry("win", true) | |
37 | - | else BooleanEntry("win", false)] | |
38 | - | } | |
39 | - | else throw("Strict value is not equal to itself.") | |
26 | + | let k = ((((((j.transactionId + j.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(height)) + toBytes(assetBalance(this, g))) + toBytes(wavesBalance(e).available)) | |
27 | + | let l = sha256(k) | |
28 | + | let m = toInt(l) | |
29 | + | let n = if ((0 > m)) | |
30 | + | then (-1 * m) | |
31 | + | else m | |
32 | + | [BinaryEntry("rand", k), BinaryEntry("randhash", l), IntegerEntry("randhash int", n), IntegerEntry("result remainder", (n % 1000)), if ((500 > (n % 1000))) | |
33 | + | then BooleanEntry("win", true) | |
34 | + | else BooleanEntry("win", false)] | |
40 | 35 | } | |
41 | 36 | ||
42 | 37 | ||
43 | 38 | ||
44 | 39 | @Callable(j) | |
45 | 40 | func buy_lottery () = { | |
46 | - | let | |
41 | + | let o = value(j.payments[0]) | |
47 | 42 | nil | |
48 | 43 | } | |
49 | 44 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 100000000 | |
5 | 5 | ||
6 | 6 | let b = base58'3PE7NtJdmVq4yo47LKDqurQ8RLDCouvJCPB' | |
7 | 7 | ||
8 | 8 | let c = toBase58String(b) | |
9 | 9 | ||
10 | 10 | let d = base58'3PQHndCUVrv3wBuQjbvVP9SnGmfbfitGxfx' | |
11 | 11 | ||
12 | 12 | let e = Address(base58'3MqEAEVk1NcbRAuEPAX7nyzUqMHbhvRofez') | |
13 | 13 | ||
14 | 14 | let f = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p' | |
15 | 15 | ||
16 | 16 | let g = base58'3SjxA2YLdfF9fTRbzLm9xFn27C6MW34W1YsdJ6Axefns' | |
17 | 17 | ||
18 | 18 | let h = toBase58String(g) | |
19 | 19 | ||
20 | 20 | let i = base58'WAVES' | |
21 | 21 | ||
22 | 22 | @Callable(j) | |
23 | 23 | func drawWinner () = if ((j.caller != this)) | |
24 | 24 | then throw("access only by project owner") | |
25 | 25 | else { | |
26 | - | let k = invoke(Address(base58'3PE7NtJdmVq4yo47LKDqurQ8RLDCouvJCPB'), "claimIndexRewards", nil, nil) | |
27 | - | if ((k == k)) | |
28 | - | then { | |
29 | - | let l = ((((((j.transactionId + j.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(height)) + toBytes(assetBalance(this, g))) + toBytes(wavesBalance(e).available)) | |
30 | - | let m = sha256(l) | |
31 | - | let n = toInt(m) | |
32 | - | let o = if ((0 > n)) | |
33 | - | then (-1 * n) | |
34 | - | else n | |
35 | - | [BinaryEntry("rand", l), BinaryEntry("randhash", m), IntegerEntry("randhash int", o), IntegerEntry("result remainder", (o % 1000)), if ((500 > (o % 1000))) | |
36 | - | then BooleanEntry("win", true) | |
37 | - | else BooleanEntry("win", false)] | |
38 | - | } | |
39 | - | else throw("Strict value is not equal to itself.") | |
26 | + | let k = ((((((j.transactionId + j.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(height)) + toBytes(assetBalance(this, g))) + toBytes(wavesBalance(e).available)) | |
27 | + | let l = sha256(k) | |
28 | + | let m = toInt(l) | |
29 | + | let n = if ((0 > m)) | |
30 | + | then (-1 * m) | |
31 | + | else m | |
32 | + | [BinaryEntry("rand", k), BinaryEntry("randhash", l), IntegerEntry("randhash int", n), IntegerEntry("result remainder", (n % 1000)), if ((500 > (n % 1000))) | |
33 | + | then BooleanEntry("win", true) | |
34 | + | else BooleanEntry("win", false)] | |
40 | 35 | } | |
41 | 36 | ||
42 | 37 | ||
43 | 38 | ||
44 | 39 | @Callable(j) | |
45 | 40 | func buy_lottery () = { | |
46 | - | let | |
41 | + | let o = value(j.payments[0]) | |
47 | 42 | nil | |
48 | 43 | } | |
49 | 44 | ||
50 | 45 |
github/deemru/w8io/026f985 29.06 ms ◑