Skip to content

Commit be35bf2

Browse files
committed
fix: feat v3 v3 migration
feat: allow v3 to v3 migration chore: change license
1 parent 69ead98 commit be35bf2

File tree

11 files changed

+914
-71
lines changed

11 files changed

+914
-71
lines changed

LICENSE

Lines changed: 114 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,117 @@
1-
Copyright 2022 BGD Labs
1+
Business Source License 1.1
22

3-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3+
License text copyright (c) 2020 MariaDB Corporation Ab, All Rights Reserved.
4+
“Business Source License” is a trademark of MariaDB Corporation Ab.
45

5-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
-----------------------------------------------------------------------------
67

7-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8+
Parameters
9+
10+
Licensor: Aave DAO, represented by its governance smart contracts
11+
12+
13+
Licensed Work: Aave Migration Contracts
14+
The Licensed Work is (c) 2023 Aave DAO, represented by its governance smart contracts
15+
16+
Additional Use Grant: You are permitted to use, copy, and modify the Licensed Work, subject to
17+
the following conditions:
18+
- Your use of the Licensed Work shall not, directly or indirectly, enable, facilitate,
19+
or assist in any way with the migration of users and/or funds from the Aave ecosystem.
20+
The "Aave ecosystem" is defined in the context of this License as the collection of
21+
software protocols and applications approved by the Aave governance, including all
22+
those produced within compensated service provider engagements with the Aave DAO.
23+
The Aave DAO is able to waive this requirement for one or more third-parties, if and
24+
only if explicitly indicating it on a record 'authorizations' on govv3.aavelicense.eth.
25+
- You are neither an individual nor a direct or indirect participant in any incorporated
26+
organization, DAO, or identifiable group, that has deployed in production any original
27+
or derived software ("fork") of the Aave ecosystem for purposes competitive to Aave,
28+
within the preceding two years.
29+
The Aave DAO is able to waive this requirement for one or more third-parties, if and
30+
only if explicitly indicating it on a record 'authorizations' on govv3.aavelicense.eth.
31+
- You must ensure that the usage of the Licensed Work does not result in any direct or
32+
indirect harm to the Aave ecosystem or the Aave brand. This encompasses, but is not limited to,
33+
reputational damage, omission of proper credit/attribution, or utilization for any malicious
34+
intent.
35+
36+
Change Date: The earlier of:
37+
- 2027-10-09
38+
- The date specified in the 'change-date' record on poolmigration.aavelicense.eth
39+
40+
Change License: MIT
41+
42+
-----------------------------------------------------------------------------
43+
44+
Notice
45+
46+
The Business Source License (this document, or the “License”) is not an Open
47+
Source license. However, the Licensed Work will eventually be made available
48+
under an Open Source License, as stated in this License.
49+
50+
-----------------------------------------------------------------------------
51+
52+
Terms
53+
54+
The Licensor hereby grants you the right to copy, modify, create derivative
55+
works, redistribute, and make non-production use of the Licensed Work. The
56+
Licensor may make an Additional Use Grant, above, permitting limited
57+
production use.
58+
59+
Effective on the Change Date, or the fourth anniversary of the first publicly
60+
available distribution of a specific version of the Licensed Work under this
61+
License, whichever comes first, the Licensor hereby grants you rights under
62+
the terms of the Change License, and the rights granted in the paragraph
63+
above terminate.
64+
65+
If your use of the Licensed Work does not comply with the requirements
66+
currently in effect as described in this License, you must purchase a
67+
commercial license from the Licensor, its affiliated entities, or authorized
68+
resellers, or you must refrain from using the Licensed Work.
69+
70+
All copies of the original and modified Licensed Work, and derivative works
71+
of the Licensed Work, are subject to this License. This License applies
72+
separately for each version of the Licensed Work and the Change Date may vary
73+
for each version of the Licensed Work released by Licensor.
74+
75+
You must conspicuously display this License on each original or modified copy
76+
of the Licensed Work. If you receive the Licensed Work in original or
77+
modified form from a third party, the terms and conditions set forth in this
78+
License apply to your use of that work.
79+
80+
Any use of the Licensed Work in violation of this License will automatically
81+
terminate your rights under this License for the current and all other
82+
versions of the Licensed Work.
83+
84+
This License does not grant you any right in any trademark or logo of
85+
Licensor or its affiliates (provided that you may use a trademark or logo of
86+
Licensor as expressly required by this License).
87+
88+
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
89+
AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
90+
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
91+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
92+
TITLE.
93+
94+
MariaDB hereby grants you permission to use this License’s text to license
95+
your works, and to refer to it using the trademark “Business Source License”,
96+
as long as you comply with the Covenants of Licensor below.
97+
98+
Covenants of Licensor
99+
100+
In consideration of the right to use this License’s text and the “Business
101+
Source License” name and trademark, Licensor covenants to MariaDB, and to all
102+
other recipients of the licensed work to be provided by Licensor:
103+
104+
1. To specify as the Change License the GPL Version 2.0 or any later version,
105+
or a license that is compatible with GPL Version 2.0 or a later version,
106+
where “compatible” means that software provided under the Change License can
107+
be included in a program with software provided under GPL Version 2.0 or a
108+
later version. Licensor may specify additional Change Licenses without
109+
limitation.
110+
111+
2. To either: (a) specify an additional grant of rights to use that does not
112+
impose any additional restriction on the right granted in this License, as
113+
the Additional Use Grant; or (b) insert the text “None”.
114+
115+
3. To specify a Change Date.
116+
117+
4. Not to modify this License in any other way.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
"keywords": [],
1313
"author": "BGD labs",
14-
"license": "MIT",
14+
"license": "BUSL-1.1",
1515
"bugs": {
1616
"url": "https://github.com/bgd-labs/bgd-forge-template/issues"
1717
},

src/contracts/MigrationHelper.sol

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-License-Identifier: MIT
1+
// SPDX-License-Identifier: BUSL-1.1
22
pragma solidity ^0.8.10;
33

44
import {IERC20WithPermit} from 'solidity-utils/contracts/oz-common/interfaces/IERC20WithPermit.sol';
@@ -7,20 +7,20 @@ import {DataTypes, ILendingPool as IV2Pool} from 'aave-address-book/AaveV2.sol';
77
import {IPool as IV3Pool} from 'aave-address-book/AaveV3.sol';
88
import {Ownable} from 'solidity-utils/contracts/oz-common/Ownable.sol';
99

10-
import {IMigrationHelper} from '../interfaces/IMigrationHelper.sol';
10+
import {IMigrationHelperV2V3, IMigrationHelper} from '../interfaces/IMigrationHelperV2V3.sol';
1111

1212
/**
1313
* @title MigrationHelper
1414
* @author BGD Labs
1515
* @dev Contract to migrate positions from Aave v2 to Aave v3 pool
1616
*/
17-
contract MigrationHelper is Ownable, IMigrationHelper {
17+
contract MigrationHelper is Ownable, IMigrationHelperV2V3 {
1818
using SafeERC20 for IERC20WithPermit;
1919

20-
/// @inheritdoc IMigrationHelper
20+
/// @inheritdoc IMigrationHelperV2V3
2121
IV2Pool public immutable V2_POOL;
2222

23-
/// @inheritdoc IMigrationHelper
23+
/// @inheritdoc IMigrationHelperV2V3
2424
IV3Pool public immutable V3_POOL;
2525

2626
mapping(address => IERC20WithPermit) public aTokens;
@@ -39,7 +39,7 @@ contract MigrationHelper is Ownable, IMigrationHelper {
3939
}
4040

4141
/// @inheritdoc IMigrationHelper
42-
function cacheATokens() public virtual {
42+
function cacheATokens() public {
4343
DataTypes.ReserveData memory reserveData;
4444
address[] memory reserves = _getV2Reserves();
4545
for (uint256 i = 0; i < reserves.length; i++) {

src/contracts/MigrationHelperAmm.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-License-Identifier: MIT
1+
// SPDX-License-Identifier: BUSL-1.1
22
pragma solidity ^0.8.10;
33

44
import {IERC20WithPermit} from 'solidity-utils/contracts/oz-common/interfaces/IERC20WithPermit.sol';

src/contracts/MigrationHelperMainnet.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-License-Identifier: MIT
1+
// SPDX-License-Identifier: BUSL-1.1
22
pragma solidity ^0.8.10;
33

44
import {IERC20WithPermit} from 'solidity-utils/contracts/oz-common/interfaces/IERC20WithPermit.sol';

0 commit comments

Comments
 (0)