-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* start FlashMintNav * minimal compile * minimal compile * wip add deploy funcs for nav issuance module * add nav issuance abi for typechain * remove alt name nav issuance module * consistent filename casing * consistent filename casing * fix deps * test setup * first test run * use correct version of DIM from fixture * check for reserve asset * issue functions & tests * redeem for ETH * add redeem for erc20 function * cleanup unused functions * function to validate reserve asset * wip getter functions * debugging static call in test * fix callStatic * use callStatic * tests for output estimation * cleanup * add description * cleanup issue from eth test * issue tests cont * add tests for dai and usdt * wip refactor redeem tests * redemption tests * update desc and wip refactor tests * refactor redeem tests * remove unused import * reorg immutable vars * format withdrawTokens --------- Co-authored-by: Pranav Bhardwaj <[email protected]>
- Loading branch information
Showing
10 changed files
with
1,105 additions
and
2 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
Copyright 2020 Set Labs Inc. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
SPDX-License-Identifier: Apache License, Version 2.0 | ||
*/ | ||
pragma solidity 0.6.10; | ||
|
||
import { ISetToken } from "./ISetToken.sol"; | ||
|
||
interface INAVIssuanceHook { | ||
function invokePreIssueHook( | ||
ISetToken _setToken, | ||
address _reserveAsset, | ||
uint256 _reserveAssetQuantity, | ||
address _sender, | ||
address _to | ||
) | ||
external; | ||
|
||
function invokePreRedeemHook( | ||
ISetToken _setToken, | ||
uint256 _redeemQuantity, | ||
address _sender, | ||
address _to | ||
) | ||
external; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
Copyright 2024 Index Coop | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
SPDX-License-Identifier: Apache License, Version 2.0 | ||
*/ | ||
pragma solidity 0.6.10; | ||
|
||
import { ISetToken } from "./ISetToken.sol"; | ||
|
||
interface INAVIssuanceModule { | ||
function issue( | ||
ISetToken _setToken, | ||
address _reserveAsset, | ||
uint256 _reserveAssetQuantity, | ||
uint256 _minSetTokenReceiveQuantity, | ||
address _to | ||
) external; | ||
|
||
function redeem( | ||
ISetToken _setToken, | ||
address _reserveAsset, | ||
uint256 _setTokenQuantity, | ||
uint256 _minReserveReceiveQuantity, | ||
address _to | ||
) external; | ||
|
||
function isReserveAsset( | ||
ISetToken _setToken, | ||
address _asset | ||
) external view returns(bool); | ||
|
||
function getReserveAssets(address _setToken) external view returns (address[] memory); | ||
|
||
function getExpectedSetTokenIssueQuantity( | ||
ISetToken _setToken, | ||
address _reserveAsset, | ||
uint256 _reserveAssetQuantity | ||
) external view returns (uint256); | ||
|
||
function getExpectedReserveRedeemQuantity( | ||
ISetToken _setToken, | ||
address _reserveAsset, | ||
uint256 _setTokenQuantity | ||
) external view returns (uint256); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.