tx · BwtNn43nLxo8Qgtn6Y7QYARb5SvyiNYHtHBN3jCD5q59 3MrYoV4W5mu5ZP8rPspCXveMXusGstSPTjL: -0.01400000 Waves 2020.01.31 12:00 [878311] smart account 3MrYoV4W5mu5ZP8rPspCXveMXusGstSPTjL > SELF 0.00000000 Waves
{ "type": 13, "id": "BwtNn43nLxo8Qgtn6Y7QYARb5SvyiNYHtHBN3jCD5q59", "fee": 1400000, "feeAssetId": null, "timestamp": 1580461242703, "version": 1, "sender": "3MrYoV4W5mu5ZP8rPspCXveMXusGstSPTjL", "senderPublicKey": "f1NbgbpkRpbigsrHaDkWZAkPgcqd8GM5G5eNmqnTD6z", "proofs": [ "3nSw7BGtNNBhawpFjWanRgBFdhT7NVFGifLWQwACSYzE15MiWmH3agCG8dFLvpvAY96eh6bnA3jjmAs7kSj9vAqM" ], "script": "base64:AAIDAAAAAAAAAA8IARIFCgMICAgSBAoCCAgAAAAGAAAAAA1hY2NlcHRlZFRva2VuAQAAACDopWq8yndC8nBhMjVKT0WDubke5ZlnF8Nx6tkLoQSt6wAAAAAMY3VycmVudFByaWNlAAAAAAAO5rKAAAAAAARiYW5rAgAAACMzTXpZTGtRNnFDd3RieGFZUTJ5azFrZFV1ZHpiTmc0SmlURwEAAAAMY291bnRQYXJ0aWVzAAAAAgAAAAthY2N1bXVsYXRvcgAAAARhZGRyAwkAAAAAAAACCQABMQAAAAEFAAAABGFkZHIAAAAAAAAAACMJAABkAAAAAgUAAAALYWNjdW11bGF0b3IAAAAAAAAAAAEJAABkAAAAAgUAAAALYWNjdW11bGF0b3IAAAAAAAAAAAABAAAADmdldFZhbHVlU3RyaW5nAAAAAQAAAARqc29uCQABLwAAAAIJAAEwAAAAAgUAAAAEanNvbgAAAAAAAAAAAQkBAAAABXZhbHVlAAAAAQkABLMAAAACCQABMAAAAAIFAAAABGpzb24AAAAAAAAAAAECAAAAASIBAAAACGdldFZhbHVlAAAAAgAAAARqc29uAAAAA2tleQQAAAAIa2V5SW5kZXgJ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ACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIFAAAABnNpZ25lcgIAAAAEX01BXwkAAlgAAAABBQAAAAJpZAIAAAAGU0lHTkVEBQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABBQAAAARiYW5rBQAAAAZhbW91bnQFAAAADWFjY2VwdGVkVG9rZW4FAAAAA25pbAAAAADhZHW0", "chainId": 84, "height": 878311, "spentComplexity": 0 } View: original | compacted Prev: 3sR8iQMM7K8rw9W1bhMEUjgCNFhaHwseTPiBTtRQnuHr Next: 6NZgQj1w47GjxNBB8NuCDG4XDCj6RqxHVDriZQavcGhT Diff:
Old | New | Differences | |
---|---|---|---|
7 | 7 | ||
8 | 8 | let bank = "3MzYLkQ6qCwtbxaYQ2yk1kdUudzbNg4JiTG" | |
9 | 9 | ||
10 | - | func countParties (accumulator,addr) = if (if ((size(addr) == 35)) | |
11 | - | then (take(addr, 2) == "3N") | |
12 | - | else false) | |
10 | + | func countParties (accumulator,addr) = if ((size(addr) == 35)) | |
13 | 11 | then (accumulator + 1) | |
14 | 12 | else (accumulator + 0) | |
15 | 13 | ||
38 | 36 | let address6 = getValue(addresses, "address6") | |
39 | 37 | let addressesArray = [address1, address2, address3, address4, address5, address6] | |
40 | 38 | let totalAddresses = { | |
41 | - | let $ | |
42 | - | let $ | |
43 | - | let $ | |
44 | - | if (($ | |
45 | - | then $ | |
39 | + | let $list14931533 = addressesArray | |
40 | + | let $size14931533 = size($list14931533) | |
41 | + | let $acc014931533 = 0 | |
42 | + | if (($size14931533 == 0)) | |
43 | + | then $acc014931533 | |
46 | 44 | else { | |
47 | - | let $ | |
48 | - | if (($ | |
49 | - | then $ | |
45 | + | let $acc114931533 = countParties($acc014931533, $list14931533[0]) | |
46 | + | if (($size14931533 == 1)) | |
47 | + | then $acc114931533 | |
50 | 48 | else { | |
51 | - | let $ | |
52 | - | if (($ | |
53 | - | then $ | |
49 | + | let $acc214931533 = countParties($acc114931533, $list14931533[1]) | |
50 | + | if (($size14931533 == 2)) | |
51 | + | then $acc214931533 | |
54 | 52 | else { | |
55 | - | let $ | |
56 | - | if (($ | |
57 | - | then $ | |
53 | + | let $acc314931533 = countParties($acc214931533, $list14931533[2]) | |
54 | + | if (($size14931533 == 3)) | |
55 | + | then $acc314931533 | |
58 | 56 | else { | |
59 | - | let $ | |
60 | - | if (($ | |
61 | - | then $ | |
57 | + | let $acc414931533 = countParties($acc314931533, $list14931533[3]) | |
58 | + | if (($size14931533 == 4)) | |
59 | + | then $acc414931533 | |
62 | 60 | else { | |
63 | - | let $ | |
64 | - | if (($ | |
65 | - | then $ | |
61 | + | let $acc514931533 = countParties($acc414931533, $list14931533[4]) | |
62 | + | if (($size14931533 == 5)) | |
63 | + | then $acc514931533 | |
66 | 64 | else { | |
67 | - | let $ | |
68 | - | if (($ | |
69 | - | then $ | |
65 | + | let $acc614931533 = countParties($acc514931533, $list14931533[5]) | |
66 | + | if (($size14931533 == 6)) | |
67 | + | then $acc614931533 | |
70 | 68 | else { | |
71 | - | let $ | |
69 | + | let $acc714931533 = countParties($acc614931533, $list14931533[6]) | |
72 | 70 | throw("List size exceed 6") | |
73 | 71 | } | |
74 | 72 | } |
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 = 250000000 | |
7 | 7 | ||
8 | 8 | let bank = "3MzYLkQ6qCwtbxaYQ2yk1kdUudzbNg4JiTG" | |
9 | 9 | ||
10 | - | func countParties (accumulator,addr) = if (if ((size(addr) == 35)) | |
11 | - | then (take(addr, 2) == "3N") | |
12 | - | else false) | |
10 | + | func countParties (accumulator,addr) = if ((size(addr) == 35)) | |
13 | 11 | then (accumulator + 1) | |
14 | 12 | else (accumulator + 0) | |
15 | 13 | ||
16 | 14 | ||
17 | 15 | func getValueString (json) = take(drop(json, 1), value(indexOf(drop(json, 1), "\""))) | |
18 | 16 | ||
19 | 17 | ||
20 | 18 | func getValue (json,key) = { | |
21 | 19 | let keyIndex = value(indexOf(json, (("\"" + key) + "\":"))) | |
22 | 20 | let data = drop(json, ((keyIndex + size(key)) + 3)) | |
23 | 21 | let jsonValue = getValueString(data) | |
24 | 22 | jsonValue | |
25 | 23 | } | |
26 | 24 | ||
27 | 25 | ||
28 | 26 | @Callable(invoke) | |
29 | 27 | func createAgreement (hash,title,addresses) = { | |
30 | 28 | let payment = extract(invoke.payment) | |
31 | 29 | let amount = extract(payment.amount) | |
32 | 30 | let id = extract(invoke.transactionId) | |
33 | 31 | let address1 = getValue(addresses, "address1") | |
34 | 32 | let address2 = getValue(addresses, "address2") | |
35 | 33 | let address3 = getValue(addresses, "address3") | |
36 | 34 | let address4 = getValue(addresses, "address4") | |
37 | 35 | let address5 = getValue(addresses, "address5") | |
38 | 36 | let address6 = getValue(addresses, "address6") | |
39 | 37 | let addressesArray = [address1, address2, address3, address4, address5, address6] | |
40 | 38 | let totalAddresses = { | |
41 | - | let $ | |
42 | - | let $ | |
43 | - | let $ | |
44 | - | if (($ | |
45 | - | then $ | |
39 | + | let $list14931533 = addressesArray | |
40 | + | let $size14931533 = size($list14931533) | |
41 | + | let $acc014931533 = 0 | |
42 | + | if (($size14931533 == 0)) | |
43 | + | then $acc014931533 | |
46 | 44 | else { | |
47 | - | let $ | |
48 | - | if (($ | |
49 | - | then $ | |
45 | + | let $acc114931533 = countParties($acc014931533, $list14931533[0]) | |
46 | + | if (($size14931533 == 1)) | |
47 | + | then $acc114931533 | |
50 | 48 | else { | |
51 | - | let $ | |
52 | - | if (($ | |
53 | - | then $ | |
49 | + | let $acc214931533 = countParties($acc114931533, $list14931533[1]) | |
50 | + | if (($size14931533 == 2)) | |
51 | + | then $acc214931533 | |
54 | 52 | else { | |
55 | - | let $ | |
56 | - | if (($ | |
57 | - | then $ | |
53 | + | let $acc314931533 = countParties($acc214931533, $list14931533[2]) | |
54 | + | if (($size14931533 == 3)) | |
55 | + | then $acc314931533 | |
58 | 56 | else { | |
59 | - | let $ | |
60 | - | if (($ | |
61 | - | then $ | |
57 | + | let $acc414931533 = countParties($acc314931533, $list14931533[3]) | |
58 | + | if (($size14931533 == 4)) | |
59 | + | then $acc414931533 | |
62 | 60 | else { | |
63 | - | let $ | |
64 | - | if (($ | |
65 | - | then $ | |
61 | + | let $acc514931533 = countParties($acc414931533, $list14931533[4]) | |
62 | + | if (($size14931533 == 5)) | |
63 | + | then $acc514931533 | |
66 | 64 | else { | |
67 | - | let $ | |
68 | - | if (($ | |
69 | - | then $ | |
65 | + | let $acc614931533 = countParties($acc514931533, $list14931533[5]) | |
66 | + | if (($size14931533 == 6)) | |
67 | + | then $acc614931533 | |
70 | 68 | else { | |
71 | - | let $ | |
69 | + | let $acc714931533 = countParties($acc614931533, $list14931533[6]) | |
72 | 70 | throw("List size exceed 6") | |
73 | 71 | } | |
74 | 72 | } | |
75 | 73 | } | |
76 | 74 | } | |
77 | 75 | } | |
78 | 76 | } | |
79 | 77 | } | |
80 | 78 | } | |
81 | 79 | let agreementDataObject = (((((((((((((((((("{id: '" + toBase58String(id)) + "', title: '") + title) + "' hash: '") + hash) + "', address1: '") + addressesArray[0]) + "', address2: '") + addressesArray[1]) + "', address3: '") + addressesArray[2]) + "', address4: '") + addressesArray[3]) + "', address5: '") + addressesArray[4]) + "', address6: '") + addressesArray[5]) + "'}") | |
82 | 80 | let paymentAssetId = if (isDefined(payment.assetId)) | |
83 | 81 | then extract(payment.assetId) | |
84 | 82 | else throw("Waves is not accepted as payment") | |
85 | 83 | if ((paymentAssetId != acceptedToken)) | |
86 | 84 | then throw("Only payments in SIGN are allowed at the moment") | |
87 | 85 | else if (((currentPrice * totalAddresses) > amount)) | |
88 | 86 | then throw(("The price is wrong, it should be " + toString((currentPrice * totalAddresses)))) | |
89 | 87 | else if ((totalAddresses == 6)) | |
90 | 88 | then ScriptResult(WriteSet([DataEntry(("title_MA_" + toBase58String(id)), title), DataEntry(("hash_MA_" + toBase58String(id)), hash), DataEntry(("data_MA_" + toBase58String(id)), agreementDataObject), DataEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[2] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[3] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[4] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[5] + "_MA_") + toBase58String(id)), "PENDING")]), TransferSet([ScriptTransfer(addressFromStringValue(bank), amount, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[1]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[2]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[3]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[4]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[5]), 0, acceptedToken)])) | |
91 | 89 | else if ((totalAddresses == 5)) | |
92 | 90 | then ScriptResult(WriteSet([DataEntry(("title_MA_" + toBase58String(id)), title), DataEntry(("hash_MA_" + toBase58String(id)), hash), DataEntry(("data_MA_" + toBase58String(id)), agreementDataObject), DataEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[2] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[3] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[4] + "_MA_") + toBase58String(id)), "PENDING")]), TransferSet([ScriptTransfer(addressFromStringValue(bank), amount, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[1]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[2]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[3]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[4]), 0, acceptedToken)])) | |
93 | 91 | else if ((totalAddresses == 4)) | |
94 | 92 | then ScriptResult(WriteSet([DataEntry(("title_MA_" + toBase58String(id)), title), DataEntry(("hash_MA_" + toBase58String(id)), hash), DataEntry(("data_MA_" + toBase58String(id)), agreementDataObject), DataEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[2] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[3] + "_MA_") + toBase58String(id)), "PENDING")]), TransferSet([ScriptTransfer(addressFromStringValue(bank), amount, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[1]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[2]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[3]), 0, acceptedToken)])) | |
95 | 93 | else if ((totalAddresses == 3)) | |
96 | 94 | then ScriptResult(WriteSet([DataEntry(("title_MA_" + toBase58String(id)), title), DataEntry(("hash_MA_" + toBase58String(id)), hash), DataEntry(("data_MA_" + toBase58String(id)), agreementDataObject), DataEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[2] + "_MA_") + toBase58String(id)), "PENDING")]), TransferSet([ScriptTransfer(addressFromStringValue(bank), amount, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[1]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[2]), 0, acceptedToken)])) | |
97 | 95 | else if ((totalAddresses == 2)) | |
98 | 96 | then ScriptResult(WriteSet([DataEntry(("title_MA_" + toBase58String(id)), title), DataEntry(("hash_MA_" + toBase58String(id)), hash), DataEntry(("data_MA_" + toBase58String(id)), agreementDataObject), DataEntry(((addressesArray[0] + "_MA_") + toBase58String(id)), "PENDING"), DataEntry(((addressesArray[1] + "_MA_") + toBase58String(id)), "PENDING")]), TransferSet([ScriptTransfer(addressFromStringValue(bank), amount, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[0]), 0, acceptedToken), ScriptTransfer(addressFromStringValue(addressesArray[1]), 0, acceptedToken)])) | |
99 | 97 | else throw(("Needs 2 to 6 parties addresses" + toString(totalAddresses))) | |
100 | 98 | } | |
101 | 99 | ||
102 | 100 | ||
103 | 101 | ||
104 | 102 | @Callable(invoke) | |
105 | 103 | func signAgreement (hash,agreementId) = { | |
106 | 104 | let payment = extract(invoke.payment) | |
107 | 105 | let amount = extract(payment.amount) | |
108 | 106 | let id = extract(invoke.transactionId) | |
109 | 107 | let signer = toBase58String(invoke.caller.bytes) | |
110 | 108 | let signingRequestExist = match getString(this, ((signer + "_MA_") + toBase58String(id))) { | |
111 | 109 | case s: String => | |
112 | 110 | s | |
113 | 111 | case _ => | |
114 | 112 | throw("There is no corresponding signing request") | |
115 | 113 | } | |
116 | 114 | let paymentAssetId = if (isDefined(payment.assetId)) | |
117 | 115 | then extract(payment.assetId) | |
118 | 116 | else throw("Waves is not accepted as payment") | |
119 | 117 | if ((paymentAssetId != acceptedToken)) | |
120 | 118 | then throw("Only payments in SIGN are allowed at the moment") | |
121 | 119 | else if ((amount != currentPrice)) | |
122 | 120 | then throw("The price is wrong") | |
123 | 121 | else ScriptResult(WriteSet([DataEntry(((signer + "_MA_") + toBase58String(id)), "SIGNED")]), TransferSet([ScriptTransfer(addressFromStringValue(bank), amount, acceptedToken)])) | |
124 | 122 | } | |
125 | 123 | ||
126 | 124 |
github/deemru/w8io/169f3d6 55.33 ms ◑