Address Contract Partially Verified
Address
0xBceC8dC97df3BC9F521585989959275CF7c14Ca1
Balance
0 ETH
Nonce
1
Code Size
9691 bytes
Creator
0x59a08652...b6C9 at tx 0x2245bcaf...a86032
Indexed Transactions
0 (1 on-chain, <1% indexed)
Contract Bytecode
9691 bytes
0x608060405234801561001057600080fd5b50600436106101735760003560e01c80637cb332bb116100de578063a9059cbb11610097578063dd62ed3e11610071578063dd62ed3e1461042c578063ea2f0b371461045c578063f2fde38b14610478578063f9efb5051461049457610173565b8063a9059cbb146103d4578063b3c8591814610404578063c87965721461042257610173565b80637cb332bb14610324578063856e8bad146103405780638da5cb5b1461034a5780639003adfe1461036857806395d89b4114610386578063a457c2d7146103a457610173565b806339509351116101305780633950935114610250578063437823ec146102805780635342acb41461029c57806359927044146102cc57806370a08231146102ea578063715018a61461031a57610173565b806306fdde0314610178578063095ea7b31461019657806318160ddd146101c657806323b872dd146101e4578063313ce5671461021457806337a67ca714610232575b600080fd5b6101806104b2565b60405161018d9190611aad565b60405180910390f35b6101b060048036038101906101ab9190611b68565b6104ef565b6040516101bd9190611bc3565b60405180910390f35b6101ce61050d565b6040516101db9190611bed565b60405180910390f35b6101fe60048036038101906101f99190611c08565b610517565b60405161020b9190611bc3565b60405180910390f35b61021c61060f565b6040516102299190611c77565b60405180910390f35b61023a610618565b6040516102479190611bed565b60405180910390f35b61026a60048036038101906102659190611b68565b61061d565b6040516102779190611bc3565b60405180910390f35b61029a60048036038101906102959190611c92565b610737565b005b6102b660048036038101906102b19190611c92565b6108b4565b6040516102c39190611bc3565b60405180910390f35b6102d461090a565b6040516102e19190611cce565b60405180910390f35b61030460048036038101906102ff9190611c92565b610930565b6040516103119190611bed565b60405180910390f35b610322610979565b005b61033e60048036038101906103399190611c92565b610a01565b005b610348610c41565b005b610352610e0f565b60405161035f9190611cce565b60405180910390f35b610370610e38565b60405161037d9190611bed565b60405180910390f35b61038e610e7f565b60405161039b9190611aad565b60405180910390f35b6103be60048036038101906103b99190611b68565b610ebc565b6040516103cb9190611bc3565b60405180910390f35b6103ee60048036038101906103e99190611b68565b611016565b6040516103fb9190611bc3565b60405180910390f35b61040c611034565b6040516104199190611bed565b60405180910390f35b61042a611039565b005b61044660048036038101906104419190611ce9565b6111c3565b6040516104539190611bed565b60405180910390f35b61047660048036038101906104719190611c92565b61124a565b005b610492600480360381019061048d9190611c92565b6113c7565b005b61049c6114be565b6040516104a99190611bed565b60405180910390f35b60606040518060400160405280601181526020017f526f6d616e20456d7069726520436f696e000000000000000000000000000000815250905090565b60006105036104fc6114c4565b84846114cc565b6001905092915050565b6000600454905090565b6000610524848484611695565b6000600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061056f6114c4565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050828110156105ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105e690611d9b565b60405180910390fd5b610603856105fb6114c4565b8584036114cc565b60019150509392505050565b60006012905090565b600481565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361068d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161068490611e2d565b60405180910390fd5b61072d6106986114c4565b8484600360006106a66114c4565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546107289190611e7c565b6114cc565b6001905092915050565b61073f6114c4565b73ffffffffffffffffffffffffffffffffffffffff1661075d610e0f565b73ffffffffffffffffffffffffffffffffffffffff16146107b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107aa90611efc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610822576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081990611f68565b60405180910390fd5b6001600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f846730387031eb38d037020e318a00ecd9b790625c4764c8c74caffda5efe12e816040516108a99190611cce565b60405180910390a150565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6109816114c4565b73ffffffffffffffffffffffffffffffffffffffff1661099f610e0f565b73ffffffffffffffffffffffffffffffffffffffff16146109f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109ec90611efc565b60405180910390fd5b6109ff6000611959565b565b610a096114c4565b73ffffffffffffffffffffffffffffffffffffffff16610a27610e0f565b73ffffffffffffffffffffffffffffffffffffffff1614610a7d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a7490611efc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610aec576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ae390611ffa565b60405180910390fd5b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fb2bfb416cf413294a87930f9bac388d81bdd29b7aabfac207310d6988daace158183604051610c3592919061201a565b60405180910390a15050565b610c496114c4565b73ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cd8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ccf9061208f565b60405180910390fd5b60065460016000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610d7e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d7590612121565b60405180910390fd5b610dae600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000600654611695565b60065460046000828254610dc29190612141565b9250508190555060006006819055507fc5a2b7ad6439179b1edea47d8a4bc00b2c5270a1c741c00fab7be4012caa7d0a6000600654604051610e05929190612175565b60405180910390a1565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905090565b60606040518060400160405280600581526020017f524f4d414e000000000000000000000000000000000000000000000000000000815250905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610f2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f2390612210565b60405180910390fd5b600060036000610f3a6114c4565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015610ff7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fee906122a2565b60405180910390fd5b61100b6110026114c4565b858584036114cc565b600191505092915050565b600061102a6110236114c4565b8484611695565b6001905092915050565b600481565b6110416114c4565b73ffffffffffffffffffffffffffffffffffffffff1661105f610e0f565b73ffffffffffffffffffffffffffffffffffffffff16146110b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110ac90611efc565b60405180910390fd5b6000600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905061116530600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611695565b7fc5a2b7ad6439179b1edea47d8a4bc00b2c5270a1c741c00fab7be4012caa7d0a600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16826040516111b8929190612175565b60405180910390a150565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6112526114c4565b73ffffffffffffffffffffffffffffffffffffffff16611270610e0f565b73ffffffffffffffffffffffffffffffffffffffff16146112c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112bd90611efc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611335576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161132c9061230e565b60405180910390fd5b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f3adeb961032d23873014c008c6b64c18b61201f11a10a1a65dfc350259da6dbd816040516113bc9190611cce565b60405180910390a150565b6113cf6114c4565b73ffffffffffffffffffffffffffffffffffffffff166113ed610e0f565b73ffffffffffffffffffffffffffffffffffffffff1614611443576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161143a90611efc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036114b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114a9906123a0565b60405180910390fd5b6114bb81611959565b50565b60065481565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361153b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161153290612432565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036115aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115a1906124c4565b60405180910390fd5b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516116889190611bed565b60405180910390a3505050565b6000600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181101561171c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161171390612556565b60405180910390fd5b818103600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156118065781600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055506118ee565b60006103e8600484028161181d5761181c612576565b5b04905060006103e86004800185028161183957611838612576565b5b049050808403935083600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555080600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508160066000828254019250508190555050505b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161194b9190611bed565b60405180910390a350505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611a57578082015181840152602081019050611a3c565b60008484015250505050565b6000601f19601f8301169050919050565b6000611a7f82611a1d565b611a898185611a28565b9350611a99818560208601611a39565b611aa281611a63565b840191505092915050565b60006020820190508181036000830152611ac78184611a74565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611aff82611ad4565b9050919050565b611b0f81611af4565b8114611b1a57600080fd5b50565b600081359050611b2c81611b06565b92915050565b6000819050919050565b611b4581611b32565b8114611b5057600080fd5b50565b600081359050611b6281611b3c565b92915050565b60008060408385031215611b7f57611b7e611acf565b5b6000611b8d85828601611b1d565b9250506020611b9e85828601611b53565b9150509250929050565b60008115159050919050565b611bbd81611ba8565b82525050565b6000602082019050611bd86000830184611bb4565b92915050565b611be781611b32565b82525050565b6000602082019050611c026000830184611bde565b92915050565b600080600060608486031215611c2157611c20611acf565b5b6000611c2f86828701611b1d565b9350506020611c4086828701611b1d565b9250506040611c5186828701611b53565b9150509250925092565b600060ff82169050919050565b611c7181611c5b565b82525050565b6000602082019050611c8c6000830184611c68565b92915050565b600060208284031215611ca857611ca7611acf565b5b6000611cb684828501611b1d565b91505092915050565b611cc881611af4565b82525050565b6000602082019050611ce36000830184611cbf565b92915050565b60008060408385031215611d0057611cff611acf565b5b6000611d0e85828601611b1d565b9250506020611d1f85828601611b1d565b9150509250929050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206160008201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b6000611d85602883611a28565b9150611d9082611d29565b604082019050919050565b60006020820190508181036000830152611db481611d78565b9050919050565b7f496e6372656173696e6720616c6c6f77616e636520666f72207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000611e17602583611a28565b9150611e2282611dbb565b604082019050919050565b60006020820190508181036000830152611e4681611e0a565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611e8782611b32565b9150611e9283611b32565b9250828201905080821115611eaa57611ea9611e4d565b5b92915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000611ee6602083611a28565b9150611ef182611eb0565b602082019050919050565b60006020820190508181036000830152611f1581611ed9565b9050919050565b7f4578636c7564696e6720666f7220746865207a65726f20616464726573730000600082015250565b6000611f52601e83611a28565b9150611f5d82611f1c565b602082019050919050565b60006020820190508181036000830152611f8181611f45565b9050919050565b7f43616e6e6f7420736574207465616d77616c6c6574206173207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000611fe4602583611a28565b9150611fef82611f88565b604082019050919050565b6000602082019050818103600083015261201381611fd7565b9050919050565b600060408201905061202f6000830185611cbf565b61203c6020830184611cbf565b9392505050565b7f43616c6c6572206973206e6f7420746865207465616d77616c6c657400000000600082015250565b6000612079601c83611a28565b915061208482612043565b602082019050919050565b600060208201905081810360008301526120a88161206c565b9050919050565b7f446f6573206e6f7420686176652074686520726571756972656420616d6f756e60008201527f74206f6620746f6b656e7320746f206275726e00000000000000000000000000602082015250565b600061210b603383611a28565b9150612116826120af565b604082019050919050565b6000602082019050818103600083015261213a816120fe565b9050919050565b600061214c82611b32565b915061215783611b32565b925082820390508181111561216f5761216e611e4d565b5b92915050565b600060408201905061218a6000830185611cbf565b6121976020830184611bde565b9392505050565b7f44656372656173696e6720616c6c6f77616e636520666f72207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b60006121fa602583611a28565b91506122058261219e565b604082019050919050565b60006020820190508181036000830152612229816121ed565b9050919050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b600061228c602583611a28565b915061229782612230565b604082019050919050565b600060208201905081810360008301526122bb8161227f565b9050919050565b7f496e636c7564696e6720666f7220746865207a65726f20616464726573730000600082015250565b60006122f8601e83611a28565b9150612303826122c2565b602082019050919050565b60006020820190508181036000830152612327816122eb565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061238a602683611a28565b91506123958261232e565b604082019050919050565b600060208201905081810360008301526123b98161237d565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b600061241c602483611a28565b9150612427826123c0565b604082019050919050565b6000602082019050818103600083015261244b8161240f565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b60006124ae602283611a28565b91506124b982612452565b604082019050919050565b600060208201905081810360008301526124dd816124a1565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b6000612540602683611a28565b915061254b826124e4565b604082019050919050565b6000602082019050818103600083015261256f81612533565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea2646970667358221220cc1b831a6820d2d26dbc50319132cacc3798e170b48410ec21c16bf9887fe90064736f6c63430008120033
Verified Source Code Partial Match
Compiler: v0.8.18+commit.87f61d96
EVM: paris
Optimization: No
RomanEmpireCoin.sol 430 lines
// SPDX-License-Identifier: MIT
/**
* The OFFICIAL currency of the The Roman Empire - $ROMAN
* +-+-+-+-+-+-+
* |$|R|O|M|A|N|
* +-+-+-+-+-+-+
* https://romanempirecoin.com
* x
* Copyright © 20BC-2023 The Roman Empire™ All Rights Reserved®
*/
pragma solidity ^0.8.18;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions. By default, the deployer will be the owner, however this
* can later be changed with {transferOwnership}.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*
* @dev will Renounce $ROMAN as an honourary gesture to Emperor Tiberius
*
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token ($ROMAN).
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
/**
* @dev Implementation of The Roman Empire Coin ($ROME)
*
*/
contract RomanEmpireCoin is Ownable, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping (address => bool) private _isExcludedFromFee;
mapping(address => mapping(address => uint256)) private _allowances;
string constant private _name = "Roman Empire Coin";
string constant private _symbol = "ROMAN";
uint8 constant private _decimal = 18;
uint256 private _totalSupply = 690000000 * (10 ** _decimal); // 690 million tokens
uint256 constant public _taxBurn = 4; // 0.4%
uint256 constant public _taxLiquidity = 4; // 0.4%
address public teamWallet;
uint256 public toBurnAmount = 0;
event teamWalletChanged(address oldWalletAddress, address newWalletAddress);
event feeCollected(address teamWallet, uint256 amount);
event excludingAddressFromFee(address account);
event includingAddressInFee(address account);
modifier onlyTeamWallet() {
require(teamWallet == _msgSender(), "Caller is not the teamwallet");
_;
}
/**
* @dev Sets the values for {name}, {symbol}, {total supply} and {decimal}.
* Currently teamWallet will be Owner and can be changed later
*/
constructor(address _teamWallet) {
require(_teamWallet!=address(0), "Cannot set teamwallet as zero address");
_balances[_msgSender()] = _totalSupply;
_isExcludedFromFee[_msgSender()] = true;
_isExcludedFromFee[address(this)] = true;
_isExcludedFromFee[_teamWallet] = true;
teamWallet = _teamWallet;
emit Transfer(address(0), _msgSender(), _totalSupply);
}
/**
* @dev Returns Name of the token
*/
function name() external view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the name.
*/
function symbol() external view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation
*/
function decimals() external view virtual override returns (uint8) {
return _decimal;
}
/**
* @dev This will give the total number of tokens in existence.
*/
function totalSupply() external view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev Gets the balance of the specified address.
*/
function balanceOf(address account) external view virtual override returns (uint256) {
return _balances[account];
}
/**
* @dev Returns collected fees of the token
*/
function collectedFees() external view returns (uint256) {
return _balances[address(this)];
}
/**
* @dev Transfer token to a specified address and Emits a Transfer event.
*/
function transfer(address recipient, uint256 amount) external virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
/**
* @dev Function to check the number of tokens that an owner allowed to a spender
*/
function allowance(address owner, address spender) external view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev Function to allow anyone to spend a token from your account and Emits an Approval event.
*/
function approve(address spender, uint256 amount) external virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
/**
* @dev owner can make exclude the account from paying fee on transfer
*/
function excludeFromFee(address account) external onlyOwner {
require(account!=address(0), "Excluding for the zero address");
_isExcludedFromFee[account] = true;
emit excludingAddressFromFee(account);
}
/**
* @dev check if account is excluded from fee
*/
function isExcludedFromFee(address account) external view returns(bool) {
return _isExcludedFromFee[account];
}
/**
* @dev owner can make the account pay fee on transfer.
*/
function includeInFee(address account) external onlyOwner {
require(account!=address(0), "Including for the zero address");
_isExcludedFromFee[account] = false;
emit includingAddressInFee(account);
}
/**
* @dev owner can claim collected fees.
*/
function collectFees() external onlyOwner {
uint256 fees = _balances[address(this)];
_transfer(address(this), teamWallet, _balances[address(this)]);
emit feeCollected(teamWallet, fees);
}
/**
* @dev teamWallet can burn collected burn fees.
*/
function burnCollectedFees() external onlyTeamWallet {
require(_balances[teamWallet] >= toBurnAmount, "Does not have the required amount of tokens to burn");
_transfer(teamWallet, address(0), toBurnAmount);
_totalSupply -= toBurnAmount;
toBurnAmount = 0;
emit feeCollected(address(0), toBurnAmount);
}
/**
* @dev owner can update the collection team wallet
*/
function updateTeamWallet(address _teamWallet) external onlyOwner {
require(_teamWallet!=address(0), "Cannot set teamwallet as zero address");
address oldWallet = teamWallet;
teamWallet = _teamWallet;
_isExcludedFromFee[_teamWallet] = true;
_isExcludedFromFee[oldWallet] = false;
emit teamWalletChanged(oldWallet,_teamWallet);
}
/**
* @dev Function to transfer allowed token from other's account
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external virtual override returns (bool) {
_transfer(sender, recipient, amount);
uint256 currentAllowance = _allowances[sender][_msgSender()];
require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
unchecked {
_approve(sender, _msgSender(), currentAllowance - amount);
}
return true;
}
/**
* @dev Function to increase the allowance of another account
*/
function increaseAllowance(address spender, uint256 addedValue) external virtual returns (bool) {
require(spender!=address(0), "Increasing allowance for zero address");
_approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
return true;
}
/**
* @dev Function to decrease the allowance of another account
*/
function decreaseAllowance(address spender, uint256 subtractedValue) external virtual returns (bool) {
require(spender!=address(0), "Decreasing allowance for zero address");
uint256 currentAllowance = _allowances[_msgSender()][spender];
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(_msgSender(), spender, currentAllowance - subtractedValue);
}
return true;
}
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
uint256 senderBalance = _balances[sender];
require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
unchecked {
_balances[sender] = senderBalance - amount;
}
if(_isExcludedFromFee[sender]) {
unchecked {//condititon to exclude
_balances[recipient] += amount;
}
}else{
unchecked {
uint256 burnFee = (amount * _taxBurn) / 1000;
uint256 tFee = (amount * (_taxBurn + _taxLiquidity)) / 1000;
amount = amount - tFee;
_balances[recipient] += amount;
_balances[address(this)] += tFee;
toBurnAmount += burnFee;
}
}
emit Transfer(sender, recipient, amount);
}
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
}
Read Contract
_taxBurn 0xb3c85918 → uint256
_taxLiquidity 0x37a67ca7 → uint256
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
collectedFees 0x9003adfe → uint256
decimals 0x313ce567 → uint8
isExcludedFromFee 0x5342acb4 → bool
name 0x06fdde03 → string
owner 0x8da5cb5b → address
symbol 0x95d89b41 → string
teamWallet 0x59927044 → address
toBurnAmount 0xf9efb505 → uint256
totalSupply 0x18160ddd → uint256
Write Contract 12 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
burnCollectedFees 0x856e8bad
No parameters
collectFees 0xc8796572
No parameters
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
excludeFromFee 0x437823ec
address account
includeInFee 0xea2f0b37
address account
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
renounceOwnership 0x715018a6
No parameters
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
updateTeamWallet 0x7cb332bb
address _teamWallet
Recent Transactions
This address has 1 on-chain transactions, but only <1% of the chain is indexed. Transactions will appear as indexing progresses. View on Etherscan →