tx · 8yiYYiPcNkvo72YXtN1uZM9mzb8KSk24GCq8dNmFDcUF
3N1Yvim93pdUR3fP1znzTYEhKnsb8fpqU55: -0.01000000 Waves
2022.06.05 22:36 [2083476] smart account 3N1Yvim93pdUR3fP1znzTYEhKnsb8fpqU55 > SELF 0.00000000 Waves
{
"type": 13,
"id": "8yiYYiPcNkvo72YXtN1uZM9mzb8KSk24GCq8dNmFDcUF",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1654457787078,
"version": 2,
"chainId": 84,
"sender": "3N1Yvim93pdUR3fP1znzTYEhKnsb8fpqU55",
"senderPublicKey": "EK4tAXbeXpEJhAvZH4VHPBKw1A8dREMduJWrs1q6LgUs",
"proofs": [
"36bHonQ3oDJ27pzkb2pLHsdUZBrSXPbrujVvUpe3WCiBFS73on4YdZx7ok7rz9KFPGaQmohMM1a3Zb2YG7GdFrJ1"
],
"script": "base64:AAIFAAAAAAAAAA4IAhIDCgEIEgUKAwgICAAAAAAAAAACAAAAAWkBAAAAC2FyYm9vc0NoZWNrAAAAAQAAAARoYXNoBAAAAAVmb3VuZAQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzCQABLAAAAAICAAAADnRyeElkLWJ5LWhhc2gtBQAAAARoYXNoAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWECAAAAAAMJAQAAAAIhPQAAAAIFAAAABWZvdW5kAgAAAAAJAAACAAAAAQkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAADGhhc2ggZXhpc3RzIAUAAAAFZm91bmQCAAAACiBmb3IgZmlsZSAJAQAAABFAZXh0ck5hdGl2ZSgxMDUzKQAAAAIFAAAABHRoaXMJAAEsAAAAAgIAAAARZmlsZW5hbWUtYnktaGFzaC0FAAAABGhhc2gCAAAABCBieSAJAQAAABFAZXh0ck5hdGl2ZSgxMDUzKQAAAAIFAAAABHRoaXMJAAE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bGVBc1NIQTI1NgUAAAAIZmlsZW5hbWUJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAASwAAAACAgAAABRjZXJ0aWZpZWRCeS1ieS1oYXNoLQUAAAAMZmlsZUFzU0hBMjU2BQAAAAtjZXJ0aWZpZWRCeQUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXke8i81",
"height": 2083476,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: Hcm8vFnCiVVtdjwFYHJVGPEgUtd3JB6QtJjVFvufacmy
Next: 4ZxQHAqpRXPHcAYPPkb6hgnLU67PeQchTLdA6ya7x4uA
Diff:
Old | New | | Differences |
---|
20 | 20 | | |
---|
21 | 21 | | @Callable(i) |
---|
22 | 22 | | func arboosCertify (filename,fileAsSHA256,certifiedBy) = { |
---|
23 | | - | let id = value(i.transactionId) |
---|
| 23 | + | let found = match getString(this, ("trxId-by-hash-" + fileAsSHA256)) { |
---|
| 24 | + | case a: String => |
---|
| 25 | + | a |
---|
| 26 | + | case _ => |
---|
| 27 | + | "" |
---|
| 28 | + | } |
---|
| 29 | + | if ((found != "")) |
---|
| 30 | + | then throw(((((("hash exists " + found) + " for file ") + getStringValue(this, ("filename-by-hash-" + fileAsSHA256))) + " by ") + getStringValue(this, ("certifiedBy-by-hash-" + fileAsSHA256)))) |
---|
| 31 | + | else { |
---|
| 32 | + | let id = value(i.transactionId) |
---|
24 | 33 | | [StringEntry(("trxId-by-hash-" + fileAsSHA256), toBase58String(value(i.transactionId))), StringEntry(("filename-by-hash-" + fileAsSHA256), filename), StringEntry(("certifiedBy-by-hash-" + fileAsSHA256), certifiedBy)] |
---|
| 34 | + | } |
---|
25 | 35 | | } |
---|
26 | 36 | | |
---|
27 | 37 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(i) |
---|
7 | 7 | | func arboosCheck (hash) = { |
---|
8 | 8 | | let found = match getString(this, ("trxId-by-hash-" + hash)) { |
---|
9 | 9 | | case a: String => |
---|
10 | 10 | | a |
---|
11 | 11 | | case _ => |
---|
12 | 12 | | "" |
---|
13 | 13 | | } |
---|
14 | 14 | | if ((found != "")) |
---|
15 | 15 | | then throw(((((("hash exists " + found) + " for file ") + getStringValue(this, ("filename-by-hash-" + hash))) + " by ") + getStringValue(this, ("certifiedBy-by-hash-" + hash)))) |
---|
16 | 16 | | else throw("hash not found") |
---|
17 | 17 | | } |
---|
18 | 18 | | |
---|
19 | 19 | | |
---|
20 | 20 | | |
---|
21 | 21 | | @Callable(i) |
---|
22 | 22 | | func arboosCertify (filename,fileAsSHA256,certifiedBy) = { |
---|
23 | | - | let id = value(i.transactionId) |
---|
| 23 | + | let found = match getString(this, ("trxId-by-hash-" + fileAsSHA256)) { |
---|
| 24 | + | case a: String => |
---|
| 25 | + | a |
---|
| 26 | + | case _ => |
---|
| 27 | + | "" |
---|
| 28 | + | } |
---|
| 29 | + | if ((found != "")) |
---|
| 30 | + | then throw(((((("hash exists " + found) + " for file ") + getStringValue(this, ("filename-by-hash-" + fileAsSHA256))) + " by ") + getStringValue(this, ("certifiedBy-by-hash-" + fileAsSHA256)))) |
---|
| 31 | + | else { |
---|
| 32 | + | let id = value(i.transactionId) |
---|
24 | 33 | | [StringEntry(("trxId-by-hash-" + fileAsSHA256), toBase58String(value(i.transactionId))), StringEntry(("filename-by-hash-" + fileAsSHA256), filename), StringEntry(("certifiedBy-by-hash-" + fileAsSHA256), certifiedBy)] |
---|
| 34 | + | } |
---|
25 | 35 | | } |
---|
26 | 36 | | |
---|
27 | 37 | | |
---|
28 | 38 | | @Verifier(tx) |
---|
29 | 39 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
30 | 40 | | |
---|