Description:
ERC20 token contract with Factory capabilities. Standard implementation for fungible tokens on Ethereum.
Blockchain: Ethereum
Source Code: View Code On The Blockchain
Solidity Source Code:
{{
"language": "Solidity",
"sources": {
"NovWxrp.sol": {
"content": "// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
/// @notice Minimal ERC20 interface
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function allowance(address o, address s) external view returns (uint256);
function transfer(address to, uint256 amount) external returns (bool);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}
/// @notice Minimal SafeERC20 (no external imports)
library SafeERC20 {
function safeTransfer(IERC20 token, address to, uint256 amount) internal {
require(token.transfer(to, amount), "TRANSFER_FAILED");
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 amount) internal {
require(token.transferFrom(from, to, amount), "TRANSFER_FROM_FAILED");
}
}
/**
* @title GrowthVault_wXRP_2025
* @notice Timelocked vault for Wrapped XRP (wXRP) on Ethereum.
* - Owner-only deposits
* - Full withdrawal by owner after unlockTime
* - No backdoors, no upgradeability, no sweep
*/
contract GrowthVault_wXRP_2025 {
using SafeERC20 for IERC20;
address public immutable owner;
uint256 public immutable unlockTime;
IERC20 public immutable wXRP;
constructor(address _wXRPAddress, uint256 _unlockTime) {
require(_wXRPAddress != address(0), "Invalid wXRP address");
require(_unlockTime > block.timestamp, "Unlock time must be in the future");
owner = msg.sender;
unlockTime = _unlockTime;
wXRP = IERC20(_wXRPAddress);
}
/// @notice Owner-only deposit (approve first)
function deposit(uint256 amount) external {
require(msg.sender == owner, "Only owner can deposit");
require(amount > 0, "Amount must be > 0");
wXRP.safeTransferFrom(msg.sender, address(this), amount);
}
/// @notice Withdraw entire balance after unlock
function withdraw() external {
require(block.timestamp >= unlockTime, "Vault is still locked");
require(msg.sender == owner, "Only owner can withdraw");
uint256 balance = wXRP.balanceOf(address(this));
require(balance > 0, "No funds to withdraw");
wXRP.safeTransfer(owner, balance);
}
/// @notice Convenience view
function getBalance() external view returns (uint256) {
return wXRP.balanceOf(address(this));
}
}
"
}
},
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"remappings": []
}
}}
Submitted on: 2025-11-05 13:16:03
Comments
Log in to comment.
No comments yet.