tx · BiPxeH2DoWVMnNnvRipw2GNdxptzhik4NM3aZz4VNF29
3N6GuFb7Ucxs3cZjmwYDusKtfLaAigDtav5: -0.01000000 Waves
2023.05.29 14:52 [2599231] smart account 3N6GuFb7Ucxs3cZjmwYDusKtfLaAigDtav5 > SELF 0.00000000 Waves
{
"type": 13,
"id": "BiPxeH2DoWVMnNnvRipw2GNdxptzhik4NM3aZz4VNF29",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1685361135865,
"version": 2,
"chainId": 84,
"sender": "3N6GuFb7Ucxs3cZjmwYDusKtfLaAigDtav5",
"senderPublicKey": "EMAuwff72FwVoiJK9xHyuUUMbpKmgV5temqeLU2aEsiS",
"proofs": [
"AgvJwfzNHgHDUm6r3mfn3agbUBWr16NkQ4WNvHcE158bPtmVmfkdPxtfvNc72yZ25s7vaFqNr4yagP1MeGkZHqW"
],
"script": "base64:BgIOCAISABIAEgASABIAEgAEAQ9nZXRSYW5kb21OdW1iZXIABA9yYW5kb21TZWVkQmxvY2sJAQV2YWx1ZQEJAO0HAQACBApyYW5kb21IYXNoCQDUFgEJAQV2YWx1ZQEIBQ9yYW5kb21TZWVkQmxvY2sDdnJmCQCxCQEFCnJhbmRvbUhhc2gBEGdldFJhbmRvbU51bWJlcjIABA9yYW5kb21TZWVkQmxvY2sJAQV2YWx1ZQEJAO0HAQACBApyYW5kb21IYXNoCQDUFgEJAQV2YWx1ZQEIBQ9yYW5kb21TZWVkQmxvY2sDdnJmCQDaBAEFCnJhbmRvbUhhc2gBB3Rlc3Q1aDEBB2FkZHJlc3MJAMwIAgkBC1N0cmluZ0VudHJ5AgIIYWRkcmVzczIFB2FkZHJlc3MFA25pbAEEY2FsYwAAAwYBaQEFdGVzdDEABAZyZXN1bHQJAQRjYWxjAAkAlAoCBQNuaWwFBnJlc3VsdAFpAQV0ZXN0MwAEB2FkZHJlc3MJANgEAQgIBQFpBmNhbGxlcgVieXRlcwkAzAgCCQELU3RyaW5nRW50cnkCAgdhZGRyZXNzBQdhZGRyZXNzBQNuaWwBaQEFdGVzdDQABAdhZGRyZXNzCQDYBAEICAUBaQZjYWxsZXIFYnl0ZXMJAAIBBQdhZGRyZXNzAWkBBXRlc3Q1AAQHYWRkcmVzcwkA2AQBCAgFAWkGY2FsbGVyBWJ5dGVzCQEHdGVzdDVoMQEFB2FkZHJlc3MBaQEFdGVzdDYABAdhZGRyZXNzCQDYBAEICAUBaQZjYWxsZXIFYnl0ZXMEAXIJAQd0ZXN0NWgxAQUHYWRkcmVzcwkAAgEFB2FkZHJlc3MBaQEFdGVzdDcABAdhZGRyZXNzCQDYBAEICAUBaQZjYWxsZXIFYnl0ZXMEAXIJAKQDAQkBD2dldFJhbmRvbU51bWJlcgAJAAIBBQFyAI92t5Q=",
"height": 2599231,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: GFDz3zfQCWLqqVU9QCs6qTR4KQgdTCZUqWDKprTRMP9m
Next: 3aGBcw4J4swV2EM188wejH5c18xMTDcNjrDwNR2u2YF9
Diff:
Old | New | | Differences |
---|
5 | 5 | | let randomSeedBlock = value(blockInfoByHeight(2)) |
---|
6 | 6 | | let randomHash = sha256_16Kb(value(randomSeedBlock.vrf)) |
---|
7 | 7 | | toInt(randomHash) |
---|
| 8 | + | } |
---|
| 9 | + | |
---|
| 10 | + | |
---|
| 11 | + | func getRandomNumber2 () = { |
---|
| 12 | + | let randomSeedBlock = value(blockInfoByHeight(2)) |
---|
| 13 | + | let randomHash = sha256_16Kb(value(randomSeedBlock.vrf)) |
---|
| 14 | + | toBase64String(randomHash) |
---|
8 | 15 | | } |
---|
9 | 16 | | |
---|
10 | 17 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 6 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | func getRandomNumber () = { |
---|
5 | 5 | | let randomSeedBlock = value(blockInfoByHeight(2)) |
---|
6 | 6 | | let randomHash = sha256_16Kb(value(randomSeedBlock.vrf)) |
---|
7 | 7 | | toInt(randomHash) |
---|
| 8 | + | } |
---|
| 9 | + | |
---|
| 10 | + | |
---|
| 11 | + | func getRandomNumber2 () = { |
---|
| 12 | + | let randomSeedBlock = value(blockInfoByHeight(2)) |
---|
| 13 | + | let randomHash = sha256_16Kb(value(randomSeedBlock.vrf)) |
---|
| 14 | + | toBase64String(randomHash) |
---|
8 | 15 | | } |
---|
9 | 16 | | |
---|
10 | 17 | | |
---|
11 | 18 | | func test5h1 (address) = [StringEntry("address2", address)] |
---|
12 | 19 | | |
---|
13 | 20 | | |
---|
14 | 21 | | func calc () = 3 |
---|
15 | 22 | | |
---|
16 | 23 | | |
---|
17 | 24 | | @Callable(i) |
---|
18 | 25 | | func test1 () = { |
---|
19 | 26 | | let result = calc() |
---|
20 | 27 | | $Tuple2(nil, result) |
---|
21 | 28 | | } |
---|
22 | 29 | | |
---|
23 | 30 | | |
---|
24 | 31 | | |
---|
25 | 32 | | @Callable(i) |
---|
26 | 33 | | func test3 () = { |
---|
27 | 34 | | let address = toBase58String(i.caller.bytes) |
---|
28 | 35 | | [StringEntry("address", address)] |
---|
29 | 36 | | } |
---|
30 | 37 | | |
---|
31 | 38 | | |
---|
32 | 39 | | |
---|
33 | 40 | | @Callable(i) |
---|
34 | 41 | | func test4 () = { |
---|
35 | 42 | | let address = toBase58String(i.caller.bytes) |
---|
36 | 43 | | throw(address) |
---|
37 | 44 | | } |
---|
38 | 45 | | |
---|
39 | 46 | | |
---|
40 | 47 | | |
---|
41 | 48 | | @Callable(i) |
---|
42 | 49 | | func test5 () = { |
---|
43 | 50 | | let address = toBase58String(i.caller.bytes) |
---|
44 | 51 | | test5h1(address) |
---|
45 | 52 | | } |
---|
46 | 53 | | |
---|
47 | 54 | | |
---|
48 | 55 | | |
---|
49 | 56 | | @Callable(i) |
---|
50 | 57 | | func test6 () = { |
---|
51 | 58 | | let address = toBase58String(i.caller.bytes) |
---|
52 | 59 | | let r = test5h1(address) |
---|
53 | 60 | | throw(address) |
---|
54 | 61 | | } |
---|
55 | 62 | | |
---|
56 | 63 | | |
---|
57 | 64 | | |
---|
58 | 65 | | @Callable(i) |
---|
59 | 66 | | func test7 () = { |
---|
60 | 67 | | let address = toBase58String(i.caller.bytes) |
---|
61 | 68 | | let r = toString(getRandomNumber()) |
---|
62 | 69 | | throw(r) |
---|
63 | 70 | | } |
---|
64 | 71 | | |
---|
65 | 72 | | |
---|