编译器
0.8.19+commit.7dd6d404
文件 1 的 8:Context.sol
pragma solidity ^0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
文件 2 的 8:FX1SportsToken.sol
pragma solidity ^0.8.19;
import "@openzeppelin/contracts/access/Ownable2Step.sol";
import "./interfaces/IUniswapV2Factory.sol";
import "./interfaces/IUniswapV2Router02.sol";
import "./interfaces/IFX1SportsToken.sol";
contract FX1SportsToken is Ownable2Step, IFX1SportsToken {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) public bots;
mapping(address => bool) public excludedFromFees;
mapping(address => bool) public excludedFromMaxTransfer;
mapping(address => bool) public excludedFromMaxWallet;
mapping(address => bool) public whitelists;
uint256 private _totalSupply = 250_000_000 * 10 ** _decimals;
uint256 public launchTime;
uint256 public whitelistPeriod;
uint256 public swapThreshold;
uint256 public maxTransferAmount;
uint256 public maxWalletAmount;
uint256 private accLiquidityAmount;
uint256 private accMarketingAmount;
uint256 private accPROOFAmount;
address public marketingTaxRecv;
address public proofRevenue;
address public proofRewards;
address public proofAdmin;
address public pair;
address constant DEAD = 0x000000000000000000000000000000000000dEaD;
bool private inSwapLiquidity;
string private _name = "FX1 Sports";
string private _symbol = "FX1";
uint16 public immutable FIXED_POINT = 1000;
uint8 private constant _decimals = 18;
IUniswapV2Router02 public dexRouter;
BuyFeeRate public buyfeeRate;
SellFeeRate public sellfeeRate;
modifier onlyPROOFAdmin() {
require(
proofAdmin == _msgSender(),
"Ownable: caller is not the proofAdmin"
);
_;
}
constructor(Param memory _param) {
require(
_param.proofRevenue != address(0),
"invalid PROOF Revenue address"
);
require(
_param.proofRewards != address(0),
"invalid PROOF Rewards address"
);
require(
_param.proofAdmin != address(0),
"invalid PROOF Rewards address"
);
require(
_param.marketingTaxRecv != address(0),
"invalid MarketingTaxRecv address"
);
require(
_param.teamAllocator_1 != address(0),
"invalid teamAllocator_1 address"
);
require(
_param.teamAllocator_2 != address(0),
"invalid teamAllocator_2 address"
);
require(_param.dexRouter != address(0), "invalid dexRouter adddress");
require(_param.whitelistPeriod > 0, "invalid whitelistPeriod");
require(_param.proofFeeDuration > 0, "invalid proofFeeDuration");
require(
_param.highPROOFFeeRate > 0 &&
_param.highPROOFFeeRate > _param.normalPROOFFeeRate,
"invalid highPROOFFeeRate"
);
require(_param.normalPROOFFeeRate > 0, "invalid normalPROOFFeeRate");
require(
_param.totalTeamAllocationRate > 0,
"invalid totalTeamAllocationRate"
);
require(
_param.totalTeamAllocationRate ==
_param.teamAllocationRate_1 + _param.teamAllocationRate_2,
"invalid teamAllocationRates"
);
address sender = msg.sender;
proofRevenue = _param.proofRevenue;
proofRewards = _param.proofRewards;
proofAdmin = _param.proofAdmin;
marketingTaxRecv = _param.marketingTaxRecv;
dexRouter = IUniswapV2Router02(_param.dexRouter);
whitelistPeriod = _param.whitelistPeriod;
buyfeeRate.highPROOFFeeRate = _param.highPROOFFeeRate;
buyfeeRate.normalPROOFFeeRate = _param.normalPROOFFeeRate;
buyfeeRate.liquidityFeeRate = _param.liquidityFeeRate;
buyfeeRate.marketingFeeRate = _param.marketingFeeRate;
buyfeeRate.proofFeeDuration = _param.proofFeeDuration;
buyfeeRate.highTotalFeeRate =
_param.marketingFeeRate +
_param.liquidityFeeRate +
_param.highPROOFFeeRate;
buyfeeRate.normalTotalFeeRate =
_param.marketingFeeRate +
_param.liquidityFeeRate +
_param.normalPROOFFeeRate;
sellfeeRate.highPROOFFeeRate = _param.highPROOFFeeRate;
sellfeeRate.normalPROOFFeeRate = _param.normalPROOFFeeRate;
sellfeeRate.liquidityFeeRate = _param.liquidityFeeRate;
sellfeeRate.marketingFeeRate = _param.marketingFeeRate;
sellfeeRate.proofFeeDuration = _param.proofFeeDuration;
sellfeeRate.highTotalFeeRate =
_param.marketingFeeRate +
_param.liquidityFeeRate +
_param.highPROOFFeeRate;
sellfeeRate.normalTotalFeeRate =
_param.marketingFeeRate +
_param.liquidityFeeRate +
_param.normalPROOFFeeRate;
pair = IUniswapV2Factory(dexRouter.factory()).createPair(
dexRouter.WETH(),
address(this)
);
excludedFromFees[sender] = true;
excludedFromMaxTransfer[sender] = true;
excludedFromMaxTransfer[pair] = true;
excludedFromMaxTransfer[address(this)] = true;
excludedFromMaxWallet[sender] = true;
excludedFromMaxWallet[pair] = true;
excludedFromMaxWallet[address(this)] = true;
excludedFromMaxWallet[proofRevenue] = true;
excludedFromMaxWallet[proofRewards] = true;
excludedFromMaxWallet[proofAdmin] = true;
excludedFromMaxWallet[marketingTaxRecv] = true;
whitelists[sender] = true;
whitelists[pair] = true;
whitelists[address(this)] = true;
uint256 totalTeamAllocationAmount = (_totalSupply *
_param.totalTeamAllocationRate) / FIXED_POINT;
uint256 teamAllocationAmount_1 = (_totalSupply *
_param.teamAllocationRate_1) / FIXED_POINT;
uint256 teamAllocationAmount_2 = totalTeamAllocationAmount -
teamAllocationAmount_1;
uint256 amountForDeployer = _totalSupply - totalTeamAllocationAmount;
_balances[_param.teamAllocator_1] += teamAllocationAmount_1;
_balances[_param.teamAllocator_2] += teamAllocationAmount_2;
_balances[msg.sender] += amountForDeployer;
emit Transfer(address(0), msg.sender, amountForDeployer);
emit Transfer(
address(0),
_param.teamAllocator_1,
teamAllocationAmount_1
);
emit Transfer(
address(0),
_param.teamAllocator_2,
teamAllocationAmount_2
);
swapThreshold = _totalSupply / 10000;
maxTransferAmount = (_totalSupply * 5) / 1000;
maxWalletAmount = (_totalSupply * 1) / 100;
}
function name() external view returns (string memory) {
return _name;
}
function symbol() external view returns (string memory) {
return _symbol;
}
function decimals() external pure returns (uint8) {
return _decimals;
}
function totalSupply() external view returns (uint256) {
return _totalSupply;
}
function balanceOf(address account) public view returns (uint256) {
return _balances[account];
}
function transfer(
address _recipient,
uint256 _amount
) external override returns (bool) {
_transfer(msg.sender, _recipient, _amount);
return true;
}
function allowance(
address _owner,
address _spender
) external view override returns (uint256) {
return _allowances[_owner][_spender];
}
function approve(
address _spender,
uint256 _amount
) external override returns (bool) {
_approve(msg.sender, _spender, _amount);
return true;
}
function transferFrom(
address _sender,
address _recipient,
uint256 _amount
) external override returns (bool) {
uint256 currentAllowance = _allowances[_sender][msg.sender];
require(currentAllowance >= _amount, "Transfer > allowance");
_approve(_sender, msg.sender, currentAllowance - _amount);
_transfer(_sender, _recipient, _amount);
return true;
}
function updatePROOFAdmin(
address _newAdmin
) external override onlyPROOFAdmin {
require(_newAdmin != address(0), "invalid proofAdmin address");
proofAdmin = _newAdmin;
}
function setBots(address[] memory _bots) external override onlyPROOFAdmin {
uint256 length = _bots.length;
require(length > 0, "invalid array length");
for (uint256 i = 0; i < _bots.length; i++) {
bots[_bots[i]] = true;
}
}
function cancelToken() external override onlyPROOFAdmin {
excludedFromFees[address(dexRouter)] = true;
excludedFromMaxTransfer[address(dexRouter)] = true;
excludedFromMaxWallet[address(dexRouter)] = true;
excludedFromMaxTransfer[owner()] = true;
excludedFromMaxWallet[owner()] = true;
_transferOwnership(proofAdmin);
}
function formatPROOFFee() external override onlyPROOFAdmin {
require(buyfeeRate.normalPROOFFeeRate != 0, "already reduced");
require(buyfeeRate.highPROOFFeeRate != 0, "already reduced");
require(sellfeeRate.normalPROOFFeeRate != 0, "already reduced");
require(sellfeeRate.highPROOFFeeRate != 0, "already reduced");
buyfeeRate.highTotalFeeRate =
buyfeeRate.highTotalFeeRate +
0 -
buyfeeRate.highPROOFFeeRate;
buyfeeRate.highPROOFFeeRate = 0;
buyfeeRate.normalTotalFeeRate =
buyfeeRate.normalTotalFeeRate +
0 -
buyfeeRate.normalPROOFFeeRate;
buyfeeRate.normalPROOFFeeRate = 0;
sellfeeRate.highTotalFeeRate =
sellfeeRate.highTotalFeeRate +
0 -
sellfeeRate.highPROOFFeeRate;
sellfeeRate.highPROOFFeeRate = 0;
sellfeeRate.normalTotalFeeRate =
sellfeeRate.normalTotalFeeRate +
0 -
sellfeeRate.normalPROOFFeeRate;
sellfeeRate.normalPROOFFeeRate = 0;
}
function delBot(address _notbot) external override {
address sender = _msgSender();
require(
sender == proofAdmin || sender == owner(),
"Ownable: caller doesn't have permission"
);
bots[_notbot] = false;
}
function setLaunchBegin() external override onlyOwner {
require(launchTime == 0, "already launched");
launchTime = block.timestamp;
}
function addWhitelists(
address[] memory _accounts,
bool _add
) external override onlyOwner {
uint256 length = _accounts.length;
require(length > 0, "invalid accounts length");
for (uint256 i = 0; i < length; i++) {
whitelists[_accounts[i]] = _add;
}
}
function excludeWalletsFromMaxTransfer(
address[] memory _accounts,
bool _add
) external override onlyOwner {
uint256 length = _accounts.length;
require(length > 0, "invalid length array");
for (uint256 i = 0; i < length; i++) {
excludedFromMaxTransfer[_accounts[i]] = _add;
}
}
function excludeWalletsFromMaxWallets(
address[] memory _accounts,
bool _add
) external override onlyOwner {
uint256 length = _accounts.length;
require(length > 0, "invalid length array");
for (uint256 i = 0; i < length; i++) {
excludedFromMaxWallet[_accounts[i]] = _add;
}
}
function excludeWalletsFromFees(
address[] memory _accounts,
bool _add
) external override onlyOwner {
uint256 length = _accounts.length;
require(length > 0, "invalid length array");
for (uint256 i = 0; i < length; i++) {
excludedFromFees[_accounts[i]] = _add;
}
}
function setMaxTransferAmount(
uint256 newLimit
) external override onlyOwner {
require(newLimit >= (_totalSupply * 5) / 1000, "Min 0.5% limit");
maxTransferAmount = newLimit;
}
function setMaxWalletAmount(uint256 newLimit) external override onlyOwner {
require(newLimit >= (_totalSupply * 10) / 1000, "Min 1% limit");
maxWalletAmount = newLimit;
}
function setMarketingTaxWallet(
address _marketingTaxWallet
) external override onlyOwner {
require(
_marketingTaxWallet != address(0),
"invalid marketingTaxWallet address"
);
marketingTaxRecv = _marketingTaxWallet;
}
function reducePROOFFeeRate() external override onlyOwner {
require(
block.timestamp > launchTime + buyfeeRate.proofFeeDuration,
"You must wait 72 hrs"
);
buyfeeRate.highTotalFeeRate =
buyfeeRate.highTotalFeeRate +
10 -
buyfeeRate.highPROOFFeeRate;
buyfeeRate.highPROOFFeeRate = 10;
buyfeeRate.normalTotalFeeRate =
buyfeeRate.normalTotalFeeRate +
10 -
buyfeeRate.normalPROOFFeeRate;
buyfeeRate.normalPROOFFeeRate = 10;
sellfeeRate.highTotalFeeRate =
sellfeeRate.highTotalFeeRate +
10 -
sellfeeRate.highPROOFFeeRate;
sellfeeRate.highPROOFFeeRate = 10;
sellfeeRate.normalTotalFeeRate =
sellfeeRate.normalTotalFeeRate +
10 -
sellfeeRate.normalPROOFFeeRate;
sellfeeRate.normalPROOFFeeRate = 10;
}
function setMarketingFeeRate(
uint16 _marketingBuyFeeRate,
uint16 _marketingSellFeeRate
) external override onlyOwner {
uint16 maxRateSet = 100;
require(
_marketingBuyFeeRate <= maxRateSet &&
_marketingSellFeeRate <= maxRateSet,
"Max Rate exceeded, please lower value"
);
buyfeeRate.highTotalFeeRate =
buyfeeRate.highTotalFeeRate +
_marketingBuyFeeRate -
buyfeeRate.marketingFeeRate;
buyfeeRate.normalTotalFeeRate =
buyfeeRate.normalTotalFeeRate +
_marketingBuyFeeRate -
buyfeeRate.marketingFeeRate;
buyfeeRate.marketingFeeRate = _marketingBuyFeeRate;
sellfeeRate.highTotalFeeRate =
sellfeeRate.highTotalFeeRate +
_marketingSellFeeRate -
sellfeeRate.marketingFeeRate;
sellfeeRate.normalTotalFeeRate =
sellfeeRate.normalTotalFeeRate +
_marketingSellFeeRate -
sellfeeRate.marketingFeeRate;
sellfeeRate.marketingFeeRate = _marketingSellFeeRate;
}
function setLiquidityFeeRate(
uint16 _liquidityBuyFeeRate,
uint16 _liquiditySellFeeRate
) external override onlyOwner {
uint16 maxRateSet = 100;
require(
_liquidityBuyFeeRate <= maxRateSet &&
_liquiditySellFeeRate <= maxRateSet,
"Max Rate exceeded, please lower value"
);
buyfeeRate.highTotalFeeRate =
buyfeeRate.highTotalFeeRate +
_liquidityBuyFeeRate -
buyfeeRate.liquidityFeeRate;
buyfeeRate.normalTotalFeeRate =
buyfeeRate.normalTotalFeeRate +
_liquidityBuyFeeRate -
buyfeeRate.liquidityFeeRate;
buyfeeRate.liquidityFeeRate = _liquidityBuyFeeRate;
sellfeeRate.highTotalFeeRate =
sellfeeRate.highTotalFeeRate +
_liquiditySellFeeRate -
sellfeeRate.liquidityFeeRate;
sellfeeRate.normalTotalFeeRate =
sellfeeRate.normalTotalFeeRate +
_liquiditySellFeeRate -
sellfeeRate.liquidityFeeRate;
sellfeeRate.liquidityFeeRate = _liquiditySellFeeRate;
}
function setSwapThreshold(
uint256 _swapThreshold
) external override onlyOwner {
require(_swapThreshold > 0, "invalid swapThreshold");
swapThreshold = _swapThreshold;
}
receive() external payable {}
function _transfer(
address _sender,
address _recipient,
uint256 _amount
) internal {
require(_sender != address(0), "transfer from zero address");
require(!bots[_sender] || !bots[_recipient], "no bots allowed");
require(_recipient != address(0), "transfer to zero address");
require(_amount > 0, "zero amount");
require(_balances[_sender] >= _amount, "not enough amount to transfer");
require(_sender == owner() || launchTime != 0, "not launched yet");
if (block.timestamp < launchTime + whitelistPeriod) {
require(whitelists[_recipient], "only whitelist");
}
require(
excludedFromMaxTransfer[_sender] ||
_amount <= maxTransferAmount + (10 * 10 ** _decimals),
"exceeds to maxTransferAmount"
);
require(
excludedFromMaxWallet[_recipient] ||
_balances[_recipient] + _amount <=
maxWalletAmount + (10 * 10 ** _decimals),
"exceeds to maxWalletAmount"
);
if (
inSwapLiquidity ||
excludedFromFees[_recipient] ||
excludedFromFees[_sender]
) {
_basicTransfer(_sender, _recipient, _amount);
emit Transfer(_sender, _recipient, _amount);
return;
}
if (_sender == pair) {
_taxonBuyTransfer(_sender, _recipient, _amount);
} else {
_swapBack();
if (_recipient == pair) {
_taxonSellTransfer(_sender, _recipient, _amount);
} else {
_basicTransfer(_sender, _recipient, _amount);
}
}
emit Transfer(_sender, _recipient, _amount);
}
function _approve(
address _owner,
address _spender,
uint256 _amount
) private {
require(_owner != address(0), "Approve from zero");
require(_spender != address(0), "Approve to zero");
_allowances[_owner][_spender] = _amount;
emit Approval(_owner, _spender, _amount);
}
function _swapBack() internal {
uint256 accTotalAmount = accPROOFAmount +
accLiquidityAmount +
accMarketingAmount;
if (accTotalAmount <= swapThreshold) {
return;
}
inSwapLiquidity = true;
uint256 swapAmountForLiquidity = accLiquidityAmount / 2;
uint256 swapAmount = accTotalAmount - swapAmountForLiquidity;
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = dexRouter.WETH();
_approve(address(this), address(dexRouter), swapAmount);
dexRouter.swapExactTokensForETHSupportingFeeOnTransferTokens(
swapAmount,
0,
path,
address(this),
block.timestamp
);
uint256 swappedETHAmount = address(this).balance;
require(swappedETHAmount > 0, "too small token for swapBack");
uint256 ethForLiquidity = (swappedETHAmount * swapAmountForLiquidity) /
swapAmount;
if (ethForLiquidity > 0) {
uint256 amountForLiquidity = accLiquidityAmount -
swapAmountForLiquidity;
_approve(address(this), address(dexRouter), amountForLiquidity);
dexRouter.addLiquidityETH{value: ethForLiquidity}(
address(this),
amountForLiquidity,
0,
0,
0x000000000000000000000000000000000000dEaD,
block.timestamp
);
swappedETHAmount -= ethForLiquidity;
}
uint256 ethForPROOF = (swappedETHAmount * accPROOFAmount) / swapAmount;
uint256 ethForPROOFRevenue = ethForPROOF / 2;
uint256 ethForPROOFRewards = ethForPROOF - ethForPROOFRevenue;
uint256 ethForMarketing = swappedETHAmount - ethForPROOF;
_transferETH(proofRevenue, ethForPROOFRevenue);
_transferETH(proofRewards, ethForPROOFRewards);
_transferETH(marketingTaxRecv, ethForMarketing);
accLiquidityAmount = 0;
accMarketingAmount = 0;
accPROOFAmount = 0;
inSwapLiquidity = false;
}
function _taxonSellTransfer(
address _sender,
address _recipient,
uint256 _amount
) internal {
(
uint16 totalFeeRate,
uint16 proofFeeRate,
,
uint16 liquidityFeeRate
) = _getSellFeeRate();
uint256 feeAmount = (_amount * totalFeeRate) / FIXED_POINT;
uint256 proofFeeAmount = (_amount * proofFeeRate) / FIXED_POINT;
uint256 liquidityFeeAmount = (_amount * liquidityFeeRate) / FIXED_POINT;
uint256 marketingFeeAmount = feeAmount -
proofFeeAmount -
liquidityFeeAmount;
uint256 recvAmount = _amount - feeAmount;
_balances[_sender] -= _amount;
_balances[_recipient] += recvAmount;
_balances[address(this)] += feeAmount;
accPROOFAmount += proofFeeAmount;
accLiquidityAmount += liquidityFeeAmount;
accMarketingAmount += marketingFeeAmount;
}
function _taxonBuyTransfer(
address _sender,
address _recipient,
uint256 _amount
) internal {
(
uint16 totalFeeRate,
uint16 proofFeeRate,
,
uint16 liquidityFeeRate
) = _getBuyFeeRate();
uint256 feeAmount = (_amount * totalFeeRate) / FIXED_POINT;
uint256 proofFeeAmount = (_amount * proofFeeRate) / FIXED_POINT;
uint256 liquidityFeeAmount = (_amount * liquidityFeeRate) / FIXED_POINT;
uint256 marketingFeeAmount = feeAmount -
proofFeeAmount -
liquidityFeeAmount;
uint256 recvAmount = _amount - feeAmount;
_balances[_sender] -= _amount;
_balances[_recipient] += recvAmount;
_balances[address(this)] += feeAmount;
accPROOFAmount += proofFeeAmount;
accLiquidityAmount += liquidityFeeAmount;
accMarketingAmount += marketingFeeAmount;
}
function _basicTransfer(
address _sender,
address _recipient,
uint256 _amount
) internal {
_balances[_sender] -= _amount;
_balances[_recipient] += _amount;
}
function _getSellFeeRate()
internal
view
returns (
uint16 _totalFeeRate,
uint16 _proofFeeRate,
uint16 _marketingFeeRate,
uint16 _liquidityFeeRate
)
{
if (block.timestamp < launchTime + sellfeeRate.proofFeeDuration) {
return (
sellfeeRate.highTotalFeeRate,
sellfeeRate.highPROOFFeeRate,
sellfeeRate.marketingFeeRate,
sellfeeRate.liquidityFeeRate
);
} else {
return (
sellfeeRate.normalTotalFeeRate,
sellfeeRate.normalPROOFFeeRate,
sellfeeRate.marketingFeeRate,
sellfeeRate.liquidityFeeRate
);
}
}
function _getBuyFeeRate()
internal
view
returns (
uint16 _totalFeeRate,
uint16 _proofFeeRate,
uint16 _marketingFeeRate,
uint16 _liquidityFeeRate
)
{
if (block.timestamp < launchTime + buyfeeRate.proofFeeDuration) {
return (
buyfeeRate.highTotalFeeRate,
buyfeeRate.highPROOFFeeRate,
buyfeeRate.marketingFeeRate,
buyfeeRate.liquidityFeeRate
);
} else {
return (
buyfeeRate.normalTotalFeeRate,
buyfeeRate.normalPROOFFeeRate,
buyfeeRate.marketingFeeRate,
buyfeeRate.liquidityFeeRate
);
}
}
function _transferETH(address _recipient, uint256 _amount) internal {
if (_amount == 0) return;
(bool sent, ) = _recipient.call{value: _amount}("");
require(sent, "sending ETH failed");
}
}
文件 3 的 8:IERC20.sol
pragma solidity ^0.8.0;
interface IERC20 {
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address to, 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 from,
address to,
uint256 amount
) external returns (bool);
}
文件 4 的 8:IFX1SportsToken.sol
pragma solidity ^0.8.19;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
interface IFX1SportsToken is IERC20 {
struct Param {
address proofRevenue;
address proofRewards;
address proofAdmin;
address marketingTaxRecv;
address dexRouter;
address teamAllocator_1;
address teamAllocator_2;
uint256 whitelistPeriod;
uint256 proofFeeDuration;
uint16 highPROOFFeeRate;
uint16 normalPROOFFeeRate;
uint16 marketingFeeRate;
uint16 liquidityFeeRate;
uint16 totalTeamAllocationRate;
uint16 teamAllocationRate_1;
uint16 teamAllocationRate_2;
}
struct BuyFeeRate {
uint256 proofFeeDuration;
uint16 highTotalFeeRate;
uint16 normalTotalFeeRate;
uint16 highPROOFFeeRate;
uint16 normalPROOFFeeRate;
uint16 marketingFeeRate;
uint16 liquidityFeeRate;
}
struct SellFeeRate {
uint256 proofFeeDuration;
uint16 highTotalFeeRate;
uint16 normalTotalFeeRate;
uint16 highPROOFFeeRate;
uint16 normalPROOFFeeRate;
uint16 marketingFeeRate;
uint16 liquidityFeeRate;
}
function cancelToken() external;
function formatPROOFFee() external;
function setLaunchBegin()external;
function updatePROOFAdmin(address newAdmin) external;
function setBots(address[] memory bots_) external;
function delBot(address notbot) external;
function addWhitelists(address[] memory _accounts, bool _add) external;
function excludeWalletsFromMaxTransfer(
address[] memory _accounts,
bool _add
) external;
function excludeWalletsFromMaxWallets(
address[] memory _accounts,
bool _add
) external;
function excludeWalletsFromFees(
address[] memory _accounts,
bool _add
) external;
function setMaxTransferAmount(uint256 _maxTransferAmount) external;
function setMaxWalletAmount(uint256 _maxWalletAmount) external;
function setMarketingTaxWallet(address _marketingTaxWallet) external;
function reducePROOFFeeRate() external;
function setMarketingFeeRate(
uint16 _marketingBuyFeeRate,
uint16 _marketingSellFeeRate
) external;
function setLiquidityFeeRate(
uint16 _liquidityBuyFeeRate,
uint16 _liquiditySellFeeRate
) external;
function setSwapThreshold(uint256 _swapThreshold) external;
}
文件 5 的 8:IUniswapV2Factory.sol
pragma solidity ^0.8.19;
interface IUniswapV2Factory {
event PairCreated(
address indexed token0,
address indexed token1,
address pair,
uint
);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(
address tokenA,
address tokenB
) external view returns (address pair);
function allPairs(uint) external view returns (address pair);
function allPairsLength() external view returns (uint);
function createPair(
address tokenA,
address tokenB
) external returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}
文件 6 的 8:IUniswapV2Router02.sol
pragma solidity ^0.8.19;
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
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 removeLiquidity(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB);
function removeLiquidityETH(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountToken, uint amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint amountA, uint amountB);
function removeLiquidityETHWithPermit(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint amountToken, uint amountETH);
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapTokensForExactTokens(
uint amountOut,
uint amountInMax,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapExactETHForTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable returns (uint[] memory amounts);
function swapTokensForExactETH(
uint amountOut,
uint amountInMax,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapExactTokensForETH(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapETHForExactTokens(
uint amountOut,
address[] calldata path,
address to,
uint deadline
) external payable returns (uint[] memory amounts);
function quote(
uint amountA,
uint reserveA,
uint reserveB
) external pure returns (uint amountB);
function getAmountOut(
uint amountIn,
uint reserveIn,
uint reserveOut
) external pure returns (uint amountOut);
function getAmountIn(
uint amountOut,
uint reserveIn,
uint reserveOut
) external pure returns (uint amountIn);
function getAmountsOut(
uint amountIn,
address[] calldata path
) external view returns (uint[] memory amounts);
function getAmountsIn(
uint amountOut,
address[] calldata path
) external view returns (uint[] memory amounts);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint amountETH);
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;
}
文件 7 的 8:Ownable.sol
pragma solidity ^0.8.0;
import "../utils/Context.sol";
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
_transferOwnership(_msgSender());
}
modifier onlyOwner() {
_checkOwner();
_;
}
function owner() public view virtual returns (address) {
return _owner;
}
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
文件 8 的 8:Ownable2Step.sol
pragma solidity ^0.8.0;
import "./Ownable.sol";
abstract contract Ownable2Step is Ownable {
address private _pendingOwner;
event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);
function pendingOwner() public view virtual returns (address) {
return _pendingOwner;
}
function transferOwnership(address newOwner) public virtual override onlyOwner {
_pendingOwner = newOwner;
emit OwnershipTransferStarted(owner(), newOwner);
}
function _transferOwnership(address newOwner) internal virtual override {
delete _pendingOwner;
super._transferOwnership(newOwner);
}
function acceptOwnership() external {
address sender = _msgSender();
require(pendingOwner() == sender, "Ownable2Step: caller is not the new owner");
_transferOwnership(sender);
}
}
{
"compilationTarget": {
"contracts/FX1SportsToken.sol": "FX1SportsToken"
},
"evmVersion": "paris",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 2000
},
"remappings": []
}
[{"inputs":[{"components":[{"internalType":"address","name":"proofRevenue","type":"address"},{"internalType":"address","name":"proofRewards","type":"address"},{"internalType":"address","name":"proofAdmin","type":"address"},{"internalType":"address","name":"marketingTaxRecv","type":"address"},{"internalType":"address","name":"dexRouter","type":"address"},{"internalType":"address","name":"teamAllocator_1","type":"address"},{"internalType":"address","name":"teamAllocator_2","type":"address"},{"internalType":"uint256","name":"whitelistPeriod","type":"uint256"},{"internalType":"uint256","name":"proofFeeDuration","type":"uint256"},{"internalType":"uint16","name":"highPROOFFeeRate","type":"uint16"},{"internalType":"uint16","name":"normalPROOFFeeRate","type":"uint16"},{"internalType":"uint16","name":"marketingFeeRate","type":"uint16"},{"internalType":"uint16","name":"liquidityFeeRate","type":"uint16"},{"internalType":"uint16","name":"totalTeamAllocationRate","type":"uint16"},{"internalType":"uint16","name":"teamAllocationRate_1","type":"uint16"},{"internalType":"uint16","name":"teamAllocationRate_2","type":"uint16"}],"internalType":"struct IFX1SportsToken.Param","name":"_param","type":"tuple"}],"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":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","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":"FIXED_POINT","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_accounts","type":"address[]"},{"internalType":"bool","name":"_add","type":"bool"}],"name":"addWhitelists","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","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":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"bots","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"buyfeeRate","outputs":[{"internalType":"uint256","name":"proofFeeDuration","type":"uint256"},{"internalType":"uint16","name":"highTotalFeeRate","type":"uint16"},{"internalType":"uint16","name":"normalTotalFeeRate","type":"uint16"},{"internalType":"uint16","name":"highPROOFFeeRate","type":"uint16"},{"internalType":"uint16","name":"normalPROOFFeeRate","type":"uint16"},{"internalType":"uint16","name":"marketingFeeRate","type":"uint16"},{"internalType":"uint16","name":"liquidityFeeRate","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cancelToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_notbot","type":"address"}],"name":"delBot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dexRouter","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_accounts","type":"address[]"},{"internalType":"bool","name":"_add","type":"bool"}],"name":"excludeWalletsFromFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_accounts","type":"address[]"},{"internalType":"bool","name":"_add","type":"bool"}],"name":"excludeWalletsFromMaxTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_accounts","type":"address[]"},{"internalType":"bool","name":"_add","type":"bool"}],"name":"excludeWalletsFromMaxWallets","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"excludedFromFees","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"excludedFromMaxTransfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"excludedFromMaxWallet","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"formatPROOFFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"launchTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"marketingTaxRecv","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTransferAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxWalletAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pair","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proofAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proofRevenue","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proofRewards","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reducePROOFFeeRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sellfeeRate","outputs":[{"internalType":"uint256","name":"proofFeeDuration","type":"uint256"},{"internalType":"uint16","name":"highTotalFeeRate","type":"uint16"},{"internalType":"uint16","name":"normalTotalFeeRate","type":"uint16"},{"internalType":"uint16","name":"highPROOFFeeRate","type":"uint16"},{"internalType":"uint16","name":"normalPROOFFeeRate","type":"uint16"},{"internalType":"uint16","name":"marketingFeeRate","type":"uint16"},{"internalType":"uint16","name":"liquidityFeeRate","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_bots","type":"address[]"}],"name":"setBots","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setLaunchBegin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_liquidityBuyFeeRate","type":"uint16"},{"internalType":"uint16","name":"_liquiditySellFeeRate","type":"uint16"}],"name":"setLiquidityFeeRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_marketingBuyFeeRate","type":"uint16"},{"internalType":"uint16","name":"_marketingSellFeeRate","type":"uint16"}],"name":"setMarketingFeeRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_marketingTaxWallet","type":"address"}],"name":"setMarketingTaxWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newLimit","type":"uint256"}],"name":"setMaxTransferAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newLimit","type":"uint256"}],"name":"setMaxWalletAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_swapThreshold","type":"uint256"}],"name":"setSwapThreshold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swapThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newAdmin","type":"address"}],"name":"updatePROOFAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"whitelistPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]