Description:
ERC20 token contract. Standard implementation for fungible tokens on Ethereum.
Blockchain: Ethereum
Source Code: View Code On The Blockchain
Solidity Source Code:
/**
*Submitted for verification at Etherscan.io on 2025-10-27
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
/// @title Distributed Digital Reserve Coin (DDRC) - ERC-20 (minimal, fixed supply)
/// @notice Fixed supply token minted once to three immutable addresses:
/// OWNER1 (50%), OWNER2 (25%), SAFE (25%). No admin/minter/blacklist/tax/antiwhale/etc.
contract DDRC {
// Token metadata
string public constant name = "Distributed Digital Reserve Coin";
string public constant symbol = "DDRC";
uint8 public constant decimals = 18;
// Immutable recipients (set to the addresses you provided)
address public constant OWNER1 = 0x92E81A0303BD182F58303dCEa5d9a23Aad26d12E; // 50%
address public constant OWNER2 = 0x9898912671811EC6f7bc14D4480ae86657E3Bb13; // 25%
address public constant SAFE = 0x522E8e03213baDaa2Cb3842F250DcE149Ad3c770; // 25%
// Total supply: 10,000,000,000 * 10^18
uint256 public constant totalSupply = 10_000_000_000 * 10**18;
// Balances and allowances
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
// Events (ERC-20)
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed ownerAddr, address indexed spender, uint256 value);
/// @notice Constructor: distribute fixed supply (50% / 25% / 25%)
constructor() {
// Calculate shares
uint256 half = (totalSupply * 50) / 100; // 50%
uint256 quarter = (totalSupply * 25) / 100; // 25%
// Assign balances
_balances[OWNER1] = half;
_balances[OWNER2] = quarter;
_balances[SAFE] = quarter;
// Emit minting transfer events
emit Transfer(address(0), OWNER1, half);
emit Transfer(address(0), OWNER2, quarter);
emit Transfer(address(0), SAFE, quarter);
}
// ---------- Read functions ----------
function balanceOf(address account) public view returns (uint256) {
return _balances[account];
}
function allowance(address ownerAddr, address spender) public view returns (uint256) {
return _allowances[ownerAddr][spender];
}
// ---------- ERC-20 write functions ----------
function transfer(address to, uint256 amount) public returns (bool) {
address sender = msg.sender;
require(to != address(0), "DDRC: transfer to zero address");
uint256 senderBal = _balances[sender];
require(senderBal >= amount, "DDRC: transfer amount exceeds balance");
_balances[sender] = senderBal - amount;
_balances[to] += amount;
emit Transfer(sender, to, amount);
return true;
}
function approve(address spender, uint256 amount) public returns (bool) {
require(spender != address(0), "DDRC: approve to zero address");
_allowances[msg.sender][spender] = amount;
emit Approval(msg.sender, spender, amount);
return true;
}
function transferFrom(address from, address to, uint256 amount) public returns (bool) {
address spender = msg.sender;
require(from != address(0) && to != address(0), "DDRC: zero address");
uint256 fromBal = _balances[from];
require(fromBal >= amount, "DDRC: transfer amount exceeds balance");
uint256 currentAllowance = _allowances[from][spender];
require(currentAllowance >= amount, "DDRC: transfer amount exceeds allowance");
_balances[from] = fromBal - amount;
_balances[to] += amount;
_allowances[from][spender] = currentAllowance - amount;
emit Transfer(from, to, amount);
return true;
}
}
Submitted on: 2025-10-28 09:56:13
Comments
Log in to comment.
No comments yet.