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