tx · 4xHqEuumEC4hhveU4qx7x2u65Kmx3Q27bfqgD533H3x4

3MzT6Lr8UBLvCnz1rU1KeRc5xws5SSGiFpT:  -0.01000000 Waves

2024.10.07 20:27 [3316721] smart account 3MzT6Lr8UBLvCnz1rU1KeRc5xws5SSGiFpT > SELF 0.00000000 Waves

{ "type": 13, "id": "4xHqEuumEC4hhveU4qx7x2u65Kmx3Q27bfqgD533H3x4", "fee": 1000000, "feeAssetId": null, "timestamp": 1728322125019, "version": 2, "chainId": 84, "sender": "3MzT6Lr8UBLvCnz1rU1KeRc5xws5SSGiFpT", "senderPublicKey": "GdxgUF82GpaMfqBobwBoNB8zb1whsmo2NpiZVc7JiNeC", "proofs": [ "2qLycUGEVb3Q3QtDNJpVon5EdovpMnn4vvuEKVSUNXZdcb7PVRWbLJgZHN4q1Vro1uwFVWiJECBsyWAWUfYtjkFk" ], "script": "base64:AAIFAAAAAAAAABIIAhIDCgEIEgQKAggBEgMKAQgAAAAJAQAAAAdnZXRCb29sAAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQbAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAdCb29sZWFuBAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiBwEAAAAJaXNUZXN0RW52AAAAAAkBAAAAB2dldEJvb2wAAAABAgAAAAdURVNURU5WAQAAABdzdGF0aWNLZXlfb3JhY2xlQWRkcmVzcwAAAAACAAAAFHN0YXRpY19vcmFjbGVBZGRyZXNzAQAAABRzdGF0aWNLZXlfYW1tQWRkcmVzcwAAAAACAAAAEXN0YXRpY19hbW1BZGRyZXNzAQAAAAlnZXRPcmFjbGUAAAAACQEAAAAHQWRkcmVzcwAAAAEJAAJZAAAAAQkBAAAAEUBleHRyTmF0aXZlKDEwNTMpAAAAAgUAAAAEdGhpcwkBAAAAF3N0YXRpY0tleV9vcmFjbGVBZGRyZXNzAAAAAAEAAAANZ2V0QXNzZXRCeXRlcwAAAAEA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AAAAl0aGlyZFVzZXIAAAAAAAAAAAEDCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAgUAAAAJdGhpcmRVc2VyAAAAAAAAAAABAAAAAAAAAAAABAAAAA9zaWduYXR1cmVzQ291bnQJAABkAAAAAgkAAGQAAAACBQAAAA9maXJzdFVzZXJTaWduZWQFAAAAEHNlY29uZFVzZXJTaWduZWQFAAAAD3RoaXJkVXNlclNpZ25lZAQAAAAHJG1hdGNoMAUAAAACdHgJAABnAAAAAgUAAAAPc2lnbmF0dXJlc0NvdW50AAAAAAAAAAACwd2VCQ==", "height": 3316721, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 5 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+func getBool (key) = match getBoolean(this, key) {
5+ case b: Boolean =>
6+ b
7+ case _ =>
8+ false
9+}
10+
11+
12+func isTestEnv () = getBool("TESTENV")
13+
14+
15+func staticKey_oracleAddress () = "static_oracleAddress"
16+
17+
18+func staticKey_ammAddress () = "static_ammAddress"
19+
20+
21+func getOracle () = Address(fromBase58String(getStringValue(this, staticKey_oracleAddress())))
22+
23+
24+func getAssetBytes (assetIdStr) = if ((assetIdStr == "WAVES"))
25+ then unit
26+ else fromBase58String(assetIdStr)
27+
28+
29+func getTokenBalance (assetId) = match assetId {
30+ case t: ByteVector =>
31+ assetBalance(this, t)
32+ case _ =>
33+ wavesBalance(this).available
34+}
35+
36+
37+func addAssetBytesToList (accum,item) = (accum ++ [getAssetBytes(item)])
38+
39+
40+func convertStringIntoAmm (amm) = {
41+ let amms = getStringValue(getOracle(), staticKey_ammAddress())
42+ let list = split(amms, ",")
43+ if (containsElement(list, amm))
44+ then value(addressFromString(amm))
45+ else throw("BCO: AMM not found")
46+ }
47+
48+
49+@Callable(i)
50+func generateAndStakeIndex (amm) = {
51+ let mainAddress = convertStringIntoAmm(amm)
52+ let assetIds = {
53+ let $l = split(getStringValue(mainAddress, "static_tokenIds"), ",")
54+ let $s = size($l)
55+ let $acc0 = nil
56+ func $f0_1 ($a,$i) = if (($i >= $s))
57+ then $a
58+ else addAssetBytesToList($a, $l[$i])
59+
60+ func $f0_2 ($a,$i) = if (($i >= $s))
61+ then $a
62+ else throw("List size exceeds 10")
63+
64+ $f0_2($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)
65+ }
66+ let baseAssetId = getAssetBytes(getStringValue(mainAddress, "static_baseTokenId"))
67+ let secondaryAssetIds = removeByIndex(assetIds, value(indexOf(assetIds, baseAssetId)))
68+ let poolIndexId = getBinaryValue(mainAddress, "global_poolToken_id")
69+ let PIssuedAmount = match reentrantInvoke(mainAddress, "generateIndex", [true], i.payments) {
70+ case x: Int =>
71+ x
72+ case _ =>
73+ 0
74+ }
75+ if ((PIssuedAmount == PIssuedAmount))
76+ then {
77+ let stakeInvoke = reentrantInvoke(mainAddress, "stakeIndex", nil, [AttachedPayment(poolIndexId, PIssuedAmount)])
78+ if ((stakeInvoke == stakeInvoke))
79+ then nil
80+ else throw("Strict value is not equal to itself.")
81+ }
82+ else throw("Strict value is not equal to itself.")
83+ }
84+
85+
86+
87+@Callable(i)
88+func unstakeAndRedeemIndex (amm,amount) = {
89+ let mainAddress = convertStringIntoAmm(amm)
90+ let assetIds = {
91+ let $l = split(getStringValue(mainAddress, "static_tokenIds"), ",")
92+ let $s = size($l)
93+ let $acc0 = nil
94+ func $f0_1 ($a,$i) = if (($i >= $s))
95+ then $a
96+ else addAssetBytesToList($a, $l[$i])
97+
98+ func $f0_2 ($a,$i) = if (($i >= $s))
99+ then $a
100+ else throw("List size exceeds 10")
101+
102+ $f0_2($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)
103+ }
104+ let baseAssetId = getAssetBytes(getStringValue(mainAddress, "static_baseTokenId"))
105+ let secondaryAssetIds = removeByIndex(assetIds, value(indexOf(assetIds, baseAssetId)))
106+ let poolIndexId = getBinaryValue(mainAddress, "global_poolToken_id")
107+ let unstakeInvoke = reentrantInvoke(mainAddress, "unstakeIndex", [amount], i.payments)
108+ if ((unstakeInvoke == unstakeInvoke))
109+ then {
110+ let redeemInvoke = reentrantInvoke(mainAddress, "redeemIndex", [true], [AttachedPayment(poolIndexId, amount)])
111+ if ((redeemInvoke == redeemInvoke))
112+ then nil
113+ else throw("Strict value is not equal to itself.")
114+ }
115+ else throw("Strict value is not equal to itself.")
116+ }
117+
118+
119+
120+@Callable(i)
121+func configureOracle (oracle) = if ((i.caller != this))
122+ then throw("BCO: admin only")
123+ else [StringEntry(staticKey_oracleAddress(), oracle)]
124+
125+
126+@Verifier(tx)
127+func verify () = if (isTestEnv())
128+ then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
129+ else {
130+ let firstUser = base58'6TdaXEfhnjYquvPf3yV7MFxt2CbgFmaqsvGwkKfXtKi4'
131+ let secondUser = base58'7DsP2WaMLocbHuUxux7pbXRjTrrZ1TFQPsi5QumS3gr8'
132+ let thirdUser = base58'BpFWP3p3JgYrrP45xfrKzeMcWMEXoinj4FVPPkUiA8D3'
133+ let firstUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], firstUser))
134+ then 1
135+ else if (sigVerify(tx.bodyBytes, tx.proofs[1], firstUser))
136+ then 1
137+ else if (sigVerify(tx.bodyBytes, tx.proofs[2], firstUser))
138+ then 1
139+ else 0
140+ let secondUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], secondUser))
141+ then 1
142+ else if (sigVerify(tx.bodyBytes, tx.proofs[1], secondUser))
143+ then 1
144+ else if (sigVerify(tx.bodyBytes, tx.proofs[2], secondUser))
145+ then 1
146+ else 0
147+ let thirdUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], thirdUser))
148+ then 1
149+ else if (sigVerify(tx.bodyBytes, tx.proofs[1], thirdUser))
150+ then 1
151+ else if (sigVerify(tx.bodyBytes, tx.proofs[2], thirdUser))
152+ then 1
153+ else 0
154+ let signaturesCount = ((firstUserSigned + secondUserSigned) + thirdUserSigned)
155+ match tx {
156+ case _ =>
157+ (signaturesCount >= 2)
158+ }
159+ }
160+

github/deemru/w8io/026f985 
15.19 ms