tx · 7TxoJfzsmTY4kCjXtwb4Rrio9Vm5m292D5RKdp53fR9B 3Moz6HJhucpFh4V3VScXhd9efei4Curytfj: -0.01000000 Waves 2023.10.28 17:52 [2818629] smart account 3Moz6HJhucpFh4V3VScXhd9efei4Curytfj > SELF 0.00000000 Waves
{ "type": 13, "id": "7TxoJfzsmTY4kCjXtwb4Rrio9Vm5m292D5RKdp53fR9B", "fee": 1000000, "feeAssetId": null, "timestamp": 1698504827006, "version": 2, "chainId": 84, "sender": "3Moz6HJhucpFh4V3VScXhd9efei4Curytfj", "senderPublicKey": "Ec1VLg3r1E7mwHmaNidmoKrFAUJ55UVJFq3J1YKRy5Zm", "proofs": [ "5uffz4NGnTfeNm8jiP7WQB2NTfvUEAwap1bkp2KWTbroSBqkiyWRmuUssNUGEDaUU6mjySmQiJaV27J2ZzkR6frk" ], "script": "base64:BgIHCAISAwoBEQwAB3NwZWNpZXMJAMwIAgILSXJpcy1zZXRvc2EJAMwIAgIPSXJpcy12ZXJzaWNvbG9yCQDMCAICDklyaXMtdmlyZ2luaWNhBQNuaWwAB3dlaWdodDEJAMwIAgkAzAgCAI0wCQDMCAIAhuj/////////AQkAzAgCAMZeCQDMCAIAmYcBBQNuaWwJAMwIAgkAzAgCAKDh/////////wEJAMwIAgD36/////////8BCQDMCAIAgOr/////////AQkAzAgCAIgDBQNuaWwJAMwIAgkAzAgCAOkzCQDMCAIArAIJAMwIAgCrWQkAzAgCAKVbBQNuaWwJAMwIAgkAzAgCALUgCQDMCAIAodn/////////AQkAzAgCAM/n/////////wEJAMwIAgCVBwUDbmlsCQDMCAIJAMwIAgCmMQkAzAgCALq3/////////wEJAMwIAgDERAkAzAgCAIoCBQNuaWwJAMwIAgkAzAgCAPH7/////////wEJAMwIAgDqKwkAzAgCANXo/////////wEJAMwIAgDNnf////////8BBQNuaWwJAMwIAgkAzAgCAMw2CQDMCAIAw9T/////////AQkAzAgCAPlZCQDMCAIA/XIFA25pbAkAzAgCCQDMCAIAgBUJAMwIAgCvLgkAzAgCALi1/////////wEJAMwIAgCIu/////////8BBQNuaWwJAMwIAgkAzAgCAKoSCQDMCAIApDQJAMwIAgCTzv////////8BCQDMCAIArJj/////////AQUDbmlsCQDMCAIJAMwIAgDkFgkAzAgCAPpUCQDMCAIAorH/////////AQkAzAgCAJSp/////////wEFA25pbAkAzAgCCQDMCAIAx+b/////////AQkAzAgCAJqUAQkAzAgCANaU/////////wEJAMwIAgCs7v7///////8BBQNuaWwJAMwIAgkAzAgCAK1TCQDMCAIA7sj/////////AQkAzAgCAL+DAQkAzAgCALuHAQUDbmlsBQNuaWwAB2JpYXNlczEJAMwIAgCR7v////////8BCQDMCAIA0Ob/////////AQkAzAgCAL7V/////////wEJAMwIAgCe4v////////8BCQDMCAIA8xwJAMwIAgDvWwkAzAgCAP/1/////////wEJAMwIAgCGWAkAzAgCAINjCQDMCAIA6F0JAMwIAgCNVAkAzAgCALzv/////////wEFA25pbAAHd2VpZ2h0MgkAzAgCCQDMCAIAvZL/////////AQkAzAgCANb+/////////wEJAMwIAgCYmv////////8BCQDMCAIAiBMJAMwIAgCjpP////////8BCQDMCAIAy2sJAMwIAgCzh/////////8BCQDMCAIAwGMJAMwIAgD0agkAzAgCAPJzCQDMCAIA8Y4BCQDMCAIAnp7/////////AQUDbmlsCQDMCAIJAMwIAgDt+f////////8BCQDMCAIAjQQJAMwIAgDW1P////////8BCQDMCAIA5P//////////AQkAzAgCAMIdCQDMCAIA0nIJAMwIAgDKAgkAzAgCAMJ4CQDMCAIAs2sJAMwIAgCXTgkAzAgCAKja/v///////wEJAMwIAgDRAwUDbmlsCQDMCAIJAMwIAgChMAkAzAgCAMUICQDMCAIAsEsJAMwIAgChDgkAzAgCALcKCQDMCAIAg97+////////AQkAzAgCAMY1CQDMCAIA17f+////////AQkAzAgCAJ26/v///////wEJAMwIAgCy8P7///////8BCQDMCAIAoLz/////////AQkAzAgCAKI8BQNuaWwFA25pbAAFYmlhczIJAMwIAgC3MwkAzAgCAMgyCQDM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MCBQZvdXRwdXQAAAkAkQMCBQZvdXRwdXQAAQAAAAEEBG1heDIDCQBmAgUEbWF4MQkAkQMCBQZvdXRwdXQAAgUEbWF4MQACBQRtYXgyAQFpAQpwcmVkaWN0aW9uAQVpbnB1dAQGb3V0cHV0CQEMZm9yd2FyZF9wcm9wAQUFaW5wdXQEDWNhbGxlckFkZHJlc3MJAKUIAQgFAWkGY2FsbGVyBARwcmVkCQEJZmluZF9wcmVkAQUGb3V0cHV0CQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFDWNhbGxlckFkZHJlc3MCAl8xCQCRAwIFBm91dHB1dAAACQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFDWNhbGxlckFkZHJlc3MCAl8yCQCRAwIFBm91dHB1dAABCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFDWNhbGxlckFkZHJlc3MCAl8zCQCRAwIFBm91dHB1dAACCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgUNY2FsbGVyQWRkcmVzcwICX3AJAJEDAgUHc3BlY2llcwUEcHJlZAUDbmlsAICFX34=", "height": 2818629, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3yXAAVQ7hMyV4mpM7j8V8iJYvsLoYdyi3DGY5qod2bQT Next: edHHWZhzMocFaEmRgCHdG39rnEcosEpcE9P1JVNUaNo Diff:
Old | New | Differences | |
---|---|---|---|
46 | 46 | ||
47 | 47 | ||
48 | 48 | func A (i) = { | |
49 | - | let | |
50 | - | let | |
51 | - | let | |
52 | - | [ | |
49 | + | let o = l(i, d[0], e[0]) | |
50 | + | let p = l(i, d[1], e[1]) | |
51 | + | let q = l(i, d[2], e[2]) | |
52 | + | [o, p, q] | |
53 | 53 | } | |
54 | 54 | ||
55 | 55 | ||
56 | - | func | |
57 | - | let | |
58 | - | let | |
59 | - | | |
56 | + | func B (i) = { | |
57 | + | let C = n(i) | |
58 | + | let D = A(C) | |
59 | + | D | |
60 | 60 | } | |
61 | 61 | ||
62 | 62 | ||
63 | - | func | |
64 | - | let | |
63 | + | func E (F) = { | |
64 | + | let G = if ((F[0] > F[1])) | |
65 | 65 | then 0 | |
66 | 66 | else 1 | |
67 | - | let | |
68 | - | then | |
67 | + | let H = if ((G > F[2])) | |
68 | + | then G | |
69 | 69 | else 2 | |
70 | - | | |
70 | + | H | |
71 | 71 | } | |
72 | 72 | ||
73 | 73 | ||
74 | - | @Callable( | |
74 | + | @Callable(I) | |
75 | 75 | func prediction (i) = { | |
76 | - | let | |
77 | - | let | |
78 | - | let | |
79 | - | [IntegerEntry(( | |
76 | + | let F = B(i) | |
77 | + | let J = toString(I.caller) | |
78 | + | let K = E(F) | |
79 | + | [IntegerEntry((J + "_1"), F[0]), IntegerEntry((J + "_2"), F[1]), IntegerEntry((J + "_3"), F[2]), StringEntry((J + "_p"), a[K])] | |
80 | 80 | } | |
81 | 81 | ||
82 | 82 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = ["Iris-setosa", "Iris-versicolor", "Iris-virginica"] | |
5 | 5 | ||
6 | 6 | let b = [[6157, -3066, 12102, 17305], [-3936, -2569, -2816, 392], [6633, 300, 11435, 11685], [4149, -4959, -3121, 917], [6310, -9286, 8772, 266], [-527, 5610, -2987, -12595], [6988, -5565, 11513, 14717], [2688, 5935, -9544, -8824], [2346, 6692, -6381, -13268], [2916, 10874, -10078, -11116], [-3257, 18970, -13738, -18644], [10669, -7058, 16831, 17339]] | |
7 | 7 | ||
8 | 8 | let c = [-2287, -3248, -5442, -3810, 3699, 11759, -1281, 11270, 12675, 12008, 10765, -2116] | |
9 | 9 | ||
10 | 10 | let d = [[-14019, -170, -13032, 2440, -11741, 13771, -15437, 12736, 13684, 14834, 18289, -12514], [-787, 525, -5546, -28, 3778, 14674, 330, 15426, 13747, 10007, -21208, 465], [6177, 1093, 9648, 1825, 1335, -20733, 6854, -25641, -25315, -18382, -8672, 7714]] | |
11 | 11 | ||
12 | 12 | let e = [6583, 6472, -4596] | |
13 | 13 | ||
14 | 14 | func f (g) = if ((g > 0)) | |
15 | 15 | then g | |
16 | 16 | else 0 | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func h (i,j,k) = { | |
20 | 20 | let h = (((((i[0] * j[0]) + (i[1] * j[1])) + (i[2] * j[2])) + (i[3] * j[3])) + k) | |
21 | 21 | h | |
22 | 22 | } | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | func l (i,j,k) = { | |
26 | 26 | let m = (((((((((((((i[0] * j[0]) + (i[1] * j[1])) + (i[2] * j[2])) + (i[3] * j[3])) + (i[4] * j[4])) + (i[5] * j[5])) + (i[6] * j[6])) + (i[7] * j[7])) + (i[8] * j[8])) + (i[9] * j[9])) + (i[10] * j[10])) + (i[11] * j[11])) + k) | |
27 | 27 | m | |
28 | 28 | } | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | func n (i) = { | |
32 | 32 | let o = f(h(i, b[0], c[0])) | |
33 | 33 | let p = f(h(i, b[1], c[1])) | |
34 | 34 | let q = f(h(i, b[2], c[2])) | |
35 | 35 | let r = f(h(i, b[3], c[3])) | |
36 | 36 | let s = f(h(i, b[4], c[4])) | |
37 | 37 | let t = f(h(i, b[5], c[5])) | |
38 | 38 | let u = f(h(i, b[6], c[6])) | |
39 | 39 | let v = f(h(i, b[7], c[7])) | |
40 | 40 | let w = f(h(i, b[8], c[8])) | |
41 | 41 | let x = f(h(i, b[9], c[9])) | |
42 | 42 | let y = f(h(i, b[10], c[10])) | |
43 | 43 | let z = f(h(i, b[11], c[11])) | |
44 | 44 | [o, p, q, r, s, t, u, v, w, x, y, z] | |
45 | 45 | } | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func A (i) = { | |
49 | - | let | |
50 | - | let | |
51 | - | let | |
52 | - | [ | |
49 | + | let o = l(i, d[0], e[0]) | |
50 | + | let p = l(i, d[1], e[1]) | |
51 | + | let q = l(i, d[2], e[2]) | |
52 | + | [o, p, q] | |
53 | 53 | } | |
54 | 54 | ||
55 | 55 | ||
56 | - | func | |
57 | - | let | |
58 | - | let | |
59 | - | | |
56 | + | func B (i) = { | |
57 | + | let C = n(i) | |
58 | + | let D = A(C) | |
59 | + | D | |
60 | 60 | } | |
61 | 61 | ||
62 | 62 | ||
63 | - | func | |
64 | - | let | |
63 | + | func E (F) = { | |
64 | + | let G = if ((F[0] > F[1])) | |
65 | 65 | then 0 | |
66 | 66 | else 1 | |
67 | - | let | |
68 | - | then | |
67 | + | let H = if ((G > F[2])) | |
68 | + | then G | |
69 | 69 | else 2 | |
70 | - | | |
70 | + | H | |
71 | 71 | } | |
72 | 72 | ||
73 | 73 | ||
74 | - | @Callable( | |
74 | + | @Callable(I) | |
75 | 75 | func prediction (i) = { | |
76 | - | let | |
77 | - | let | |
78 | - | let | |
79 | - | [IntegerEntry(( | |
76 | + | let F = B(i) | |
77 | + | let J = toString(I.caller) | |
78 | + | let K = E(F) | |
79 | + | [IntegerEntry((J + "_1"), F[0]), IntegerEntry((J + "_2"), F[1]), IntegerEntry((J + "_3"), F[2]), StringEntry((J + "_p"), a[K])] | |
80 | 80 | } | |
81 | 81 | ||
82 | 82 |
github/deemru/w8io/169f3d6 47.07 ms ◑