tx · 4ZxQHAqpRXPHcAYPPkb6hgnLU67PeQchTLdA6ya7x4uA
3N1Yvim93pdUR3fP1znzTYEhKnsb8fpqU55: -0.01000000 Waves
2022.06.06 01:39 [2083658] smart account 3N1Yvim93pdUR3fP1znzTYEhKnsb8fpqU55 > SELF 0.00000000 Waves
{
"type": 13,
"id": "4ZxQHAqpRXPHcAYPPkb6hgnLU67PeQchTLdA6ya7x4uA",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1654468798002,
"version": 2,
"chainId": 84,
"sender": "3N1Yvim93pdUR3fP1znzTYEhKnsb8fpqU55",
"senderPublicKey": "EK4tAXbeXpEJhAvZH4VHPBKw1A8dREMduJWrs1q6LgUs",
"proofs": [
"21dcAMjL7UhU5U6zN6WQopxj2cEc4xeU77yqLQfPr2nGUv2YPKSKcvvrsFh5qu2aKk2e2yJEfWWFGHtZaVdptmVV"
],
"script": "base64:AAIFAAAAAAAAABAIAhIDCgEIEgcKBQgICAgIAAAAAAAAAAIAAAABaQEAAAALYXJib29zQ2hlY2sAAAABAAAABGhhc2gEAAAABWZvdW5kBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMJAAEsAAAAAgIAAAAOdHJ4SWQtYnktaGFzaC0FAAAABGhhc2gDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQIAAAAAAwkBAAAAAiE9AAAAAgUAAAAFZm91bmQCAAAAAAkAAAIAAAABCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAMaGFzaCBleGlzdHMgBQAAAAVmb3VuZAIAAAAKIGZvciBmaWxlIAkBAAAAEUBleHRyTmF0aXZlKDEwNTMpAAAAAgUAAAAEdGhpcwkAASwAAAACAgAAABFmaWxlbmFtZS1ieS1oYXNoLQUAAAAEaGFzaAIAAAAEIGJ5IAkBAAAAEUBleHRyTmF0aXZlKDEwNTMpAAAAAgUAAAAEdGh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bWVudFVybAIAAAACIn0FAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5tqwvtA==",
"height": 2083658,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 8yiYYiPcNkvo72YXtN1uZM9mzb8KSk24GCq8dNmFDcUF
Next: none
Diff:
Old | New | | Differences |
---|
19 | 19 | | |
---|
20 | 20 | | |
---|
21 | 21 | | @Callable(i) |
---|
22 | | - | func arboosCertify (filename,fileAsSHA256,certifiedBy) = { |
---|
23 | | - | let found = match getString(this, ("trxId-by-hash-" + fileAsSHA256)) { |
---|
| 22 | + | func arboosCertify (filename,fileAsSHA256,certifiedBy,certifierId,documentUrl) = { |
---|
| 23 | + | let found = match getString(this, ("by-hash-" + fileAsSHA256)) { |
---|
24 | 24 | | case a: String => |
---|
25 | 25 | | a |
---|
26 | 26 | | case _ => |
---|
27 | 27 | | "" |
---|
28 | 28 | | } |
---|
29 | 29 | | if ((found != "")) |
---|
30 | | - | then throw(((((("hash exists " + found) + " for file ") + getStringValue(this, ("filename-by-hash-" + fileAsSHA256))) + " by ") + getStringValue(this, ("certifiedBy-by-hash-" + fileAsSHA256)))) |
---|
| 30 | + | then throw(((("hash exists " + fileAsSHA256) + " for ") + found)) |
---|
31 | 31 | | else { |
---|
32 | 32 | | let id = value(i.transactionId) |
---|
33 | | - | [StringEntry(("trxId-by-hash-" + fileAsSHA256), toBase58String(value(i.transactionId))), StringEntry(("filename-by-hash-" + fileAsSHA256), filename), StringEntry(("certifiedBy-by-hash-" + fileAsSHA256), certifiedBy)] |
---|
| 33 | + | [StringEntry(("by-hash-" + fileAsSHA256), (((((((((("{\"trxId\":\"" + toBase58String(value(i.transactionId))) + "\",\"filename\":\"") + filename) + "\",\"certifiedBy\":") + certifiedBy) + "\",\"certifierId\":\"") + certifierId) + "\",\"url\":\"") + documentUrl) + "\"}"))] |
---|
34 | 34 | | } |
---|
35 | 35 | | } |
---|
36 | 36 | | |
---|
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 | | - | func arboosCertify (filename,fileAsSHA256,certifiedBy) = { |
---|
23 | | - | let found = match getString(this, ("trxId-by-hash-" + fileAsSHA256)) { |
---|
| 22 | + | func arboosCertify (filename,fileAsSHA256,certifiedBy,certifierId,documentUrl) = { |
---|
| 23 | + | let found = match getString(this, ("by-hash-" + fileAsSHA256)) { |
---|
24 | 24 | | case a: String => |
---|
25 | 25 | | a |
---|
26 | 26 | | case _ => |
---|
27 | 27 | | "" |
---|
28 | 28 | | } |
---|
29 | 29 | | if ((found != "")) |
---|
30 | | - | then throw(((((("hash exists " + found) + " for file ") + getStringValue(this, ("filename-by-hash-" + fileAsSHA256))) + " by ") + getStringValue(this, ("certifiedBy-by-hash-" + fileAsSHA256)))) |
---|
| 30 | + | then throw(((("hash exists " + fileAsSHA256) + " for ") + found)) |
---|
31 | 31 | | else { |
---|
32 | 32 | | let id = value(i.transactionId) |
---|
33 | | - | [StringEntry(("trxId-by-hash-" + fileAsSHA256), toBase58String(value(i.transactionId))), StringEntry(("filename-by-hash-" + fileAsSHA256), filename), StringEntry(("certifiedBy-by-hash-" + fileAsSHA256), certifiedBy)] |
---|
| 33 | + | [StringEntry(("by-hash-" + fileAsSHA256), (((((((((("{\"trxId\":\"" + toBase58String(value(i.transactionId))) + "\",\"filename\":\"") + filename) + "\",\"certifiedBy\":") + certifiedBy) + "\",\"certifierId\":\"") + certifierId) + "\",\"url\":\"") + documentUrl) + "\"}"))] |
---|
34 | 34 | | } |
---|
35 | 35 | | } |
---|
36 | 36 | | |
---|
37 | 37 | | |
---|
38 | 38 | | @Verifier(tx) |
---|
39 | 39 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
40 | 40 | | |
---|