Verified contractPartialUnlicense
EthereumPieToken
Address0x4ed3433680487da80684c851e2f05faa0ddfc666
- Balance
0 ETH
- Transactions
4
- Compiler
solc 0.5.17
- Same code
Only this contract
Details
- Compiler
- solc 0.5.17+commit.d19bba13
- Language
- solidity
- Optimization
- Yes, 200 runs
- License
- Unlicense
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 12,592,100
- Creation transaction
- 0x81fbb9c61b…f1e3f235e7
EthereumPieToken.sol
//SPDX-License-Identifier: Unlicense
// ----------------------------------------------------------------------------
// 'EthereumPieToken' token contract
//
// Symbol : ETHPIE 🥧
// Name : Ethereum Pie
// Total supply: 100000000000000
// Decimals : 18
// Burned : 50%
// ----------------------------------------------------------------------------
pragma solidity >=0.4.22 <0.6.0;
contract ERC20 {
function totalSupply() public view returns (uint supply);
function balanceOf(address who) public view returns (uint value);
function allowance(address owner, address spender) public view returns (uint remaining);
function transferFrom(address from, address to, uint value) public returns (bool ok);
function approve(address spender, uint value) public returns (bool ok);
function transfer(address to, uint value) public returns (bool ok);
event Transfer(address indexed from, address indexed to, uint value);
event Approval(address indexed owner, address indexed spender, uint value);
}
contract EthereumPieToken is ERC20{
uint8 public constant decimals = 18;
uint256 initialSupply = 1000000000000000*10**uint256(decimals);
string public constant name = "Ethereum Pie";
string public constant symbol = "ETHPIE 🥧";
address payable teamAddress;
function totalSupply() public view returns (uint256) {
return initialSupply;
}
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed;
function balanceOf(address owner) public view returns (uint256 balance) {
return balances[owner];
}
function allowance(address owner, address spender) public view returns (uint remaining) {
return allowed[owner][spender];
}
function transfer(address to, uint256 value) public returns (bool success) {
if (balances[msg.sender] >= value && value > 0) {
balances[msg.sender] -= value;
balances[to] += value;
emit Transfer(msg.sender, to, value);
return true;
} else {
return false;
}
}
function transferFrom(address from, address to, uint256 value) public returns (bool success) {
if (balances[from] >= value && allowed[from][msg.sender] >= value && value > 0) {
balances[to] += value;
balances[from] -= value;
allowed[from][msg.sender] -= value;
emit Transfer(from, to, value);
return true;
} else {
return false;
}
}
function approve(address spender, uint256 value) public returns (bool success) {
allowed[msg.sender][spender] = value;
emit Approval(msg.sender, spender, value);
return true;
}
function () external payable {
teamAddress.transfer(msg.value);
}
constructor () public payable {
teamAddress = msg.sender;
balances[teamAddress] = initialSupply;
}
}Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": true
}
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.