Verified contractExactMIT
WMPSF
Address0x1ce63e4341d0f0c5eefb7ba50f9b09b5449ee03e
- Balance
0 ETH
- Transactions
6
- Compiler
solc 0.8.20
- Same code
Only this contract
Details
- Compiler
- solc 0.8.20+commit.a1b79de6
- Language
- solidity
- Optimization
- No
- License
- MIT
- Match
- Exactcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 23,965,867
- Creation transaction
- 0xfc3ec34b85…44c2b202e0
contracts/wmpsf.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
/**
* @title WMPSF – Wrapped Maya Preferred Secured Future Token
*
* @dev
* Standard ERC-20 token with burn functionality.
*
* This contract is the replacement for the original
* "Maya Preferred Retirement Plan Program Wrapped Token" (RPWMPRA)
* previously deployed at:
*
* 0x8a0e1804a55d64fB0157D7961f47EBCd535780f2
*
* WMPSF maintains the same pegged value intention and overall economic
* structure as the legacy RPWMPRA token, within the broader
* Maya Preferred ecosystem backed by MPRA / SMPRA.
*
* Creator / Developer : UK Financial LTD (United Kingdom)
* Total Supply : 240,000,000,000 WMPSF (240 billion)
* Decimals : 18
* Owner Wallet : 0xAF2587b7e09d7816Fc0867Ea3A8B3058bBaAa16F
*
* All tokens are minted to the owner on deployment.
* A burn mechanism is included so supply can be reduced over time.
*/
contract WMPSF {
string public name = "Wrapped Maya Preferred Secured Future";
string public symbol = "WMPSF";
uint8 public decimals = 18;
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
address public owner;
modifier onlyOwner() {
require(msg.sender == owner, "Not owner");
_;
}
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed tokenOwner, address indexed spender, uint256 value);
constructor() {
// Set owner (UK Financial LTD primary owner wallet)
owner = 0xAF2587b7e09d7816Fc0867Ea3A8B3058bBaAa16F;
// Mint full supply (240,000,000,000 * 10^18) to owner upon deployment
uint256 initialSupply = 240_000_000_000 * 10 ** uint256(decimals);
_mint(owner, initialSupply);
}
// --------- INTERNAL MINT / BURN ---------
function _mint(address to, uint256 amount) internal {
require(to != address(0), "Invalid address");
totalSupply += amount;
balanceOf[to] += amount;
emit Transfer(address(0), to, amount);
}
function _burn(address from, uint256 amount) internal {
require(from != address(0), "Invalid address");
require(balanceOf[from] >= amount, "Burn amount exceeds balance");
balanceOf[from] -= amount;
totalSupply -= amount;
emit Transfer(from, address(0), amount);
}
// --------- STANDARD ERC-20 FUNCTIONS ---------
function transfer(address to, uint256 value) external returns (bool) {
require(to != address(0), "Invalid address");
require(balanceOf[msg.sender] >= value, "Insufficient balance");
balanceOf[msg.sender] -= value;
balanceOf[to] += value;
emit Transfer(msg.sender, to, value);
return true;
}
function approve(address spender, uint256 value) external returns (bool) {
require(spender != address(0), "Invalid address");
allowance[msg.sender][spender] = value;
emit Approval(msg.sender, spender, value);
return true;
}
function transferFrom(address from, address to, uint256 value) external returns (bool) {
require(to != address(0), "Invalid address");
require(balanceOf[from] >= value, "Insufficient balance");
require(allowance[from][msg.sender] >= value, "Not allowed");
allowance[from][msg.sender] -= value;
balanceOf[from] -= value;
balanceOf[to] += value;
emit Transfer(from, to, value);
return true;
}
// --------- BURN FUNCTIONS (NEW FEATURE) ---------
/**
* @notice Burn tokens from your own balance.
* @param amount The amount of tokens to burn.
*/
function burn(uint256 amount) external {
_burn(msg.sender, amount);
}
/**
* @notice Burn tokens from another address, using allowance.
* @param from The address to burn tokens from.
* @param amount The amount of tokens to burn.
*/
function burnFrom(address from, uint256 amount) external {
require(allowance[from][msg.sender] >= amount, "Burn amount exceeds allowance");
allowance[from][msg.sender] -= amount;
_burn(from, amount);
}
// --------- OPTIONAL OWNER RECOVERY (IF YOU WANT IT) ---------
// You can uncomment this if you want the owner to be able to
// withdraw any ERC20 tokens accidentally sent to this contract.
/*
function rescueTokens(address token, address to, uint256 amount) external onlyOwner {
IERC20(token).transfer(to, amount);
}
*/
}Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": false
},
"remappings": []
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.