tx · HsfMZ4ogWJRaSdFbJjw3GQh4MYRBfrkqposqH1JjuDd8 3PR66hDNWcszgP7u3Bqw8Yp3fJ9qzupj6Q8: -0.00300000 Waves 2022.11.04 15:40 [3367761] smart account 3PR66hDNWcszgP7u3Bqw8Yp3fJ9qzupj6Q8 > SELF 0.00000000 Waves
{ "type": 13, "id": "HsfMZ4ogWJRaSdFbJjw3GQh4MYRBfrkqposqH1JjuDd8", "fee": 300000, "feeAssetId": null, "timestamp": 1667565664630, "version": 2, "chainId": 87, "sender": "3PR66hDNWcszgP7u3Bqw8Yp3fJ9qzupj6Q8", "senderPublicKey": "B5bDwAWAxe3eW8Q6mk5Bkwhy9a3djUN3XLh1n2DyJea5", "proofs": [ "4VhPNPjV9m8zoNABPX2YbFxhJssMEBp4tY9q63S4hmXXodhue935wbfyQZSQJVGkh3WwDc8va3EDK4ujbJRWVSjM" ], "script": "base64:AAIFAAAAAAAAAAYIAhIAEgAAAAAIAAAAAARVU0ROAQAAACC2JinDBPXOU5GkDkt1JC9kjFGx+t+vVCm9SNIdKrKq0QAAAAAEVVNEQwEAAAAgUjPZ4ZeIJuXiH8L96og0uId2o4yxg+/IYBx+ChJUJiUAAAAACW1lQWRkcmVzcwkBAAAAB0FkZHJlc3MAAAABAQAAABoBVwwnQqCKkBXJzfWlRzLkNiuD5nGzmlYalgAAAAAMYWRtaW5BZGRyZXNzCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFXvhuxU1jMn1zZ4f4UImyCnow4o+Q3aSlPAAAAABB2aXJlc01haW5BZGRyZXNzCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFXXsGWGTDJokN4RmnWJtbx5rhD0L32TB64AAAAABB2aXJlc1VzZGNBZGRyZXNzCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFXnJHW61bfY7G/f+SNMyTkHKjj+EDnO+0DAAAAABt2aXJlc1Zlc3RpbmdVc2RuTWFpbkFkZHJlc3MJAQAAAAdBZGRyZXNzAAAAAQEAAAAaA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0RDBQAAAANuaWwJAAACAAAAAQIAAAAVdHJhbnNmZXIgdXNkYyAtIGVycm9yCQAAAgAAAAECAAAAEHdpdGhkcmF3IC0gZXJyb3IEAAAAD2ludm9rZVRvVmVzdGluZwkAA/wAAAAEBQAAABt2aXJlc1Zlc3RpbmdVc2RuTWFpbkFkZHJlc3MCAAAADWNvbnZlcnRUb1VTRE4FAAAAA25pbAUAAAADbmlsAwkAAAAAAAACBQAAAA9pbnZva2VUb1Zlc3RpbmcFAAAAD2ludm9rZVRvVmVzdGluZwQAAAADaW52CQAD/AAAAAQFAAAAG3ZpcmVzVmVzdGluZ1VzZG5NYWluQWRkcmVzcwIAAAAVd2l0aGRyYXdWZXN0ZWRBbGxVU0ROCQAETAAAAAIHCQAETAAAAAIGBQAAAANuaWwFAAAAA25pbAMJAAAAAAAAAgUAAAADaW52BQAAAANpbnYEAAAAF3VzZG5BbW91bnRBZnRlcldpdGhkcmF3CQAD8AAAAAIFAAAABHRoaXMFAAAABFVTRE4DCQAAAAAAAAIFAAAAF3VzZG5BbW91bnRBZnRlcldpdGhkcmF3BQAAABd1c2RuQW1vdW50QWZ0ZXJXaXRoZHJhdwkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAltZUFkZHJlc3MFAAAAF3VzZG5BbW91bnRBZnRlcldpdGhkcmF3BQAAAARVU0ROBQAAAANuaWwJAAACAAAAAQIAAAAVdHJhbnNmZXIgdXNkbiAtIGVycm9yCQAAAgAAAAECAAAAHXdpdGhkcmF3VmVzdGVkQWxsVVNETiAtIGVycm9yCQAAAgAAAAECAAAAFWNvbnZlcnRUb1VTRE4gLSBlcnJvcgkAAAIAAAABAgAAABlyZXBsZW5pc2hXaXRoQXRva2VuIGVycm9yAAAAAHKx/4w=", "height": 3367761, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BCB1wcgetU9z1Xg2kj5TAeiu5qsRtJehYe5ufwj3jyKc Next: DuZTXkxMcBj4j4jcxWki5rJi6FR21NhFBFi1UN3BR5Vi Diff:
Old | New | Differences | |
---|---|---|---|
14 | 14 | let viresUsdcAddress = Address(base58'3PGCkrHBxFMi7tz1xqnxgBpeNvn5E4M4g8S') | |
15 | 15 | ||
16 | 16 | let viresVestingUsdnMainAddress = Address(base58'3PCbvPVQfSvVu88ip8Fm5YjwJhjEYk1Txhk') | |
17 | + | ||
18 | + | func getAmountFromUserBalance (v) = match v { | |
19 | + | case x: (Int, Int, Int, Int, Int, Boolean) => | |
20 | + | x._2 | |
21 | + | case t => | |
22 | + | throw("#err") | |
23 | + | } | |
24 | + | ||
17 | 25 | ||
18 | 26 | @Callable(i) | |
19 | 27 | func test () = if ((i.caller != adminAddress)) | |
33 | 41 | ||
34 | 42 | ||
35 | 43 | @Callable(i) | |
36 | - | func | |
44 | + | func dddd_with_import () = if ((i.caller != adminAddress)) | |
37 | 45 | then throw("only admin can do") | |
38 | 46 | else { | |
39 | - | let invokeImportUsdcLp = invoke(viresMainAddress, "replenishWithAtoken", nil, i.payments) | |
47 | + | let userBalance = getAmountFromUserBalance(invoke(viresUsdcAddress, "userBalance", [toString(this)], nil)) | |
48 | + | let invokeImportUsdcLp = if ((1 > userBalance)) | |
49 | + | then invoke(viresMainAddress, "replenishWithAtoken", nil, i.payments) | |
50 | + | else true | |
40 | 51 | if ((invokeImportUsdcLp == invokeImportUsdcLp)) | |
41 | 52 | then { | |
42 | - | let invokeToVesting = invoke(viresVestingUsdnMainAddress, "convertToUSDN", nil, nil) | |
43 | - | if ((invokeToVesting == invokeToVesting)) | |
44 | - | then { | |
45 | - | let inv = invoke(viresVestingUsdnMainAddress, "withdrawVestedAllUSDN", [false, true], nil) | |
46 | - | if ((inv == inv)) | |
47 | - | then { | |
48 | - | let usdnAmountAfterWithdraw = assetBalance(this, USDN) | |
49 | - | if ((usdnAmountAfterWithdraw == usdnAmountAfterWithdraw)) | |
50 | - | then [ScriptTransfer(meAddress, usdnAmountAfterWithdraw, USDN)] | |
51 | - | else throw("Strict value is not equal to itself. - 5") | |
52 | - | } | |
53 | - | else throw("Strict value is not equal to itself. - 4") | |
54 | - | } | |
55 | - | else throw("Strict value is not equal to itself. - 3") | |
56 | - | } | |
57 | - | else throw("Strict value is not equal to itself. - 2") | |
58 | - | } | |
59 | - | ||
60 | - | ||
61 | - | ||
62 | - | @Callable(i) | |
63 | - | func usdc_100_with_import () = if ((i.caller != adminAddress)) | |
64 | - | then throw("only admin can do") | |
65 | - | else { | |
66 | - | let scBalance = assetBalance(viresUsdcAddress, USDC) | |
67 | - | if ((100000000 > scBalance)) | |
68 | - | then throw("no usdc in pool") | |
69 | - | else { | |
70 | - | let invokeImportUsdcLp = invoke(viresMainAddress, "replenishWithAtoken", nil, i.payments) | |
71 | - | if ((invokeImportUsdcLp == invokeImportUsdcLp)) | |
53 | + | let scBalance = assetBalance(viresUsdcAddress, USDC) | |
54 | + | if ((100000000 > scBalance)) | |
72 | 55 | then { | |
73 | 56 | let inv = invoke(viresMainAddress, "withdraw", [toBase58String(USDC), -1], nil) | |
74 | 57 | if ((inv == inv)) | |
76 | 59 | let usdcAmountAfterWithdraw = assetBalance(this, USDC) | |
77 | 60 | if ((usdcAmountAfterWithdraw == usdcAmountAfterWithdraw)) | |
78 | 61 | then [ScriptTransfer(meAddress, usdcAmountAfterWithdraw, USDC)] | |
79 | - | else throw(" | |
62 | + | else throw("transfer usdc - error") | |
80 | 63 | } | |
81 | - | else throw(" | |
64 | + | else throw("withdraw - error") | |
82 | 65 | } | |
83 | - | else throw("Strict value is not equal to itself. - 6") | |
84 | - | } | |
85 | - | } | |
86 | - | ||
87 | - | ||
88 | - | ||
89 | - | @Callable(i) | |
90 | - | func dddd_with_import () = if ((i.caller != adminAddress)) | |
91 | - | then throw("only admin can do") | |
92 | - | else { | |
93 | - | let scBalance = assetBalance(viresUsdcAddress, USDC) | |
94 | - | if ((100000000 > scBalance)) | |
95 | - | then { | |
96 | - | let invokeImportUsdcLp = invoke(viresMainAddress, "replenishWithAtoken", nil, i.payments) | |
97 | - | if ((invokeImportUsdcLp == invokeImportUsdcLp)) | |
98 | - | then { | |
66 | + | else { | |
99 | 67 | let invokeToVesting = invoke(viresVestingUsdnMainAddress, "convertToUSDN", nil, nil) | |
100 | 68 | if ((invokeToVesting == invokeToVesting)) | |
101 | 69 | then { | |
105 | 73 | let usdnAmountAfterWithdraw = assetBalance(this, USDN) | |
106 | 74 | if ((usdnAmountAfterWithdraw == usdnAmountAfterWithdraw)) | |
107 | 75 | then [ScriptTransfer(meAddress, usdnAmountAfterWithdraw, USDN)] | |
108 | - | else throw(" | |
76 | + | else throw("transfer usdn - error") | |
109 | 77 | } | |
110 | - | else throw(" | |
78 | + | else throw("withdrawVestedAllUSDN - error") | |
111 | 79 | } | |
112 | - | else throw(" | |
80 | + | else throw("convertToUSDN - error") | |
113 | 81 | } | |
114 | - | else throw("Strict value is not equal to itself. - 2") | |
115 | 82 | } | |
116 | - | else { | |
117 | - | let invokeImportUsdcLp = invoke(viresMainAddress, "replenishWithAtoken", nil, i.payments) | |
118 | - | if ((invokeImportUsdcLp == invokeImportUsdcLp)) | |
119 | - | then { | |
120 | - | let inv = invoke(viresMainAddress, "withdraw", [toBase58String(USDC), -1], nil) | |
121 | - | if ((inv == inv)) | |
122 | - | then { | |
123 | - | let usdcAmountAfterWithdraw = assetBalance(this, USDC) | |
124 | - | if ((usdcAmountAfterWithdraw == usdcAmountAfterWithdraw)) | |
125 | - | then [ScriptTransfer(meAddress, usdcAmountAfterWithdraw, USDC)] | |
126 | - | else throw("Strict value is not equal to itself. - 7") | |
127 | - | } | |
128 | - | else throw("Strict value is not equal to itself. - 8") | |
129 | - | } | |
130 | - | else throw("Strict value is not equal to itself. - 6") | |
131 | - | } | |
83 | + | else throw("replenishWithAtoken error") | |
132 | 84 | } | |
133 | 85 | ||
134 | 86 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let USDN = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p' | |
5 | 5 | ||
6 | 6 | let USDC = base58'6XtHjpXbs9RRJP2Sr9GUyVqzACcby9TkThHXnjVC5CDJ' | |
7 | 7 | ||
8 | 8 | let meAddress = Address(base58'3P339sQ6rBBSUxAJheEvpEm77htQCsJBnzy') | |
9 | 9 | ||
10 | 10 | let adminAddress = Address(base58'3PKG6HpECVsPpGHoQyyE66wdEKfZLpbHxpn') | |
11 | 11 | ||
12 | 12 | let viresMainAddress = Address(base58'3PAZv9tgK1PX7dKR7b4kchq5qdpUS3G5sYT') | |
13 | 13 | ||
14 | 14 | let viresUsdcAddress = Address(base58'3PGCkrHBxFMi7tz1xqnxgBpeNvn5E4M4g8S') | |
15 | 15 | ||
16 | 16 | let viresVestingUsdnMainAddress = Address(base58'3PCbvPVQfSvVu88ip8Fm5YjwJhjEYk1Txhk') | |
17 | + | ||
18 | + | func getAmountFromUserBalance (v) = match v { | |
19 | + | case x: (Int, Int, Int, Int, Int, Boolean) => | |
20 | + | x._2 | |
21 | + | case t => | |
22 | + | throw("#err") | |
23 | + | } | |
24 | + | ||
17 | 25 | ||
18 | 26 | @Callable(i) | |
19 | 27 | func test () = if ((i.caller != adminAddress)) | |
20 | 28 | then throw("only admin can do") | |
21 | 29 | else { | |
22 | 30 | let invokeImportUsdcLp = invoke(viresMainAddress, "replenishWithAtoken", nil, i.payments) | |
23 | 31 | if ((invokeImportUsdcLp == invokeImportUsdcLp)) | |
24 | 32 | then { | |
25 | 33 | let invokeToVesting = invoke(viresVestingUsdnMainAddress, "convertToUSDN", nil, nil) | |
26 | 34 | if ((invokeToVesting == invokeToVesting)) | |
27 | 35 | then [IntegerEntry("zz", 0)] | |
28 | 36 | else throw("Strict value is not equal to itself. - 3") | |
29 | 37 | } | |
30 | 38 | else throw("Strict value is not equal to itself. - 2") | |
31 | 39 | } | |
32 | 40 | ||
33 | 41 | ||
34 | 42 | ||
35 | 43 | @Callable(i) | |
36 | - | func | |
44 | + | func dddd_with_import () = if ((i.caller != adminAddress)) | |
37 | 45 | then throw("only admin can do") | |
38 | 46 | else { | |
39 | - | let invokeImportUsdcLp = invoke(viresMainAddress, "replenishWithAtoken", nil, i.payments) | |
47 | + | let userBalance = getAmountFromUserBalance(invoke(viresUsdcAddress, "userBalance", [toString(this)], nil)) | |
48 | + | let invokeImportUsdcLp = if ((1 > userBalance)) | |
49 | + | then invoke(viresMainAddress, "replenishWithAtoken", nil, i.payments) | |
50 | + | else true | |
40 | 51 | if ((invokeImportUsdcLp == invokeImportUsdcLp)) | |
41 | 52 | then { | |
42 | - | let invokeToVesting = invoke(viresVestingUsdnMainAddress, "convertToUSDN", nil, nil) | |
43 | - | if ((invokeToVesting == invokeToVesting)) | |
44 | - | then { | |
45 | - | let inv = invoke(viresVestingUsdnMainAddress, "withdrawVestedAllUSDN", [false, true], nil) | |
46 | - | if ((inv == inv)) | |
47 | - | then { | |
48 | - | let usdnAmountAfterWithdraw = assetBalance(this, USDN) | |
49 | - | if ((usdnAmountAfterWithdraw == usdnAmountAfterWithdraw)) | |
50 | - | then [ScriptTransfer(meAddress, usdnAmountAfterWithdraw, USDN)] | |
51 | - | else throw("Strict value is not equal to itself. - 5") | |
52 | - | } | |
53 | - | else throw("Strict value is not equal to itself. - 4") | |
54 | - | } | |
55 | - | else throw("Strict value is not equal to itself. - 3") | |
56 | - | } | |
57 | - | else throw("Strict value is not equal to itself. - 2") | |
58 | - | } | |
59 | - | ||
60 | - | ||
61 | - | ||
62 | - | @Callable(i) | |
63 | - | func usdc_100_with_import () = if ((i.caller != adminAddress)) | |
64 | - | then throw("only admin can do") | |
65 | - | else { | |
66 | - | let scBalance = assetBalance(viresUsdcAddress, USDC) | |
67 | - | if ((100000000 > scBalance)) | |
68 | - | then throw("no usdc in pool") | |
69 | - | else { | |
70 | - | let invokeImportUsdcLp = invoke(viresMainAddress, "replenishWithAtoken", nil, i.payments) | |
71 | - | if ((invokeImportUsdcLp == invokeImportUsdcLp)) | |
53 | + | let scBalance = assetBalance(viresUsdcAddress, USDC) | |
54 | + | if ((100000000 > scBalance)) | |
72 | 55 | then { | |
73 | 56 | let inv = invoke(viresMainAddress, "withdraw", [toBase58String(USDC), -1], nil) | |
74 | 57 | if ((inv == inv)) | |
75 | 58 | then { | |
76 | 59 | let usdcAmountAfterWithdraw = assetBalance(this, USDC) | |
77 | 60 | if ((usdcAmountAfterWithdraw == usdcAmountAfterWithdraw)) | |
78 | 61 | then [ScriptTransfer(meAddress, usdcAmountAfterWithdraw, USDC)] | |
79 | - | else throw(" | |
62 | + | else throw("transfer usdc - error") | |
80 | 63 | } | |
81 | - | else throw(" | |
64 | + | else throw("withdraw - error") | |
82 | 65 | } | |
83 | - | else throw("Strict value is not equal to itself. - 6") | |
84 | - | } | |
85 | - | } | |
86 | - | ||
87 | - | ||
88 | - | ||
89 | - | @Callable(i) | |
90 | - | func dddd_with_import () = if ((i.caller != adminAddress)) | |
91 | - | then throw("only admin can do") | |
92 | - | else { | |
93 | - | let scBalance = assetBalance(viresUsdcAddress, USDC) | |
94 | - | if ((100000000 > scBalance)) | |
95 | - | then { | |
96 | - | let invokeImportUsdcLp = invoke(viresMainAddress, "replenishWithAtoken", nil, i.payments) | |
97 | - | if ((invokeImportUsdcLp == invokeImportUsdcLp)) | |
98 | - | then { | |
66 | + | else { | |
99 | 67 | let invokeToVesting = invoke(viresVestingUsdnMainAddress, "convertToUSDN", nil, nil) | |
100 | 68 | if ((invokeToVesting == invokeToVesting)) | |
101 | 69 | then { | |
102 | 70 | let inv = invoke(viresVestingUsdnMainAddress, "withdrawVestedAllUSDN", [false, true], nil) | |
103 | 71 | if ((inv == inv)) | |
104 | 72 | then { | |
105 | 73 | let usdnAmountAfterWithdraw = assetBalance(this, USDN) | |
106 | 74 | if ((usdnAmountAfterWithdraw == usdnAmountAfterWithdraw)) | |
107 | 75 | then [ScriptTransfer(meAddress, usdnAmountAfterWithdraw, USDN)] | |
108 | - | else throw(" | |
76 | + | else throw("transfer usdn - error") | |
109 | 77 | } | |
110 | - | else throw(" | |
78 | + | else throw("withdrawVestedAllUSDN - error") | |
111 | 79 | } | |
112 | - | else throw(" | |
80 | + | else throw("convertToUSDN - error") | |
113 | 81 | } | |
114 | - | else throw("Strict value is not equal to itself. - 2") | |
115 | 82 | } | |
116 | - | else { | |
117 | - | let invokeImportUsdcLp = invoke(viresMainAddress, "replenishWithAtoken", nil, i.payments) | |
118 | - | if ((invokeImportUsdcLp == invokeImportUsdcLp)) | |
119 | - | then { | |
120 | - | let inv = invoke(viresMainAddress, "withdraw", [toBase58String(USDC), -1], nil) | |
121 | - | if ((inv == inv)) | |
122 | - | then { | |
123 | - | let usdcAmountAfterWithdraw = assetBalance(this, USDC) | |
124 | - | if ((usdcAmountAfterWithdraw == usdcAmountAfterWithdraw)) | |
125 | - | then [ScriptTransfer(meAddress, usdcAmountAfterWithdraw, USDC)] | |
126 | - | else throw("Strict value is not equal to itself. - 7") | |
127 | - | } | |
128 | - | else throw("Strict value is not equal to itself. - 8") | |
129 | - | } | |
130 | - | else throw("Strict value is not equal to itself. - 6") | |
131 | - | } | |
83 | + | else throw("replenishWithAtoken error") | |
132 | 84 | } | |
133 | 85 | ||
134 | 86 |
github/deemru/w8io/6500d08 28.11 ms ◑