tx · J9XzMd5vLGowibNrZEwrgLzQcgzb8bec84X1PLi5nry
3MxwtQTF1cHZBzHdVMmfdeeTJAoF58usNzC: -0.01400000 Waves
2019.10.24 14:35 [734130] smart account 3MxwtQTF1cHZBzHdVMmfdeeTJAoF58usNzC > SELF 0.00000000 Waves
{
"type": 13,
"id": "J9XzMd5vLGowibNrZEwrgLzQcgzb8bec84X1PLi5nry",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1571917039072,
"version": 1,
"sender": "3MxwtQTF1cHZBzHdVMmfdeeTJAoF58usNzC",
"senderPublicKey": "AtB1c3RaAbi5bMXf4twdpm182Pcj5tgADufjhfxjt5YP",
"proofs": [
"4HKjk2YKK2f5WHnjXtLJhoD5yAejoFaX824mdKQMhYkigVQWS4Xz2YevgyN6FpWuFz3BiKnpV6uWYwBe3KmnuC19"
],
"script": "base64:AAIDAAAAAAAAAAQIARIAAAAAAgAAAAALb3duZXJQdWJLZXkBAAAAIJLVH1aKS7GiLdMgBtKumrDgMoaT5BFPrNSzSjm7iLMkAQAAAApyYW5kb21pemVyAAAAAQAAAANpbnYEAAAABGxhc3QEAAAAByRtYXRjaDAJAAQcAAAAAgUAAAAEdGhpcwIAAAAEdGVzdAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAKQnl0ZVZlY3RvcgQAAAABcwUAAAAHJG1hdGNoMAUAAAABcwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAEVW5pdAQAAAABYQUAAAAHJG1hdGNoMAEAAAAMV2F2ZXNMb3R0b1YyCQEAAAAFdGhyb3cAAAAABAAAAARyYW5kCQAAywAAAAIJAADLAAAAAgkAAMsAAAACCQAAywAAAAIJAADLAAAAAgUAAAAEbGFzdAgFAAAAA2ludgAAAA10cmFuc2FjdGlvbklkCAUAAAADaW52AAAAD2NhbGxlclB1YmxpY0tleQgFAAAACWxhc3RCbG9jawAAABNnZW5lcmF0aW9uU2lnbmF0dXJlCQABmgAAAAEIBQAAAAlsYXN0QmxvY2sAAAAJdGltZXN0YW1wCQABmgAAAAEIBQAAAAlsYXN0QmxvY2sAAAAGaGVpZ2h0CQAB9wAAAAEFAAAABHJhbmQAAAABAAAAA2ludgEAAAAEdGVzdAAAAAAJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAICAAAABHRlc3QJAABqAAAAAgkABLEAAAABCQEAAAAKcmFuZG9taXplcgAAAAEFAAAAA2ludgAAAAAAAAAACgUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBAAAAAF0BQAAAAckbWF0Y2gwCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAALb3duZXJQdWJLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAF0ludm9rZVNjcmlwdFRyYW5zYWN0aW9uBAAAAAFjBQAAAAckbWF0Y2gwBgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPRGF0YVRyYW5zYWN0aW9uBAAAAAFkBQAAAAckbWF0Y2gwBgfwPj54",
"chainId": 84,
"height": 734130,
"spentComplexity": 0
}
View: original | compacted
Prev: 2ytuT7dzFYGXBCEJ1tNGSNLYCgxKDpny1GeTeSiQ9jhp
Next: E9A2imsGF14Dwn8jDWh5B4Y3MhYY9fjnTvPxaRchtns3
Diff:
Old | New | | Differences |
---|
12 | 12 | | case _ => |
---|
13 | 13 | | throw() |
---|
14 | 14 | | } |
---|
15 | | - | let rand = ((((inv.transactionId + inv.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height)) |
---|
| 15 | + | let rand = (((((last + inv.transactionId) + inv.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height)) |
---|
16 | 16 | | sha256(rand) |
---|
17 | 17 | | } |
---|
18 | 18 | | |
---|
19 | 19 | | |
---|
20 | 20 | | @Callable(inv) |
---|
21 | | - | func test () = WriteSet([DataEntry("test", (toInt(randomizer(inv)) % 100))]) |
---|
| 21 | + | func test () = WriteSet([DataEntry("test", (toInt(randomizer(inv)) % 10))]) |
---|
22 | 22 | | |
---|
23 | 23 | | |
---|
24 | 24 | | @Verifier(tx) |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let ownerPubKey = base58'AtB1c3RaAbi5bMXf4twdpm182Pcj5tgADufjhfxjt5YP' |
---|
5 | 5 | | |
---|
6 | 6 | | func randomizer (inv) = { |
---|
7 | 7 | | let last = match getBinary(this, "test") { |
---|
8 | 8 | | case s: ByteVector => |
---|
9 | 9 | | s |
---|
10 | 10 | | case a: Unit => |
---|
11 | 11 | | base58'2ee4oFDYriWJ9EMeR' |
---|
12 | 12 | | case _ => |
---|
13 | 13 | | throw() |
---|
14 | 14 | | } |
---|
15 | | - | let rand = ((((inv.transactionId + inv.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height)) |
---|
| 15 | + | let rand = (((((last + inv.transactionId) + inv.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height)) |
---|
16 | 16 | | sha256(rand) |
---|
17 | 17 | | } |
---|
18 | 18 | | |
---|
19 | 19 | | |
---|
20 | 20 | | @Callable(inv) |
---|
21 | | - | func test () = WriteSet([DataEntry("test", (toInt(randomizer(inv)) % 100))]) |
---|
| 21 | + | func test () = WriteSet([DataEntry("test", (toInt(randomizer(inv)) % 10))]) |
---|
22 | 22 | | |
---|
23 | 23 | | |
---|
24 | 24 | | @Verifier(tx) |
---|
25 | 25 | | func verify () = match tx { |
---|
26 | 26 | | case t: SetScriptTransaction => |
---|
27 | 27 | | sigVerify(tx.bodyBytes, tx.proofs[0], ownerPubKey) |
---|
28 | 28 | | case c: InvokeScriptTransaction => |
---|
29 | 29 | | true |
---|
30 | 30 | | case d: DataTransaction => |
---|
31 | 31 | | true |
---|
32 | 32 | | case _ => |
---|
33 | 33 | | false |
---|
34 | 34 | | } |
---|
35 | 35 | | |
---|