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