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