tx · 5zzWw2qQYEvxnqh3evKVySAUAWQj1kBBHrN9RfJ2k13b 3N3kKNoJohjVQYNLTrYTGTesr3nq3PZNh37: -0.01000000 Waves 2024.03.19 18:27 [3025086] smart account 3N3kKNoJohjVQYNLTrYTGTesr3nq3PZNh37 > SELF 0.00000000 Waves
{ "type": 13, "id": "5zzWw2qQYEvxnqh3evKVySAUAWQj1kBBHrN9RfJ2k13b", "fee": 1000000, "feeAssetId": null, "timestamp": 1710862138955, "version": 2, "chainId": 84, "sender": "3N3kKNoJohjVQYNLTrYTGTesr3nq3PZNh37", "senderPublicKey": "vmMXxwQAMUAoisvL193ptPiTtaWQqL5YNu2zs1ouTbY", "proofs": [ "5NhKzhsziZNwFG5aEdNZ37kU2XPyDdDs6HZSuemWn31QGR2URLiMnb2hoj7Ymaiu3ehcibDQKDG9xqSSDPKUnZTe" ], "script": "base64:BwIlCAISAwoBCBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGCgACXNlcGFyYXRvcgICX18AB2NoYWluSWQJAMkBAgkAygECCAUEdGhpcwVieXRlcwABAAEACGNoYWluSWRXAQFXABBjb250cmFjdEZpbGVuYW1lAhdmdXR1cmVzX2NhbGN1bGF0b3IucmlkZQEHd3JhcEVycgEBcwkArAICCQCsAgIFEGNvbnRyYWN0RmlsZW5hbWUCAjogBQFzAQh0aHJvd0VycgEBcwkAAgEJAQd3cmFwRXJyAQUBcwAPa0ZhY3RvcnlBZGRyZXNzAhIlc19fZmFjdG9yeUFkZHJlc3MAFGZhY3RvcnlBZGRyZXNzT3B0aW9uBAckbWF0Y2gwCQCdCAIFBHRoaXMFD2tGYWN0b3J5QWRkcmVzcwMJAAECBQckbWF0Y2gwAgZTdHJpbmcEAXMFByRtYXRjaDAJAKYIAQUBcwMJAAECBQckbWF0Y2gwAgRVbml0BQR1bml0CQACAQILTWF0Y2ggZXJyb3IADmZhY3RvcnlBZGRyZXNzCQETdmFsdWVPckVycm9yTWVzc2FnZQIFFGZhY3RvcnlBZGRyZ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AgCBQZhbW91bnQJAMwIAgUHYXNzZXRJZAUDbmlsBQNuaWwFA25pbAkAlAoCBQNuaWwFC2ludm9jYXRpb25zCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAWkBDXBhaXJBbGxvd2FuY2UCD2NhbGxlclB1YmxpY0tleQRhcmdzBAtjaGVja0NhbGxlcgkBC211c3RGYWN0b3J5AQUBaQMJAAACBQtjaGVja0NhbGxlcgULY2hlY2tDYWxsZXIEEGFtb3VudEFzc2V0SWRTdHIJAJEDAgUEYXJncwAABA9wcmljZUFzc2V0SWRTdHIJAJEDAgUEYXJncwABBAhhbGxvd1N0cgkAkQMCBQRhcmdzAAIEDWFtb3VudEFzc2V0SWQJAQxwYXJzZUFzc2V0SWQBBRBhbW91bnRBc3NldElkU3RyBAxwcmljZUFzc2V0SWQJAQxwYXJzZUFzc2V0SWQBBQ9wcmljZUFzc2V0SWRTdHIEBWFsbG93CQAAAgUIYWxsb3dTdHICBHRydWUEC2ludm9jYXRpb25zCQDMCAIJAPwHBAUOZmFjdG9yeUFkZHJlc3MCDGJvb2xlYW5FbnRyeQkAzAgCCQEMa1BhaXJBbGxvd2VkAgUNYW1vdW50QXNzZXRJZAUMcHJpY2VBc3NldElkCQDMCAIFBWFsbG93BQNuaWwFA25pbAUDbmlsCQCUCgIFA25pbAULaW52b2NhdGlvbnMJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AngyJ7w==", "height": 3025086, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 525AKwtCWfWFMyPPL2ecfnmjF6FXAYzXXHGDh1u7DJGB Next: AeE9HsMec7dmamH2zeLctPppdFspzLQdfdpsaXCAjDFS Diff:
Old | New | Differences | |
---|---|---|---|
245 | 245 | } | |
246 | 246 | ||
247 | 247 | ||
248 | + | ||
249 | + | @Callable(i) | |
250 | + | func pairAllowance (callerPublicKey,args) = { | |
251 | + | let checkCaller = mustFactory(i) | |
252 | + | if ((checkCaller == checkCaller)) | |
253 | + | then { | |
254 | + | let amountAssetIdStr = args[0] | |
255 | + | let priceAssetIdStr = args[1] | |
256 | + | let allowStr = args[2] | |
257 | + | let amountAssetId = parseAssetId(amountAssetIdStr) | |
258 | + | let priceAssetId = parseAssetId(priceAssetIdStr) | |
259 | + | let allow = (allowStr == "true") | |
260 | + | let invocations = [invoke(factoryAddress, "booleanEntry", [kPairAllowed(amountAssetId, priceAssetId), allow], nil)] | |
261 | + | $Tuple2(nil, invocations) | |
262 | + | } | |
263 | + | else throw("Strict value is not equal to itself.") | |
264 | + | } | |
265 | + | ||
266 | + |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 7 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let separator = "__" | |
5 | 5 | ||
6 | 6 | let chainId = take(drop(this.bytes, 1), 1) | |
7 | 7 | ||
8 | 8 | let chainIdW = base58'2W' | |
9 | 9 | ||
10 | 10 | let contractFilename = "futures_calculator.ride" | |
11 | 11 | ||
12 | 12 | func wrapErr (s) = ((contractFilename + ": ") + s) | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func throwErr (s) = throw(wrapErr(s)) | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | let kFactoryAddress = "%s__factoryAddress" | |
19 | 19 | ||
20 | 20 | let factoryAddressOption = match getString(this, kFactoryAddress) { | |
21 | 21 | case s: String => | |
22 | 22 | addressFromString(s) | |
23 | 23 | case _: Unit => | |
24 | 24 | unit | |
25 | 25 | case _ => | |
26 | 26 | throw("Match error") | |
27 | 27 | } | |
28 | 28 | ||
29 | 29 | let factoryAddress = valueOrErrorMessage(factoryAddressOption, wrapErr("invalid factory address")) | |
30 | 30 | ||
31 | 31 | func mustAddress (i,address) = if ((i.caller == address)) | |
32 | 32 | then true | |
33 | 33 | else throwErr("permission denied") | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func mustThis (i) = mustAddress(i, this) | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func mustFactory (i) = mustAddress(i, factoryAddress) | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | let wavesString = "WAVES" | |
43 | 43 | ||
44 | 44 | let queueItemSize = 32 | |
45 | 45 | ||
46 | 46 | func parseAssetId (input) = if ((input == wavesString)) | |
47 | 47 | then unit | |
48 | 48 | else fromBase58String(input) | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func assetIdToString (input) = if ((input == unit)) | |
52 | 52 | then wavesString | |
53 | 53 | else toBase58String(value(input)) | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | let kAccountScript = "%s__accountScript" | |
57 | 57 | ||
58 | 58 | func accountScript () = valueOrErrorMessage(getBinary(factoryAddress, kAccountScript), wrapErr("account script is not set")) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | let kRewardAmount = "%s__rewardAmount" | |
62 | 62 | ||
63 | 63 | func rewardAmount () = valueOrErrorMessage(getInteger(factoryAddress, kRewardAmount), wrapErr("reward amount is not set")) | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | let kAccountsLimit = "%s__accountsLimit" | |
67 | 67 | ||
68 | 68 | let accountsLimitDefault = 20 | |
69 | 69 | ||
70 | 70 | func accountsLimit () = valueOrElse(getInteger(factoryAddress, kAccountsLimit), accountsLimitDefault) | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | let REQUEST_STATUS_EMPTY = 0 | |
74 | 74 | ||
75 | 75 | let REQUEST_STATUS_READY = 1 | |
76 | 76 | ||
77 | 77 | func kRequestStatus (requestId) = makeString(["%s%s", toBase58String(requestId), "status"], separator) | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func kAccountCreatorPublicKey (accountAddress) = makeString(["%s%s", toString(accountAddress), "creatorPublicKey"], separator) | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func kRequestOwnerPublicKey (requestId) = makeString(["%s%s", toBase58String(requestId), "ownerPublicKey"], separator) | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func kRequestAmountAssetId (requestId) = makeString(["%s%s", toBase58String(requestId), "amountAssetId"], separator) | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func kRequestPriceAssetId (requestId) = makeString(["%s%s", toBase58String(requestId), "priceAssetId"], separator) | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func kRequestIdToAccountPublicKey (requestId) = makeString(["%s%s", toBase58String(requestId), "requestIdToAccountPublicKey"], separator) | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func kAccountAddressToRequestId (accountAddress) = makeString(["%s%s", toString(accountAddress), "accountAddressToRequestId"], separator) | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func kRequestsQueue () = makeString(["%s", "requestsQueue"], separator) | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func requestsQueue () = valueOrElse(getBinary(factoryAddress, kRequestsQueue()), base58'') | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func kAccountsQueue () = makeString(["%s", "accountsQueue"], separator) | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | func accountsQueue () = valueOrElse(getBinary(factoryAddress, kAccountsQueue()), base58'') | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func kRequestsByOwner (ownerAddress) = makeString(["%s%s", "accounts", toString(ownerAddress)], separator) | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func requestsByOwner (ownerAddress) = valueOrElse(getBinary(factoryAddress, kRequestsByOwner(ownerAddress)), base58'') | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func kPairAllowed (amountAssetId,priceAssetId) = makeString(["%s%s%s", assetIdToString(amountAssetId), assetIdToString(priceAssetId), "pairAllowed"], separator) | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func pairAllowed (amountAssetId,priceAssetId) = valueOrElse(getBoolean(factoryAddress, kPairAllowed(amountAssetId, priceAssetId)), false) | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | @Callable(i) | |
123 | 123 | func init (factoryAddressStr) = { | |
124 | 124 | let checkCaller = mustThis(i) | |
125 | 125 | if ((checkCaller == checkCaller)) | |
126 | 126 | then $Tuple2([StringEntry(kFactoryAddress, factoryAddressStr)], unit) | |
127 | 127 | else throw("Strict value is not equal to itself.") | |
128 | 128 | } | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | ||
132 | 132 | @Callable(i) | |
133 | 133 | func requestAccount (callerPublicKey,args) = { | |
134 | 134 | let checkCaller = mustFactory(i) | |
135 | 135 | if ((checkCaller == checkCaller)) | |
136 | 136 | then { | |
137 | 137 | let amountAssetIdStr = args[0] | |
138 | 138 | let priceAssetIdStr = args[1] | |
139 | 139 | let userAddress = addressFromPublicKey(callerPublicKey) | |
140 | 140 | let requestId = sha256(((userAddress.bytes + fromBase58String(amountAssetIdStr)) + fromBase58String(priceAssetIdStr))) | |
141 | 141 | let amountAssetId = parseAssetId(amountAssetIdStr) | |
142 | 142 | let priceAssetId = parseAssetId(priceAssetIdStr) | |
143 | 143 | let userRequestsNumber = (size(kRequestsByOwner(userAddress)) / queueItemSize) | |
144 | 144 | let checks = [if ((size(i.payments) == 1)) | |
145 | 145 | then true | |
146 | 146 | else throwErr("1 payment is required"), if ((i.payments[0].assetId == unit)) | |
147 | 147 | then true | |
148 | 148 | else throwErr("invalid asset"), if ((i.payments[0].amount == rewardAmount())) | |
149 | 149 | then true | |
150 | 150 | else throwErr("invalid amount"), if (pairAllowed(amountAssetId, priceAssetId)) | |
151 | 151 | then true | |
152 | 152 | else throwErr("pair is not allowed"), if ((getInteger(factoryAddress, kRequestStatus(requestId)) == unit)) | |
153 | 153 | then true | |
154 | 154 | else throwErr("account is already exists"), if ((accountsLimit() > userRequestsNumber)) | |
155 | 155 | then true | |
156 | 156 | else throwErr(("accounts limit is " + toString(accountsLimit())))] | |
157 | 157 | if ((checks == checks)) | |
158 | 158 | then { | |
159 | 159 | let $t050206376 = if ((size(accountsQueue()) == 0)) | |
160 | 160 | then $Tuple2([ScriptTransfer(factoryAddress, rewardAmount(), unit)], [invoke(factoryAddress, "integerEntry", [kRequestStatus(requestId), REQUEST_STATUS_EMPTY], nil), invoke(factoryAddress, "binaryEntry", [kRequestsQueue(), (requestsQueue() + requestId)], nil)]) | |
161 | 161 | else { | |
162 | 162 | let accountPublicKey = take(accountsQueue(), queueItemSize) | |
163 | 163 | let accountAddress = addressFromPublicKey(accountPublicKey) | |
164 | 164 | let creatorAddress = addressFromPublicKey(valueOrErrorMessage(getBinary(factoryAddress, kAccountCreatorPublicKey(accountAddress)), wrapErr("invalid creator public key"))) | |
165 | 165 | $Tuple2([ScriptTransfer(creatorAddress, rewardAmount(), unit)], [invoke(factoryAddress, "binaryEntry", [kAccountsQueue(), drop(accountsQueue(), queueItemSize)], nil), invoke(factoryAddress, "integerEntry", [kRequestStatus(requestId), REQUEST_STATUS_READY], nil), invoke(factoryAddress, "binaryEntry", [kRequestIdToAccountPublicKey(requestId), accountPublicKey], nil), invoke(factoryAddress, "stringEntry", [kAccountAddressToRequestId(accountAddress), toBase58String(requestId)], nil)]) | |
166 | 166 | } | |
167 | 167 | let actions = $t050206376._1 | |
168 | 168 | let factoryActions = $t050206376._2 | |
169 | 169 | $Tuple2(actions, (factoryActions ++ [invoke(factoryAddress, "binaryEntry", [kRequestOwnerPublicKey(requestId), callerPublicKey], nil), invoke(factoryAddress, "binaryEntry", [kRequestsByOwner(userAddress), (requestsByOwner(userAddress) + requestId)], nil), invoke(factoryAddress, "stringEntry", [kRequestAmountAssetId(requestId), amountAssetIdStr], nil), invoke(factoryAddress, "stringEntry", [kRequestPriceAssetId(requestId), priceAssetIdStr], nil)])) | |
170 | 170 | } | |
171 | 171 | else throw("Strict value is not equal to itself.") | |
172 | 172 | } | |
173 | 173 | else throw("Strict value is not equal to itself.") | |
174 | 174 | } | |
175 | 175 | ||
176 | 176 | ||
177 | 177 | ||
178 | 178 | @Callable(i) | |
179 | 179 | func addAccount (callerPublicKey,args) = { | |
180 | 180 | let checkCaller = mustFactory(i) | |
181 | 181 | if ((checkCaller == checkCaller)) | |
182 | 182 | then { | |
183 | 183 | let creatorPublicKey = fromBase58String(args[0]) | |
184 | 184 | let accountPublicKey = callerPublicKey | |
185 | 185 | let accountAddress = addressFromPublicKey(callerPublicKey) | |
186 | 186 | let creatorAddress = addressFromPublicKey(creatorPublicKey) | |
187 | 187 | let checks = [if ((getBinary(factoryAddress, kAccountCreatorPublicKey(accountAddress)) == unit)) | |
188 | 188 | then true | |
189 | 189 | else throwErr("account is already exists"), if ( match scriptHash(accountAddress) { | |
190 | 190 | case b: ByteVector => | |
191 | 191 | (b == blake2b256_32Kb(accountScript())) | |
192 | 192 | case _ => | |
193 | 193 | false | |
194 | 194 | }) | |
195 | 195 | then true | |
196 | 196 | else throwErr("invalid script")] | |
197 | 197 | if ((checks == checks)) | |
198 | 198 | then { | |
199 | 199 | let $t075778579 = if ((size(requestsQueue()) == 0)) | |
200 | 200 | then $Tuple2(nil, [invoke(factoryAddress, "binaryEntry", [kAccountsQueue(), (accountsQueue() + accountPublicKey)], nil)]) | |
201 | 201 | else { | |
202 | 202 | let requestId = take(requestsQueue(), queueItemSize) | |
203 | 203 | $Tuple2(nil, [invoke(factoryAddress, "integerEntry", [kRequestStatus(requestId), REQUEST_STATUS_READY], nil), invoke(factoryAddress, "binaryEntry", [kRequestIdToAccountPublicKey(requestId), accountPublicKey], nil), invoke(factoryAddress, "binaryEntry", [kRequestsQueue(), drop(requestsQueue(), queueItemSize)], nil), invoke(factoryAddress, "stringEntry", [kAccountAddressToRequestId(accountAddress), toBase58String(requestId)], nil), invoke(factoryAddress, "transferWaves", [creatorAddress.bytes, rewardAmount()], nil)]) | |
204 | 204 | } | |
205 | 205 | let actions = $t075778579._1 | |
206 | 206 | let factoryActions = $t075778579._2 | |
207 | 207 | $Tuple2(actions, (factoryActions ++ [invoke(factoryAddress, "binaryEntry", [kAccountCreatorPublicKey(accountAddress), creatorPublicKey], nil)])) | |
208 | 208 | } | |
209 | 209 | else throw("Strict value is not equal to itself.") | |
210 | 210 | } | |
211 | 211 | else throw("Strict value is not equal to itself.") | |
212 | 212 | } | |
213 | 213 | ||
214 | 214 | ||
215 | 215 | ||
216 | 216 | @Callable(i) | |
217 | 217 | func deposit (callerPublicKey,args) = { | |
218 | 218 | let checkCaller = mustFactory(i) | |
219 | 219 | if ((checkCaller == checkCaller)) | |
220 | 220 | then { | |
221 | 221 | let accountAddress = valueOrErrorMessage(addressFromString(args[0]), wrapErr("invalid account address")) | |
222 | 222 | let payment = i.payments[0] | |
223 | 223 | let actions = [ScriptTransfer(accountAddress, payment.amount, payment.assetId)] | |
224 | 224 | let factoryActions = nil | |
225 | 225 | $Tuple2(actions, factoryActions) | |
226 | 226 | } | |
227 | 227 | else throw("Strict value is not equal to itself.") | |
228 | 228 | } | |
229 | 229 | ||
230 | 230 | ||
231 | 231 | ||
232 | 232 | @Callable(i) | |
233 | 233 | func withdraw (callerPublicKey,args) = { | |
234 | 234 | let checkCaller = mustFactory(i) | |
235 | 235 | if ((checkCaller == checkCaller)) | |
236 | 236 | then { | |
237 | 237 | let userAddress = addressFromPublicKey(callerPublicKey) | |
238 | 238 | let accountAddress = valueOrErrorMessage(addressFromString(args[0]), wrapErr("invalid account address")) | |
239 | 239 | let amount = valueOrErrorMessage(parseInt(args[1]), wrapErr("invalid amount")) | |
240 | 240 | let assetId = parseAssetId(args[2]) | |
241 | 241 | let invocations = [invoke(accountAddress, "transferAsset", [userAddress.bytes, amount, assetId], nil)] | |
242 | 242 | $Tuple2(nil, invocations) | |
243 | 243 | } | |
244 | 244 | else throw("Strict value is not equal to itself.") | |
245 | 245 | } | |
246 | 246 | ||
247 | 247 | ||
248 | + | ||
249 | + | @Callable(i) | |
250 | + | func pairAllowance (callerPublicKey,args) = { | |
251 | + | let checkCaller = mustFactory(i) | |
252 | + | if ((checkCaller == checkCaller)) | |
253 | + | then { | |
254 | + | let amountAssetIdStr = args[0] | |
255 | + | let priceAssetIdStr = args[1] | |
256 | + | let allowStr = args[2] | |
257 | + | let amountAssetId = parseAssetId(amountAssetIdStr) | |
258 | + | let priceAssetId = parseAssetId(priceAssetIdStr) | |
259 | + | let allow = (allowStr == "true") | |
260 | + | let invocations = [invoke(factoryAddress, "booleanEntry", [kPairAllowed(amountAssetId, priceAssetId), allow], nil)] | |
261 | + | $Tuple2(nil, invocations) | |
262 | + | } | |
263 | + | else throw("Strict value is not equal to itself.") | |
264 | + | } | |
265 | + | ||
266 | + |
github/deemru/w8io/169f3d6 43.75 ms ◑