-
Notifications
You must be signed in to change notification settings - Fork 467
Open
Description
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract SpaceCoin is ERC20 {
constructor(uint256 initialSupply) ERC20("SpaceCoin", "SPC") {
_mint(msg.sender, initialSupply);
}
// Дополнительно: ограничьте передачу токенов на определённый срок
mapping(address => uint256) private lockTime;
function lockTokens(uint256 time) public {
lockTime[msg.sender] = block.timestamp + time;
}
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal override {
require(lockTime[from] < block.timestamp, "Tokens are locked");
super._beforeTokenTransfer(from, to, amount);
}
}
SpaceCoin
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
