Verified contractPartial
JpToken
Address0xce4d20b74faf8c1ab15e2b0fd3f1cccfe6f6d419
- Balance
0 ETH
- Transactions
11
- Compiler
solc 0.4.18
- Same code
1 more contract
Details
- Compiler
- solc 0.4.18+commit.9cf6e910
- Language
- solidity
- Optimization
- No
- License
- Not stated
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 5,085,250
- Creation transaction
- 0xe973b4821d…b3ec27cba8
JpToken.sol
pragma solidity ^0.4.18;
contract JpToken {
string public name;
string public symbol;
uint8 public decimals = 2;
uint256 public totalSupply;
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
event Transfer(address indexed from, address indexed to, uint256 value);
function JpToken() public {
totalSupply = 50000000* 10 ** uint256(decimals); // Update total supply with the decimal amount
balanceOf[msg.sender] = totalSupply; // Give the creator all initial tokens
name = "JPToken"; // Set the name for display purposes
symbol = "JPT"; // Set the symbol for display purposes
}
function _transfer(address _from, address _to, uint _value) internal {
require(_to != 0x0);
require(balanceOf[_from] >= _value);
require(balanceOf[_to] + _value > balanceOf[_to]);
uint previousBalances = balanceOf[_from] + balanceOf[_to];
balanceOf[_from] -= _value;
balanceOf[_to] += _value;
Transfer(_from, _to, _value);
assert(balanceOf[_from] + balanceOf[_to] == previousBalances);
}
function transfer(address _to, uint256 _value) public {
_transfer(msg.sender, _to, _value);
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
require(_value <= allowance[_from][msg.sender]); // Check allowance
allowance[_from][msg.sender] -= _value;
_transfer(_from, _to, _value);
return true;
}
function approve(address _spender, uint256 _value) public returns (bool success) {
allowance[msg.sender][_spender] = _value;
return true;
}
}Compiler settingsShow
{
"libraries": {},
"optimizer": {
"runs": 200,
"enabled": false
},
"remappings": []
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.