mirror of
https://github.com/logos-co/staking.git
synced 2025-01-11 03:06:24 +00:00
skel
This commit is contained in:
parent
f56d7197f4
commit
d23afa676a
39
contracts/StakeManager.sol
Normal file
39
contracts/StakeManager.sol
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
|
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
|
||||||
|
|
||||||
|
contract StakeManager is ERC20 {
|
||||||
|
|
||||||
|
address stakedToken;
|
||||||
|
|
||||||
|
bytes32 vaultCodehash;
|
||||||
|
|
||||||
|
mapping (address => Account) account;
|
||||||
|
|
||||||
|
|
||||||
|
modifier onlyVault {
|
||||||
|
require(msg.sender.codehash() == vaultCodehash, "Unauthorized Codehash");
|
||||||
|
}
|
||||||
|
|
||||||
|
function join(uint256 amount) external onlyVault {
|
||||||
|
stakedToken.transferFrom(msg.sender, )
|
||||||
|
}
|
||||||
|
|
||||||
|
function lock(uint256 amount, uint256 time) external onlyVault {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function joinAndLock(uint256 amount, uint256 time) external onlyVault {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function leave(uint256 amount) external {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
36
contracts/StakeVault.sol
Normal file
36
contracts/StakeVault.sol
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
|
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
|
||||||
|
|
||||||
|
contract StakeVault {
|
||||||
|
address owner;
|
||||||
|
address stakeManager;
|
||||||
|
|
||||||
|
ERC20 stakedToken;
|
||||||
|
uint256 balance;
|
||||||
|
uint256 locked;
|
||||||
|
uint256 multiplier;
|
||||||
|
|
||||||
|
|
||||||
|
function join(uint256 amount) external {
|
||||||
|
stakedToken.transferFrom(msg.sender, address(this), amount);
|
||||||
|
}
|
||||||
|
|
||||||
|
function lock(uint256 amount, uint256 time) external {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function joinAndLock(uint256 amount, uint256 time) external {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function leave(uint256 amount) external {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user