tx · 2oEYtpV1GB2GYFoYeaSTyv8sxojKkPfLjD7mcVLZoCGW 3NBqs2vfpyT5cMdUJ97mEJ1Ycp2y8GbAZDA: -0.01400000 Waves 2022.03.11 17:19 [1959397] smart account 3NBqs2vfpyT5cMdUJ97mEJ1Ycp2y8GbAZDA > SELF 0.00000000 Waves
{ "type": 13, "id": "2oEYtpV1GB2GYFoYeaSTyv8sxojKkPfLjD7mcVLZoCGW", "fee": 1400000, "feeAssetId": null, "timestamp": 1647008339748, "version": 1, "sender": "3NBqs2vfpyT5cMdUJ97mEJ1Ycp2y8GbAZDA", "senderPublicKey": "H19CeJVbUnfsK8EYs8K6fHxwBH7pLyxw8WCDFu7D4rGQ", "proofs": [ "2UDNzyzUAX9TQLVFe7NLBpPxHzrnz9HFn96XNktgJsZsLbhrCi89ucWU9DZ3GVg3udhLaWeEkyEc6rQ1YkJUeaJo" ], "script": "base64:AAIFAAAAAAAAABsIAhIJCgcIAQEBAQEIEgMKAQESABIDCgEIEgAAAAAkAAAAAANTRVACAAAAAl9fAQAAAA9nZXRTdHJpbmdPckZhaWwAAAACAAAAB2FkZHJlc3MAAAADa2V5CQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQdAAAAAgUAAAAHYWRkcmVzcwUAAAADa2V5CQABLAAAAAIJAAEsAAAAAgIAAAAPbWFuZGF0b3J5IHRoaXMuBQAAAANrZXkCAAAADyBpcyBub3QgZGVmaW5lZAEAAAARa2V5RmFjdG9yeUFkZHJlc3MAAAAAAgAAABwlcyVzX19jb25maWdfX2ZhY3RvcnlBZGRyZXNzAAAAABhJZHhGYWN0b3J5Q2ZnU3Rha2luZ0RhcHAAAAAAAAAAAAEAAAAAGUlkeEZhY3RvcnlDZmdCb29zdGluZ0RhcHAAAAAAAAAAAAIAAAAAFElkeEZhY3RvcnlDZmdJZG9EYXBwAAAAAAAAAAADAAAAABVJZHhGYWN0b3J5Q2ZnVGVhbURhcHAAAAAAAAAAAAQAAAAAGUlkeEZhY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JsaWNLZXkJAAACAAAAAQIAAAALTWF0Y2ggZXJyb3IJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAA90YXJnZXRQdWJsaWNLZXlmRwea", "chainId": 84, "height": 1959397, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GjY1aZ5yXx65dW2UX9mSs8s9ucQa8RiJxx6yMSV9h5tC Next: CzxjTAPjUHpug2GKuFdA3ZrRWEoXQ7ZGouWJCXNaLYoC Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "__" | |
5 | 5 | ||
6 | 6 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), (("mandatory this." + key) + " is not defined")) | |
7 | 7 | ||
8 | 8 | ||
9 | 9 | func keyFactoryAddress () = "%s%s__config__factoryAddress" | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | let IdxFactoryCfgStakingDapp = 1 | |
13 | 13 | ||
14 | 14 | let IdxFactoryCfgBoostingDapp = 2 | |
15 | 15 | ||
16 | 16 | let IdxFactoryCfgIdoDapp = 3 | |
17 | 17 | ||
18 | 18 | let IdxFactoryCfgTeamDapp = 4 | |
19 | 19 | ||
20 | 20 | let IdxFactoryCfgEmissionDapp = 5 | |
21 | 21 | ||
22 | 22 | let IdxFactoryCfgRestDapp = 6 | |
23 | 23 | ||
24 | 24 | let IdxFactoryCfgSlippageDapp = 7 | |
25 | 25 | ||
26 | 26 | let IdxFactoryCfgGwxRewardDapp = 10 | |
27 | 27 | ||
28 | 28 | func keyFactoryCfg () = "%s__factoryConfig" | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func keyFactoryLpList () = "%s__lpTokensList" | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP) | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func readFactoryAddressOrFail () = addressFromStringValue(getStringOrFail(this, keyFactoryAddress())) | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func readLpList () = split(valueOrElse(getString(readFactoryAddressOrFail(), keyFactoryLpList()), ""), SEP) | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func readFactoryCfgOrFail (factory) = split(getStringOrFail(factory, keyFactoryCfg()), SEP) | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp]) | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp]) | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp]) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func getGwxRewardAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgGwxRewardDapp]) | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func keyConfig () = "%s__config" | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func keyRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current" | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func keyRatePerBlockMaxStartFrom (timestamp,block) = makeString(["%s%s%d%d__ratePerBlockMax__start", toString(timestamp), toString(block)], SEP) | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func keyRatePerBlockCurrent () = "%s%s__ratePerBlock__current" | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func keyRatePerBlockStartFrom (timestamp,block) = makeString(["%s%s%d%d__ratePerBlock__start", toString(timestamp), toString(block)], SEP) | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func keyEmissionStartBlock () = "%s%s__emission__startBlock" | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func keyEmissionDurationInBlocks () = "%s%s__emission__duration" | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func keyEmissionEndBlock () = "%s%s__emission__endBlock" | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
95 | 95 | case s: String => | |
96 | 96 | fromBase58String(s) | |
97 | 97 | case _: Unit => | |
98 | 98 | unit | |
99 | 99 | case _ => | |
100 | 100 | throw("Match error") | |
101 | 101 | } | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
105 | 105 | case s: String => | |
106 | 106 | fromBase58String(s) | |
107 | 107 | case _: Unit => | |
108 | 108 | unit | |
109 | 109 | case _ => | |
110 | 110 | throw("Match error") | |
111 | 111 | } | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func mustManager (i) = { | |
115 | 115 | let pd = throw("Permission denied") | |
116 | 116 | match managerPublicKeyOrUnit() { | |
117 | 117 | case pk: ByteVector => | |
118 | 118 | if ((i.callerPublicKey == pk)) | |
119 | 119 | then true | |
120 | 120 | else pd | |
121 | 121 | case _: Unit => | |
122 | 122 | if ((i.caller == this)) | |
123 | 123 | then true | |
124 | 124 | else pd | |
125 | 125 | case _ => | |
126 | 126 | throw("Match error") | |
127 | 127 | } | |
128 | 128 | } | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | @Callable(i) | |
132 | 132 | func constructor (factoryAddress,ratePerBlockMax,ratePerBlock,emissionStartBlock,emissionDuration,emissionStartTimestamp,wxAssetIdStr) = { | |
133 | 133 | let checkCaller = mustManager(i) | |
134 | 134 | if ((checkCaller == checkCaller)) | |
135 | 135 | then [IntegerEntry(keyRatePerBlockMaxStartFrom(emissionStartTimestamp, emissionStartBlock), ratePerBlockMax), IntegerEntry(keyRatePerBlockMaxCurrent(), ratePerBlockMax), IntegerEntry(keyRatePerBlockStartFrom(emissionStartTimestamp, emissionStartBlock), ratePerBlock), IntegerEntry(keyRatePerBlockCurrent(), ratePerBlock), IntegerEntry(keyEmissionStartBlock(), emissionStartBlock), IntegerEntry(keyEmissionDurationInBlocks(), emissionDuration), IntegerEntry(keyEmissionEndBlock(), (emissionStartBlock + emissionDuration)), StringEntry(keyFactoryAddress(), factoryAddress), StringEntry(keyConfig(), ("%s__" + wxAssetIdStr))] | |
136 | 136 | else throw("Strict value is not equal to itself.") | |
137 | 137 | } | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | ||
141 | 141 | @Callable(i) | |
142 | 142 | func emit (amount) = if ((0 >= amount)) | |
143 | 143 | then $Tuple2(nil, nil) | |
144 | 144 | else { | |
145 | 145 | let factoryContract = readFactoryAddressOrFail() | |
146 | 146 | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
147 | 147 | let stakingContract = getStakingAddressOrFail(factoryCfg) | |
148 | 148 | let gwxRewardsContract = getGwxRewardAddressOrFail(factoryCfg) | |
149 | 149 | let caller = i.caller | |
150 | 150 | if (if ((caller != stakingContract)) | |
151 | 151 | then (caller != gwxRewardsContract) | |
152 | 152 | else false) | |
153 | 153 | then throw("permissions denied") | |
154 | 154 | else { | |
155 | 155 | let wxAssetIdStr = split(getStringOrFail(this, keyConfig()), SEP)[1] | |
156 | 156 | let wxAssetId = fromBase58String(wxAssetIdStr) | |
157 | 157 | $Tuple2([ScriptTransfer(caller, amount, wxAssetId)], [wxAssetId]) | |
158 | 158 | } | |
159 | 159 | } | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | ||
163 | 163 | @Callable(i) | |
164 | 164 | func burn () = { | |
165 | 165 | let factoryContract = readFactoryAddressOrFail() | |
166 | 166 | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
167 | 167 | let boostingContract = getBoostingAddressOrFail(factoryCfg) | |
168 | 168 | if ((size(i.payments) != 1)) | |
169 | 169 | then throw("exact one payment is allowed") | |
170 | 170 | else { | |
171 | 171 | let pmt = i.payments[0] | |
172 | 172 | let assetId = value(pmt.assetId) | |
173 | 173 | let pmtAmount = pmt.amount | |
174 | 174 | let wxAssetId = fromBase58String(split(getStringOrFail(this, keyConfig()), SEP)[1]) | |
175 | 175 | if ((assetId != wxAssetId)) | |
176 | 176 | then throw("invalid wxAssetId is passed") | |
177 | 177 | else if ((i.caller != boostingContract)) | |
178 | 178 | then throw("permissions denied") | |
179 | 179 | else [Burn(assetId, pmtAmount), StringEntry(("%s%s%s__history__burn__" + toBase58String(i.transactionId)), makeString(["%d%d%d", toString(height), toString(lastBlock.timestamp), toString(pmtAmount)], SEP))] | |
180 | 180 | } | |
181 | 181 | } | |
182 | 182 | ||
183 | 183 | ||
184 | 184 | ||
185 | 185 | @Callable(i) | |
186 | 186 | func setManager (pendingManagerPublicKey) = { | |
187 | 187 | let checkCaller = mustManager(i) | |
188 | 188 | if ((checkCaller == checkCaller)) | |
189 | 189 | then { | |
190 | 190 | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
191 | 191 | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
192 | 192 | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
193 | 193 | else throw("Strict value is not equal to itself.") | |
194 | 194 | } | |
195 | 195 | else throw("Strict value is not equal to itself.") | |
196 | 196 | } | |
197 | 197 | ||
198 | 198 | ||
199 | 199 | ||
200 | 200 | @Callable(i) | |
201 | 201 | func confirmManager () = { | |
202 | 202 | let pm = pendingManagerPublicKeyOrUnit() | |
203 | 203 | let hasPM = if (isDefined(pm)) | |
204 | 204 | then true | |
205 | 205 | else throw("No pending manager") | |
206 | 206 | if ((hasPM == hasPM)) | |
207 | 207 | then { | |
208 | 208 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
209 | 209 | then true | |
210 | 210 | else throw("You are not pending manager") | |
211 | 211 | if ((checkPM == checkPM)) | |
212 | 212 | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
213 | 213 | else throw("Strict value is not equal to itself.") | |
214 | 214 | } | |
215 | 215 | else throw("Strict value is not equal to itself.") | |
216 | 216 | } | |
217 | 217 | ||
218 | 218 | ||
219 | 219 | @Verifier(tx) | |
220 | 220 | func verify () = { | |
221 | 221 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
222 | 222 | case pk: ByteVector => | |
223 | 223 | pk | |
224 | 224 | case _: Unit => | |
225 | 225 | tx.senderPublicKey | |
226 | 226 | case _ => | |
227 | 227 | throw("Match error") | |
228 | 228 | } | |
229 | 229 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
230 | 230 | } | |
231 | 231 |
github/deemru/w8io/026f985 31.35 ms ◑