Verified contractExactMIT
SilverSurfer
Address0x8fcab218edbc3b4e4e541e7bd1f467da83ce3474
- Balance
0 ETH
- Transactions
3
- Compiler
solc 0.8.33
- Same code
Only this contract
Details
- Compiler
- solc 0.8.33+commit.64118f21
- Language
- solidity
- Optimization
- No
- License
- MIT
- Match
- Exactcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 24,371,375
- Creation transaction
- 0xc3f1ae0f97…d4a64d04c0
contracts/Silver Surfer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
contract SilverSurfer {
// Metadata (not strictly required by ERC-20 spec, but expected by almost everything)
string public constant name = "Silver Surfer";
string public constant symbol = "Silver Surfer";
uint8 public constant decimals = 18;
// ERC-20 state
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
// ERC-20 events
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
constructor() {
uint256 supply = 1_100_000_000 * 1e18;
totalSupply = supply;
balanceOf[msg.sender] = supply;
emit Transfer(address(0), msg.sender, supply);
}
function transfer(address to, uint256 value) external returns (bool) {
balanceOf[msg.sender] -= value;
unchecked { balanceOf[to] += value; }
emit Transfer(msg.sender, to, value);
return true;
}
function approve(address spender, uint256 value) external returns (bool) {
allowance[msg.sender][spender] = value;
emit Approval(msg.sender, spender, value);
return true;
}
function transferFrom(address from, address to, uint256 value) external returns (bool) {
uint256 a = allowance[from][msg.sender];
if (a != type(uint256).max) allowance[from][msg.sender] = a - value;
balanceOf[from] -= value;
unchecked { balanceOf[to] += value; }
emit Transfer(from, to, value);
return true;
}
}
Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": false
},
"remappings": []
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.