Skip to content

Commit

Permalink
Create TokenStaking contract
Browse files Browse the repository at this point in the history
A token staking contract for a specified standard ERC20 token. A holder
of the specified token can stake its tokens to this contract and recover
the stake after undelegation period is over.
  • Loading branch information
r-czajkowski committed Oct 30, 2023
1 parent 6cc518c commit e8f4850
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions core/contracts/staking/TokenStaking.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// SPDX-License-Identifier: GPL-3.0-only

pragma solidity ^0.8.9;

/// @title TokenStaking
/// @notice A token staking contract for a specified standard ERC20 token. A
/// holder of the specified token can stake its tokens to this contract
/// and recover the stake after undelegation period is over.
contract TokenStaking {
// TODO: use IERC20 contract as type
address internal immutable token;

constructor(address _token) {
require(
address(_token) != address(0),
"Token can not be the zero address"
);

token = _token;
}
}

0 comments on commit e8f4850

Please sign in to comment.