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