tx · BiiKuiqi2B7tAL12vHRiZFFkxHWMPoFubtkHvcLGmxs7 3N9ZoipEVJyQhhijNYxkcomvgGrrEeDhPvN: -0.01000000 Waves 2023.02.16 15:26 [2452167] smart account 3N9ZoipEVJyQhhijNYxkcomvgGrrEeDhPvN > SELF 0.00000000 Waves
{ "type": 13, "id": "BiiKuiqi2B7tAL12vHRiZFFkxHWMPoFubtkHvcLGmxs7", "fee": 1000000, "feeAssetId": null, "timestamp": 1676550407194, "version": 2, "chainId": 84, "sender": "3N9ZoipEVJyQhhijNYxkcomvgGrrEeDhPvN", "senderPublicKey": "2Gtgx295VLiew3CzXqh9eXfFZBTEpDW2nLsrJZ1C4i9J", "proofs": [ "5vcm3AvbdmuA1RELyk7yP1dN2khzmhjyKKbjPsrhARFGwwFLgawoav93enzqCTjPBH5rbESGrs64HiCd5bheg3g4" ], "script": "base64:AAIFAAAAAAAAACMIAhIGCgQIBAgEEgMKAQgSBwoFCAgIAQgSAwoBCBIECgIICAAAAA8AAAAAD2V4dGVybmFsT3JhY2xlcwkABEwAAAACAgAAACMzWFUzR01uMnZxWGdVMmZ2ZUhValV5aXV5SmNubnFNMUdmUwkABEwAAAACAgAAACMzWFhCRjY5VDFkZ3ZNM3NLWkFzY1dVNmk1YXJSN1hqNmIxdwUAAAADbmlsAAAAAANmZWUAAAAAAAAAAAEAAAAACGZlZVNjYWxlAAAAAAAAAAPoAQAAABR0cnlHZXRTdHJpbmdFeHRlcm5hbAAAAAIAAAAHYWRkcmVzcwAAAANrZXkEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAHYWRkcmVzcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWECAAAAAAEAAAAVdHJ5R2V0SW50ZWdlckV4dGVybmFsAAAAAgAAAAdhZGRyZXNzAAAAA2tleQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAdhZGRyZXNzBQAAAANrZXkD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4XwUAAAAEdHhJZAIAAAAIX290aGVySWQCAAAAAAkAAAIAAAABCQABLAAAAAIFAAAABHR4SWQCAAAAHCBpcyBhbHJlYWR5IGZ1bGx5IHByb2Nlc3NlZCEDCQEAAAABIQAAAAEDBQAAAAlkZXN0Q2hlY2sFAAAAC3N0YXR1c0NoZWNrBwkAAAIAAAABAgAAAA1EaXJ0eSBoYWNrZXIhBAAAAAdhc3NldElkCQEAAAAMdHJ5R2V0U3RyaW5nAAAAAQkAASwAAAACCQABLAAAAAICAAAAA3R4XwUAAAAEdHhJZAIAAAAIX2Fzc2V0SWQEAAAABmFtb3VudAkBAAAADXRyeUdldEludGVnZXIAAAABCQABLAAAAAIJAAEsAAAAAgIAAAADdHhfBQAAAAR0eElkAgAAAAdfYW1vdW50CQAETgAAAAIICQEAAAAMcmV3YXJkT3JhY2xlAAAAAgUAAAAHYXNzZXRJZAUAAAAGYW1vdW50AAAAAl8xCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAN0eF8FAAAABHR4SWQCAAAAB19zdGF0dXMCAAAACVBST0NFU1NFRAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgIAAAADdHhfBQAAAAR0eElkAgAAAAhfb3RoZXJJZAUAAAAJb3RoZXJUeElkBQAAAANuaWwAAAAAW0BaaA==", "height": 2452167, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9FFkng3XP6xTD1hA7GuxUxHYFiLqfZsKcVSShLDTSbxk Next: 3cDh6VygQCZn95A7wTwPXRZPA2PkVmFPwZsxmW1Qn6Nx Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let externalOracles = [" | |
4 | + | let externalOracles = ["3XU3GMn2vqXgU2fveHUjUyiuyJcnnqM1GfS", "3XXBF69T1dgvM3sKZAscWU6i5arR7Xj6b1w"] | |
5 | 5 | ||
6 | 6 | let fee = 1 | |
7 | 7 | ||
190 | 190 | else if ((tryGetString(otherChainAssetKey(assetId)) != assetIdToReceive)) | |
191 | 191 | then throw("URE: Skipping tx, corrupt data!") | |
192 | 192 | else nil | |
193 | - | (( | |
193 | + | ((specifiqueData ++ [ScriptTransfer(addressFromStringValue(destination), (amount - rewardOracle(assetIdToReceive, amount)._2), fromBase58String(assetIdToReceive)), StringEntry((("tx_" + txId) + "_status"), "PROCESSED"), StringEntry((("tx_" + txId) + "_otherId"), toBase58String(i.transactionId))]) ++ rewardOracle(assetIdToReceive, amount)._1) | |
194 | 194 | } | |
195 | 195 | } | |
196 | 196 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let externalOracles = [" | |
4 | + | let externalOracles = ["3XU3GMn2vqXgU2fveHUjUyiuyJcnnqM1GfS", "3XXBF69T1dgvM3sKZAscWU6i5arR7Xj6b1w"] | |
5 | 5 | ||
6 | 6 | let fee = 1 | |
7 | 7 | ||
8 | 8 | let feeScale = 1000 | |
9 | 9 | ||
10 | 10 | func tryGetStringExternal (address,key) = match getString(address, key) { | |
11 | 11 | case a: String => | |
12 | 12 | a | |
13 | 13 | case _ => | |
14 | 14 | "" | |
15 | 15 | } | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | func tryGetIntegerExternal (address,key) = match getInteger(address, key) { | |
19 | 19 | case b: Int => | |
20 | 20 | b | |
21 | 21 | case _ => | |
22 | 22 | 0 | |
23 | 23 | } | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | func tryGetString (key) = tryGetStringExternal(this, key) | |
27 | 27 | ||
28 | 28 | ||
29 | 29 | func tryGetInteger (key) = tryGetIntegerExternal(this, key) | |
30 | 30 | ||
31 | 31 | ||
32 | 32 | func tryGetBoolean (key) = match getBoolean(this, key) { | |
33 | 33 | case b: Boolean => | |
34 | 34 | b | |
35 | 35 | case _ => | |
36 | 36 | false | |
37 | 37 | } | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | func assetIdToString (assetId) = toBase58String(value(assetId)) | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func nativeAssetKey (nativeAsset) = ("nativeAsset_" + nativeAsset) | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func otherChainAssetKey (otherChainAsset) = ("otherChainAsset_" + otherChainAsset) | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func reissueable (asset) = ("reissueable_" + asset) | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func validatePayment (payment) = { | |
53 | 53 | let pmt = value(payment) | |
54 | 54 | if (!(isDefined(pmt.assetId))) | |
55 | 55 | then throw("It needs to be an asset") | |
56 | 56 | else { | |
57 | 57 | let assetDetails = value(assetInfo(value(pmt.assetId))) | |
58 | 58 | if ((1 > pmt.amount)) | |
59 | 59 | then throw("You didnt attached a payment!") | |
60 | 60 | else assetIdToString(pmt.assetId) | |
61 | 61 | } | |
62 | 62 | } | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func rewardOracle (assetId,baseAmount) = { | |
66 | 66 | let reward = fraction(baseAmount, fee, feeScale, DOWN) | |
67 | 67 | let rewardForOracle = fraction(reward, 1, size(externalOracles), DOWN) | |
68 | 68 | func calculatePayout (acc,externalOracle) = (acc ++ [ScriptTransfer(addressFromStringValue(externalOracle), rewardForOracle, fromBase58String(assetId))]) | |
69 | 69 | ||
70 | 70 | let result = { | |
71 | 71 | let $l = externalOracles | |
72 | 72 | let $s = size($l) | |
73 | 73 | let $acc0 = nil | |
74 | 74 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
75 | 75 | then $a | |
76 | 76 | else calculatePayout($a, $l[$i]) | |
77 | 77 | ||
78 | 78 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
79 | 79 | then $a | |
80 | 80 | else throw("List size exceeds 5") | |
81 | 81 | ||
82 | 82 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
83 | 83 | } | |
84 | 84 | $Tuple2(result, reward) | |
85 | 85 | } | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func checkKey (key,value) = { | |
89 | 89 | func checkIfKeyExist (acc,externalOracle) = match value { | |
90 | 90 | case b: String => | |
91 | 91 | let result = tryGetStringExternal(addressFromStringValue(externalOracle), key) | |
92 | 92 | if ((result != value)) | |
93 | 93 | then throw(("String Key not matching in " + externalOracle)) | |
94 | 94 | else true | |
95 | 95 | case b: Int => | |
96 | 96 | let result = tryGetIntegerExternal(addressFromStringValue(externalOracle), key) | |
97 | 97 | if ((result != value)) | |
98 | 98 | then throw(("Integer Key not matching in " + externalOracle)) | |
99 | 99 | else true | |
100 | 100 | case _ => | |
101 | 101 | throw("Invalid Value!") | |
102 | 102 | } | |
103 | 103 | ||
104 | 104 | let $l = externalOracles | |
105 | 105 | let $s = size($l) | |
106 | 106 | let $acc0 = true | |
107 | 107 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
108 | 108 | then $a | |
109 | 109 | else checkIfKeyExist($a, $l[$i]) | |
110 | 110 | ||
111 | 111 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
112 | 112 | then $a | |
113 | 113 | else throw("List size exceeds 5") | |
114 | 114 | ||
115 | 115 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
116 | 116 | } | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | @Callable(i) | |
120 | 120 | func initiateAssets (nativeAsset,nativeAssetReissueable,otherChainAsset,otherChainAssetReissueable) = if ((i.caller != this)) | |
121 | 121 | then throw("Only the owner dapp can add additional assets!") | |
122 | 122 | else if ((tryGetString(nativeAssetKey(nativeAsset)) != "")) | |
123 | 123 | then throw("Native Asset already listed!") | |
124 | 124 | else if ((tryGetString(otherChainAssetKey(otherChainAsset)) != "")) | |
125 | 125 | then throw("Other Asset already listed!") | |
126 | 126 | else [StringEntry(nativeAssetKey(nativeAsset), otherChainAsset), StringEntry(otherChainAssetKey(otherChainAsset), nativeAsset), BooleanEntry(reissueable(nativeAsset), nativeAssetReissueable), BooleanEntry(reissueable(otherChainAsset), otherChainAssetReissueable)] | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | ||
130 | 130 | @Callable(i) | |
131 | 131 | func initiateOutGoingTx (destination) = { | |
132 | 132 | let payment = i.payments | |
133 | 133 | if ((size(payment) != 1)) | |
134 | 134 | then throw("Invalid payment added!") | |
135 | 135 | else if ((1 > payment[0].amount)) | |
136 | 136 | then throw("Invalid amount added!") | |
137 | 137 | else { | |
138 | 138 | let assetId = validatePayment(payment[0]) | |
139 | 139 | let specifiqueData = if (tryGetBoolean(reissueable(assetId))) | |
140 | 140 | then [Burn(fromBase58String(assetId), payment[0].amount), StringEntry((("tx_" + toBase58String(i.transactionId)) + "_asset_to_receive"), tryGetString(otherChainAssetKey(assetId)))] | |
141 | 141 | else [StringEntry((("tx_" + toBase58String(i.transactionId)) + "_asset_to_receive"), tryGetString(nativeAssetKey(assetId)))] | |
142 | 142 | ([StringEntry((("tx_" + toBase58String(i.transactionId)) + "_dest"), destination), StringEntry((("tx_" + toBase58String(i.transactionId)) + "_status"), "UNPROCESSED")] ++ specifiqueData) | |
143 | 143 | } | |
144 | 144 | } | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | ||
148 | 148 | @Callable(i) | |
149 | 149 | func storeDataIncomingTx (txId,destination,assetId,amount,assetIdToReceive) = if (if ((tryGetString((("tx_" + txId) + "_status")) != "")) | |
150 | 150 | then true | |
151 | 151 | else (tryGetString((("tx_" + txId) + "_dest")) != "")) | |
152 | 152 | then throw((txId + " is already stored!")) | |
153 | 153 | else { | |
154 | 154 | let destCheck = checkKey((("tx_" + txId) + "_dest"), destination) | |
155 | 155 | let statusCheck = checkKey((("tx_" + txId) + "_status"), "UNPROCESSED") | |
156 | 156 | let assetIdCheck = checkKey((("tx_" + txId) + "_assetId"), assetId) | |
157 | 157 | let assetId_to_receiveCheck = checkKey((("tx_" + txId) + "_assetId_to_receive"), assetIdToReceive) | |
158 | 158 | let amountCheck = checkKey((("tx_" + txId) + "_amount"), amount) | |
159 | 159 | if (!(if (if (if (if (destCheck) | |
160 | 160 | then statusCheck | |
161 | 161 | else false) | |
162 | 162 | then assetIdCheck | |
163 | 163 | else false) | |
164 | 164 | then assetId_to_receiveCheck | |
165 | 165 | else false) | |
166 | 166 | then amountCheck | |
167 | 167 | else false)) | |
168 | 168 | then throw("Dirty hacker!") | |
169 | 169 | else [StringEntry((("tx_" + txId) + "_dest"), destination), StringEntry((("tx_" + txId) + "_status"), "UNPROCESSED"), StringEntry((("tx_" + txId) + "_assetId"), assetId), StringEntry((("tx_" + txId) + "_assetId_to_receive"), assetIdToReceive), IntegerEntry((("tx_" + txId) + "_amount"), amount)] | |
170 | 170 | } | |
171 | 171 | ||
172 | 172 | ||
173 | 173 | ||
174 | 174 | @Callable(i) | |
175 | 175 | func releaseIncomingTx (txId) = { | |
176 | 176 | let status = tryGetString((("tx_" + txId) + "_status")) | |
177 | 177 | if ((status == "")) | |
178 | 178 | then throw("No such txid found!") | |
179 | 179 | else if ((status == "PROCESSED")) | |
180 | 180 | then throw("Already processed!") | |
181 | 181 | else { | |
182 | 182 | let assetIdToReceive = tryGetString((("tx_" + txId) + "_assetId_to_receive")) | |
183 | 183 | let destination = tryGetString((("tx_" + txId) + "_dest")) | |
184 | 184 | let amount = tryGetInteger((("tx_" + txId) + "_amount")) | |
185 | 185 | let assetId = tryGetString((("tx_" + txId) + "_assetId")) | |
186 | 186 | let specifiqueData = if (tryGetBoolean(reissueable(assetIdToReceive))) | |
187 | 187 | then if ((tryGetString(nativeAssetKey(assetId)) != assetIdToReceive)) | |
188 | 188 | then throw("RE: Skipping tx, corrupt data!") | |
189 | 189 | else [Reissue(fromBase58String(assetIdToReceive), amount, true)] | |
190 | 190 | else if ((tryGetString(otherChainAssetKey(assetId)) != assetIdToReceive)) | |
191 | 191 | then throw("URE: Skipping tx, corrupt data!") | |
192 | 192 | else nil | |
193 | - | (( | |
193 | + | ((specifiqueData ++ [ScriptTransfer(addressFromStringValue(destination), (amount - rewardOracle(assetIdToReceive, amount)._2), fromBase58String(assetIdToReceive)), StringEntry((("tx_" + txId) + "_status"), "PROCESSED"), StringEntry((("tx_" + txId) + "_otherId"), toBase58String(i.transactionId))]) ++ rewardOracle(assetIdToReceive, amount)._1) | |
194 | 194 | } | |
195 | 195 | } | |
196 | 196 | ||
197 | 197 | ||
198 | 198 | ||
199 | 199 | @Callable(i) | |
200 | 200 | func finalizeOutgoingTx (txId,otherTxId) = { | |
201 | 201 | let destCheck = checkKey((("tx_" + txId) + "_otherId"), otherTxId) | |
202 | 202 | let statusCheck = checkKey((("tx_" + txId) + "_status"), "PROCESSED") | |
203 | 203 | if ((tryGetString((("tx_" + txId) + "_otherId")) != "")) | |
204 | 204 | then throw((txId + " is already fully processed!")) | |
205 | 205 | else if (!(if (destCheck) | |
206 | 206 | then statusCheck | |
207 | 207 | else false)) | |
208 | 208 | then throw("Dirty hacker!") | |
209 | 209 | else { | |
210 | 210 | let assetId = tryGetString((("tx_" + txId) + "_assetId")) | |
211 | 211 | let amount = tryGetInteger((("tx_" + txId) + "_amount")) | |
212 | 212 | (rewardOracle(assetId, amount)._1 ++ [StringEntry((("tx_" + txId) + "_status"), "PROCESSED"), StringEntry((("tx_" + txId) + "_otherId"), otherTxId)]) | |
213 | 213 | } | |
214 | 214 | } | |
215 | 215 | ||
216 | 216 |
github/deemru/w8io/169f3d6 64.32 ms ◑