tx · Dv9zBtX2HYdBs2d24SNFwg1y1eB5RBu6L5zEnqBxiHKb 3Mup4uG7mXS2N9Fuk3JtEpoKKmzA2PtQcUY: -0.01400000 Waves 2019.09.24 09:53 [690101] smart account 3Mup4uG7mXS2N9Fuk3JtEpoKKmzA2PtQcUY > SELF 0.00000000 Waves
{ "type": 13, "id": "Dv9zBtX2HYdBs2d24SNFwg1y1eB5RBu6L5zEnqBxiHKb", "fee": 1400000, "feeAssetId": null, "timestamp": 1569308051337, "version": 1, "sender": "3Mup4uG7mXS2N9Fuk3JtEpoKKmzA2PtQcUY", "senderPublicKey": "6VdgiscuZ9B1c2urnAVPPVaCS5afNjzf1RpG2SS3GUy6", "proofs": [ "5wiEayuJbo4XTmtKCqB95uG9h1ethPgiYTPkkVd1qDbJHoKwmMPzi1BKvPUBTaW8FmWwD5yqxZCsvQpGn6fTwZcC" ], "script": "base64:AAIDAAAAAAAAAAAAAAADAAAAAA1hY2NlcHRlZFRva2VuAQAAACDopWq8yndC8nBhMjVKT0WDubke5ZlnF8Nx6tkLoQSt6wAAAAAMY3VycmVudFByaWNlAAAAAFF9oCwAAAAAAARiYW5rAgAAACMzTjFFNnRYZGRSb1ZhUmZROWRRM3ZnNUxhVzJmc2Q4SEt1YgAAAAIAAAAGaW52b2tlAQAAABFmaWxlQ2VydGlmaWNhdGlvbgAAAAQAAAAEaGFzaAAAAAV0aXRsZQAAAAl0aW1lc3RhbXAAAAAEdXVpZAQAAAAHcGF5bWVudAkBAAAAB2V4dHJhY3QAAAABCAUAAAAGaW52b2tlAAAAB3BheW1lbnQEAAAABmFtb3VudAkBAAAAB2V4dHJhY3QAAAABCAUAAAAHcGF5bWVudAAAAAZhbW91bnQEAAAAAmlkCQEAAAAHZXh0cmFjdAAAAAEIBQAAAAZpbnZva2UAAAANdHJhbnNhY3Rpb25JZAQAAAAKZW50cnlFeGlzdAQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzCQABLAAAAAIJAAEsAAAAAgUAAA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GaW52b2tlAAAABmNhbGxlcgAAAAVieXRlcwUAAAAEZGF0YQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAFaGFzaF8JAAJYAAAAAQUAAAACaWQCAAAAAV8JAAJYAAAAAQgIBQAAAAZpbnZva2UAAAAGY2FsbGVyAAAABWJ5dGVzBQAAAARoYXNoBQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABBQAAAARiYW5rBQAAAAZhbW91bnQFAAAADWFjY2VwdGVkVG9rZW4FAAAAA25pbAAAAABFvJPx", "chainId": 84, "height": 690101, "spentComplexity": 0 } View: original | compacted Prev: 7HTPJoMsyRS7bNJQHEqgvYaLerny5V2owN2i2CkEyeA1 Next: 7tzC2AVBM3u75dXtAYHWJmciK6LBMRWgDd4dq6KwkUJh Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let acceptedToken = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a' | |
5 | 5 | ||
6 | 6 | let currentPrice = 350000000000 | |
7 | 7 | ||
8 | 8 | let bank = "3N1E6tXddRoVaRfQ9dQ3vg5LaW2fsd8HKub" | |
9 | 9 | ||
10 | 10 | @Callable(invoke) | |
11 | 11 | func fileCertification (hash,title,timestamp,uuid) = { | |
12 | 12 | let payment = extract(invoke.payment) | |
13 | 13 | let amount = extract(payment.amount) | |
14 | 14 | let id = extract(invoke.transactionId) | |
15 | 15 | let entryExist = match getString(this, ((hash + "_") + uuid)) { | |
16 | 16 | case a: String => | |
17 | 17 | a | |
18 | 18 | case _ => | |
19 | 19 | "NONE" | |
20 | 20 | } | |
21 | 21 | if ((entryExist != "NONE")) | |
22 | 22 | then throw("This entry already exist") | |
23 | 23 | else { | |
24 | 24 | let paymentAssetId = if (isDefined(payment.assetId)) | |
25 | 25 | then extract(payment.assetId) | |
26 | 26 | else throw("Waves is not accepted as payment") | |
27 | 27 | if ((paymentAssetId != acceptedToken)) | |
28 | 28 | then throw("Only payments in SIGN are allowed at the moment") | |
29 | 29 | else if ((amount != currentPrice)) | |
30 | 30 | then throw("The price is wrong") | |
31 | 31 | else ScriptResult(WriteSet([DataEntry(((hash + "_") + uuid), toBase58String(id)), DataEntry(((("timestamp" + toBase58String(id)) + "_") + toBase58String(invoke.caller.bytes)), timestamp), DataEntry(((("title_" + toBase58String(id)) + "_") + toBase58String(invoke.caller.bytes)), title), DataEntry(((("hash_" + toBase58String(id)) + "_") + toBase58String(invoke.caller.bytes)), hash)]), TransferSet([ScriptTransfer(addressFromStringValue(bank), amount, acceptedToken)])) | |
32 | 32 | } | |
33 | 33 | } | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | ||
37 | 37 | @Callable(invoke) | |
38 | 38 | func fileCertificationJson (hash,title,timestamp,uuid,data) = { | |
39 | 39 | let payment = extract(invoke.payment) | |
40 | 40 | let amount = extract(payment.amount) | |
41 | 41 | let id = extract(invoke.transactionId) | |
42 | 42 | let entryExist = match getString(this, ((hash + "_") + uuid)) { | |
43 | 43 | case a: String => | |
44 | 44 | a | |
45 | 45 | case _ => | |
46 | 46 | "NONE" | |
47 | 47 | } | |
48 | 48 | if ((entryExist != "NONE")) | |
49 | 49 | then throw("This entry already exist") | |
50 | 50 | else { | |
51 | 51 | let paymentAssetId = if (isDefined(payment.assetId)) | |
52 | 52 | then extract(payment.assetId) | |
53 | 53 | else throw("Waves is not accepted as payment") | |
54 | 54 | if ((paymentAssetId != acceptedToken)) | |
55 | 55 | then throw("Only payments in SIGN are allowed at the moment") | |
56 | 56 | else if ((amount != currentPrice)) | |
57 | 57 | then throw("The price is wrong") | |
58 | 58 | else ScriptResult(WriteSet([DataEntry(((hash + "_") + uuid), toBase58String(id)), DataEntry(((("timestamp" + toBase58String(id)) + "_") + toBase58String(invoke.caller.bytes)), timestamp), DataEntry(((("title_" + toBase58String(id)) + "_") + toBase58String(invoke.caller.bytes)), title), DataEntry(((("data_" + toBase58String(id)) + "_") + toBase58String(invoke.caller.bytes)), data), DataEntry(((("hash_" + toBase58String(id)) + "_") + toBase58String(invoke.caller.bytes)), hash)]), TransferSet([ScriptTransfer(addressFromStringValue(bank), amount, acceptedToken)])) | |
59 | 59 | } | |
60 | 60 | } | |
61 | 61 | ||
62 | 62 |
github/deemru/w8io/169f3d6 32.54 ms ◑