tx · AEWQDPGy8gZPtmCjHCTbEmw7MYrNENUFpeUekH5LXinY

3MxiR4vDPzVeaEPgznfS4zi4uLd2nnQuGy9:  -0.01100000 Waves

2023.10.06 11:55 [2786549] smart account 3MxiR4vDPzVeaEPgznfS4zi4uLd2nnQuGy9 > SELF 0.00000000 Waves

{ "type": 13, "id": "AEWQDPGy8gZPtmCjHCTbEmw7MYrNENUFpeUekH5LXinY", "fee": 1100000, "feeAssetId": null, "timestamp": 1696582534537, "version": 2, "chainId": 84, "sender": "3MxiR4vDPzVeaEPgznfS4zi4uLd2nnQuGy9", "senderPublicKey": "4AVkL2DQJ8sngCNyArYueNuPS7cvygnakPJhU65LfPfu", "proofs": [ "5PpZtTENAhjhuhpS8mDdNq83cYNoyE9aA1DFEUwT3XYUYqwGzPMBSzhiWBBduGbtxipvTcxd1TyYcrfLw1pG1ADv", "4pkhQrynym59PJFdFrABjVnyBqYx2H7VqwJZKyYrHVXq18cT4dSatokG2t8dek1rE4BusCD39KYShbGV76aaWUre" ], "script": "base64:BgIRCAISAwoBGBIDCgEYEgMKARgcAA5BWExZX01BSU5fQUREUgkBB0FkZHJlc3MBARoBVEdh0UpNzn/72+6l9L3Wwi2aSOpC0rlhmwAMQVhMWV9GQVJNSU5HCQEHQWRkcmVzcwEBGgFUiFrCGKZVQmFa0TmuSd5FGDc6uNWQtIjpAA5BWExZX1RPS0VOT01JQwkBEUBleHRyTmF0aXZlKDEwNjIpAQkBE3ZhbHVlT3JFcnJvck1lc3NhZ2UCCQCdCAIFDEFYTFlfRkFSTUlORwIRdG9rZW5vbWljQ29udHJhY3QCGENhbid0IGdldCB0b2tlbm9taWMgYWRkcgANQVhMWV9URUFNX0JPWAkBB0FkZHJlc3MBARoBVOklXEf1z5bkgzXbUQsFjOvwGd12KKCp+gAMQVhMWV9TVEFLSU5HCQEHQWRkcmVzcwEBGgFUoahv7LNLfrTJXgHTjP0PfUhduUwxjCRLAAdTRl9QT09MAgJTRgAHV1hfUE9PTAICV1gAF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Alib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQhhZG1pbjFQSwABAAAEEmFkbWluUHViS2V5MlNpZ25lZAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAEFCGFkbWluMlBLAAEAAAQSYWRtaW5QdWJLZXkzU2lnbmVkAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAgUIYWRtaW4zUEsAAQAACQBnAgkAZAIJAGQCBRJhZG1pblB1YktleTFTaWduZWQFEmFkbWluUHViS2V5MlNpZ25lZAUSYWRtaW5QdWJLZXkzU2lnbmVkAAIvvm2U", "height": 2786549, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: C4XZSBFndDbybXHs9EzPDfkXAvhrG7sWnKHANTw58CxQ Next: EmgAvuhRknuiKRvjrYgSmCVBFbk8Uju4iHUtrqH1EKUL Diff:
OldNewDifferences
33 {-# CONTENT_TYPE DAPP #-}
44 let AXLY_MAIN_ADDR = Address(base58'3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS')
55
6+let AXLY_FARMING = Address(base58'3N2M4PztorHwrfENp7D6LhYGgGodjiD1fjn')
7+
8+let AXLY_TOKENOMIC = addressFromStringValue(valueOrErrorMessage(getString(AXLY_FARMING, "tokenomicContract"), "Can't get tokenomic addr"))
9+
10+let AXLY_TEAM_BOX = Address(base58'3NBAqyU7HpCjXtX7ymiEGiUkrw7qe9bSdxm')
11+
12+let AXLY_STAKING = Address(base58'3N4erM2YbPHzpzNT31KQbgHxQoRdiJdFFTY')
13+
614 let SF_POOL = "SF"
715
816 let WX_POOL = "WX"
17+
18+let AMOUNT_WAVES_FOR_FEE = 100000000
19+
20+let PERCENT_TO_TEAM = 50
21+
22+let kAxlyPool = "axlyPool"
23+
24+let kAXLYTokenId = "axlyTokenId"
925
1026 let kSharePool = "_poolShareId"
1127
2743
2844 let operatorPK = fromBase58String(valueOrErrorMessage(getString(AXLY_MAIN_ADDR, kOperatorCallPK), "Can't get operatorPK"))
2945
46+let axlyId = fromBase58String(valueOrErrorMessage(getString(AXLY_TOKENOMIC, kAXLYTokenId), "Can't get axly token id"))
47+
48+let axlyPool = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(AXLY_FARMING, kAxlyPool), "Can't get axlyPool key")), "Can't get axly pool")
49+
3050 func unknownPoolType () = throw("Wrong pool type")
51+
52+
53+func isSelfCall (i) = if ((i.caller == this))
54+ then unit
55+ else throw("Only contract itself can call this function")
3156
3257
3358 func listToInt (a,item) = (a :+ parseIntValue(item))
91116
92117
93118 @Callable(i)
94-func exchangeLps (lps) = {
119+func exchangeLps (lps) = valueOrElse(isSelfCall(i), {
95120 func exLP (a,lp) = {
96121 let lpB = fromBase58String(lp)
97122 let balance = assetBalance(this, lpB)
127152 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50)
128153 }
129154 $Tuple2(nil, res)
130- }
155+ })
131156
132157
133158
134159 @Callable(i)
135-func exchangeTokens (routes) = {
160+func exchangeTokens (routes) = valueOrElse(isSelfCall(i), {
136161 func exchangeToken (r,route) = {
137162 let rArgs = split(route, "__")
138163 if ((rArgs[0] == "directSwopfiCPMM"))
169194 if ((res == res))
170195 then nil
171196 else throw("Strict value is not equal to itself.")
172- }
197+ })
198+
199+
200+
201+@Callable(i)
202+func airdropStaking (routes) = valueOrElse(isSelfCall(i), {
203+ let wBalance = wavesBalance(this).available
204+ let bAirdrop = (wBalance - AMOUNT_WAVES_FOR_FEE)
205+ let toTeam = fraction(bAirdrop, PERCENT_TO_TEAM, 100)
206+ let toStaking = (bAirdrop - toTeam)
207+ if ((0 >= bAirdrop))
208+ then throw("No tokens to airdrop")
209+ else if ((0 >= toStaking))
210+ then throw("No tokens to airdrop")
211+ else {
212+ let inv = invoke(axlyPool, "callFunction", ["exchange", ["0"]], [AttachedPayment(unit, toStaking)])
213+ if ((inv == inv))
214+ then {
215+ let axlyBalance = assetBalance(this, axlyId)
216+ if ((axlyBalance == axlyBalance))
217+ then {
218+ let invA = invoke(AXLY_STAKING, "airdrop", nil, [AttachedPayment(axlyId, axlyBalance)])
219+ if ((invA == invA))
220+ then [ScriptTransfer(AXLY_TEAM_BOX, toTeam, unit)]
221+ else throw("Strict value is not equal to itself.")
222+ }
223+ else throw("Strict value is not equal to itself.")
224+ }
225+ else throw("Strict value is not equal to itself.")
226+ }
227+ })
173228
174229
175230 @Verifier(tx)
180235 else false
181236 let isExLpCall = (inv.function == "exchangeLps")
182237 let isExTokensCall = (inv.function == "exchangeTokens")
238+ let isAirdropStaking = (inv.function == "airdropStaking")
183239 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], admin1PK))
184240 then 1
185241 else 0
194250 else 0
195251 let signedByOneAdmin = ((((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) + adminPubKeyCallSigned) >= 1)
196252 if (if (isRightFee)
197- then if (isExLpCall)
253+ then if (if (isExLpCall)
198254 then true
199- else isExTokensCall
255+ else isExTokensCall)
256+ then true
257+ else isAirdropStaking
200258 else false)
201259 then signedByOneAdmin
202260 else false
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let AXLY_MAIN_ADDR = Address(base58'3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS')
55
6+let AXLY_FARMING = Address(base58'3N2M4PztorHwrfENp7D6LhYGgGodjiD1fjn')
7+
8+let AXLY_TOKENOMIC = addressFromStringValue(valueOrErrorMessage(getString(AXLY_FARMING, "tokenomicContract"), "Can't get tokenomic addr"))
9+
10+let AXLY_TEAM_BOX = Address(base58'3NBAqyU7HpCjXtX7ymiEGiUkrw7qe9bSdxm')
11+
12+let AXLY_STAKING = Address(base58'3N4erM2YbPHzpzNT31KQbgHxQoRdiJdFFTY')
13+
614 let SF_POOL = "SF"
715
816 let WX_POOL = "WX"
17+
18+let AMOUNT_WAVES_FOR_FEE = 100000000
19+
20+let PERCENT_TO_TEAM = 50
21+
22+let kAxlyPool = "axlyPool"
23+
24+let kAXLYTokenId = "axlyTokenId"
925
1026 let kSharePool = "_poolShareId"
1127
1228 let kPool = "pool_"
1329
1430 let kAdmin1PK = "group1_admin1_pub_key"
1531
1632 let kAdmin2PK = "group1_admin2_pub_key"
1733
1834 let kAdmin3PK = "group1_admin3_pub_key"
1935
2036 let kOperatorCallPK = "admin_call_pub_key"
2137
2238 let admin1PK = fromBase58String(valueOrErrorMessage(getString(AXLY_MAIN_ADDR, kAdmin1PK), "Can't get admin1PK"))
2339
2440 let admin2PK = fromBase58String(valueOrErrorMessage(getString(AXLY_MAIN_ADDR, kAdmin2PK), "Can't get admin2PK"))
2541
2642 let admin3PK = fromBase58String(valueOrErrorMessage(getString(AXLY_MAIN_ADDR, kAdmin3PK), "Can't get admin3PK"))
2743
2844 let operatorPK = fromBase58String(valueOrErrorMessage(getString(AXLY_MAIN_ADDR, kOperatorCallPK), "Can't get operatorPK"))
2945
46+let axlyId = fromBase58String(valueOrErrorMessage(getString(AXLY_TOKENOMIC, kAXLYTokenId), "Can't get axly token id"))
47+
48+let axlyPool = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(AXLY_FARMING, kAxlyPool), "Can't get axlyPool key")), "Can't get axly pool")
49+
3050 func unknownPoolType () = throw("Wrong pool type")
51+
52+
53+func isSelfCall (i) = if ((i.caller == this))
54+ then unit
55+ else throw("Only contract itself can call this function")
3156
3257
3358 func listToInt (a,item) = (a :+ parseIntValue(item))
3459
3560
3661 func directSwopfiCPMM (rArgs) = {
3762 let dApp = addressFromStringValue(rArgs[1])
3863 let pmt = {
3964 let pmtP = split(rArgs[2], "|")
4065 [AttachedPayment(fromBase58String(pmtP[0]), parseIntValue(pmtP[1]))]
4166 }
4267 let minToRecive = rArgs[3]
4368 invoke(dApp, "callFunction", ["exchange", [minToRecive]], pmt)
4469 }
4570
4671
4772 func directRoutingSwopfi (rArgs) = {
4873 let dApp = addressFromStringValue(rArgs[1])
4974 let pmt = {
5075 let pmtP = split(rArgs[2], "|")
5176 [AttachedPayment(fromBase58String(pmtP[0]), parseIntValue(pmtP[1]))]
5277 }
5378 let args = {
5479 let eArgs = split(rArgs[3], "|")
5580 let exchangers = split(eArgs[0], ",")
5681 let exchangersType = split(eArgs[1], ",")
5782 let args1 = {
5883 let $l = split(eArgs[2], ",")
5984 let $s = size($l)
6085 let $acc0 = nil
6186 func $f0_1 ($a,$i) = if (($i >= $s))
6287 then $a
6388 else listToInt($a, $l[$i])
6489
6590 func $f0_2 ($a,$i) = if (($i >= $s))
6691 then $a
6792 else throw("List size exceeds 3")
6893
6994 $f0_2($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3)
7095 }
7196 let args2 = {
7297 let $l = split(eArgs[3], ",")
7398 let $s = size($l)
7499 let $acc0 = nil
75100 func $f1_1 ($a,$i) = if (($i >= $s))
76101 then $a
77102 else listToInt($a, $l[$i])
78103
79104 func $f1_2 ($a,$i) = if (($i >= $s))
80105 then $a
81106 else throw("List size exceeds 3")
82107
83108 $f1_2($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3)
84109 }
85110 let routingAssetsKeys = split(eArgs[4], ",")
86111 let minToRecive = parseIntValue(eArgs[5])
87112 [exchangers, exchangersType, args1, args2, routingAssetsKeys, minToRecive]
88113 }
89114 invoke(dApp, "routingTrade", args, pmt)
90115 }
91116
92117
93118 @Callable(i)
94-func exchangeLps (lps) = {
119+func exchangeLps (lps) = valueOrElse(isSelfCall(i), {
95120 func exLP (a,lp) = {
96121 let lpB = fromBase58String(lp)
97122 let balance = assetBalance(this, lpB)
98123 let pool = valueOrErrorMessage(getString(AXLY_MAIN_ADDR, (lp + kSharePool)), ("Can't get pool of lp:" + lp))
99124 let pType = valueOrErrorMessage(getString(AXLY_MAIN_ADDR, (kPool + pool)), "Pool is not inited")
100125 let poolAddr = valueOrErrorMessage(addressFromString(pool), "unknown addr")
101126 if ((balance > 0))
102127 then {
103128 let inv = if ((pType == SF_POOL))
104129 then invoke(poolAddr, "callFunction", ["withdraw", ["0"]], [AttachedPayment(lpB, balance)])
105130 else if ((pType == WX_POOL))
106131 then invoke(poolAddr, "get", nil, [AttachedPayment(lpB, balance)])
107132 else unknownPoolType()
108133 if ((inv == inv))
109134 then (a :+ true)
110135 else throw("Strict value is not equal to itself.")
111136 }
112137 else (a :+ false)
113138 }
114139
115140 let res = {
116141 let $l = lps
117142 let $s = size($l)
118143 let $acc0 = nil
119144 func $f0_1 ($a,$i) = if (($i >= $s))
120145 then $a
121146 else exLP($a, $l[$i])
122147
123148 func $f0_2 ($a,$i) = if (($i >= $s))
124149 then $a
125150 else throw("List size exceeds 50")
126151
127152 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50)
128153 }
129154 $Tuple2(nil, res)
130- }
155+ })
131156
132157
133158
134159 @Callable(i)
135-func exchangeTokens (routes) = {
160+func exchangeTokens (routes) = valueOrElse(isSelfCall(i), {
136161 func exchangeToken (r,route) = {
137162 let rArgs = split(route, "__")
138163 if ((rArgs[0] == "directSwopfiCPMM"))
139164 then {
140165 let inv = directSwopfiCPMM(rArgs)
141166 if ((inv == inv))
142167 then (r :+ inv)
143168 else throw("Strict value is not equal to itself.")
144169 }
145170 else if ((rArgs[0] == "routingSwopfi"))
146171 then {
147172 let inv = directRoutingSwopfi(rArgs)
148173 if ((inv == inv))
149174 then (r :+ inv)
150175 else throw("Strict value is not equal to itself.")
151176 }
152177 else throw("Unknown route type")
153178 }
154179
155180 let res = {
156181 let $l = routes
157182 let $s = size($l)
158183 let $acc0 = nil
159184 func $f0_1 ($a,$i) = if (($i >= $s))
160185 then $a
161186 else exchangeToken($a, $l[$i])
162187
163188 func $f0_2 ($a,$i) = if (($i >= $s))
164189 then $a
165190 else throw("List size exceeds 30")
166191
167192 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30)
168193 }
169194 if ((res == res))
170195 then nil
171196 else throw("Strict value is not equal to itself.")
172- }
197+ })
198+
199+
200+
201+@Callable(i)
202+func airdropStaking (routes) = valueOrElse(isSelfCall(i), {
203+ let wBalance = wavesBalance(this).available
204+ let bAirdrop = (wBalance - AMOUNT_WAVES_FOR_FEE)
205+ let toTeam = fraction(bAirdrop, PERCENT_TO_TEAM, 100)
206+ let toStaking = (bAirdrop - toTeam)
207+ if ((0 >= bAirdrop))
208+ then throw("No tokens to airdrop")
209+ else if ((0 >= toStaking))
210+ then throw("No tokens to airdrop")
211+ else {
212+ let inv = invoke(axlyPool, "callFunction", ["exchange", ["0"]], [AttachedPayment(unit, toStaking)])
213+ if ((inv == inv))
214+ then {
215+ let axlyBalance = assetBalance(this, axlyId)
216+ if ((axlyBalance == axlyBalance))
217+ then {
218+ let invA = invoke(AXLY_STAKING, "airdrop", nil, [AttachedPayment(axlyId, axlyBalance)])
219+ if ((invA == invA))
220+ then [ScriptTransfer(AXLY_TEAM_BOX, toTeam, unit)]
221+ else throw("Strict value is not equal to itself.")
222+ }
223+ else throw("Strict value is not equal to itself.")
224+ }
225+ else throw("Strict value is not equal to itself.")
226+ }
227+ })
173228
174229
175230 @Verifier(tx)
176231 func verify () = match tx {
177232 case inv: InvokeScriptTransaction =>
178233 let isRightFee = if ((inv.fee == 900000))
179234 then (inv.feeAssetId == unit)
180235 else false
181236 let isExLpCall = (inv.function == "exchangeLps")
182237 let isExTokensCall = (inv.function == "exchangeTokens")
238+ let isAirdropStaking = (inv.function == "airdropStaking")
183239 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], admin1PK))
184240 then 1
185241 else 0
186242 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], admin2PK))
187243 then 1
188244 else 0
189245 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], admin3PK))
190246 then 1
191247 else 0
192248 let adminPubKeyCallSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], operatorPK))
193249 then 1
194250 else 0
195251 let signedByOneAdmin = ((((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) + adminPubKeyCallSigned) >= 1)
196252 if (if (isRightFee)
197- then if (isExLpCall)
253+ then if (if (isExLpCall)
198254 then true
199- else isExTokensCall
255+ else isExTokensCall)
256+ then true
257+ else isAirdropStaking
200258 else false)
201259 then signedByOneAdmin
202260 else false
203261 case _ =>
204262 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], admin1PK))
205263 then 1
206264 else 0
207265 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], admin2PK))
208266 then 1
209267 else 0
210268 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], admin3PK))
211269 then 1
212270 else 0
213271 (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
214272 }
215273

github/deemru/w8io/026f985 
50.36 ms