-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from Instadapp/fantom-support-changes
Fantom Refactored code
- Loading branch information
Showing
10 changed files
with
201 additions
and
170 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,51 @@ | ||
//SPDX-License-Identifier: Unlicense | ||
pragma solidity ^0.8.0; | ||
import "../../../common/variables.sol"; | ||
|
||
import "../../../common/interfaces.sol"; | ||
import "../../../common/variablesV1.sol"; | ||
import "../../../common/variablesV2.sol"; | ||
import "../../../common/structs.sol"; | ||
|
||
contract ConstantVariables { | ||
address public constant treasuryAddr = | ||
0x6C4061A00F8739d528b185CC683B6400E0cd396a; | ||
ListInterface public constant instaList = ListInterface(0x10e166c3FAF887D8a61dE6c25039231eE694E926); | ||
uint256 public constant InstaFeeBPS = 5; // in BPS; 1 BPS = 0.01% | ||
} | ||
|
||
contract Variables is ConstantVariables { | ||
|
||
bytes32 internal dataHash; | ||
// if 1 then can enter flashlaon, if 2 then callback | ||
uint256 internal status; | ||
contract FantomVariablesV1 { | ||
address public owner; | ||
|
||
struct FlashloanVariables { | ||
address[] _tokens; | ||
uint256[] _amounts; | ||
uint256[] _iniBals; | ||
uint256[] _finBals; | ||
uint256[] _instaFees; | ||
/** | ||
* @dev owner gaurd. | ||
* @notice owner gaurd. | ||
*/ | ||
modifier onlyOwner() { | ||
require(msg.sender == owner, "not-owner"); | ||
_; | ||
} | ||
|
||
address public owner; | ||
} | ||
|
||
contract Variables is ConstantVariables, CommonVariablesV1, Structs, FantomVariablesV1, CommonVariablesV2 { | ||
// ******** Stroage Variable layout ******* // | ||
|
||
/* CommonVariablesV1 | ||
// bytes32 internal dataHash; | ||
// uint256 internal status; | ||
*/ | ||
|
||
/* Structs | ||
FlashloanVariables; | ||
*/ | ||
|
||
/* FantomVariablesV1 | ||
// address public owner; | ||
*/ | ||
|
||
/* CommonVariablesV2 | ||
// mapping(uint256 => address) public routeToImplementation; | ||
// mapping(uint256 => bool) public routeStatus; | ||
// address internal fallbackImplementation; | ||
// uint256[] public routes; | ||
*/ | ||
} |
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.