tx · 7WEWb7pEkqAUT6S8Ddy8aTRC1pPoJQdDpEwg96tBgBZR 3PNixXRpaBngijBdNmKe3VHJKwD6PatDZX4: -0.00200000 Waves 2022.12.21 07:21 [3435032] smart account 3PNixXRpaBngijBdNmKe3VHJKwD6PatDZX4 > SELF 0.00000000 Waves
{ "type": 13, "id": "7WEWb7pEkqAUT6S8Ddy8aTRC1pPoJQdDpEwg96tBgBZR", "fee": 200000, "feeAssetId": null, "timestamp": 1671596555821, "version": 1, "sender": "3PNixXRpaBngijBdNmKe3VHJKwD6PatDZX4", "senderPublicKey": "2d499SNJhrHLMh6Jjn4L2gFbZZ9jz81ta6Y8EaWZAf3S", "proofs": [ "5UtpZWdYGspTEEPSW33X35jwecyhVVx1SdrsLzuC8dGVCPr7kDJ8jKFSGkFU3gheTnBtSTWwTk86Pv1nF2DKjcjh" ], "script": "base64:BgKGAQgCEgASABIAIgRVU0ROIg1DbGFpbXNSZXdhcmRzIgdWZXN0aW5nIg9kZWxlZ2F0ZUFkZHJlc3MiDGFkbWluQWRkcmVzcyIBaSIDaW52Igt1c2RuSW5pdGlhbCIJdXNkbkZpbmFsIgpVU0ROUmV3YXJkIgJ0eCIGdmVyaWZ5IgckbWF0Y2gwBQABYQEgtiYpwwT1zlORpA5LdSQvZIxRsfrfr1QpvUjSHSqyqtEAAWIJAQdBZGRyZXNzAQEaAVfBck6YPz0QEz8ItSgBixhYcdv0PaqHx2QAAWMJAQdBZGRyZXNzAQEaAVd1Et2Tgg9b3iV2FTnLSdUfUygJxOhxXicAAWQJAQdBZGRyZXNzAQEaAVeCseCv9O4DBvfUEsqcCwjlU9tmnjqUogUAAWUJAQdBZGRyZXNzAQEaAVcULU/ulWtOLv6M9qfqEp7osy/PzlmN64UDAWYBAnZ2AAMDCQAAAggFAWYGY2FsbGVyBQR0aGlzBgkAAAIIBQFmBmNhbGxlcgUBZQQBZwkA/AcEBQFjAhV3aXRoZHJhd1Zlc3RlZEFsbFVTRE4JAMwIAgcJAMwIAg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CAUBawZwcm9vZnMAAAgFAWsPc2VuZGVyUHVibGljS2V5emEVbQ==", "chainId": 87, "height": 3435032, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2k1zKtvJEStgkeC7YiSW8fQr6oKSLT46Adk1NC6UsFW5 Next: none Diff:
Old | New | Differences | |
---|---|---|---|
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let USDN = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p' | |
5 | 5 | ||
6 | - | let | |
6 | + | let ClaimsRewards = Address(base58'3PKZk5TdPCLP2GZviipLFfK46ExTnwkRCBd') | |
7 | 7 | ||
8 | - | let | |
8 | + | let Vesting = Address(base58'3PCbvPVQfSvVu88ip8Fm5YjwJhjEYk1Txhk') | |
9 | 9 | ||
10 | - | let | |
10 | + | let delegateAddress = Address(base58'3PDqwfLpLfmdsYvJrnT5wizggfzYt7XC7xY') | |
11 | 11 | ||
12 | - | let VIRES = base58'DSbbhLsSTeDg5Lsiufk2Aneh3DjVqJuPr2M9uU1gwy5p' | |
13 | - | ||
14 | - | let Vesting = addressFromStringValue("3PCbvPVQfSvVu88ip8Fm5YjwJhjEYk1Txhk") | |
15 | - | ||
16 | - | let viresMain = addressFromStringValue("3PAZv9tgK1PX7dKR7b4kchq5qdpUS3G5sYT") | |
17 | - | ||
18 | - | let delegateAddress = addressFromStringValue("3P3maXS1yoBEvhbMTLBYHm2pAPeUSrfzDAc") | |
12 | + | let adminAddress = Address(base58'3P3maXS1yoBEvhbMTLBYHm2pAPeUSrfzDAc') | |
19 | 13 | ||
20 | 14 | @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 | - | } | |
47 | - | else throw("Strict value is not equal to itself.") | |
48 | - | } | |
49 | - | ||
50 | - | ||
51 | - | ||
52 | - | @Callable(i) | |
53 | - | func v () = if ((i.caller != this)) | |
54 | - | then throw("Access Denied") | |
55 | - | else { | |
15 | + | func vv () = if (if ((i.caller == this)) | |
16 | + | then true | |
17 | + | else (i.caller == adminAddress)) | |
18 | + | then { | |
56 | 19 | let inv = invoke(Vesting, "withdrawVestedAllUSDN", [false, true], nil) | |
57 | 20 | if ((inv == inv)) | |
58 | 21 | then nil | |
59 | 22 | else throw("Strict value is not equal to itself.") | |
60 | 23 | } | |
24 | + | else throw("Access Denied") | |
61 | 25 | ||
62 | 26 | ||
63 | 27 | ||
64 | 28 | @Callable(i) | |
65 | - | func vw () = if ((i.caller != this)) | |
66 | - | then throw("Access Denied") | |
67 | - | else { | |
29 | + | func v () = if (if ((i.caller == this)) | |
30 | + | then true | |
31 | + | else (i.caller == adminAddress)) | |
32 | + | then { | |
68 | 33 | let usdnInitial = assetBalance(this, USDN) | |
69 | 34 | if ((usdnInitial == usdnInitial)) | |
70 | 35 | then { | |
80 | 45 | } | |
81 | 46 | else throw("Strict value is not equal to itself.") | |
82 | 47 | } | |
48 | + | else throw("Access Denied") | |
83 | 49 | ||
84 | 50 | ||
85 | 51 | ||
86 | 52 | @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 { | |
53 | + | func ClaimRewardsUSDN () = if (if ((i.caller == this)) | |
54 | + | then true | |
55 | + | else (i.caller == adminAddress)) | |
56 | + | then { | |
114 | 57 | let USDNReward = invoke(ClaimsRewards, "claimRewards", nil, nil) | |
115 | 58 | if ((USDNReward == USDNReward)) | |
116 | 59 | then nil | |
117 | 60 | else throw("Strict value is not equal to itself.") | |
118 | 61 | } | |
62 | + | else throw("Access Denied") | |
119 | 63 | ||
120 | 64 | ||
121 | 65 | @Verifier(tx) | |
122 | 66 | func verify () = match tx { | |
123 | 67 | case inv: InvokeScriptTransaction => | |
124 | - | if ((addressFromRecipient(inv.dApp) == this)) | |
68 | + | if (if ((addressFromRecipient(inv.dApp) == this)) | |
69 | + | then (13000001 >= inv.fee) | |
70 | + | else false) | |
125 | 71 | then true | |
126 | 72 | else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
127 | 73 | case _ => |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let USDN = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p' | |
5 | 5 | ||
6 | - | let | |
6 | + | let ClaimsRewards = Address(base58'3PKZk5TdPCLP2GZviipLFfK46ExTnwkRCBd') | |
7 | 7 | ||
8 | - | let | |
8 | + | let Vesting = Address(base58'3PCbvPVQfSvVu88ip8Fm5YjwJhjEYk1Txhk') | |
9 | 9 | ||
10 | - | let | |
10 | + | let delegateAddress = Address(base58'3PDqwfLpLfmdsYvJrnT5wizggfzYt7XC7xY') | |
11 | 11 | ||
12 | - | let VIRES = base58'DSbbhLsSTeDg5Lsiufk2Aneh3DjVqJuPr2M9uU1gwy5p' | |
13 | - | ||
14 | - | let Vesting = addressFromStringValue("3PCbvPVQfSvVu88ip8Fm5YjwJhjEYk1Txhk") | |
15 | - | ||
16 | - | let viresMain = addressFromStringValue("3PAZv9tgK1PX7dKR7b4kchq5qdpUS3G5sYT") | |
17 | - | ||
18 | - | let delegateAddress = addressFromStringValue("3P3maXS1yoBEvhbMTLBYHm2pAPeUSrfzDAc") | |
12 | + | let adminAddress = Address(base58'3P3maXS1yoBEvhbMTLBYHm2pAPeUSrfzDAc') | |
19 | 13 | ||
20 | 14 | @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 | - | } | |
47 | - | else throw("Strict value is not equal to itself.") | |
48 | - | } | |
49 | - | ||
50 | - | ||
51 | - | ||
52 | - | @Callable(i) | |
53 | - | func v () = if ((i.caller != this)) | |
54 | - | then throw("Access Denied") | |
55 | - | else { | |
15 | + | func vv () = if (if ((i.caller == this)) | |
16 | + | then true | |
17 | + | else (i.caller == adminAddress)) | |
18 | + | then { | |
56 | 19 | let inv = invoke(Vesting, "withdrawVestedAllUSDN", [false, true], nil) | |
57 | 20 | if ((inv == inv)) | |
58 | 21 | then nil | |
59 | 22 | else throw("Strict value is not equal to itself.") | |
60 | 23 | } | |
24 | + | else throw("Access Denied") | |
61 | 25 | ||
62 | 26 | ||
63 | 27 | ||
64 | 28 | @Callable(i) | |
65 | - | func vw () = if ((i.caller != this)) | |
66 | - | then throw("Access Denied") | |
67 | - | else { | |
29 | + | func v () = if (if ((i.caller == this)) | |
30 | + | then true | |
31 | + | else (i.caller == adminAddress)) | |
32 | + | then { | |
68 | 33 | let usdnInitial = assetBalance(this, USDN) | |
69 | 34 | if ((usdnInitial == usdnInitial)) | |
70 | 35 | then { | |
71 | 36 | let inv = invoke(Vesting, "withdrawVestedAllUSDN", [false, true], nil) | |
72 | 37 | if ((inv == inv)) | |
73 | 38 | then { | |
74 | 39 | let usdnFinal = assetBalance(this, USDN) | |
75 | 40 | if ((usdnFinal == usdnFinal)) | |
76 | 41 | then [ScriptTransfer(delegateAddress, usdnFinal, USDN)] | |
77 | 42 | else throw("Strict value is not equal to itself.") | |
78 | 43 | } | |
79 | 44 | else throw("Strict value is not equal to itself.") | |
80 | 45 | } | |
81 | 46 | else throw("Strict value is not equal to itself.") | |
82 | 47 | } | |
48 | + | else throw("Access Denied") | |
83 | 49 | ||
84 | 50 | ||
85 | 51 | ||
86 | 52 | @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 { | |
53 | + | func ClaimRewardsUSDN () = if (if ((i.caller == this)) | |
54 | + | then true | |
55 | + | else (i.caller == adminAddress)) | |
56 | + | then { | |
114 | 57 | let USDNReward = invoke(ClaimsRewards, "claimRewards", nil, nil) | |
115 | 58 | if ((USDNReward == USDNReward)) | |
116 | 59 | then nil | |
117 | 60 | else throw("Strict value is not equal to itself.") | |
118 | 61 | } | |
62 | + | else throw("Access Denied") | |
119 | 63 | ||
120 | 64 | ||
121 | 65 | @Verifier(tx) | |
122 | 66 | func verify () = match tx { | |
123 | 67 | case inv: InvokeScriptTransaction => | |
124 | - | if ((addressFromRecipient(inv.dApp) == this)) | |
68 | + | if (if ((addressFromRecipient(inv.dApp) == this)) | |
69 | + | then (13000001 >= inv.fee) | |
70 | + | else false) | |
125 | 71 | then true | |
126 | 72 | else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
127 | 73 | case _ => | |
128 | 74 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
129 | 75 | } | |
130 | 76 |
github/deemru/w8io/3ef1775 57.79 ms ◑