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