¡El código fuente de este contrato está verificado!
Metadatos del Contrato
Compilador
0.8.24+commit.e11b9ed9
Idioma
Solidity
Código Fuente del Contrato
Archivo 1 de 8: Context.sol
pragmasolidity ^0.8.9;// SPDX-License-Identifier: MIT/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/abstractcontractContext{
function_msgSender() internalviewvirtualreturns (addresspayable) {
returnpayable(msg.sender);
}
function_msgData() internalviewvirtualreturns (bytesmemory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691returnmsg.data;
}
}
pragmasolidity ^0.8.9;// SPDX-License-Identifier: MIT//website: juicebot.app//twitter: https://twitter.com/juicebotapp//tg: https://t.me/JuiceBotAppimport"./ERC20.sol";
import"./Ownable.sol";
contractJUICEisERC20, Ownable{
uint256constantprivate startingSupply =10_000_000;
uint256constantprivate _tTotal = startingSupply *10**18;
constructor(address _router) ERC20("JUICE", "JUICE") {
_mint(msg.sender, _tTotal);
uniswapRouter = IUniswapV2Router02(_router);
isExcludedFromFee[address(this)] =true;
isExcludedFromFee[msg.sender] =true;
}
functionenableTrading() publiconlyOwner{
require(!isTradingEnabled, "JUICE: Trading is alredy enabled");
require(pairsList.length>0, "JUICE: Please add all the pairs first");
isTradingEnabled =true;
contractSwapEnabled =true;
emit ContractSwapEnabledUpdated(true);
}
functionexcludeOrInclude(address user, bool value) publiconlyOwner{
require(isExcludedFromFee[user] != value, "JUICE: Already set as same value");
isExcludedFromFee[user] = value;
}
functionaddOrRemovePairs(address pair, bool value) publiconlyOwner{
require(isPair[pair] != value, "JUICE: Already set as same value");
isPair[pair] = value;
pairsList.push(pair);
if (lpPair ==address(0)) {
lpPair = pair;
}
}
functionsetSwapSettings(uint256 thresholdPercent, uint256 thresholdDivisor, uint256 amountPercent, uint256 amountDivisor) externalonlyOwner{
swapThreshold = (_tTotal * thresholdPercent) / thresholdDivisor;
swapAmount = (_tTotal * amountPercent) / amountDivisor;
require(swapThreshold <= swapAmount, "Threshold cannot be above amount.");
require(swapAmount <= (balanceOf(lpPair) *20) /1000, "Cannot be above 2% of current PI.");
require(swapAmount >= _tTotal /10_000_000, "Cannot be lower than 0.00001% of total supply.");
require(swapThreshold >= _tTotal /10_000_000, "Cannot be lower than 0.00001% of total supply.");
}
functionsetPriceImpactSwapAmount(uint256 priceImpactSwapPercent) externalonlyOwner{
require(priceImpactSwapPercent <=100, "Cannot set above 1%.");
piSwapPercent = priceImpactSwapPercent;
}
functionsetContractSwapEnabled(bool swapEnabled, bool priceImpactSwapEnabled) externalonlyOwner{
contractSwapEnabled = swapEnabled;
piContractSwapsEnabled = priceImpactSwapEnabled;
emit ContractSwapEnabledUpdated(swapEnabled);
}
functionupdateDevelopmentAddress(addresspayable development) publiconlyOwner{
require(_taxWallets.development != development, "JUICE: Already set as same address");
_taxWallets.development =payable(development);
}
functionupdateFees(uint256 transfer, uint256 buy, uint256 sell) publiconlyOwner{
transferFee = transfer;
buyFee = buy;
sellFee = sell;
}
functiontransferEther() publiconlyOwner{
payable(owner()).transfer(address(this).balance);
}
// function to allow admin to transfer *any* ERC20 tokens from this contract..functiontransferAnyERC20Tokens(address tokenAddress, address recipient, uint256 amount) publiconlyOwner{
require(amount >0, "JUICE: amount must be greater than 0");
require(recipient !=address(0), "JUICE: recipient is the zero address");
IERC20(tokenAddress).transfer(recipient, amount);
}
receive() externalpayable{ }
}
Código Fuente del Contrato
Archivo 7 de 8: Ownable.sol
pragmasolidity ^0.8.9;// SPDX-License-Identifier: MITimport"./Context.sol";
/**
* @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 owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/abstractcontractOwnableisContext{
addressprivate _owner;
eventOwnershipTransferred(addressindexed previousOwner, addressindexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/constructor () {
address msgSender = _msgSender();
_owner = msgSender;
emit OwnershipTransferred(address(0), msgSender);
}
/**
* @dev Returns the address of the current owner.
*/functionowner() publicviewreturns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/modifieronlyOwner() {
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.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/functionrenounceOwnership() publicvirtualonlyOwner{
emit OwnershipTransferred(_owner, address(0));
_owner =address(0);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/functiontransferOwnership(address newOwner) publicvirtualonlyOwner{
require(newOwner !=address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}
Código Fuente del Contrato
Archivo 8 de 8: SafeMath.sol
pragmasolidity ^0.8.9;// SPDX-License-Identifier: MITlibrarySafeMath{
functionadd(uint256 a, uint256 b) internalpurereturns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
functionsub(uint256 a, uint256 b) internalpurereturns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
functionsub(uint256 a, uint256 b, stringmemory errorMessage) internalpurereturns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
functionmul(uint256 a, uint256 b) internalpurereturns (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/522if (a ==0) {
return0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
functiondiv(uint256 a, uint256 b) internalpurereturns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
functiondiv(uint256 a, uint256 b, stringmemory errorMessage) internalpurereturns (uint256) {
require(b >0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't holdreturn c;
}
functionmod(uint256 a, uint256 b) internalpurereturns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
functionmod(uint256 a, uint256 b, stringmemory errorMessage) internalpurereturns (uint256) {
require(b !=0, errorMessage);
return a % b;
}
}