@gearbox-protocol/deploy-tools 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/LICENSE +102 -0
  2. package/README.md +60 -0
  3. package/dist/index.js +151000 -0
  4. package/package.json +68 -0
package/LICENSE ADDED
@@ -0,0 +1,102 @@
1
+ Business Source License 1.1
2
+ License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved.
3
+ "Business Source License" is a trademark of MariaDB Corporation Ab.
4
+
5
+ -----------------------------------------------------------------------------
6
+
7
+ Parameters
8
+
9
+ Licensor: GearBox Protocol Limited
10
+
11
+ Licensed Work: Gearbox Contracts (Gearbox Protocol v1)
12
+ The Licensed Work is (c) 2021 GearBox Holdings
13
+
14
+ Additional Use Grant: Any production use of the Licensed Work is permitted if,
15
+ and as long as, such use is expressly mentioned at
16
+ gearbox.eth (the “List”). Once any specific use is added
17
+ to the List, such production use shall be deemed permitted.
18
+ Once any specific use is removed from the List (including
19
+ if the List is updated to indicate that any specific such
20
+ use is no longer allowed), such use shall no longer be
21
+ permitted, and any license to make such production use
22
+ shall be deemed immediately revoked.
23
+
24
+ Change Date: December 15, 2022
25
+
26
+ Change License: GNU General Public License v2.0 or later
27
+
28
+ -----------------------------------------------------------------------------
29
+
30
+ Terms
31
+
32
+ The Licensor hereby grants you the right to copy, modify, create derivative works,
33
+ redistribute, and make non-production use of the Licensed Work. The Licensor may
34
+ make an Additional Use Grant, above, permitting limited production use.
35
+
36
+ Effective on the Change Date, or the fourth anniversary of the first publicly
37
+ available distribution of a specific version of the Licensed Work under this License,
38
+ whichever comes first, the Licensor hereby grants you rights under the terms of the
39
+ Change License, and the rights granted in the paragraph above terminate.
40
+
41
+ If your use of the Licensed Work does not comply with the requirements currently in
42
+ effect as described in this License, you must purchase a commercial license from the
43
+ Licensor, its affiliated entities, or authorized resellers, or you must refrain from
44
+ using the Licensed Work.
45
+
46
+ All copies of the original and modified Licensed Work, and derivative works of the
47
+ Licensed Work, are subject to this License. This License applies separately for each
48
+ version of the Licensed Work and the Change Date may vary for each version of the
49
+ Licensed Work released by Licensor.
50
+
51
+ You must conspicuously display this License on each original or modified copy of the
52
+ Licensed Work. If you receive the Licensed Work in original or modified form from a
53
+ third party, the terms and conditions set forth in this License apply to your use of
54
+ that work.
55
+
56
+ Any use of the Licensed Work in violation of this License will automatically terminate
57
+ your rights under this License for the current and all other versions of the Licensed
58
+ Work.
59
+
60
+ This License does not grant you any right in any trademark or logo of Licensor or its
61
+ affiliates (provided that you may use a trademark or logo of Licensor as expressly
62
+ required by this License).
63
+
64
+ TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON AN “AS IS”
65
+ BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS OR IMPLIED,
66
+ INCLUDING (WITHOUT LIMITATION) WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
67
+ PURPOSE, NON-INFRINGEMENT, AND TITLE.
68
+
69
+ MariaDB hereby grants you permission to use this License’s text to license your works,
70
+ and to refer to it using the trademark “Business Source License”, as long as you comply
71
+ with the Covenants of Licensor below.
72
+
73
+
74
+ -----------------------------------------------------------------------------
75
+
76
+ Covenants of Licensor
77
+
78
+ In consideration of the right to use this License’s text and the “Business Source License”
79
+ name and trademark, Licensor covenants to MariaDB, and to all other recipients of the
80
+ licensed work to be provided by Licensor:
81
+
82
+ 1. To specify as the Change License the GPL Version 2.0 or any later version, or a
83
+ license that is compatible with GPL Version 2.0 or a later version, where “compatible”
84
+ means that software provided under the Change License can be included in a program with
85
+ software provided under GPL Version 2.0 or a later version. Licensor may specify
86
+ additional Change Licenses without limitation.
87
+
88
+ 2. To either: (a) specify an additional grant of rights to use that does not impose
89
+ any additional restriction on the right granted in this License, as the Additional
90
+ Use Grant; or (b) insert the text “None”.
91
+
92
+ 3. To specify a Change Date.
93
+
94
+ 4. Not to modify this License in any other way.
95
+
96
+ -----------------------------------------------------------------------------
97
+
98
+ Notice
99
+
100
+ The Business Source License (this document, or the “License”) is not an Open Source license.
101
+ However, the Licensed Work will eventually be made available under an Open Source License,
102
+ as stated in this License.
package/README.md ADDED
@@ -0,0 +1,60 @@
1
+ ![gearbox](header.png)
2
+
3
+ ## Gearbox protocol
4
+
5
+ This repository contains the code for middleware between Gearbox V2 and third-party protocols.
6
+
7
+ ### What is Gearbox protocol?
8
+
9
+ Gearbox is a generalized leverage protocol: it allows you to take leverage in one place and then use it across various
10
+ DeFi protocols and platforms in a composable way. The protocol has two sides to it: passive liquidity providers who earn higher APY
11
+ by providing liquidity; active traders, farmers, or even other protocols who can borrow those assets to trade or farm with x4+ leverage.
12
+
13
+ Gearbox protocol is a Marketmake ETHGlobal hackathon finalist.
14
+
15
+ ## Bug bounty
16
+
17
+ This repository is subject to the Gearbox bug bounty program, per the terms defined [here]().
18
+
19
+ ## Documentation
20
+
21
+ General documentation of the Gearbox Protocol can be found [here](https://docs.gearbox.fi). Developer documentation with
22
+ more tech-related infromation about the protocol, contract interfaces, integration guides and audits is available on the
23
+ [Gearbox dev protal](https://dev.gearbox.fi).
24
+
25
+ ## Testing
26
+
27
+ ### Setup
28
+
29
+ Running Forge tests requires Foundry. See [Foundry Book](https://book.getfoundry.sh/getting-started/installation) for installation details.
30
+
31
+ ### Unit tests
32
+
33
+ `forge t`
34
+
35
+ ### Mainnet integration tests
36
+
37
+ 1. Start a Mainnet or Goerli fork with: `yarn fork` or `yarn fork-goerli`, respectively.
38
+ 2. Open a new terminal window and run `forge t --match-test _live_ --fork-url http://localhost:8545`.
39
+
40
+ It is recommended to set `$ETH_MAINNET_BLOCK` or `$ETH_GOERLI_BLOCK` to run the tests on a fixed block. Mainnet tests can take significant time to run and can fail unexpectedly due to external provider errors. Re-running the tests on the same block (or without restarting the fork) will be sped up due to caching.
41
+
42
+ ## Licensing
43
+
44
+ The primary license for Gearbox contracts is the Business Source License 1.1 (BUSL-1.1), see [LICENSE](https://github.com/Gearbox-protocol/gearbox-contracts/blob/master/LICENSE). The files licensed under the BUSL-1.1 have appropriate SPDX headers.
45
+
46
+ ###
47
+
48
+ - The files in `contracts/adapters`, `contracts/interfaces` are licensed under GPL-2.0-or-later.
49
+ - The files in `contracts/integrations` are either licensed under GPL-2.0-or-later or unlicensed (as indicated in their SPDX headers).
50
+ - The files in `scripts`, `contracts/test`,`contracts/mocks` are unlicensed.
51
+
52
+ ## Disclaimer
53
+
54
+ This application is provided "as is" and "with all faults." Me as developer makes no representations or
55
+ warranties of any kind concerning the safety, suitability, lack of viruses, inaccuracies, typographical
56
+ errors, or other harmful components of this software. There are inherent dangers in the use of any software,
57
+ and you are solely responsible for determining whether this software product is compatible with your equipment and
58
+ other software installed on your equipment. You are also solely responsible for the protection of your equipment
59
+ and backup of your data, and THE PROVIDER will not be liable for any damages you may suffer in connection with using,
60
+ modifying, or distributing this software product.