Skip to content

Commit

Permalink
Create PiNexusRouter.sol
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Jul 29, 2024
1 parent 5316f0b commit 49eb4c1
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions contracts/PiNexusRouter.sol
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);
}
}

0 comments on commit 49eb4c1

Please sign in to comment.