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