-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
40 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
pragma solidity ^0.8.0; | ||
|
||
import "https://github.com/OpenZeppelin/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol"; | ||
|
||
contract PiNexusRouter is SafeERC20 { | ||
// Router properties | ||
address public piNexusToken; | ||
address public piNexusStaking; | ||
address public piNexusLending; | ||
address public piNexusGovernance; | ||
|
||
// Router constructor | ||
constructor() public { | ||
piNexusToken = address(new PiNexusToken()); | ||
piNexusStaking = address(new PiNexusStaking()); | ||
piNexusLending = address(new PiNexusLending()); | ||
piNexusGovernance = address(new PiNexusGovernance()); | ||
} | ||
|
||
// Router functions | ||
function routeTokens(address from, address to, uint256 amount) public { | ||
// Route tokens between addresses | ||
_routeTokens(from, to, amount); | ||
} | ||
|
||
function routeStaking(address from, uint256 amount) public { | ||
// Route staking tokens to staking contract | ||
_routeStaking(from, amount); | ||
} | ||
|
||
function routeLending(address from, uint256 amount) public { | ||
// Route lending tokens to lending contract | ||
_routeLending(from, amount); | ||
} | ||
|
||
function routeGovernance(address from, uint256 amount) public { | ||
// Route governance tokens to governance contract | ||
_routeGovernance(from, amount); | ||
} | ||
} |