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 c = "3MzYLkQ6qCwtbxaYQ2yk1kdUudzbNg4JiTG" | |
9 | 9 | ||
10 | - | func d (e) = if ((size(e) == 35)) | |
11 | - | then (take(e, 2) == "3N") | |
12 | - | else false | |
10 | + | func d (e,f) = if (if ((size(f) == 35)) | |
11 | + | then (take(f, 2) == "3N") | |
12 | + | else false) | |
13 | + | then (e + 1) | |
14 | + | else (e + 0) | |
13 | 15 | ||
14 | 16 | ||
15 | - | func f (g,e) = if ((size(e) > 0)) | |
16 | - | then (g + 1) | |
17 | - | else (g + 0) | |
17 | + | func g (h) = take(drop(h, 1), value(indexOf(drop(h, 1), "\""))) | |
18 | 18 | ||
19 | 19 | ||
20 | - | func h (i) = take(drop(i, 1), value(indexOf(drop(i, 1), "\""))) | |
21 | - | ||
22 | - | ||
23 | - | func j (i,k) = { | |
24 | - | let l = value(indexOf(i, (("\"" + k) + "\":"))) | |
25 | - | let m = drop(i, ((l + size(k)) + 3)) | |
26 | - | let n = h(m) | |
27 | - | n | |
20 | + | func i (h,j) = { | |
21 | + | let k = value(indexOf(h, (("\"" + j) + "\":"))) | |
22 | + | let l = drop(h, ((k + size(j)) + 3)) | |
23 | + | let m = g(l) | |
24 | + | m | |
28 | 25 | } | |
29 | 26 | ||
30 | 27 | ||
31 | - | @Callable( | |
32 | - | func createAgreement (p,q | |
33 | - | let | |
34 | - | let | |
35 | - | let | |
36 | - | let | |
37 | - | let | |
38 | - | let | |
39 | - | let | |
40 | - | let | |
41 | - | let | |
42 | - | let | |
43 | - | let | |
44 | - | let | |
45 | - | let | |
46 | - | let | |
47 | - | if (( | |
48 | - | then | |
28 | + | @Callable(n) | |
29 | + | func createAgreement (o,p,q) = { | |
30 | + | let r = extract(n.payment) | |
31 | + | let s = extract(r.amount) | |
32 | + | let t = extract(n.transactionId) | |
33 | + | let u = i(q, "address1") | |
34 | + | let v = i(q, "address2") | |
35 | + | let w = i(q, "address3") | |
36 | + | let x = i(q, "address4") | |
37 | + | let y = i(q, "address5") | |
38 | + | let z = i(q, "address6") | |
39 | + | let A = [u, v, w, x, y, z] | |
40 | + | let B = { | |
41 | + | let C = A | |
42 | + | let D = size(C) | |
43 | + | let E = 0 | |
44 | + | if ((D == 0)) | |
45 | + | then E | |
49 | 46 | else { | |
50 | - | let | |
51 | - | if (( | |
52 | - | then | |
47 | + | let F = d(E, C[0]) | |
48 | + | if ((D == 1)) | |
49 | + | then F | |
53 | 50 | else { | |
54 | - | let | |
55 | - | if (( | |
56 | - | then | |
51 | + | let G = d(F, C[1]) | |
52 | + | if ((D == 2)) | |
53 | + | then G | |
57 | 54 | else { | |
58 | - | let | |
59 | - | if (( | |
60 | - | then | |
55 | + | let H = d(G, C[2]) | |
56 | + | if ((D == 3)) | |
57 | + | then H | |
61 | 58 | else { | |
62 | - | let | |
63 | - | if (( | |
64 | - | then | |
59 | + | let I = d(H, C[3]) | |
60 | + | if ((D == 4)) | |
61 | + | then I | |
65 | 62 | else { | |
66 | - | let | |
67 | - | if (( | |
68 | - | then | |
63 | + | let J = d(I, C[4]) | |
64 | + | if ((D == 5)) | |
65 | + | then J | |
69 | 66 | else { | |
70 | - | let | |
71 | - | if (( | |
72 | - | then | |
67 | + | let K = d(J, C[5]) | |
68 | + | if ((D == 6)) | |
69 | + | then K | |
73 | 70 | else { | |
74 | - | let | |
71 | + | let L = d(K, C[6]) | |
75 | 72 | throw("List size exceed 6") | |
76 | 73 | } | |
77 | 74 | } | |
81 | 78 | } | |
82 | 79 | } | |
83 | 80 | } | |
84 | - | let | |
85 | - | let | |
86 | - | then extract( | |
81 | + | let M = (((((((((((((((((("{id: '" + toBase58String(t)) + "', title: '") + p) + "' hash: '") + o) + "', address1: '") + A[0]) + "', address2: '") + A[1]) + "', address3: '") + A[2]) + "', address4: '") + A[3]) + "', address5: '") + A[4]) + "', address6: '") + A[5]) + "'}") | |
82 | + | let N = if (isDefined(r.assetId)) | |
83 | + | then extract(r.assetId) | |
87 | 84 | else throw("Waves is not accepted as payment") | |
88 | - | if (( | |
85 | + | if ((N != a)) | |
89 | 86 | then throw("Only payments in SIGN are allowed at the moment") | |
90 | - | else if (((b * | |
91 | - | then throw(("The price is wrong, it should be " + toString((b * | |
92 | - | else if (( | |
93 | - | then ScriptResult(WriteSet([DataEntry(("title_MA_" + toBase58String( | |
94 | - | else if (( | |
95 | - | then ScriptResult(WriteSet([DataEntry(("title_MA_" + toBase58String( | |
96 | - | else if (( | |
97 | - | then ScriptResult(WriteSet([DataEntry(("title_MA_" + toBase58String( | |
98 | - | else if (( | |
99 | - | then ScriptResult(WriteSet([DataEntry(("title_MA_" + toBase58String( | |
100 | - | else if (( | |
101 | - | then ScriptResult(WriteSet([DataEntry(("title_MA_" + toBase58String( | |
102 | - | else throw(("Needs 2 to 6 parties addresses" + toString( | |
87 | + | else if (((b * B) > s)) | |
88 | + | then throw(("The price is wrong, it should be " + toString((b * B)))) | |
89 | + | else if ((B == 6)) | |
90 | + | then ScriptResult(WriteSet([DataEntry(("title_MA_" + toBase58String(t)), p), DataEntry(("hash_MA_" + toBase58String(t)), o), DataEntry(("data_MA_" + toBase58String(t)), M), DataEntry(((A[0] + "_MA_") + toBase58String(t)), "PENDING"), DataEntry(((A[1] + "_MA_") + toBase58String(t)), "PENDING"), DataEntry(((A[2] + "_MA_") + toBase58String(t)), "PENDING"), DataEntry(((A[3] + "_MA_") + toBase58String(t)), "PENDING"), DataEntry(((A[4] + "_MA_") + toBase58String(t)), "PENDING"), DataEntry(((A[5] + "_MA_") + toBase58String(t)), "PENDING")]), TransferSet([ScriptTransfer(addressFromStringValue(c), s, a), ScriptTransfer(addressFromStringValue(A[0]), 0, a), ScriptTransfer(addressFromStringValue(A[1]), 0, a), ScriptTransfer(addressFromStringValue(A[2]), 0, a), ScriptTransfer(addressFromStringValue(A[3]), 0, a), ScriptTransfer(addressFromStringValue(A[4]), 0, a), ScriptTransfer(addressFromStringValue(A[5]), 0, a)])) | |
91 | + | else if ((B == 5)) | |
92 | + | then ScriptResult(WriteSet([DataEntry(("title_MA_" + toBase58String(t)), p), DataEntry(("hash_MA_" + toBase58String(t)), o), DataEntry(("data_MA_" + toBase58String(t)), M), DataEntry(((A[0] + "_MA_") + toBase58String(t)), "PENDING"), DataEntry(((A[1] + "_MA_") + toBase58String(t)), "PENDING"), DataEntry(((A[2] + "_MA_") + toBase58String(t)), "PENDING"), DataEntry(((A[3] + "_MA_") + toBase58String(t)), "PENDING"), DataEntry(((A[4] + "_MA_") + toBase58String(t)), "PENDING")]), TransferSet([ScriptTransfer(addressFromStringValue(c), s, a), ScriptTransfer(addressFromStringValue(A[0]), 0, a), ScriptTransfer(addressFromStringValue(A[1]), 0, a), ScriptTransfer(addressFromStringValue(A[2]), 0, a), ScriptTransfer(addressFromStringValue(A[3]), 0, a), ScriptTransfer(addressFromStringValue(A[4]), 0, a)])) | |
93 | + | else if ((B == 4)) | |
94 | + | then ScriptResult(WriteSet([DataEntry(("title_MA_" + toBase58String(t)), p), DataEntry(("hash_MA_" + toBase58String(t)), o), DataEntry(("data_MA_" + toBase58String(t)), M), DataEntry(((A[0] + "_MA_") + toBase58String(t)), "PENDING"), DataEntry(((A[1] + "_MA_") + toBase58String(t)), "PENDING"), DataEntry(((A[2] + "_MA_") + toBase58String(t)), "PENDING"), DataEntry(((A[3] + "_MA_") + toBase58String(t)), "PENDING")]), TransferSet([ScriptTransfer(addressFromStringValue(c), s, a), ScriptTransfer(addressFromStringValue(A[0]), 0, a), ScriptTransfer(addressFromStringValue(A[1]), 0, a), ScriptTransfer(addressFromStringValue(A[2]), 0, a), ScriptTransfer(addressFromStringValue(A[3]), 0, a)])) | |
95 | + | else if ((B == 3)) | |
96 | + | then ScriptResult(WriteSet([DataEntry(("title_MA_" + toBase58String(t)), p), DataEntry(("hash_MA_" + toBase58String(t)), o), DataEntry(("data_MA_" + toBase58String(t)), M), DataEntry(((A[0] + "_MA_") + toBase58String(t)), "PENDING"), DataEntry(((A[1] + "_MA_") + toBase58String(t)), "PENDING"), DataEntry(((A[2] + "_MA_") + toBase58String(t)), "PENDING")]), TransferSet([ScriptTransfer(addressFromStringValue(c), s, a), ScriptTransfer(addressFromStringValue(A[0]), 0, a), ScriptTransfer(addressFromStringValue(A[1]), 0, a), ScriptTransfer(addressFromStringValue(A[2]), 0, a)])) | |
97 | + | else if ((B == 2)) | |
98 | + | then ScriptResult(WriteSet([DataEntry(("title_MA_" + toBase58String(t)), p), DataEntry(("hash_MA_" + toBase58String(t)), o), DataEntry(("data_MA_" + toBase58String(t)), M), DataEntry(((A[0] + "_MA_") + toBase58String(t)), "PENDING"), DataEntry(((A[1] + "_MA_") + toBase58String(t)), "PENDING")]), TransferSet([ScriptTransfer(addressFromStringValue(c), s, a), ScriptTransfer(addressFromStringValue(A[0]), 0, a), ScriptTransfer(addressFromStringValue(A[1]), 0, a)])) | |
99 | + | else throw(("Needs 2 to 6 parties addresses" + toString(B))) | |
103 | 100 | } | |
104 | 101 | ||
105 | 102 | ||
106 | 103 | ||
107 | - | @Callable( | |
108 | - | func signAgreement ( | |
109 | - | let | |
110 | - | let | |
111 | - | let | |
112 | - | let | |
113 | - | let | |
114 | - | let | |
115 | - | if ($isInstanceOf( | |
104 | + | @Callable(n) | |
105 | + | func signAgreement (o,O) = { | |
106 | + | let r = extract(n.payment) | |
107 | + | let s = extract(r.amount) | |
108 | + | let t = extract(n.transactionId) | |
109 | + | let P = toBase58String(n.caller.bytes) | |
110 | + | let Q = { | |
111 | + | let R = getString(this, ((P + "_MA_") + toBase58String(t))) | |
112 | + | if ($isInstanceOf(R, "String")) | |
116 | 113 | then { | |
117 | - | let | |
118 | - | | |
114 | + | let S = R | |
115 | + | S | |
119 | 116 | } | |
120 | 117 | else throw("There is no corresponding signing request") | |
121 | 118 | } | |
122 | - | let | |
123 | - | then extract( | |
119 | + | let N = if (isDefined(r.assetId)) | |
120 | + | then extract(r.assetId) | |
124 | 121 | else throw("Waves is not accepted as payment") | |
125 | - | if (( | |
122 | + | if ((N != a)) | |
126 | 123 | then throw("Only payments in SIGN are allowed at the moment") | |
127 | - | else if (( | |
124 | + | else if ((s != b)) | |
128 | 125 | then throw("The price is wrong") | |
129 | - | else ScriptResult(WriteSet([DataEntry((( | |
126 | + | else ScriptResult(WriteSet([DataEntry(((P + "_MA_") + toBase58String(t)), "SIGNED")]), TransferSet([ScriptTransfer(addressFromStringValue(c), s, a)])) | |
130 | 127 | } | |
131 | 128 | ||
132 | 129 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a' | |
5 | 5 | ||
6 | 6 | let b = 250000000 | |
7 | 7 | ||
8 | 8 | let c = "3MzYLkQ6qCwtbxaYQ2yk1kdUudzbNg4JiTG" | |
9 | 9 | ||
10 | - | func d (e) = if ((size(e) == 35)) | |
11 | - | then (take(e, 2) == "3N") | |
12 | - | else false | |
10 | + | func d (e,f) = if (if ((size(f) == 35)) | |
11 | + | then (take(f, 2) == "3N") | |
12 | + | else false) | |
13 | + | then (e + 1) | |
14 | + | else (e + 0) | |
13 | 15 | ||
14 | 16 | ||
15 | - | func f (g,e) = if ((size(e) > 0)) | |
16 | - | then (g + 1) | |
17 | - | else (g + 0) | |
17 | + | func g (h) = take(drop(h, 1), value(indexOf(drop(h, 1), "\""))) | |
18 | 18 | ||
19 | 19 | ||
20 | - | func h (i) = take(drop(i, 1), value(indexOf(drop(i, 1), "\""))) | |
21 | - | ||
22 | - | ||
23 | - | func j (i,k) = { | |
24 | - | let l = value(indexOf(i, (("\"" + k) + "\":"))) | |
25 | - | let m = drop(i, ((l + size(k)) + 3)) | |
26 | - | let n = h(m) | |
27 | - | n | |
20 | + | func i (h,j) = { | |
21 | + | let k = value(indexOf(h, (("\"" + j) + "\":"))) | |
22 | + | let l = drop(h, ((k + size(j)) + 3)) | |
23 | + | let m = g(l) | |
24 | + | m | |
28 | 25 | } | |
29 | 26 | ||
30 | 27 | ||
31 | - | @Callable( | |
32 | - | func createAgreement (p,q | |
33 | - | let | |
34 | - | let | |
35 | - | let | |
36 | - | let | |
37 | - | let | |
38 | - | let | |
39 | - | let | |
40 | - | let | |
41 | - | let | |
42 | - | let | |
43 | - | let | |
44 | - | let | |
45 | - | let | |
46 | - | let | |
47 | - | if (( | |
48 | - | then | |
28 | + | @Callable(n) | |
29 | + | func createAgreement (o,p,q) = { | |
30 | + | let r = extract(n.payment) | |
31 | + | let s = extract(r.amount) | |
32 | + | let t = extract(n.transactionId) | |
33 | + | let u = i(q, "address1") | |
34 | + | let v = i(q, "address2") | |
35 | + | let w = i(q, "address3") | |
36 | + | let x = i(q, "address4") | |
37 | + | let y = i(q, "address5") | |
38 | + | let z = i(q, "address6") | |
39 | + | let A = [u, v, w, x, y, z] | |
40 | + | let B = { | |
41 | + | let C = A | |
42 | + | let D = size(C) | |
43 | + | let E = 0 | |
44 | + | if ((D == 0)) | |
45 | + | then E | |
49 | 46 | else { | |
50 | - | let | |
51 | - | if (( | |
52 | - | then | |
47 | + | let F = d(E, C[0]) | |
48 | + | if ((D == 1)) | |
49 | + | then F | |
53 | 50 | else { | |
54 | - | let | |
55 | - | if (( | |
56 | - | then | |
51 | + | let G = d(F, C[1]) | |
52 | + | if ((D == 2)) | |
53 | + | then G | |
57 | 54 | else { | |
58 | - | let | |
59 | - | if (( | |
60 | - | then | |
55 | + | let H = d(G, C[2]) | |
56 | + | if ((D == 3)) | |
57 | + | then H | |
61 | 58 | else { | |
62 | - | let | |
63 | - | if (( | |
64 | - | then | |
59 | + | let I = d(H, C[3]) | |
60 | + | if ((D == 4)) | |
61 | + | then I | |
65 | 62 | else { | |
66 | - | let | |
67 | - | if (( | |
68 | - | then | |
63 | + | let J = d(I, C[4]) | |
64 | + | if ((D == 5)) | |
65 | + | then J | |
69 | 66 | else { | |
70 | - | let | |
71 | - | if (( | |
72 | - | then | |
67 | + | let K = d(J, C[5]) | |
68 | + | if ((D == 6)) | |
69 | + | then K | |
73 | 70 | else { | |
74 | - | let | |
71 | + | let L = d(K, C[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 | - | let | |
85 | - | let | |
86 | - | then extract( | |
81 | + | let M = (((((((((((((((((("{id: '" + toBase58String(t)) + "', title: '") + p) + "' hash: '") + o) + "', address1: '") + A[0]) + "', address2: '") + A[1]) + "', address3: '") + A[2]) + "', address4: '") + A[3]) + "', address5: '") + A[4]) + "', address6: '") + A[5]) + "'}") | |
82 | + | let N = if (isDefined(r.assetId)) | |
83 | + | then extract(r.assetId) | |
87 | 84 | else throw("Waves is not accepted as payment") | |
88 | - | if (( | |
85 | + | if ((N != a)) | |
89 | 86 | then throw("Only payments in SIGN are allowed at the moment") | |
90 | - | else if (((b * | |
91 | - | then throw(("The price is wrong, it should be " + toString((b * | |
92 | - | else if (( | |
93 | - | then ScriptResult(WriteSet([DataEntry(("title_MA_" + toBase58String( | |
94 | - | else if (( | |
95 | - | then ScriptResult(WriteSet([DataEntry(("title_MA_" + toBase58String( | |
96 | - | else if (( | |
97 | - | then ScriptResult(WriteSet([DataEntry(("title_MA_" + toBase58String( | |
98 | - | else if (( | |
99 | - | then ScriptResult(WriteSet([DataEntry(("title_MA_" + toBase58String( | |
100 | - | else if (( | |
101 | - | then ScriptResult(WriteSet([DataEntry(("title_MA_" + toBase58String( | |
102 | - | else throw(("Needs 2 to 6 parties addresses" + toString( | |
87 | + | else if (((b * B) > s)) | |
88 | + | then throw(("The price is wrong, it should be " + toString((b * B)))) | |
89 | + | else if ((B == 6)) | |
90 | + | then ScriptResult(WriteSet([DataEntry(("title_MA_" + toBase58String(t)), p), DataEntry(("hash_MA_" + toBase58String(t)), o), DataEntry(("data_MA_" + toBase58String(t)), M), DataEntry(((A[0] + "_MA_") + toBase58String(t)), "PENDING"), DataEntry(((A[1] + "_MA_") + toBase58String(t)), "PENDING"), DataEntry(((A[2] + "_MA_") + toBase58String(t)), "PENDING"), DataEntry(((A[3] + "_MA_") + toBase58String(t)), "PENDING"), DataEntry(((A[4] + "_MA_") + toBase58String(t)), "PENDING"), DataEntry(((A[5] + "_MA_") + toBase58String(t)), "PENDING")]), TransferSet([ScriptTransfer(addressFromStringValue(c), s, a), ScriptTransfer(addressFromStringValue(A[0]), 0, a), ScriptTransfer(addressFromStringValue(A[1]), 0, a), ScriptTransfer(addressFromStringValue(A[2]), 0, a), ScriptTransfer(addressFromStringValue(A[3]), 0, a), ScriptTransfer(addressFromStringValue(A[4]), 0, a), ScriptTransfer(addressFromStringValue(A[5]), 0, a)])) | |
91 | + | else if ((B == 5)) | |
92 | + | then ScriptResult(WriteSet([DataEntry(("title_MA_" + toBase58String(t)), p), DataEntry(("hash_MA_" + toBase58String(t)), o), DataEntry(("data_MA_" + toBase58String(t)), M), DataEntry(((A[0] + "_MA_") + toBase58String(t)), "PENDING"), DataEntry(((A[1] + "_MA_") + toBase58String(t)), "PENDING"), DataEntry(((A[2] + "_MA_") + toBase58String(t)), "PENDING"), DataEntry(((A[3] + "_MA_") + toBase58String(t)), "PENDING"), DataEntry(((A[4] + "_MA_") + toBase58String(t)), "PENDING")]), TransferSet([ScriptTransfer(addressFromStringValue(c), s, a), ScriptTransfer(addressFromStringValue(A[0]), 0, a), ScriptTransfer(addressFromStringValue(A[1]), 0, a), ScriptTransfer(addressFromStringValue(A[2]), 0, a), ScriptTransfer(addressFromStringValue(A[3]), 0, a), ScriptTransfer(addressFromStringValue(A[4]), 0, a)])) | |
93 | + | else if ((B == 4)) | |
94 | + | then ScriptResult(WriteSet([DataEntry(("title_MA_" + toBase58String(t)), p), DataEntry(("hash_MA_" + toBase58String(t)), o), DataEntry(("data_MA_" + toBase58String(t)), M), DataEntry(((A[0] + "_MA_") + toBase58String(t)), "PENDING"), DataEntry(((A[1] + "_MA_") + toBase58String(t)), "PENDING"), DataEntry(((A[2] + "_MA_") + toBase58String(t)), "PENDING"), DataEntry(((A[3] + "_MA_") + toBase58String(t)), "PENDING")]), TransferSet([ScriptTransfer(addressFromStringValue(c), s, a), ScriptTransfer(addressFromStringValue(A[0]), 0, a), ScriptTransfer(addressFromStringValue(A[1]), 0, a), ScriptTransfer(addressFromStringValue(A[2]), 0, a), ScriptTransfer(addressFromStringValue(A[3]), 0, a)])) | |
95 | + | else if ((B == 3)) | |
96 | + | then ScriptResult(WriteSet([DataEntry(("title_MA_" + toBase58String(t)), p), DataEntry(("hash_MA_" + toBase58String(t)), o), DataEntry(("data_MA_" + toBase58String(t)), M), DataEntry(((A[0] + "_MA_") + toBase58String(t)), "PENDING"), DataEntry(((A[1] + "_MA_") + toBase58String(t)), "PENDING"), DataEntry(((A[2] + "_MA_") + toBase58String(t)), "PENDING")]), TransferSet([ScriptTransfer(addressFromStringValue(c), s, a), ScriptTransfer(addressFromStringValue(A[0]), 0, a), ScriptTransfer(addressFromStringValue(A[1]), 0, a), ScriptTransfer(addressFromStringValue(A[2]), 0, a)])) | |
97 | + | else if ((B == 2)) | |
98 | + | then ScriptResult(WriteSet([DataEntry(("title_MA_" + toBase58String(t)), p), DataEntry(("hash_MA_" + toBase58String(t)), o), DataEntry(("data_MA_" + toBase58String(t)), M), DataEntry(((A[0] + "_MA_") + toBase58String(t)), "PENDING"), DataEntry(((A[1] + "_MA_") + toBase58String(t)), "PENDING")]), TransferSet([ScriptTransfer(addressFromStringValue(c), s, a), ScriptTransfer(addressFromStringValue(A[0]), 0, a), ScriptTransfer(addressFromStringValue(A[1]), 0, a)])) | |
99 | + | else throw(("Needs 2 to 6 parties addresses" + toString(B))) | |
103 | 100 | } | |
104 | 101 | ||
105 | 102 | ||
106 | 103 | ||
107 | - | @Callable( | |
108 | - | func signAgreement ( | |
109 | - | let | |
110 | - | let | |
111 | - | let | |
112 | - | let | |
113 | - | let | |
114 | - | let | |
115 | - | if ($isInstanceOf( | |
104 | + | @Callable(n) | |
105 | + | func signAgreement (o,O) = { | |
106 | + | let r = extract(n.payment) | |
107 | + | let s = extract(r.amount) | |
108 | + | let t = extract(n.transactionId) | |
109 | + | let P = toBase58String(n.caller.bytes) | |
110 | + | let Q = { | |
111 | + | let R = getString(this, ((P + "_MA_") + toBase58String(t))) | |
112 | + | if ($isInstanceOf(R, "String")) | |
116 | 113 | then { | |
117 | - | let | |
118 | - | | |
114 | + | let S = R | |
115 | + | S | |
119 | 116 | } | |
120 | 117 | else throw("There is no corresponding signing request") | |
121 | 118 | } | |
122 | - | let | |
123 | - | then extract( | |
119 | + | let N = if (isDefined(r.assetId)) | |
120 | + | then extract(r.assetId) | |
124 | 121 | else throw("Waves is not accepted as payment") | |
125 | - | if (( | |
122 | + | if ((N != a)) | |
126 | 123 | then throw("Only payments in SIGN are allowed at the moment") | |
127 | - | else if (( | |
124 | + | else if ((s != b)) | |
128 | 125 | then throw("The price is wrong") | |
129 | - | else ScriptResult(WriteSet([DataEntry((( | |
126 | + | else ScriptResult(WriteSet([DataEntry(((P + "_MA_") + toBase58String(t)), "SIGNED")]), TransferSet([ScriptTransfer(addressFromStringValue(c), s, a)])) | |
130 | 127 | } | |
131 | 128 | ||
132 | 129 |
github/deemru/w8io/169f3d6 124.15 ms ◑