tx · 2ksdtFhQQjHZYSs5BE7czUftTf94LAshu9mbxnqP21fZ 3MyfNP96hxGP1BwNsWHuTNHuTiBiEWdm7mH: -0.01400000 Waves 2019.09.25 12:59 [691713] smart account 3MyfNP96hxGP1BwNsWHuTNHuTiBiEWdm7mH > SELF 0.00000000 Waves
{ "type": 13, "id": "2ksdtFhQQjHZYSs5BE7czUftTf94LAshu9mbxnqP21fZ", "fee": 1400000, "feeAssetId": null, "timestamp": 1569405600293, "version": 1, "sender": "3MyfNP96hxGP1BwNsWHuTNHuTiBiEWdm7mH", "senderPublicKey": "F1CXEKCB4kBs5PVuinmoNQeUTUzLb7dbimeBfUpM2iTV", "proofs": [ "5kn5U68wyFKVZn9WQ9v7s1Jcd2nyryqSQEU39Wgf2k2iB9VcMSVRCQQFEZwdxdL9SrV9qhJFy8CgYsVF3NWDWGWw" ], "script": "base64:AAIDAAAAAAAAAAAAAAAAAAAAAgAAAApjb250ZXh0T2JqAQAAAAxvcmFjbGVVcGRhdGUAAAABAAAADWFkZHJlc3NTdHJpbmcEAAAAB2FkZHJlc3MJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQUAAAANYWRkcmVzc1N0cmluZwQAAAAMYW1vdW50VG9rZW5BBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAAB2FkZHJlc3MCAAAADGFtb3VudFRva2VuQQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFzBQAAAAckbWF0Y2gwBgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAEVW5pdAQAAAABdQUAAAAHJG1hdGNoMAkAAAIAAAABAgAAABphbW91bnRUb2tlbkEgaXNuJ3QgZGVmaWVuZAkBAAAABXRocm93AAAAAAQAAAAMYW1vdW50VG9rZW5CBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAAB2FkZHJlc3MCAAAADGFtb3VudFRva2VuQgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAA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IAAAAJd2l0aGRyYXduCQAAAAAAAAIFAAAADGFtb3VudFRva2VuQgIAAAAJd2l0aGRyYXduBwkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAANYWRkcmVzc1N0cmluZwcFAAAAA25pbAkAAAIAAAABAgAAAA1vcmFjbGUgcmVqZWN0AAAAAJcbRrA=", "chainId": 84, "height": 691713, "spentComplexity": 0 } View: original | compacted Prev: GsqBTyMgPBMJ6dEvXVhirBKcjDW5mB5LvqRMK3aCA4U9 Next: none Diff:
Old | New | Differences | |
---|---|---|---|
100 | 100 | } | |
101 | 101 | ||
102 | 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 | + |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(contextObj) | |
7 | 7 | func oracleUpdate (addressString) = { | |
8 | 8 | let address = addressFromStringValue(addressString) | |
9 | 9 | let amountTokenA = match getInteger(address, "amountTokenA") { | |
10 | 10 | case s: Int => | |
11 | 11 | true | |
12 | 12 | case u: Unit => | |
13 | 13 | throw("amountTokenA isn't defiend") | |
14 | 14 | case _ => | |
15 | 15 | throw() | |
16 | 16 | } | |
17 | 17 | let amountTokenB = match getInteger(address, "amountTokenB") { | |
18 | 18 | case s: Int => | |
19 | 19 | true | |
20 | 20 | case u: Unit => | |
21 | 21 | throw("amountTokenB isn't defiend") | |
22 | 22 | case _ => | |
23 | 23 | throw() | |
24 | 24 | } | |
25 | 25 | let assetIdTokenA = match getString(address, "assetIdTokenA") { | |
26 | 26 | case s: String => | |
27 | 27 | true | |
28 | 28 | case u: Unit => | |
29 | 29 | throw("assetIdTokenA isn't defiend") | |
30 | 30 | case _ => | |
31 | 31 | throw() | |
32 | 32 | } | |
33 | 33 | let assetIdTokenB = match getString(address, "assetIdTokenB") { | |
34 | 34 | case s: String => | |
35 | 35 | true | |
36 | 36 | case u: Unit => | |
37 | 37 | throw("assetIdTokenB isn't defiend") | |
38 | 38 | case _ => | |
39 | 39 | throw() | |
40 | 40 | } | |
41 | 41 | let comission = match getInteger(address, "comission") { | |
42 | 42 | case s: Int => | |
43 | 43 | true | |
44 | 44 | case u: Unit => | |
45 | 45 | throw("comission isn't defiend") | |
46 | 46 | case _ => | |
47 | 47 | throw() | |
48 | 48 | } | |
49 | 49 | let exchangecount = match getInteger(address, "exchange_count") { | |
50 | 50 | case s: Int => | |
51 | 51 | true | |
52 | 52 | case u: Unit => | |
53 | 53 | throw("exchange_count isn't defiend") | |
54 | 54 | case _ => | |
55 | 55 | throw() | |
56 | 56 | } | |
57 | 57 | let fundA = match getBoolean(address, "fundA") { | |
58 | 58 | case s: Boolean => | |
59 | 59 | true | |
60 | 60 | case u: Unit => | |
61 | 61 | throw("fundA isn't defiend") | |
62 | 62 | case _ => | |
63 | 63 | throw() | |
64 | 64 | } | |
65 | 65 | let fundB = match getBoolean(address, "fundB") { | |
66 | 66 | case s: Boolean => | |
67 | 67 | true | |
68 | 68 | case u: Unit => | |
69 | 69 | throw("fundB isn't defiend") | |
70 | 70 | case _ => | |
71 | 71 | throw() | |
72 | 72 | } | |
73 | 73 | let owner = match getString(address, "owner") { | |
74 | 74 | case s: String => | |
75 | 75 | true | |
76 | 76 | case u: Unit => | |
77 | 77 | throw("owner isn't defiend") | |
78 | 78 | case _ => | |
79 | 79 | throw() | |
80 | 80 | } | |
81 | 81 | if (if (if (if (if (if (if (if (if (amountTokenA) | |
82 | 82 | then amountTokenB | |
83 | 83 | else false) | |
84 | 84 | then assetIdTokenA | |
85 | 85 | else false) | |
86 | 86 | then assetIdTokenB | |
87 | 87 | else false) | |
88 | 88 | then comission | |
89 | 89 | else false) | |
90 | 90 | then exchangecount | |
91 | 91 | else false) | |
92 | 92 | then fundA | |
93 | 93 | else false) | |
94 | 94 | then fundB | |
95 | 95 | else false) | |
96 | 96 | then owner | |
97 | 97 | else false) | |
98 | 98 | then WriteSet([DataEntry(addressString, true)]) | |
99 | 99 | else throw("oracle reject") | |
100 | 100 | } | |
101 | 101 | ||
102 | 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 28.08 ms ◑