Address Contract Partially Verified
Address
0x92CfbEC26C206C90aeE3b7C66A9AE673754FaB7e
Balance
0 ETH
Nonce
1
Code Size
3122 bytes
Creator
0xE9547CF7...D29B at tx 0xe2fbabb7...89d3d4
Indexed Transactions
0
Contract Bytecode
3122 bytes
0x608060405234801561001057600080fd5b50600436106101005760003560e01c806342966c6811610097578063a9059cbb11610066578063a9059cbb146101f3578063ca4b208b14610206578063dd62ed3e1461020e578063f851a4401461022157610100565b806342966c68146101b25780634dd18bf5146101c557806370a08231146101d857806395d89b41146101eb57610100565b806323b872dd116100d357806323b872dd146101625780632678224714610175578063313ce5671461018a57806340c10f191461019f57610100565b806306fdde0314610105578063095ea7b3146101235780630e18b6811461014357806318160ddd1461014d575b600080fd5b61010d610229565b60405161011a9190610acd565b60405180910390f35b610136610131366004610a6b565b6102b7565b60405161011a9190610ac2565b61014b610321565b005b610155610421565b60405161011a9190610bab565b610136610170366004610a2b565b610427565b61017d6104ed565b60405161011a9190610aae565b6101926104fc565b60405161011a9190610bb4565b61014b6101ad366004610a6b565b610501565b61014b6101c0366004610a96565b610614565b61014b6101d33660046109d7565b61068e565b6101556101e63660046109d7565b610747565b61010d610762565b610136610201366004610a6b565b6107bd565b61017d6107d3565b61015561021c3660046109f3565b6107e2565b61017d61080d565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102af5780601f10610284576101008083540402835291602001916102af565b820191906000526020600020905b81548152906001019060200180831161029257829003601f168201915b505050505081565b3360008181526006602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610310908690610bab565b60405180910390a350600192915050565b6001546001600160a01b0316331461036a5760405162461bcd60e51b8152600401808060200182810382526022815260200180610bdb6022913960400191505060405180910390fd5b60008054600180546001600160a01b038082166001600160a01b031980861682179687905590921690925560408051938316808552949092166020840152815190927ff9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc92908290030190a1600154604080516001600160a01b038085168252909216602083015280517fca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a99281900390910190a15050565b60055481565b6001600160a01b03831660008181526006602090815260408083203380855292528220549192909190821480159061046157506000198114155b156104d657610470818561081c565b6001600160a01b038781166000818152600660209081526040808320948816808452949091529081902084905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925916104cd91610bab565b60405180910390a35b6104e1868686610879565b50600195945050505050565b6001546001600160a01b031681565b601281565b6000546001600160a01b03163314610557576040805162461bcd60e51b815260206004820152601460248201527331b0b63632b91036bab9ba1031329030b236b4b760611b604482015290519081900360640190fd5b6001600160a01b0382166105865760405162461bcd60e51b815260040161057d90610b4a565b60405180910390fd5b6005546105939082610976565b6005556001600160a01b0382166000908152600760205260409020546105b99082610976565b6001600160a01b0383166000818152600760205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610608908590610bab565b60405180910390a35050565b3360009081526007602052604090205461062e908261081c565b3360009081526007602052604090205560055461064b908261081c565b60055560405160009033907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610683908590610bab565b60405180910390a350565b6000546001600160a01b031633146106e4576040805162461bcd60e51b815260206004820152601460248201527331b0b63632b91036bab9ba1031329030b236b4b760611b604482015290519081900360640190fd5b600180546001600160a01b038381166001600160a01b0319831681179093556040805191909216808252602082019390935281517fca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a9929181900390910190a15050565b6001600160a01b031660009081526007602052604090205490565b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102af5780601f10610284576101008083540402835291602001916102af565b60006107ca338484610879565b50600192915050565b6002546001600160a01b031681565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205490565b6000546001600160a01b031681565b600082821115610873576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6001600160a01b03831661089f5760405162461bcd60e51b815260040161057d90610b81565b6001600160a01b0382166108c55760405162461bcd60e51b815260040161057d90610b20565b6001600160a01b0383166000908152600760205260409020546108e8908261081c565b6001600160a01b0380851660009081526007602052604080822093909355908416815220546109179082610976565b6001600160a01b0380841660008181526007602052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610969908590610bab565b60405180910390a3505050565b6000828201838110156109d0576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6000602082840312156109e8578081fd5b81356109d081610bc2565b60008060408385031215610a05578081fd5b8235610a1081610bc2565b91506020830135610a2081610bc2565b809150509250929050565b600080600060608486031215610a3f578081fd5b8335610a4a81610bc2565b92506020840135610a5a81610bc2565b929592945050506040919091013590565b60008060408385031215610a7d578182fd5b8235610a8881610bc2565b946020939093013593505050565b600060208284031215610aa7578081fd5b5035919050565b6001600160a01b0391909116815260200190565b901515815260200190565b6000602080835283518082850152825b81811015610af957858101830151858201604001528201610add565b81811115610b0a5783604083870101525b50601f01601f1916929092016040019392505050565b60208082526010908201526f5a65726f20647374206164647265737360801b604082015260600190565b6020808252601d908201527f4f4c453a206d696e7420746f20746865207a65726f2061646472657373000000604082015260600190565b60208082526010908201526f5a65726f20737263206164647265737360801b604082015260600190565b90815260200190565b60ff91909116815260200190565b6001600160a01b0381168114610bd757600080fd5b5056fe6f6e6c792070656e64696e6741646d696e2063616e206163636570742061646d696ea2646970667358221220d619febb5108c3bb100c68a04d3d237590751f4b98c04d816b58d8313ac9c1db64736f6c63430007060033
Verified Source Code Partial Match
Compiler: v0.7.6+commit.7338295f
EVM: istanbul
Optimization: Yes (200 runs)
Adminable.sol 49 lines
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.7.6;
abstract contract Adminable {
address payable public admin;
address payable public pendingAdmin;
address payable public developer;
event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);
event NewAdmin(address oldAdmin, address newAdmin);
constructor () {
developer = msg.sender;
}
modifier onlyAdmin() {
require(msg.sender == admin, "caller must be admin");
_;
}
modifier onlyAdminOrDeveloper() {
require(msg.sender == admin || msg.sender == developer, "caller must be admin or developer");
_;
}
function setPendingAdmin(address payable newPendingAdmin) external virtual onlyAdmin {
// Save current value, if any, for inclusion in log
address oldPendingAdmin = pendingAdmin;
// Store pendingAdmin with value newPendingAdmin
pendingAdmin = newPendingAdmin;
// Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)
emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);
}
function acceptAdmin() external virtual {
require(msg.sender == pendingAdmin, "only pendingAdmin can accept admin");
// Save current values for inclusion in log
address oldAdmin = admin;
address oldPendingAdmin = pendingAdmin;
// Store admin with value pendingAdmin
admin = pendingAdmin;
// Clear the pending value
pendingAdmin = address(0);
emit NewAdmin(oldAdmin, admin);
emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);
}
}
OLEToken.sol 133 lines
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.7.6;
pragma experimental ABIEncoderV2;
import "../Adminable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
/// @dev Admin of this contract is the address of Timelock.
contract OLEToken is Adminable {
using SafeMath for uint;
// EIP-20 token name for this token
string public name;
// EIP-20 token symbol for this token
string public symbol;
// EIP-20 token decimals for this token
uint8 public constant decimals = 18;
// Total number of tokens in circulation
uint public totalSupply = 1000000000e18; // 1 billion OLE
// Allowance amounts on behalf of others
mapping(address => mapping(address => uint)) internal allowances;
// Official record of token balances for each account
mapping(address => uint) internal balances;
// The standard EIP-20 transfer event
event Transfer(address indexed from, address indexed to, uint256 amount);
// The standard EIP-20 approval event
event Approval(address indexed owner, address indexed spender, uint256 amount);
/**
* Construct a new OpenLev token
* @param initAccount The initial account to grant all the tokens
*/
constructor(address initAccount, address payable _admin, string memory _name, string memory _symbol) {
admin = _admin;
balances[initAccount] = totalSupply;
name = _name;
symbol = _symbol;
emit Transfer(address(0), initAccount, totalSupply);
}
function mint(address account, uint amount) external onlyAdmin {
require(account != address(0), "OLE: mint to the zero address");
totalSupply = totalSupply.add(amount);
balances[account] = balances[account].add(amount);
emit Transfer(address(0), account, amount);
}
function burn(uint amount) external {
balances[msg.sender] = balances[msg.sender].sub(amount);
totalSupply = totalSupply.sub(amount);
emit Transfer(msg.sender, address(0), amount);
}
/**
* Get the number of tokens `spender` is approved to spend on behalf of `account`
* @param account The address of the account holding the funds
* @param spender The address of the account spending the funds
* @return The number of tokens approved
*/
function allowance(address account, address spender) external view returns (uint) {
return allowances[account][spender];
}
/**
* Approve `spender` to transfer up to `amount` from `src`
* @dev This will overwrite the approval amount for `spender`
* and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)
* @param spender The address of the account which may transfer tokens
* @return Whether or not the approval succeeded
*/
function approve(address spender, uint amount) external returns (bool) {
allowances[msg.sender][spender] = amount;
emit Approval(msg.sender, spender, amount);
return true;
}
/**
* Get the number of tokens held by the `account`
* @param account The address of the account to get the balance of
* @return The number of tokens held
*/
function balanceOf(address account) external view returns (uint) {
return balances[account];
}
/**
* Transfer `amount` tokens from `msg.sender` to `dst`
* @param dst The address of the destination account
* @return Whether or not the transfer succeeded
*/
function transfer(address dst, uint amount) external returns (bool) {
_transferTokens(msg.sender, dst, amount);
return true;
}
/**
* Transfer `amount` tokens from `src` to `dst`
* @param src The address of the source account
* @param dst The address of the destination account
* @return Whether or not the transfer succeeded
*/
function transferFrom(address src, address dst, uint amount) external returns (bool) {
address spender = msg.sender;
uint spenderAllowance = allowances[src][spender];
if (spender != src && spenderAllowance != uint(- 1)) {
allowances[src][spender] = spenderAllowance.sub(amount);
emit Approval(src, spender, allowances[src][spender]);
}
_transferTokens(src, dst, amount);
return true;
}
function _transferTokens(address src, address dst, uint amount) internal {
require(src != address(0), "Zero src address");
require(dst != address(0), "Zero dst address");
balances[src] = balances[src].sub(amount);
balances[dst] = balances[dst].add(amount);
emit Transfer(src, dst, amount);
}
}
SafeMath.sol 214 lines
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
/**
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (b > a) return (false, 0);
return (true, a - b);
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (b == 0) return (false, 0);
return (true, a / b);
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (b == 0) return (false, 0);
return (true, a % b);
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a, "SafeMath: subtraction overflow");
return a - b;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) return 0;
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
require(b > 0, "SafeMath: division by zero");
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b > 0, "SafeMath: modulo by zero");
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
return a - b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryDiv}.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
return a % b;
}
}
Read Contract
admin 0xf851a440 → address
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
developer 0xca4b208b → address
name 0x06fdde03 → string
pendingAdmin 0x26782247 → address
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
Write Contract 7 functions
These functions modify contract state and require a wallet transaction to execute.
acceptAdmin 0x0e18b681
No parameters
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
burn 0x42966c68
uint256 amount
mint 0x40c10f19
address account
uint256 amount
setPendingAdmin 0x4dd18bf5
address newPendingAdmin
transfer 0xa9059cbb
address dst
uint256 amount
returns: bool
transferFrom 0x23b872dd
address src
address dst
uint256 amount
returns: bool
Recent Transactions
No transactions found for this address