Verified contractPartial
Jarl
Address0x9cbcc93abb4e2e9c027288e7e365f0c182c1c0b2
- Balance
0 ETH
- Transactions
93
- Compiler
solc 0.8.15
- Same code
Only this contract
Details
- Compiler
- solc 0.8.15+commit.e14f2714
- Language
- solidity
- Optimization
- Yes, 200 runs
- EVM version
- istanbul
- License
- Not stated
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 15,375,422
- Creation transaction
- 0x7f533be469…4da8737b10
3 files
- JARL.solmain4.49 KB
- IERC20.sol694 B
- SafeMath.sol599 B
JARL.sol
/*****************************************************************************************************
██ █████ ██████ ██ ██ █████ ██████ ███████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ███████ ██████ ██ ██ ███████ ██████ ███████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
█████ ██ ██ ██ ██ ███████ ███████ ██ ██ ██████ ███████
******************************************************************************************************/
pragma solidity ^0.8.7;
import "SafeMath.sol";
import "IERC20.sol";
contract Jarl is IERC20 {
using SafeMath for uint256;
string public constant symbol = "JARL";
string public constant name = "JARL LABS";
uint256 public constant decimals = 18;
uint256 public immutable totalSupply;
mapping(address => uint256) balances;
mapping(address => mapping(address => uint256)) allowed;
address payable owner;
constructor() public {
// remember which address deployed the JARL contract
owner = payable(msg.sender);
totalSupply = 5_000_000 * (10 ** decimals);
// move all 5M tokens to deployer account so it
// can be split between LBP, Uniswap, &c
balances[owner] = totalSupply;
emit Transfer(address(0), owner, totalSupply);
}
function balanceOf(address _owner) public view returns (uint256) {
return balances[_owner];
}
function allowance(address _owner, address _spender) public view returns (uint256) {
return allowed[_owner][_spender];
}
function approve(address _spender, uint256 _value) public returns (bool) {
allowed[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
function _transfer(address _from, address _to, uint256 _value) internal {
require(balances[_from] >= _value, "Insufficient balance");
balances[_from] = balances[_from].sub(_value);
balances[_to] = balances[_to].add(_value);
emit Transfer(_from, _to, _value);
}
function transfer(address _to, uint256 _value) public returns (bool) {
_transfer(msg.sender, _to, _value);
return true;
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(allowed[_from][msg.sender] >= _value, "Insufficient allowance");
allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
_transfer(_from, _to, _value);
return true;
}
// use the same event signature as openzeppelin-contracts/contracts/access/Ownable.sol
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function transferOwnership(address payable newOwner) public {
// change contract owner
require(msg.sender == owner, "Must be owner");
address prevOwner = owner;
owner = newOwner;
emit OwnershipTransferred(prevOwner, newOwner);
}
function rescueETH() public {
// withdraw ETH which may be accidentally sent to this contract
require(msg.sender == owner, "Must be owner");
owner.transfer(address(this).balance);
}
function rescueTokens() public {
// move tokens from this contract to the owner
require(msg.sender == owner, "Must be owner");
uint256 trappedTokens = balances[address(this)];
if (trappedTokens > 0) {
_transfer(address(this), owner, trappedTokens);
}
}
}IERC20.sol
pragma solidity ^0.8.7;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}SafeMath.sol
pragma solidity ^0.8.7;
library SafeMath {
function add(uint a, uint b) internal pure returns (uint c) {
c = a + b;
require(c >= a);
return c;
}
function sub(uint a, uint b) internal pure returns (uint c) {
require(b <= a);
c = a - b;
return c;
}
function mul(uint a, uint b) internal pure returns (uint c) {
c = a * b;
require(a == 0 || c / a == b);
return c;
}
function div(uint a, uint b) internal pure returns (uint c) {
require(b > 0);
c = a / b;
return c;
}
}Compiler settingsShow
{
"libraries": {
"JARL.sol": {}
},
"optimizer": {
"runs": 200,
"enabled": true
},
"evmVersion": "istanbul"
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.