tx · 3cqDnxiCg1tgoY2X9vm4L1xoatQgw1BxhY7MFhhAesE1 3N2NxcCJZYHSbvZ9pyJYKWfg4fKCYU1GXwH: -0.01400000 Waves 2020.08.07 12:24 [1121811] smart account 3N2NxcCJZYHSbvZ9pyJYKWfg4fKCYU1GXwH > SELF 0.00000000 Waves
{ "type": 13, "id": "3cqDnxiCg1tgoY2X9vm4L1xoatQgw1BxhY7MFhhAesE1", "fee": 1400000, "feeAssetId": null, "timestamp": 1596792291302, "version": 1, "sender": "3N2NxcCJZYHSbvZ9pyJYKWfg4fKCYU1GXwH", "senderPublicKey": "LdbMCsMtBhKvik7gzS8Sc8v1ey9WEH1JiuRYajzkTLt", "proofs": [ "253APg3F77GmRodVhbfUVcVHh8FEg7qeKGaxJrPVn6TH4ADr7Lj8JuJRysANcCF5ZTGRquYcG9wwmPnLFYRdpcHc" ], "script": "base64:AAIDAAAAAAAAAAwIARIDCgEIEgMKAQgAAAAAAAAAAgAAAApjb250ZXh0T2JqAQAAAAxvcmFjbGVVcGRhdGUAAAABAAAADWFkZHJlc3NTdHJpbmcEAAAAB2FkZHJlc3MJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQUAAAANYWRkcmVzc1N0cmluZwQAAAAMYW1vdW50VG9rZW5BBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAAB2FkZHJlc3MCAAAADGFtb3VudFRva2VuQQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFzBQAAAAckbWF0Y2gwBgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAEVW5pdAQAAAABdQUAAAAHJG1hdGNoMAkAAAIAAAABAgAAABphbW91bnRUb2tlbkEgaXNuJ3QgZGVmaWVuZAkBAAAABXRocm93AAAAAAQAAAAMYW1vdW50VG9rZW5CBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAAB2FkZHJlc3MCAAAADGFtb3VudFRva2VuQgMJAAABAAAAAgUAAAAHJG1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FAAAADGFtb3VudFRva2VuQQIAAAAJd2l0aGRyYXduCQAAAAAAAAIFAAAADGFtb3VudFRva2VuQgIAAAAJd2l0aGRyYXduBwkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAANYWRkcmVzc1N0cmluZwcFAAAAA25pbAkAAAIAAAABAgAAAA1vcmFjbGUgcmVqZWN0AAAAAIahl3I=", "chainId": 84, "height": 1121811, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | ||
5 | + | ||
6 | + | @Callable(contextObj) | |
7 | + | func oracleUpdate (addressString) = { | |
8 | + | let address = addressFromStringValue(addressString) | |
9 | + | let amountTokenA = match getInteger(address, "amountTokenA") { | |
10 | + | case s: Int => | |
11 | + | true | |
12 | + | case u: Unit => | |
13 | + | throw("amountTokenA isn't defiend") | |
14 | + | case _ => | |
15 | + | throw() | |
16 | + | } | |
17 | + | let amountTokenB = match getInteger(address, "amountTokenB") { | |
18 | + | case s: Int => | |
19 | + | true | |
20 | + | case u: Unit => | |
21 | + | throw("amountTokenB isn't defiend") | |
22 | + | case _ => | |
23 | + | throw() | |
24 | + | } | |
25 | + | let assetIdTokenA = match getString(address, "assetIdTokenA") { | |
26 | + | case s: String => | |
27 | + | true | |
28 | + | case u: Unit => | |
29 | + | throw("assetIdTokenA isn't defiend") | |
30 | + | case _ => | |
31 | + | throw() | |
32 | + | } | |
33 | + | let assetIdTokenB = match getString(address, "assetIdTokenB") { | |
34 | + | case s: String => | |
35 | + | true | |
36 | + | case u: Unit => | |
37 | + | throw("assetIdTokenB isn't defiend") | |
38 | + | case _ => | |
39 | + | throw() | |
40 | + | } | |
41 | + | let comission = match getInteger(address, "comission") { | |
42 | + | case s: Int => | |
43 | + | true | |
44 | + | case u: Unit => | |
45 | + | throw("comission isn't defiend") | |
46 | + | case _ => | |
47 | + | throw() | |
48 | + | } | |
49 | + | let exchangecount = match getInteger(address, "exchange_count") { | |
50 | + | case s: Int => | |
51 | + | true | |
52 | + | case u: Unit => | |
53 | + | throw("exchange_count isn't defiend") | |
54 | + | case _ => | |
55 | + | throw() | |
56 | + | } | |
57 | + | let fundA = match getBoolean(address, "fundA") { | |
58 | + | case s: Boolean => | |
59 | + | true | |
60 | + | case u: Unit => | |
61 | + | throw("fundA isn't defiend") | |
62 | + | case _ => | |
63 | + | throw() | |
64 | + | } | |
65 | + | let fundB = match getBoolean(address, "fundB") { | |
66 | + | case s: Boolean => | |
67 | + | true | |
68 | + | case u: Unit => | |
69 | + | throw("fundB isn't defiend") | |
70 | + | case _ => | |
71 | + | throw() | |
72 | + | } | |
73 | + | let owner = match getString(address, "owner") { | |
74 | + | case s: String => | |
75 | + | true | |
76 | + | case u: Unit => | |
77 | + | throw("owner isn't defiend") | |
78 | + | case _ => | |
79 | + | throw() | |
80 | + | } | |
81 | + | if (if (if (if (if (if (if (if (if (amountTokenA) | |
82 | + | then amountTokenB | |
83 | + | else false) | |
84 | + | then assetIdTokenA | |
85 | + | else false) | |
86 | + | then assetIdTokenB | |
87 | + | else false) | |
88 | + | then comission | |
89 | + | else false) | |
90 | + | then exchangecount | |
91 | + | else false) | |
92 | + | then fundA | |
93 | + | else false) | |
94 | + | then fundB | |
95 | + | else false) | |
96 | + | then owner | |
97 | + | else false) | |
98 | + | then WriteSet([DataEntry(addressString, true)]) | |
99 | + | else throw("oracle reject") | |
100 | + | } | |
101 | + | ||
102 | + | ||
103 | + | ||
104 | + | @Callable(contextObj) | |
105 | + | func oracleDelete (addressString) = { | |
106 | + | let address = addressFromStringValue(addressString) | |
107 | + | let amountTokenA = match getString(address, "amountTokenA") { | |
108 | + | case s: String => | |
109 | + | s | |
110 | + | case u: Unit => | |
111 | + | throw("amountTokenA isn't defiend") | |
112 | + | case _ => | |
113 | + | throw() | |
114 | + | } | |
115 | + | let amountTokenB = match getString(address, "amountTokenB") { | |
116 | + | case s: String => | |
117 | + | s | |
118 | + | case u: Unit => | |
119 | + | throw("amountTokenB isn't defiend") | |
120 | + | case _ => | |
121 | + | throw() | |
122 | + | } | |
123 | + | if (if ((amountTokenA == "withdrawn")) | |
124 | + | then (amountTokenB == "withdrawn") | |
125 | + | else false) | |
126 | + | then WriteSet([DataEntry(addressString, false)]) | |
127 | + | else throw("oracle reject") | |
128 | + | } | |
129 | + | ||
130 | + |
github/deemru/w8io/026f985 14.98 ms ◑