This contract's source code is verified! Compiler
0.8.17+commit.8df45f5f
File 1 of 10: Auth.sol
pragma solidity ^0.8.17;
abstract contract Auth {
address internal owner;
mapping (address = > bool ) internal authorizations;
constructor (address _owner ) {
owner = _owner;
authorizations[_owner] = true ;
}
modifier onlyOwner ( ) {
require (isOwner(msg .sender ), "!OWNER" );
_ ;
}
modifier authorized ( ) {
require (isAuthorized(msg .sender ), "!AUTHORIZED" );
_ ;
}
function authorize (address adr ) public onlyOwner {
authorizations[adr] = true ;
}
function unauthorize (address adr ) public onlyOwner {
authorizations[adr] = false ;
}
function isOwner (address account ) public view returns (bool ) {
return account = = owner;
}
function isAuthorized (address adr ) public view returns (bool ) {
return authorizations[adr];
}
function transferOwnership (address payable adr ) public onlyOwner {
owner = adr;
authorizations[adr] = true ;
emit OwnershipTransferred(adr);
}
event OwnershipTransferred (address owner ) ;
}
File 2 of 10: IDEXFactory.sol
pragma solidity ^0.8.17;
interface IDEXFactory {
function createPair (
address tokenA,
address tokenB
) external returns (address pair ) ;
}
File 3 of 10: IDEXRouter.sol
pragma solidity ^0.8.17;
interface IDEXRouter {
function factory ( ) external pure returns (address ) ;
function WETH ( ) external pure returns (address ) ;
function removeLiquidity (
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB ) ;
function addLiquidity (
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity ) ;
function addLiquidityETH (
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
)
external
payable
returns (uint amountToken, uint amountETH, uint liquidity ) ;
function swapExactTokensForTokensSupportingFeeOnTransferTokens (
uint amountIn,
uint amountOutMin,
address [] calldata path,
address to,
uint deadline
) external ;
function swapExactETHForTokensSupportingFeeOnTransferTokens (
uint amountOutMin,
address [] calldata path,
address to,
uint deadline
) external payable ;
function swapExactTokensForETHSupportingFeeOnTransferTokens (
uint amountIn,
uint amountOutMin,
address [] calldata path,
address to,
uint deadline
) external ;
}
File 4 of 10: IERC20.sol
pragma solidity ^0.8.17;
interface IERC20 {
function totalSupply ( ) external view returns (uint256 ) ;
function decimals ( ) external view returns (uint8 ) ;
function symbol ( ) external view returns (string memory ) ;
function name ( ) external view returns (string memory ) ;
function getOwner ( ) external view returns (address ) ;
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
) ;
}
File 5 of 10: Math.sol
pragma solidity >0.4.13;
contract DSMath {
function add (uint x, uint y ) internal pure returns (uint z ) {
require ((z = x + y) > = x, "ds-math-add-overflow" );
}
function sub (uint x, uint y ) internal pure returns (uint z ) {
require ((z = x - y) < = x, "ds-math-sub-underflow" );
}
function mul (uint x, uint y ) internal pure returns (uint z ) {
require (y = = 0 | | (z = x * y) / y = = x, "ds-math-mul-overflow" );
}
function min (uint x, uint y ) internal pure returns (uint z ) {
return x < = y ? x : y;
}
function max (uint x, uint y ) internal pure returns (uint z ) {
return x > = y ? x : y;
}
function imin (int x, int y ) internal pure returns (int z ) {
return x < = y ? x : y;
}
function imax (int x, int y ) internal pure returns (int z ) {
return x > = y ? x : y;
}
uint constant WAD = 10 * * 18 ;
uint constant RAY = 10 * * 27 ;
function wmul (uint x, uint y ) internal pure returns (uint z ) {
z = add(mul(x, y), WAD / 2 ) / WAD;
}
function rmul (uint x, uint y ) internal pure returns (uint z ) {
z = add(mul(x, y), RAY / 2 ) / RAY;
}
function wdiv (uint x, uint y ) internal pure returns (uint z ) {
z = add(mul(x, WAD), y / 2 ) / y;
}
function rdiv (uint x, uint y ) internal pure returns (uint z ) {
z = add(mul(x, RAY), y / 2 ) / y;
}
function rpow (uint x, uint n ) internal pure returns (uint z ) {
z = n % 2 ! = 0 ? x : RAY;
for (n / = 2 ; n ! = 0 ; n / = 2 ) {
x = rmul(x, x);
if (n % 2 ! = 0 ) {
z = rmul(z, x);
}
}
}
}
File 6 of 10: OperaLendingPool.sol
pragma solidity ^0.8.17;
import "Auth.sol" ;
import "OperaStaking.sol" ;
contract OperaPool is Auth {
uint256 public totalEthLent;
uint256 public totalAvailableEth;
uint256 public lendingStakingRequirement;
uint256 public borrowLimit = 3 ;
uint256 public _tokenDecimals = 1 * 10 * * 18 ;
bool public borrowingEnable = true ;
address public operaStakingAddress;
mapping (address = > uint256 ) public usersCurrentLentAmount;
mapping (address = > uint256 ) public usersPendingReturnAmount;
mapping (address = > bool ) public authorizedFactoryAddresses;
mapping (uint256 = > QueuePosition) public withdrawQueue;
struct QueuePosition {
address lender;
uint256 amount;
}
event ethMoved (
address account,
uint256 amount,
uint256 code,
uint256 blocktime
) ;
event factoryStatusChange (address factoryAddress, bool status ) ;
constructor ( ) Auth (msg .sender ) {}
modifier onlyFactoryAuthorized ( ) {
require (
authorizedFactoryAddresses[msg .sender ],
"only factory contracts can borrow eth"
);
_ ;
}
function updateFactoryAuthorization (
address addy,
bool status
) external onlyOwner {
authorizedFactoryAddresses[addy] = status;
emit factoryStatusChange(addy, status);
}
function updateBorrowLimit (uint256 limit ) external onlyOwner {
borrowLimit = limit;
}
function updateLendingStakeRequirement (uint256 limit ) external onlyOwner {
lendingStakingRequirement = limit;
}
function updateStakingAddress (address addy ) external onlyOwner {
operaStakingAddress = addy;
}
function updateBorrowingEnabled (bool status ) external onlyOwner {
borrowingEnable = status;
}
receive ( ) external payable {}
function lendEth ( ) external payable returns (bool ) {
require (
msg .value > 0 & & msg .value % _tokenDecimals = = 0 ,
"Only send full ether."
);
if (lendingStakingRequirement > 0 ) {
OperaStaking operaStaking = OperaStaking(
payable (operaStakingAddress)
);
require (
operaStaking.getStakedAmount(msg .sender ) > =
lendingStakingRequirement,
"You are not staking enough to lend."
);
}
uint256 amountReceived = msg .value / _tokenDecimals;
emit ethMoved(msg .sender , amountReceived, 1 , block .timestamp );
totalEthLent + = amountReceived;
usersCurrentLentAmount[msg .sender ] + = amountReceived;
totalAvailableEth + = amountReceived;
return true ;
}
function borrowEth (uint256 _amount ) external onlyFactoryAuthorized {
require (_amount < = totalAvailableEth, "Not Enough eth to borrow" );
require (_amount > 0 , "Cannot borrow 0" );
require (borrowingEnable, "Borrowing is not enabled." );
require (_amount < = borrowLimit, "Can't borrow that much." );
totalAvailableEth - = _amount;
payable (msg .sender ).transfer (_amount * _tokenDecimals);
emit ethMoved(msg .sender , _amount, 2 , block .timestamp );
}
function returnLentEth (uint256 amountEth ) external payable returns (bool ) {
require (
(amountEth * _tokenDecimals) - msg .value = = 0 ,
"Did not send enough eth."
);
emit ethMoved(msg .sender , amountEth, 3 , block .timestamp );
totalAvailableEth + = amountEth;
return true ;
}
function withdrawLentEth (uint256 _amountEther ) external payable {
require (
usersCurrentLentAmount[msg .sender ] > = _amountEther,
"You Did not lend that much."
);
require (_amountEther > 0 , "Cant withdraw 0." );
require (_amountEther < = totalAvailableEth, "Not enough eth available." );
usersCurrentLentAmount[msg .sender ] - = _amountEther;
totalAvailableEth - = _amountEther;
totalEthLent - = _amountEther;
payable (msg .sender ).transfer (_amountEther * _tokenDecimals);
emit ethMoved(msg .sender , _amountEther, 4 , block .timestamp );
}
function removeExcess ( ) external payable onlyOwner {
require (
address (this ).balance > totalAvailableEth * _tokenDecimals,
"There is no excess eth"
);
uint256 excessAmount = address (this ).balance -
(totalAvailableEth * _tokenDecimals);
payable (owner).transfer (excessAmount);
}
}
File 7 of 10: OperaRevenue.sol
pragma solidity ^0.8.17;
import "OperaToken.sol" ;
import "OperaLendingPool.sol" ;
import "IERC20.sol" ;
import "Math.sol" ;
contract OperaRevenue {
address public owner;
event rewardsMoved (
address account,
uint256 amount,
uint256 blocktime,
bool incoming
) ;
event rewardsRequested (address account ) ;
constructor ( ) {
owner = msg .sender ;
}
modifier onlyOwner ( ) {
require (owner = = msg .sender , "only owner" );
_ ;
}
function withdraw ( ) external onlyOwner {
payable (owner).transfer (address (this ).balance );
}
function requestReward ( ) external {
emit rewardsRequested(msg .sender );
}
function payoutReward (
address user,
uint256 amount
) external payable onlyOwner {
payable (user).transfer (amount);
emit rewardsMoved(user, amount, block .timestamp , false );
}
function getAddressBalance (address _address ) public view returns (uint256 ) {
return _address.balance ;
}
receive ( ) external payable {}
function recieveRewards ( ) external payable {
emit rewardsMoved(msg .sender , msg .value , block .timestamp , true );
}
}
File 8 of 10: OperaStaking.sol
pragma solidity ^0.8.17;
import "OperaToken.sol" ;
contract OperaStaking {
address public owner;
address public operaToken;
bool public lockEnabled = true ;
mapping (address = > uint256 ) public stakedAmountForAddress;
mapping (address = > uint256 ) public stakedTimerForAddress;
event stakedTokensMoved (
address user,
uint256 amount,
uint256 blocktime,
bool beingStaked
) ;
constructor ( ) {
owner = msg .sender ;
}
modifier onlyOwner ( ) {
require (msg .sender = = owner, "only owner" );
_ ;
}
function changeLockEnabled (bool locked ) external onlyOwner {
lockEnabled = locked;
}
function setOperaToken (address token ) external onlyOwner {
operaToken = token;
}
function stakeTokens (uint256 amount ) external {
OperaToken opera = OperaToken(payable (operaToken));
uint256 balanceBefore = opera.balanceOf(address (this ));
opera.transferFrom(msg .sender , address (this ), amount);
uint256 balanceAfter = opera.balanceOf(address (this ));
require (
balanceAfter - amount = = balanceBefore,
"Failed to transfer amount of tokens when moving."
);
stakedAmountForAddress[msg .sender ] + = amount;
stakedTimerForAddress[msg .sender ] = block .timestamp + 2629800 ;
emit stakedTokensMoved(
msg .sender ,
stakedAmountForAddress[msg .sender ],
block .timestamp ,
true
);
}
function getStakedAmount (address user ) public view returns (uint256 ) {
if (stakedTimerForAddress[user] > block .timestamp ) {
return stakedAmountForAddress[user];
} else {
return 0 ;
}
}
function withdrawStaked ( ) external {
if (lockEnabled) {
require (
stakedTimerForAddress[msg .sender ] < = block .timestamp ,
"Still locked"
);
}
uint256 usersAmount = stakedAmountForAddress[msg .sender ];
require (usersAmount > 0 , "You have no tokens Staked." );
stakedAmountForAddress[msg .sender ] = 0 ;
OperaToken opera = OperaToken(payable (operaToken));
opera.transfer (msg .sender , usersAmount);
emit stakedTokensMoved(msg .sender , usersAmount, block .timestamp , false );
}
function withdrawStakedWithFee ( ) external {
uint256 usersAmount = stakedAmountForAddress[msg .sender ];
require (usersAmount > 0 , "You have no tokens Staked." );
stakedTimerForAddress[msg .sender ] = 0 ;
stakedAmountForAddress[msg .sender ] = 0 ;
OperaToken opera = OperaToken(payable (operaToken));
uint256 fee = (usersAmount * 15 ) / 100 ;
emit stakedTokensMoved(msg .sender , usersAmount, block .timestamp , false );
opera.transfer (msg .sender , usersAmount - fee);
opera.transfer (owner, fee);
}
}
File 9 of 10: OperaToken.sol
pragma solidity ^0.8.17;
import "IERC20.sol" ;
import "Auth.sol" ;
import "SafeMath.sol" ;
import "IDEXRouter.sol" ;
import "IDEXFactory.sol" ;
import "OperaRevenue.sol" ;
contract OperaToken is IERC20 , Auth {
using SafeMath for uint256 ;
string _name;
string _symbol;
string _telegram;
string _website;
uint8 constant _decimals = 9 ;
uint256 public _totalSupply;
uint256 public _maxWalletToken;
uint256 public _swapThreshold;
uint256 public _operaTax = 4 ;
uint256 public _marketingBuyTax;
uint256 public _marketingSellTax;
uint256 public _devBuyTax;
uint256 public _devSellTax;
uint256 public _liquidityBuyTax;
uint256 public _liquiditySellTax;
mapping (address = > uint256 ) _balances;
mapping (address = > mapping (address = > uint256 )) _allowances;
mapping (address = > bool ) isFeeExempt;
address public pair;
address public routerAddress = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D ;
address public _devAddress;
address public _marketingAddress;
address public _operaRewardAddress;
address public _operaAddress;
address public WETHAddress = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 ;
address public DEAD = 0x000000000000000000000000000000000000dEaD ;
IDEXRouter public router;
bool inSwap;
modifier swapping ( ) {
inSwap = true ;
_ ;
inSwap = false ;
}
event AutoLiquify (uint256 amountETH, uint256 amountCoin ) ;
constructor (
string [] memory _stringData,
address [] memory _addressData,
uint256 [] memory _intData,
address rewardsAddress
) Auth (msg .sender ) {
require (_stringData.length = = 4 , "String List needs 4 string inputs" );
require (
_addressData.length = = 2 ,
"Address List needs 2 address inputs"
);
require (_intData.length = = 9 , "Int List needs 9 int inputs" );
_operaRewardAddress = rewardsAddress;
_operaAddress = msg .sender ;
router = IDEXRouter(routerAddress);
pair = IDEXFactory(router.factory()).createPair(
router.WETH(),
address (this )
);
authorizations[routerAddress] = true ;
_name = _stringData[0 ];
_symbol = _stringData[1 ];
_telegram = _stringData[2 ];
_website = _stringData[3 ];
_devAddress = _addressData[0 ];
_marketingAddress = _addressData[1 ];
require (_intData[0 ] > 0 & & _intData[0 ] < 999999999999999999 );
_totalSupply = _intData[0 ] * 10 * * _decimals;
_balances[msg .sender ] = _totalSupply;
emit Transfer(address (0 ), msg .sender , _totalSupply);
_maxWalletToken = _intData[1 ] * 10 * * _decimals;
_swapThreshold = _intData[2 ] * 10 * * _decimals;
_marketingBuyTax = _intData[3 ];
_marketingSellTax = _intData[4 ];
_devBuyTax = _intData[5 ];
_devSellTax = _intData[6 ];
_liquidityBuyTax = _intData[7 ];
_liquiditySellTax = _intData[8 ];
_allowances[address (this )][address (router)] = _totalSupply;
requireLimits();
}
receive ( ) external payable {}
function totalSupply ( ) external view override returns (uint256 ) {
return _totalSupply;
}
function decimals ( ) external pure override returns (uint8 ) {
return _decimals;
}
function symbol ( ) external view override returns (string memory ) {
return _symbol;
}
function name ( ) external view override returns (string memory ) {
return _name;
}
function getOwner ( ) external view override returns (address ) {
return owner;
}
function balanceOf (address account ) public view override returns (uint256 ) {
return _balances[account];
}
function allowance (
address holder,
address spender
) external view override returns (uint256 ) {
return _allowances[holder][spender];
}
function approve (
address spender,
uint256 amount
) public override returns (bool ) {
_allowances[msg .sender ][spender] = amount;
emit Approval(msg .sender , spender, amount);
return true ;
}
function approveMax (address spender ) external returns (bool ) {
return approve(spender, _totalSupply);
}
function transfer (
address recipient,
uint256 amount
) external override returns (bool ) {
if (owner = = msg .sender ) {
return _basicTransfer(msg .sender , recipient, amount);
} else {
return _transferFrom(msg .sender , recipient, amount);
}
}
function _basicTransfer (
address sender,
address recipient,
uint256 amount
) internal returns (bool ) {
_balances[sender] = _balances[sender].sub(
amount,
"Insufficient Balance"
);
_balances[recipient] = _balances[recipient].add(amount);
emit Transfer(sender, recipient, amount);
return true ;
}
function transferFrom (
address sender,
address recipient,
uint256 amount
) external override returns (bool ) {
require (sender ! = address (0 ), "ERC20: transfer from the zero address" );
require (recipient ! = address (0 ), "ERC20: transfer to the zero address" );
if (_allowances[sender][msg .sender ] ! = _totalSupply) {
_allowances[sender][msg .sender ] = _allowances[sender][msg .sender ]
.sub(amount, "Insufficient Allowance" );
}
return _transferFrom(sender, recipient, amount);
}
function _transferFrom (
address sender,
address recipient,
uint256 amount
) internal returns (bool ) {
require (sender ! = address (0 ), "ERC20: transfer from the zero address" );
require (recipient ! = address (0 ), "ERC20: transfer to the zero address" );
if (
authorizations[sender] | |
authorizations[recipient] | |
recipient = = _operaAddress
) {
return _basicTransfer(sender, recipient, amount);
}
if (inSwap) {
return _basicTransfer(sender, recipient, amount);
}
checkLimits(sender, recipient, amount);
if (shouldTokenSwap(recipient)) {
tokenSwap();
}
_balances[sender] = _balances[sender].sub(
amount,
"Insufficient Balance"
);
uint256 amountReceived = (recipient = = pair | | sender = = pair)
? takeFee(sender, recipient, amount)
: amount;
_balances[recipient] = _balances[recipient].add(amountReceived);
emit Transfer(sender, recipient, amountReceived);
return true ;
}
function takeFee (
address sender,
address recipient,
uint256 amount
) internal returns (uint256 ) {
if (isFeeExempt[sender] | | isFeeExempt[recipient]) {
return amount;
}
uint256 _totalFee;
_totalFee = (recipient = = pair) ? getSellTax() : getBuyTax();
uint256 feeAmount = amount.mul(_totalFee).div(1000 );
_balances[address (this )] = _balances[address (this )].add(feeAmount);
emit Transfer(sender, address (this ), feeAmount);
return amount.sub(feeAmount);
}
function getBuyTax ( ) public view returns (uint ) {
return _liquidityBuyTax + _devBuyTax + _marketingBuyTax + _operaTax;
}
function getSellTax ( ) public view returns (uint ) {
return _liquiditySellTax + _devSellTax + _marketingSellTax + _operaTax;
}
function getTotalTax ( ) public view returns (uint ) {
return getSellTax() + getBuyTax();
}
function setBuyFees (
uint256 _marketingFee,
uint256 _liquidityFee,
uint256 _devFee
) external authorized {
_marketingBuyTax = _marketingFee;
_liquidityBuyTax = _liquidityFee;
_devBuyTax = _devFee;
requireLimits();
}
function setSellFees (
uint256 _marketingFee,
uint256 _liquidityFee,
uint256 _devFee
) external authorized {
_marketingSellTax = _marketingFee;
_liquiditySellTax = _liquidityFee;
_devSellTax = _devFee;
requireLimits();
}
function tokenSwap ( ) internal swapping {
uint256 amount = _balances[address (this )];
uint256 amountToLiquify = (_liquidityBuyTax + _liquiditySellTax > 0 )
? amount
.mul(_liquidityBuyTax + _liquiditySellTax)
.div(getTotalTax())
.div(2 )
: 0 ;
uint256 amountToSwap = amount.sub(amountToLiquify);
address [] memory path = new address [](2 );
path[0 ] = address (this );
path[1 ] = WETHAddress;
uint256 balanceBefore = address (this ).balance ;
router.swapExactTokensForETHSupportingFeeOnTransferTokens(
amountToSwap,
0 ,
path,
address (this ),
block .timestamp
);
bool tmpSuccess;
uint256 amountETH = address (this ).balance .sub(balanceBefore);
uint256 totalETHFee = (_liquidityBuyTax + _liquiditySellTax > 0 )
? getTotalTax().sub((_liquidityBuyTax + _liquiditySellTax).div(2 ))
: getTotalTax();
uint256 amountETHLiquidity = amountETH
.mul(_liquidityBuyTax + _liquiditySellTax)
.div(totalETHFee)
.div(2 );
if (_devBuyTax + _devSellTax > 0 ) {
uint256 amountETHDev = amountETH.mul(_devBuyTax + _devSellTax).div(
totalETHFee
);
(tmpSuccess, ) = payable (_devAddress).call {
value : amountETHDev,
gas : 100000
}("" );
tmpSuccess = false ;
}
if (_marketingBuyTax + _marketingSellTax > 0 ) {
uint256 amountETHMarketing = amountETH
.mul(_marketingBuyTax + _marketingSellTax)
.div(totalETHFee);
(tmpSuccess, ) = payable (_marketingAddress).call {
value : amountETHMarketing,
gas : 100000
}("" );
tmpSuccess = false ;
}
if (amountToLiquify > 0 ) {
router.addLiquidityETH{value : amountETHLiquidity}(
address (this ),
amountToLiquify,
0 ,
0 ,
_operaAddress,
block .timestamp
);
emit AutoLiquify(amountETHLiquidity, amountToLiquify);
}
uint256 operaFee = amountETH.mul(_operaTax.mul(2 )).div(totalETHFee);
OperaRevenue rewardContract = OperaRevenue(
payable (_operaRewardAddress)
);
rewardContract.recieveRewards{value : operaFee}();
}
function shouldTokenSwap (address recipient ) internal view returns (bool ) {
return ((recipient = = pair) & &
! inSwap & &
_balances[address (this )] > = _swapThreshold);
}
function setTokenSwapSettings (uint256 _threshold ) external authorized {
_swapThreshold = _threshold * (10 * * _decimals);
requireLimits();
}
function checkLimits (
address sender,
address recipient,
uint256 amount
) internal view {
if (
! authorizations[sender] & &
recipient ! = address (this ) & &
sender ! = address (this ) & &
recipient ! = address (DEAD) & &
recipient ! = pair & &
recipient ! = _marketingAddress & &
recipient ! = _devAddress & &
recipient ! = _operaAddress
) {
uint256 heldTokens = balanceOf(recipient);
require (
(heldTokens + amount) < = _maxWalletToken,
"Total Holding is currently limited, you can not buy that much."
);
}
}
function setMaxWallet (uint256 percent ) external authorized {
_maxWalletToken = (_totalSupply * percent) / 1000 ;
requireLimits();
}
function requireLimits ( ) internal view {
require (
_swapThreshold < = (_totalSupply / 20 ) & &
_swapThreshold > = (_totalSupply / 500 ),
"Swap Threshold must be less than 5% of total supply, or greater than 0.2%."
);
require (
_maxWalletToken > = (_totalSupply / 500 ),
"Max Wallet must be greater than 0.2%."
);
require (getSellTax() < = 100 , "Sell tax can't be greater than 10%." );
require (getBuyTax() < = 100 , "Buy tax can't be greater than 10%." );
require (
_devAddress ! = address (0 ) & & _marketingAddress ! = address (0 ),
"Reciever wallets can't be Zero address."
);
}
function getAddress ( ) external view returns (address ) {
return address (this );
}
function aboutMe ( ) external view returns (string memory , string memory ) {
return (_telegram, _website);
}
function updateAboutMe (
string memory telegram,
string memory website
) external authorized {
_telegram = telegram;
_website = website;
}
function setAddresses (
address marketingAddress,
address devAddress
) external authorized {
_marketingAddress = marketingAddress;
_devAddress = devAddress;
requireLimits();
}
function setFeeExemption (address user, bool status ) external authorized {
isFeeExempt[user] = status;
}
function clearStuckBalance ( ) external {
require (
msg .sender = = _operaAddress,
"Only Factory Contract can clear balance."
);
payable (_operaAddress).transfer (address (this ).balance );
}
}
File 10 of 10: SafeMath.sol
pragma solidity ^0.8.17;
library SafeMath {
function add (uint256 a, uint256 b ) internal pure returns (uint256 ) {
uint256 c = a + b;
require (c > = a, "SafeMath: addition overflow" );
return c;
}
function sub (uint256 a, uint256 b ) internal pure returns (uint256 ) {
return sub(a, b, "SafeMath: subtraction overflow" );
}
function sub (
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256 ) {
require (b < = a, errorMessage);
uint256 c = a - b;
return c;
}
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;
}
function div (uint256 a, uint256 b ) internal pure returns (uint256 ) {
return div(a, b, "SafeMath: division by zero" );
}
function div (
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256 ) {
require (b > 0 , errorMessage);
uint256 c = a / b;
return c;
}
}
{
"compilationTarget" : {
"OperaToken.sol" : "OperaToken"
} ,
"evmVersion" : "istanbul" ,
"libraries" : { } ,
"metadata" : {
"bytecodeHash" : "ipfs"
} ,
"optimizer" : {
"enabled" : true ,
"runs" : 200
} ,
"remappings" : [ ]
} [{"inputs":[{"internalType":"string[]","name":"_stringData","type":"string[]"},{"internalType":"address[]","name":"_addressData","type":"address[]"},{"internalType":"uint256[]","name":"_intData","type":"uint256[]"},{"internalType":"address","name":"rewardsAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amountETH","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountCoin","type":"uint256"}],"name":"AutoLiquify","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DEAD","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETHAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_devAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_devBuyTax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_devSellTax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_liquidityBuyTax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_liquiditySellTax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_marketingAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_marketingBuyTax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_marketingSellTax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_maxWalletToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_operaAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_operaRewardAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_operaTax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_swapThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"aboutMe","outputs":[{"internalType":"string","name":"","type":"string"},{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"holder","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"approveMax","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"adr","type":"address"}],"name":"authorize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"clearStuckBalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBuyTax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSellTax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalTax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"adr","type":"address"}],"name":"isAuthorized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pair","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"router","outputs":[{"internalType":"contract IDEXRouter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"routerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"marketingAddress","type":"address"},{"internalType":"address","name":"devAddress","type":"address"}],"name":"setAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_marketingFee","type":"uint256"},{"internalType":"uint256","name":"_liquidityFee","type":"uint256"},{"internalType":"uint256","name":"_devFee","type":"uint256"}],"name":"setBuyFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"bool","name":"status","type":"bool"}],"name":"setFeeExemption","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"percent","type":"uint256"}],"name":"setMaxWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_marketingFee","type":"uint256"},{"internalType":"uint256","name":"_liquidityFee","type":"uint256"},{"internalType":"uint256","name":"_devFee","type":"uint256"}],"name":"setSellFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_threshold","type":"uint256"}],"name":"setTokenSwapSettings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"adr","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"adr","type":"address"}],"name":"unauthorize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"telegram","type":"string"},{"internalType":"string","name":"website","type":"string"}],"name":"updateAboutMe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]