2023.01.04 13:42 [3455586] smart account 3PFq4BzfwfzhgpoFQsRBSajShYbaezh6kUn > SELF 0.00000000 Waves

{ "type": 13, "id": "AEz9pYXVbXPVSBVdJvAg55Ww44sVGrUoJZrdf1QYohEm", "fee": 200000, "feeAssetId": null, "timestamp": 1672827005576, "version": 1, "sender": "3PFq4BzfwfzhgpoFQsRBSajShYbaezh6kUn", "senderPublicKey": "HeADrCmdbtSrR2AMHyKHuvvdebaQhAuZvc6FzUE2fbA4", "proofs": [ "2L4er3HSrpSeyM44EXdmnbW3dYeJEiFL4gSyew8tQtdbUT7KGnEispAwVzKF6EZJTGmaL256fbfFGUJgLWGM4mXx" ], "script": "base64:BgIKCAISABIAEgASAAQAAmxwASDWhppxa2HBN0LfTH7jKtUZdP/zSfmSIL9MMDvimAKRsQAEVVNETgEgtiYpwwT1zlORpA5LdSQvZIxRsfrfr1QpvUjSHSqyqtEADGFkbWluQWRkcmVzcwkBB0FkZHJlc3MBARoBVxQtT+6Va04u/oz2p+oSnuizL8/OWY3rhQAPZGVsZWdhdGVBZGRyZXNzCQEHQWRkcmVzcwEBGgFXgrHgr/TuAwb31BLKnAsI5VPbZp46lKIFBAFpAQFpAAMDCQAAAggFAWkGY2FsbGVyBQR0aGlzBgkAAAIIBQFpBmNhbGxlcgUMYWRtaW5BZGRyZXNzBANpbnYJAPwHBAkBB0FkZHJlc3MBARoBV17BlhkwyaJDeEZp1ibW8ea4Q9C99kweuAITcmVwbGVuaXNoV2l0aEF0b2tlbgUDbmlsCQDMCAIJAQ9BdHRhY2hlZFBheW1lbnQCBQJscAkA8AcCBQR0aGlzBQJscAUDbmlsAwkAAAIFA2ludgUDaW52BQNuaWwJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAg1BY2Nlc3MgRGVuaWVkAWkBAWMAAwMJAAACCAUBaQZjYWxsZXIFBHRoaXMGCQAAAggFAWkGY2FsbGVyBQxhZG1pbkFkZHJlc3MEA2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CQBnAgDBupkGCAUDaW52A2ZlZQcGCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5CQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5kTEe3A==", "chainId": 87, "height": 3455586, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: C8Ywpc9dmesBVktKFY5GpjvN487RN1JakDbJ8ows7gPw Next: none Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let lp = base58'FSRHtSyXRXQjzQLRtmaqFpBDDCNjY8PU8KNtwoGXVBmr'
5+
46 let USDN = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p'
57
6-let VIRES_USDT_LP = base58'2tVLdi5fQXk2JcuDAojhctnDp5B5PZhNMyj5GUpeC3tZ'
8+let adminAddress = Address(base58'3P3maXS1yoBEvhbMTLBYHm2pAPeUSrfzDAc')
79
8-let VIRES_USDC_LP = base58'FSRHtSyXRXQjzQLRtmaqFpBDDCNjY8PU8KNtwoGXVBmr'
9-
10-let ClaimsRewards = addressFromStringValue("3PKZk5TdPCLP2GZviipLFfK46ExTnwkRCBd")
11-
12-let VIRES = base58'DSbbhLsSTeDg5Lsiufk2Aneh3DjVqJuPr2M9uU1gwy5p'
13-
14-let Vesting = addressFromStringValue("3PCbvPVQfSvVu88ip8Fm5YjwJhjEYk1Txhk")
15-
16-let viresMain = addressFromStringValue("3PAZv9tgK1PX7dKR7b4kchq5qdpUS3G5sYT")
17-
18-let delegateAddress = addressFromStringValue("3P3maXS1yoBEvhbMTLBYHm2pAPeUSrfzDAc")
10+let delegateAddress = Address(base58'3PDqwfLpLfmdsYvJrnT5wizggfzYt7XC7xY')
1911
2012 @Callable(i)
21-func cvw () = if ((i.caller != this))
22- then throw("Access Denied")
23- else {
24- let lpBalance = assetBalance(this, VIRES_USDC_LP)
25- if ((lpBalance == lpBalance))
26- then {
27- let usdnAmountOnStart = assetBalance(this, USDN)
28- if ((usdnAmountOnStart == usdnAmountOnStart))
29- then {
30- let invokeConvert = invoke(Vesting, "convertToUSDN", nil, nil)
31- if ((invokeConvert == invokeConvert))
32- then {
33- let invVested = invoke(Vesting, "withdrawVestedAllUSDN", [false, true], nil)
34- if ((invVested == invVested))
35- then {
36- let usdnAmountAfterVested = assetBalance(this, USDN)
37- if ((usdnAmountAfterVested == usdnAmountAfterVested))
38- then [ScriptTransfer(delegateAddress, usdnAmountAfterVested, USDN)]
39- else throw("Strict value is not equal to itself.")
40- }
41- else throw("Strict value is not equal to itself.")
42- }
43- else throw("Strict value is not equal to itself.")
44- }
45- else throw("Strict value is not equal to itself.")
46- }
13+func i () = if (if ((i.caller == this))
14+ then true
15+ else (i.caller == adminAddress))
16+ then {
17+ let inv = invoke(Address(base58'3PAZv9tgK1PX7dKR7b4kchq5qdpUS3G5sYT'), "replenishWithAtoken", nil, [AttachedPayment(lp, assetBalance(this, lp))])
18+ if ((inv == inv))
19+ then nil
4720 else throw("Strict value is not equal to itself.")
4821 }
22+ else throw("Access Denied")
4923
5024
5125
5226 @Callable(i)
53-func v () = if ((i.caller != this))
54- then throw("Access Denied")
55- else {
56- let inv = invoke(Vesting, "withdrawVestedAllUSDN", [false, true], nil)
27+func c () = if (if ((i.caller == this))
28+ then true
29+ else (i.caller == adminAddress))
30+ then {
31+ let inv = invoke(Address(base58'3PCbvPVQfSvVu88ip8Fm5YjwJhjEYk1Txhk'), "convertToUSDN", nil, nil)
5732 if ((inv == inv))
5833 then nil
5934 else throw("Strict value is not equal to itself.")
6035 }
36+ else throw("Access Denied")
6137
6238
6339
6440 @Callable(i)
65-func vw () = if ((i.caller != this))
66- then throw("Access Denied")
67- else {
68- let usdnInitial = assetBalance(this, USDN)
69- if ((usdnInitial == usdnInitial))
70- then {
71- let inv = invoke(Vesting, "withdrawVestedAllUSDN", [false, true], nil)
72- if ((inv == inv))
73- then {
74- let usdnFinal = assetBalance(this, USDN)
75- if ((usdnFinal == usdnFinal))
76- then [ScriptTransfer(delegateAddress, usdnFinal, USDN)]
77- else throw("Strict value is not equal to itself.")
78- }
79- else throw("Strict value is not equal to itself.")
80- }
41+func v () = if (if ((i.caller == this))
42+ then true
43+ else (i.caller == adminAddress))
44+ then {
45+ let inv = invoke(Address(base58'3PCbvPVQfSvVu88ip8Fm5YjwJhjEYk1Txhk'), "withdrawVestedAllUSDN", [false, true], nil)
46+ if ((inv == inv))
47+ then [ScriptTransfer(delegateAddress, assetBalance(this, USDN), USDN)]
8148 else throw("Strict value is not equal to itself.")
8249 }
50+ else throw("Access Denied")
8351
8452
8553
8654 @Callable(i)
87-func ic (amount) = if ((i.caller != this))
88- then throw("Access Denied")
89- else {
90- let inv = invoke(viresMain, "replenishWithAtoken", nil, [AttachedPayment(VIRES_USDC_LP, amount)])
91- if ((inv == inv))
92- then nil
93- else throw("Strict value is not equal to itself.")
94- }
95-
96-
97-
98-@Callable(i)
99-func it (amount) = if ((i.caller != this))
100- then throw("Access Denied")
101- else {
102- let inv = invoke(viresMain, "replenishWithAtoken", nil, [AttachedPayment(VIRES_USDT_LP, amount)])
103- if ((inv == inv))
104- then nil
105- else throw("Strict value is not equal to itself.")
106- }
107-
108-
109-
110-@Callable(i)
111-func ClaimRewardsUSDN () = if ((i.caller != this))
112- then throw("Access Denied")
113- else {
114- let USDNReward = invoke(ClaimsRewards, "claimRewards", nil, nil)
55+func ClaimRewardsUSDN () = if (if ((i.caller == this))
56+ then true
57+ else (i.caller == adminAddress))
58+ then {
59+ let USDNReward = invoke(Address(base58'3PKZk5TdPCLP2GZviipLFfK46ExTnwkRCBd'), "claimRewards", nil, nil)
11560 if ((USDNReward == USDNReward))
11661 then nil
11762 else throw("Strict value is not equal to itself.")
11863 }
64+ else throw("Access Denied")
11965
12066
12167 @Verifier(tx)
12268 func verify () = match tx {
12369 case inv: InvokeScriptTransaction =>
124- if ((addressFromRecipient(inv.dApp) == this))
70+ if (if ((addressFromRecipient(inv.dApp) == this))
71+ then (13000001 >= inv.fee)
72+ else false)
12573 then true
12674 else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
12775 case _ =>
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let lp = base58'FSRHtSyXRXQjzQLRtmaqFpBDDCNjY8PU8KNtwoGXVBmr'
5+
46 let USDN = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p'
57
6-let VIRES_USDT_LP = base58'2tVLdi5fQXk2JcuDAojhctnDp5B5PZhNMyj5GUpeC3tZ'
8+let adminAddress = Address(base58'3P3maXS1yoBEvhbMTLBYHm2pAPeUSrfzDAc')
79
8-let VIRES_USDC_LP = base58'FSRHtSyXRXQjzQLRtmaqFpBDDCNjY8PU8KNtwoGXVBmr'
9-
10-let ClaimsRewards = addressFromStringValue("3PKZk5TdPCLP2GZviipLFfK46ExTnwkRCBd")
11-
12-let VIRES = base58'DSbbhLsSTeDg5Lsiufk2Aneh3DjVqJuPr2M9uU1gwy5p'
13-
14-let Vesting = addressFromStringValue("3PCbvPVQfSvVu88ip8Fm5YjwJhjEYk1Txhk")
15-
16-let viresMain = addressFromStringValue("3PAZv9tgK1PX7dKR7b4kchq5qdpUS3G5sYT")
17-
18-let delegateAddress = addressFromStringValue("3P3maXS1yoBEvhbMTLBYHm2pAPeUSrfzDAc")
10+let delegateAddress = Address(base58'3PDqwfLpLfmdsYvJrnT5wizggfzYt7XC7xY')
1911
2012 @Callable(i)
21-func cvw () = if ((i.caller != this))
22- then throw("Access Denied")
23- else {
24- let lpBalance = assetBalance(this, VIRES_USDC_LP)
25- if ((lpBalance == lpBalance))
26- then {
27- let usdnAmountOnStart = assetBalance(this, USDN)
28- if ((usdnAmountOnStart == usdnAmountOnStart))
29- then {
30- let invokeConvert = invoke(Vesting, "convertToUSDN", nil, nil)
31- if ((invokeConvert == invokeConvert))
32- then {
33- let invVested = invoke(Vesting, "withdrawVestedAllUSDN", [false, true], nil)
34- if ((invVested == invVested))
35- then {
36- let usdnAmountAfterVested = assetBalance(this, USDN)
37- if ((usdnAmountAfterVested == usdnAmountAfterVested))
38- then [ScriptTransfer(delegateAddress, usdnAmountAfterVested, USDN)]
39- else throw("Strict value is not equal to itself.")
40- }
41- else throw("Strict value is not equal to itself.")
42- }
43- else throw("Strict value is not equal to itself.")
44- }
45- else throw("Strict value is not equal to itself.")
46- }
13+func i () = if (if ((i.caller == this))
14+ then true
15+ else (i.caller == adminAddress))
16+ then {
17+ let inv = invoke(Address(base58'3PAZv9tgK1PX7dKR7b4kchq5qdpUS3G5sYT'), "replenishWithAtoken", nil, [AttachedPayment(lp, assetBalance(this, lp))])
18+ if ((inv == inv))
19+ then nil
4720 else throw("Strict value is not equal to itself.")
4821 }
22+ else throw("Access Denied")
4923
5024
5125
5226 @Callable(i)
53-func v () = if ((i.caller != this))
54- then throw("Access Denied")
55- else {
56- let inv = invoke(Vesting, "withdrawVestedAllUSDN", [false, true], nil)
27+func c () = if (if ((i.caller == this))
28+ then true
29+ else (i.caller == adminAddress))
30+ then {
31+ let inv = invoke(Address(base58'3PCbvPVQfSvVu88ip8Fm5YjwJhjEYk1Txhk'), "convertToUSDN", nil, nil)
5732 if ((inv == inv))
5833 then nil
5934 else throw("Strict value is not equal to itself.")
6035 }
36+ else throw("Access Denied")
6137
6238
6339
6440 @Callable(i)
65-func vw () = if ((i.caller != this))
66- then throw("Access Denied")
67- else {
68- let usdnInitial = assetBalance(this, USDN)
69- if ((usdnInitial == usdnInitial))
70- then {
71- let inv = invoke(Vesting, "withdrawVestedAllUSDN", [false, true], nil)
72- if ((inv == inv))
73- then {
74- let usdnFinal = assetBalance(this, USDN)
75- if ((usdnFinal == usdnFinal))
76- then [ScriptTransfer(delegateAddress, usdnFinal, USDN)]
77- else throw("Strict value is not equal to itself.")
78- }
79- else throw("Strict value is not equal to itself.")
80- }
41+func v () = if (if ((i.caller == this))
42+ then true
43+ else (i.caller == adminAddress))
44+ then {
45+ let inv = invoke(Address(base58'3PCbvPVQfSvVu88ip8Fm5YjwJhjEYk1Txhk'), "withdrawVestedAllUSDN", [false, true], nil)
46+ if ((inv == inv))
47+ then [ScriptTransfer(delegateAddress, assetBalance(this, USDN), USDN)]
8148 else throw("Strict value is not equal to itself.")
8249 }
50+ else throw("Access Denied")
8351
8452
8553
8654 @Callable(i)
87-func ic (amount) = if ((i.caller != this))
88- then throw("Access Denied")
89- else {
90- let inv = invoke(viresMain, "replenishWithAtoken", nil, [AttachedPayment(VIRES_USDC_LP, amount)])
91- if ((inv == inv))
92- then nil
93- else throw("Strict value is not equal to itself.")
94- }
95-
96-
97-
98-@Callable(i)
99-func it (amount) = if ((i.caller != this))
100- then throw("Access Denied")
101- else {
102- let inv = invoke(viresMain, "replenishWithAtoken", nil, [AttachedPayment(VIRES_USDT_LP, amount)])
103- if ((inv == inv))
104- then nil
105- else throw("Strict value is not equal to itself.")
106- }
107-
108-
109-
110-@Callable(i)
111-func ClaimRewardsUSDN () = if ((i.caller != this))
112- then throw("Access Denied")
113- else {
114- let USDNReward = invoke(ClaimsRewards, "claimRewards", nil, nil)
55+func ClaimRewardsUSDN () = if (if ((i.caller == this))
56+ then true
57+ else (i.caller == adminAddress))
58+ then {
59+ let USDNReward = invoke(Address(base58'3PKZk5TdPCLP2GZviipLFfK46ExTnwkRCBd'), "claimRewards", nil, nil)
11560 if ((USDNReward == USDNReward))
11661 then nil
11762 else throw("Strict value is not equal to itself.")
11863 }
64+ else throw("Access Denied")
11965
12066
12167 @Verifier(tx)
12268 func verify () = match tx {
12369 case inv: InvokeScriptTransaction =>
124- if ((addressFromRecipient(inv.dApp) == this))
70+ if (if ((addressFromRecipient(inv.dApp) == this))
71+ then (13000001 >= inv.fee)
72+ else false)
12573 then true
12674 else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
12775 case _ =>
12876 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
12977 }
13078

github/deemru/w8io/786bc32 
26.42 ms