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