Verified Contract
0x021d9468cc897bC1B3a00FD83eEb0fB3b398C680
Pin to watchlist
scan to copy
zkLTC Balance
0.0014
hard money native
Transactions
1
Token transfers
0
Validations
0
blocks produced
Hard Money Score
100
/100
PURE HARD MONEY
share of activity in native zkLTC vs. tokens
native
1
tokens
0
Contract name
GateTokenNOS
Compiler
v0.8.19+commit.7dd6d404
Optimization
enabled · 200 runs
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
contract GateTokenNOS {
address public owner;
uint256 public lastSelfTransferTime;
uint256 public constant SELF_TRANSFER_INTERVAL = 60 seconds;
uint256 public constant SELF_TRANSFER_AMOUNT = 0;
event FundsDeposited(address indexed depositor, uint256 amount);
event SelfTransferPerformed(uint256 timestamp);
modifier onlyOwner() {
require(msg.sender == owner, "Only owner can call this function");
_;
}
constructor() {
owner = msg.sender;
lastSelfTransferTime = block.timestamp;
}
receive() external payable {
emit FundsDeposited(msg.sender, msg.value);
}
fallback() external payable {
emit FundsDeposited(msg.sender, msg.value);
}
function deposit() external payable {
emit FundsDeposited(msg.sender, msg.value);
}
function performSelfTransfer() external {
require(block.timestamp >= lastSelfTransferTime + SELF_TRANSFER_INTERVAL, "Interval not elapsed");
lastSelfTransferTime = block.timestamp;
(bool sent, ) = address(this).call{value: SELF_TRANSFER_AMOUNT}("");
require(sent, "Self transfer failed");
emit SelfTransferPerformed(block.timestamp);
}
function canPerformSelfTransfer() external view returns (bool) {
return block.timestamp >= lastSelfTransferTime + SELF_TRANSFER_INTERVAL;
}
function getContractBalance() external view returns (uint256) {
return address(this).balance;
}
function withdraw(uint256 amount) external onlyOwner {
require(amount <= address(this).balance, "Insufficient balance");
(bool sent, ) = owner.call{value: amount}("");
require(sent, "Withdrawal failed");
}
}