Feature Tip: Add private address tag to any address under My Name Tag !
Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Latest 1 from a total of 1 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Transfer Ownersh... | 17443113 | 988 days ago | IN | 0 ETH | 0.00070422 |
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| 0x60806040 | 21478280 | 424 days ago | Contract Creation | 0 ETH | |||
| 0x60806040 | 21478280 | 424 days ago | Contract Creation | 0 ETH | |||
| 0x60806040 | 21238813 | 457 days ago | Contract Creation | 0 ETH | |||
| 0x60806040 | 21238813 | 457 days ago | Contract Creation | 0 ETH | |||
| 0x60806040 | 21214000 | 460 days ago | Contract Creation | 0 ETH | |||
| 0x60806040 | 21214000 | 460 days ago | Contract Creation | 0 ETH | |||
| 0x60806040 | 21145055 | 470 days ago | Contract Creation | 0 ETH | |||
| 0x60806040 | 21145055 | 470 days ago | Contract Creation | 0 ETH | |||
| 0x60806040 | 21118754 | 474 days ago | Contract Creation | 0 ETH | |||
| 0x60806040 | 21118754 | 474 days ago | Contract Creation | 0 ETH | |||
| 0x60806040 | 21081730 | 479 days ago | Contract Creation | 0 ETH | |||
| 0x60806040 | 21081730 | 479 days ago | Contract Creation | 0 ETH | |||
| 0x60806040 | 21018164 | 488 days ago | Contract Creation | 0 ETH | |||
| 0x60806040 | 21018164 | 488 days ago | Contract Creation | 0 ETH | |||
| 0x60806040 | 20958856 | 496 days ago | Contract Creation | 0 ETH | |||
| 0x60806040 | 20958856 | 496 days ago | Contract Creation | 0 ETH | |||
| 0x60806040 | 20906593 | 503 days ago | Contract Creation | 0 ETH | |||
| 0x60806040 | 20906593 | 503 days ago | Contract Creation | 0 ETH | |||
| 0x60806040 | 20779668 | 521 days ago | Contract Creation | 0 ETH | |||
| 0x60806040 | 20779668 | 521 days ago | Contract Creation | 0 ETH | |||
| 0x60806040 | 20746394 | 526 days ago | Contract Creation | 0 ETH | |||
| 0x60806040 | 20746394 | 526 days ago | Contract Creation | 0 ETH | |||
| 0x60806040 | 20723143 | 529 days ago | Contract Creation | 0 ETH | |||
| 0x60806040 | 20723143 | 529 days ago | Contract Creation | 0 ETH | |||
| 0x60806040 | 20692542 | 533 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
WalletsFacet
Compiler Version
v0.8.17+commit.8df45f5f
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2023-06-16
*/
// Sources flattened with hardhat v2.12.6 https://hardhat.org
// File contracts/interfaces/IMintFactory.sol
// SPDX-License-Identifier: UNLICENSED
// ALL RIGHTS RESERVED
// Unicrypt by SDDTech reserves all rights on this code. You may NOT copy these contracts.
pragma solidity 0.8.17;
interface IMintFactory {
struct TaxHelper {
string Name;
address Address;
uint Index;
}
function addTaxHelper(string calldata _name, address _address) external;
function updateTaxHelper(uint _index, address _address) external;
function getTaxHelperAddress(uint _index) external view returns(address);
function getTaxHelpersDataByIndex(uint _index) external view returns(TaxHelper memory);
function registerToken (address _tokenOwner, address _tokenAddress) external;
function tokenIsRegistered(address _tokenAddress) external view returns (bool);
function tokenGeneratorsLength() external view returns (uint256);
function tokenGeneratorIsAllowed(address _tokenGenerator) external view returns (bool);
function getFacetHelper() external view returns (address);
function updateFacetHelper(address _newFacetHelperAddress) external;
function getFeeHelper() external view returns (address);
function updateFeeHelper(address _newFeeHelperAddress) external;
function getLosslessController() external view returns (address);
function updateLosslessController(address _newLosslessControllerAddress) external;
}
// File contracts/interfaces/ITaxHelper.sol
//
// ALL RIGHTS RESERVED
// Unicrypt by SDDTech reserves all rights on this code. You may NOT copy these contracts.
interface ITaxHelper {
function initiateBuyBackTax(
address _token,
address _wallet
) external returns (bool);
function initiateLPTokenTax(
address _token,
address _wallet
) external returns (bool);
function lpTokenHasReserves(address _lpToken) external view returns (bool);
function createLPToken() external returns (address lpToken);
function sync(address _lpToken) external;
}
// File contracts/interfaces/IERC20.sol
// File @openzeppelin/contracts/token/ERC20/IERC20.sol@v4.0.0
/**
* @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.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* 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);
}
// File contracts/interfaces/ITaxToken.sol
//
// ALL RIGHTS RESERVED
// Unicrypt by SDDTech reserves all rights on this code. You may NOT copy these contracts.
interface ITaxToken is IERC20 {
function taxHelperIndex()external view returns(uint);
function buyBackBurn(uint256 _amount) external;
function owner() external view returns (address);
function pairAddress() external view returns (address);
function decimals() external view returns (uint8);
}
// File contracts/libraries/Context.sol
//
// File @openzeppelin/contracts/utils/Context.sol@v4.0.0
/*
* @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 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.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}
// File contracts/libraries/Ownable.sol
//
// File @openzeppelin/contracts/access/Ownable.sol@v4.0.0
/**
* @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.
*/
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 () {
address msgSender = _msgSender();
_owner = msgSender;
emit OwnershipTransferred(address(0), 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.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
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.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}
// File contracts/BuyBackWallet.sol
//
// ALL RIGHTS RESERVED
// Unicrypt by SDDTech reserves all rights on this code. You may NOT copy these contracts.
contract BuyBackWallet is Ownable{
ITaxToken public token;
IMintFactory public factory;
uint256 private threshold;
event UpdatedThreshold(uint256 _newThreshold);
event ETHtoTaxHelper(uint256 amount);
constructor(address _factory, address _token, uint256 _newThreshold) {
token = ITaxToken(_token);
factory = IMintFactory(_factory);
threshold = _newThreshold;
emit UpdatedThreshold(_newThreshold);
transferOwnership(_token);
}
function checkBuyBackTrigger() public view returns (bool) {
return address(this).balance > threshold;
}
function getBalance() public view returns (uint256) {
return address(this).balance;
}
function sendEthToTaxHelper() external returns (uint256) {
uint index = token.taxHelperIndex();
require(msg.sender == factory.getTaxHelperAddress(index), "RA");
uint256 amount = address(this).balance;
(bool sent,) = msg.sender.call{value: amount}("");
require(sent, "Failed to send Ether");
emit ETHtoTaxHelper(amount);
return amount;
}
function updateThreshold(uint256 _newThreshold) external onlyOwner {
threshold = _newThreshold;
emit UpdatedThreshold(_newThreshold);
}
function getThreshold() external view returns (uint256) {
return threshold;
}
receive() payable external {
}
}
// File contracts/FacetHelper.sol
//
// ALL RIGHTS RESERVED
// Unicrypt by SDDTech reserves all rights on this code. You may NOT copy these contracts.
contract FacetHelper is Ownable{
event AddedFacet(address _newFacet);
event AddedSelector(address _facet, bytes4 _sig);
event RemovedSelector(bytes4 _sig);
event ResetStorage();
event UpdatedSettingsFacet(address _newAddress);
event UpdatedLosslessFacet(address _newAddress);
event UpdatedTaxFacet(address _newAddress);
event UpdatedConstructorFacet(address _newAddress);
event UpdatedWalletsFacet(address _newAddress);
event UpdatedAntiBotFacet(address _newAddress);
event UpdatedMulticallFacet(address _newAddress);
struct Facets {
address Settings;
address Lossless;
address Tax;
address Constructor;
address Wallets;
address AntiBot;
address Multicall;
}
struct FacetAddressAndPosition {
address facetAddress;
uint16 functionSelectorPosition; // position in facetFunctionSelectors.functionSelectors array
}
struct FacetFunctionSelectors {
bytes4[] functionSelectors;
uint16 facetAddressPosition; // position of facetAddress in facetAddresses array
}
// maps function selector to the facet address and
// the position of the selector in the facetFunctionSelectors.selectors array
mapping(bytes4 => FacetAddressAndPosition) _selectorToFacetAndPosition;
// maps facet addresses to function selectors
mapping(address => FacetFunctionSelectors) _facetFunctionSelectors;
// facet addresses
address[] _facetAddresses;
// Used to query if a contract implements an interface.
// Used to implement ERC-165.
mapping(bytes4 => bool) supportedInterfaces;
Facets public facetsInfo;
enum FacetCutAction {Add, Replace, Remove}
// Add=0, Replace=1, Remove=2
struct FacetCut {
address facetAddress;
FacetCutAction action;
bytes4[] functionSelectors;
}
struct Facet {
address facetAddress;
bytes4[] functionSelectors;
}
/// @notice Gets all facets and their selectors.
/// @return facets_ Facet
function facets() external view returns (Facet[] memory facets_) {
uint256 numFacets = _facetAddresses.length;
facets_ = new Facet[](numFacets);
for (uint256 i; i < numFacets; i++) {
address facetAddress_ = _facetAddresses[i];
facets_[i].facetAddress = facetAddress_;
facets_[i].functionSelectors = _facetFunctionSelectors[facetAddress_].functionSelectors;
}
}
/// @notice Gets all the function selectors provided by a facet.
/// @param _facet The facet address.
/// @return facetFunctionSelectors_
function facetFunctionSelectors(address _facet) external view returns (bytes4[] memory facetFunctionSelectors_) {
facetFunctionSelectors_ = _facetFunctionSelectors[_facet].functionSelectors;
}
/// @notice Get all the facet addresses used by a diamond.
/// @return facetAddresses_
function facetAddresses() external view returns (address[] memory facetAddresses_) {
facetAddresses_ = _facetAddresses;
}
/// @notice Gets the facet that supports the given selector.
/// @dev If facet is not found return address(0).
/// @param _functionSelector The function selector.
/// @return facetAddress_ The facet address.
function facetAddress(bytes4 _functionSelector) external view returns (address facetAddress_) {
facetAddress_ = _selectorToFacetAndPosition[_functionSelector].facetAddress;
}
// This implements ERC-165.
function supportsInterface(bytes4 _interfaceId) external view returns (bool) {
return supportedInterfaces[_interfaceId];
}
event DiamondCut(FacetCut[] _diamondCut);
function diamondCut(
FacetCut[] memory _diamondCut
) public onlyOwner {
for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) {
FacetCutAction action = _diamondCut[facetIndex].action;
if (action == FacetCutAction.Add) {
addFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);
} else if (action == FacetCutAction.Replace) {
replaceFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);
} else if (action == FacetCutAction.Remove) {
removeFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);
} else {
revert("LibDiamondCut: Incorrect FacetCutAction");
}
}
emit DiamondCut(_diamondCut);
}
function addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {
require(_functionSelectors.length > 0, "LibDiamondCut: No selectors in facet to cut");
// uint16 selectorCount = uint16(diamondStorage().selectors.length);
require(_facetAddress != address(0), "LibDiamondCut: Add facet can't be address(0)");
uint16 selectorPosition = uint16(_facetFunctionSelectors[_facetAddress].functionSelectors.length);
// add new facet address if it does not exist
if (selectorPosition == 0) {
enforceHasContractCode(_facetAddress, "LibDiamondCut: New facet has no code");
_facetFunctionSelectors[_facetAddress].facetAddressPosition = uint16(_facetAddresses.length);
_facetAddresses.push(_facetAddress);
}
for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {
bytes4 selector = _functionSelectors[selectorIndex];
address oldFacetAddress = _selectorToFacetAndPosition[selector].facetAddress;
require(oldFacetAddress == address(0), "LibDiamondCut: Can't add function that already exists");
_facetFunctionSelectors[_facetAddress].functionSelectors.push(selector);
_selectorToFacetAndPosition[selector].facetAddress = _facetAddress;
_selectorToFacetAndPosition[selector].functionSelectorPosition = selectorPosition;
selectorPosition++;
}
}
function replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {
require(_functionSelectors.length > 0, "LibDiamondCut: No selectors in facet to cut");
require(_facetAddress != address(0), "LibDiamondCut: Add facet can't be address(0)");
uint16 selectorPosition = uint16(_facetFunctionSelectors[_facetAddress].functionSelectors.length);
// add new facet address if it does not exist
if (selectorPosition == 0) {
enforceHasContractCode(_facetAddress, "LibDiamondCut: New facet has no code");
_facetFunctionSelectors[_facetAddress].facetAddressPosition = uint16(_facetAddresses.length);
_facetAddresses.push(_facetAddress);
}
for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {
bytes4 selector = _functionSelectors[selectorIndex];
address oldFacetAddress = _selectorToFacetAndPosition[selector].facetAddress;
require(oldFacetAddress != _facetAddress, "LibDiamondCut: Can't replace function with same function");
removeFunction(oldFacetAddress, selector);
// add function
_selectorToFacetAndPosition[selector].functionSelectorPosition = selectorPosition;
_facetFunctionSelectors[_facetAddress].functionSelectors.push(selector);
_selectorToFacetAndPosition[selector].facetAddress = _facetAddress;
selectorPosition++;
}
}
function removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {
require(_functionSelectors.length > 0, "LibDiamondCut: No selectors in facet to cut");
// if function does not exist then do nothing and return
require(_facetAddress == address(0), "LibDiamondCut: Remove facet address must be address(0)");
for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {
bytes4 selector = _functionSelectors[selectorIndex];
address oldFacetAddress = _selectorToFacetAndPosition[selector].facetAddress;
removeFunction(oldFacetAddress, selector);
}
}
function removeFunction(address _facetAddress, bytes4 _selector) internal {
require(_facetAddress != address(0), "LibDiamondCut: Can't remove function that doesn't exist");
// an immutable function is a function defined directly in a diamond
require(_facetAddress != address(this), "LibDiamondCut: Can't remove immutable function");
// replace selector with last selector, then delete last selector
uint256 selectorPosition = _selectorToFacetAndPosition[_selector].functionSelectorPosition;
uint256 lastSelectorPosition = _facetFunctionSelectors[_facetAddress].functionSelectors.length - 1;
// if not the same then replace _selector with lastSelector
if (selectorPosition != lastSelectorPosition) {
bytes4 lastSelector = _facetFunctionSelectors[_facetAddress].functionSelectors[lastSelectorPosition];
_facetFunctionSelectors[_facetAddress].functionSelectors[selectorPosition] = lastSelector;
_selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint16(selectorPosition);
}
// delete the last selector
_facetFunctionSelectors[_facetAddress].functionSelectors.pop();
delete _selectorToFacetAndPosition[_selector];
// if no more selectors for facet address then delete the facet address
if (lastSelectorPosition == 0) {
// replace facet address with last facet address and delete last facet address
uint256 lastFacetAddressPosition = _facetAddresses.length - 1;
uint256 facetAddressPosition = _facetFunctionSelectors[_facetAddress].facetAddressPosition;
if (facetAddressPosition != lastFacetAddressPosition) {
address lastFacetAddress = _facetAddresses[lastFacetAddressPosition];
_facetAddresses[facetAddressPosition] = lastFacetAddress;
_facetFunctionSelectors[lastFacetAddress].facetAddressPosition = uint16(facetAddressPosition);
}
_facetAddresses.pop();
delete _facetFunctionSelectors[_facetAddress].facetAddressPosition;
}
}
function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {
uint256 contractSize;
assembly {
contractSize := extcodesize(_contract)
}
require(contractSize > 0, _errorMessage);
}
// mapping(bytes4 => address) public selectorToFacet;
// bytes4[] public selectorsList;
// mapping(address => bool) public isFacet;
// address[] public facetsList;
// function addFacet(address _newFacet) public onlyOwner {
// isFacet[_newFacet] = true;
// facetsList.push(_newFacet);
// emit AddedFacet(_newFacet);
// }
// function batchAddSelectors(address _facet, bytes4[] memory _sigs) public onlyOwner {
// for(uint256 index; index < _sigs.length; index++) {
// addSelector(_facet, _sigs[index]);
// }
// }
// function addSelector(address _facet, bytes4 _sig) public onlyOwner {
// require(selectorToFacet[_sig] == address(0));
// // require(isFacet[_facet]);
// selectorToFacet[_sig] = _facet;
// selectorsList.push(_sig);
// emit AddedSelector(_facet, _sig);
// }
// Removing of the selectors occurs during resetFacetStorage();
// it is easier to reset and rebuild using the script when deploying and updating the facets
// function removeSelector(bytes4 _sig) public onlyOwner {
// selectorToFacet[_sig] = address(0);
// emit RemovedSelector(_sig);
// }
// function getFacetAddressFromSelector(bytes4 _sig) public view returns (address) {
// return selectorToFacet[_sig];
// }
// function getFacetByIndex(uint256 _index) public view returns(address) {
// return facetsList[_index];
// }
// function resetFacetStorage() public onlyOwner {
// for(uint i = 0; i < selectorsList.length; i++) {
// bytes4 sig = selectorsList[i];
// selectorToFacet[sig] = address(0);
// }
// delete selectorsList;
// for(uint i = 0; i < facetsList.length; i++) {
// address facet = facetsList[i];
// isFacet[facet] = false;
// }
// delete facetsList;
// emit ResetStorage();
// }
// Facet getters and setters
function getSettingsFacet() public view returns (address) {
return facetsInfo.Settings;
}
function updateSettingsFacet(address _newSettingsAddress) public onlyOwner {
facetsInfo.Settings = _newSettingsAddress;
emit UpdatedSettingsFacet(_newSettingsAddress);
}
function getLosslessFacet() public view returns (address) {
return facetsInfo.Lossless;
}
function updateLosslessFacet(address _newLosslessAddress) public onlyOwner {
facetsInfo.Lossless = _newLosslessAddress;
emit UpdatedLosslessFacet(_newLosslessAddress);
}
function getTaxFacet() public view returns (address) {
return facetsInfo.Tax;
}
function updateTaxFacet(address _newTaxAddress) public onlyOwner {
facetsInfo.Tax = _newTaxAddress;
emit UpdatedTaxFacet(_newTaxAddress);
}
function getConstructorFacet() public view returns (address) {
return facetsInfo.Constructor;
}
function updateConstructorFacet(address _newConstructorAddress) public onlyOwner {
facetsInfo.Constructor = _newConstructorAddress;
emit UpdatedConstructorFacet(_newConstructorAddress);
}
function getWalletsFacet() public view returns (address) {
return facetsInfo.Wallets;
}
function updateWalletsFacet(address _newWalletsAddress) public onlyOwner {
facetsInfo.Wallets = _newWalletsAddress;
emit UpdatedWalletsFacet(_newWalletsAddress);
}
function getAntiBotFacet() public view returns (address) {
return facetsInfo.AntiBot;
}
function updateAntiBotFacet(address _newAntiBotAddress) public onlyOwner {
facetsInfo.AntiBot = _newAntiBotAddress;
emit UpdatedAntiBotFacet(_newAntiBotAddress);
}
function getMulticallFacet() public view returns (address) {
return facetsInfo.Multicall;
}
function updateMulticallFacet(address _newWalletsAddress) public onlyOwner {
facetsInfo.Multicall = _newWalletsAddress;
emit UpdatedMulticallFacet(_newWalletsAddress);
}
}
// File contracts/interfaces/ILosslessController.sol
//
interface ILosslessController {
function pause() external;
function unpause() external;
function setAdmin(address _newAdmin) external;
function setRecoveryAdmin(address _newRecoveryAdmin) external;
function beforeTransfer(address _sender, address _recipient, uint256 _amount) external;
function beforeTransferFrom(address _msgSender, address _sender, address _recipient, uint256 _amount) external;
function beforeApprove(address _sender, address _spender, uint256 _amount) external;
function beforeIncreaseAllowance(address _msgSender, address _spender, uint256 _addedValue) external;
function beforeDecreaseAllowance(address _msgSender, address _spender, uint256 _subtractedValue) external;
function beforeMint(address _to, uint256 _amount) external;
function beforeBurn(address _account, uint256 _amount) external;
function afterTransfer(address _sender, address _recipient, uint256 _amount) external;
event AdminChange(address indexed _newAdmin);
event RecoveryAdminChange(address indexed _newAdmin);
}
// File contracts/facets/Storage.sol
//
// ALL RIGHTS RESERVED
// Unicrypt by SDDTech reserves all rights on this code. You may NOT copy these contracts.
struct Storage {
uint256 CONTRACT_VERSION;
TaxSettings taxSettings;
TaxSettings isLocked;
Fees fees;
CustomTax[] customTaxes;
address transactionTaxWallet;
uint256 customTaxLength;
uint256 MaxTax;
uint8 MaxCustom;
uint256 DENOMINATOR;
mapping (address => uint256) _rOwned;
mapping (address => uint256) _tOwned;
mapping (address => mapping (address => uint256)) _allowances;
mapping (address => bool) _isExcluded;
address[] _excluded;
uint256 MAX;
uint256 _tTotal;
uint256 _rTotal;
uint256 _tFeeTotal;
mapping (address => bool) lpTokens;
string _name;
string _symbol;
uint8 _decimals;
address _creator;
address factory;
address buyBackWallet;
address lpWallet;
bool isPaused;
bool isTaxed;
mapping(address => bool) blacklist;
mapping(address => bool) swapWhitelist;
mapping(address => bool) maxBalanceWhitelist;
mapping(address => bool) taxWhitelist;
address pairAddress;
uint256 taxHelperIndex;
// AntiBot Variables
bool marketInit;
uint256 marketInitBlockTime;
AntiBotSettings antiBotSettings;
mapping (address => uint256) antiBotBalanceTracker;
uint256 maxBalanceAfterBuy;
SwapWhitelistingSettings swapWhitelistingSettings;
// Lossless data and events
address recoveryAdmin;
address recoveryAdminCandidate;
bytes32 recoveryAdminKeyHash;
address admin;
uint256 timelockPeriod;
uint256 losslessTurnOffTimestamp;
bool isLosslessTurnOffProposed;
bool isLosslessOn;
}
struct TaxSettings {
bool transactionTax;
bool buyBackTax;
bool holderTax;
bool lpTax;
bool canBlacklist;
bool canMint;
bool canPause;
bool maxBalanceAfterBuy;
}
struct Fee {
uint256 buy;
uint256 sell;
}
struct Fees {
Fee transactionTax;
uint256 buyBackTax;
uint256 holderTax;
uint256 lpTax;
}
struct CustomTax {
string name;
Fee fee;
address wallet;
bool withdrawAsGas;
}
struct AntiBotSettings {
uint256 startBlock;
uint256 endDate;
uint256 increment;
uint256 initialMaxHold;
bool isActive;
}
struct SwapWhitelistingSettings {
uint256 endDate;
bool isActive;
}
// File contracts/facets/AntiBot.sol
//
// ALL RIGHTS RESERVED
// Unicrypt by SDDTech reserves all rights on this code. You may NOT copy these contracts.
contract AntiBotFacet is Ownable {
Storage internal s;
event UpdatedAntiBotIncrement(uint256 _updatedIncrement);
event UpdatedAntiBotEndDate(uint256 _updatedEndDate);
event UpdatedAntiBotInitialMaxHold(uint256 _updatedInitialMaxHold);
event UpdatedAntiBotActiveStatus(bool _isActive);
event UpdatedSwapWhitelistingEndDate(uint256 _updatedEndDate);
event UpdatedSwapWhitelistingActiveStatus(bool _isActive);
event UpdatedMaxBalanceAfterBuy(uint256 _newMaxBalance);
event AddedMaxBalanceWhitelistAddress(address _address);
event RemovedMaxBalanceWhitelistAddress(address _address);
event AddedSwapWhitelistAddress(address _address);
event RemovedSwapWhitelistAddress(address _address);
// AntiBot
function antiBotIsActiveModifier() view internal {
require(s.antiBotSettings.isActive, "ABD");
}
modifier antiBotIsActive() {
antiBotIsActiveModifier();
_;
}
function setIncrement(uint256 _updatedIncrement) public onlyOwner antiBotIsActive {
s.antiBotSettings.increment = _updatedIncrement;
emit UpdatedAntiBotIncrement(_updatedIncrement);
}
function setEndDate( uint256 _updatedEndDate) public onlyOwner antiBotIsActive {
require(_updatedEndDate <= 48, "ED");
s.antiBotSettings.endDate = _updatedEndDate;
emit UpdatedAntiBotEndDate(_updatedEndDate);
}
function setInitialMaxHold( uint256 _updatedInitialMaxHold) public onlyOwner antiBotIsActive {
s.antiBotSettings.initialMaxHold = _updatedInitialMaxHold;
emit UpdatedAntiBotInitialMaxHold(_updatedInitialMaxHold);
}
function updateAntiBot(bool _isActive) public onlyOwner {
require(!s.marketInit, "AMIE");
s.antiBotSettings.isActive = _isActive;
emit UpdatedAntiBotActiveStatus(_isActive);
}
function antiBotCheck(uint256 amount, address receiver) public returns(bool) {
// restrict it to being only called by registered tokens
require(IMintFactory(s.factory).tokenIsRegistered(address(this)));
require(s.marketInit, "AMIE");
if(block.timestamp > s.marketInitBlockTime + (s.antiBotSettings.endDate * 1 hours)) {
s.antiBotSettings.isActive = false;
return true;
}
s.antiBotBalanceTracker[receiver] += amount;
uint256 userAntiBotBalance = s.antiBotBalanceTracker[receiver];
uint256 maxAntiBotBalance = ((block.number - s.antiBotSettings.startBlock) * s.antiBotSettings.increment) + s.antiBotSettings.initialMaxHold;
require((userAntiBotBalance <= maxAntiBotBalance), "ABMSA");
return true;
}
// MaxBalanceAfterBuy
function addMaxBalanceWhitelistedAddress(address _address) public onlyOwner {
require(s.taxSettings.maxBalanceAfterBuy, "AMBABD");
s.maxBalanceWhitelist[_address] = true;
emit AddedMaxBalanceWhitelistAddress(_address);
}
function removeMaxBalanceWhitelistedAddress(address _address) public onlyOwner {
require(s.taxSettings.maxBalanceAfterBuy, "AMBABD");
s.maxBalanceWhitelist[_address] = false;
emit RemovedMaxBalanceWhitelistAddress(_address);
}
function updateMaxBalanceWhitelistBatch(address[] calldata _updatedAddresses, bool _isMaxBalanceWhitelisted) public onlyOwner {
require(s.taxSettings.maxBalanceAfterBuy, "AMBABD");
for(uint i = 0; i < _updatedAddresses.length; i++) {
s.maxBalanceWhitelist[_updatedAddresses[i]] = _isMaxBalanceWhitelisted;
if(_isMaxBalanceWhitelisted) {
emit AddedMaxBalanceWhitelistAddress(_updatedAddresses[i]);
} else {
emit RemovedMaxBalanceWhitelistAddress(_updatedAddresses[i]);
}
}
}
function isMaxBalanceWhitelisted(address _address) public view returns (bool) {
return s.maxBalanceWhitelist[_address];
}
function updateMaxBalanceAfterBuy(uint256 _updatedMaxBalanceAfterBuy) public onlyOwner {
require(s.taxSettings.maxBalanceAfterBuy, "AMBABD");
s.maxBalanceAfterBuy = _updatedMaxBalanceAfterBuy;
emit UpdatedMaxBalanceAfterBuy(_updatedMaxBalanceAfterBuy);
}
function maxBalanceAfterBuyCheck(uint256 amount, address receiver) public view returns(bool) {
if(s.maxBalanceWhitelist[receiver]) {
return true;
}
require(s.taxSettings.maxBalanceAfterBuy);
uint256 receiverBalance;
if(s.taxSettings.holderTax) {
receiverBalance = s._rOwned[receiver];
} else {
receiverBalance = s._tOwned[receiver];
}
receiverBalance += amount;
require(receiverBalance <= s.maxBalanceAfterBuy, "MBAB");
return true;
}
// SwapWhitelist
function addSwapWhitelistedAddress(address _address) public onlyOwner {
require(s.swapWhitelistingSettings.isActive, "ASWD");
s.swapWhitelist[_address] = true;
emit AddedSwapWhitelistAddress(_address);
}
function removeSwapWhitelistedAddress(address _address) public onlyOwner {
require(s.swapWhitelistingSettings.isActive, "ASWD");
s.swapWhitelist[_address] = false;
emit RemovedSwapWhitelistAddress(_address);
}
function updateSwapWhitelistBatch(address[] calldata _updatedAddresses, bool _isSwapWhitelisted) public onlyOwner {
require(s.swapWhitelistingSettings.isActive, "ASWD");
for(uint i = 0; i < _updatedAddresses.length; i++) {
s.swapWhitelist[_updatedAddresses[i]] = _isSwapWhitelisted;
if(_isSwapWhitelisted) {
emit AddedSwapWhitelistAddress(_updatedAddresses[i]);
} else {
emit RemovedSwapWhitelistAddress(_updatedAddresses[i]);
}
}
}
function isSwapWhitelisted(address _address) public view returns (bool) {
return s.swapWhitelist[_address];
}
function setSwapWhitelistEndDate( uint256 _updatedEndDate) public onlyOwner {
require(s.swapWhitelistingSettings.isActive, "ASWD");
require(_updatedEndDate <= 48, "ED");
s.swapWhitelistingSettings.endDate = _updatedEndDate;
emit UpdatedSwapWhitelistingEndDate(_updatedEndDate);
}
function updateSwapWhitelisting(bool _isActive) public onlyOwner {
require(!s.marketInit, "AMIE");
s.swapWhitelistingSettings.isActive = _isActive;
emit UpdatedSwapWhitelistingActiveStatus(_isActive);
}
function swapWhitelistingCheck(address receiver) public returns(bool) {
require(s.marketInit, "AMIE");
if(block.timestamp > s.marketInitBlockTime + (s.swapWhitelistingSettings.endDate * 1 hours)) {
s.swapWhitelistingSettings.isActive = false;
return true;
}
require(s.swapWhitelist[receiver], "SWL");
return true;
}
}
// File contracts/interfaces/IBuyBackWallet.sol
//
// ALL RIGHTS RESERVED
// Unicrypt by SDDTech reserves all rights on this code. You may NOT copy these contracts.
interface IBuyBackWallet {
function checkBuyBackTrigger() external view returns (bool);
function getBalance() external view returns (uint256);
function sendEthToTaxHelper() external returns(uint256);
function updateThreshold(uint256 _newThreshold) external;
function getThreshold() external view returns (uint256);
}
// File contracts/interfaces/IFacetHelper.sol
//
// ALL RIGHTS RESERVED
// Unicrypt by SDDTech reserves all rights on this code. You may NOT copy these contracts.
interface IFacetHelper {
struct Facet {
address facetAddress;
bytes4[] functionSelectors;
}
/// @notice Gets all facet addresses and their four byte function selectors.
/// @return facets_ Facet
function facets() external view returns (Facet[] memory facets_);
/// @notice Gets all the function selectors supported by a specific facet.
/// @param _facet The facet address.
/// @return facetFunctionSelectors_
function facetFunctionSelectors(address _facet) external view returns (bytes4[] memory facetFunctionSelectors_);
/// @notice Get all the facet addresses used by a diamond.
/// @return facetAddresses_
function facetAddresses() external view returns (address[] memory facetAddresses_);
/// @notice Gets the facet that supports the given selector.
/// @dev If facet is not found return address(0).
/// @param _functionSelector The function selector.
/// @return facetAddress_ The facet address.
function facetAddress(bytes4 _functionSelector) external view returns (address facetAddress_);
// function addFacet(address _newFacet) external;
// function addSelector(address _facet, bytes4 _sig) external;
// function removeSelector(bytes4 _sig) external;
function getFacetAddressFromSelector(bytes4 _sig) external view returns (address);
function getSettingsFacet() external view returns (address);
function updateSettingsFacet(address _newSettingsAddress) external;
function getTaxFacet() external view returns (address);
function updateTaxFacet(address _newTaxesAddress) external;
function getLosslessFacet() external view returns (address);
function updateLosslessFacet(address _newLosslessAddress) external;
function getConstructorFacet() external view returns (address);
function updateConstructorFacet(address _newConstructorAddress) external;
function getWalletsFacet() external view returns (address);
function updateWalletsFacet(address _newWalletsAddress) external;
function getAntiBotFacet() external view returns (address);
function updateAntiBotFacet(address _newWalletsAddress) external;
function getMulticallFacet() external view returns (address);
function updateMulticallFacet(address _newWalletsAddress) external;
}
// File contracts/interfaces/ILPWallet.sol
//
// ALL RIGHTS RESERVED
// Unicrypt by SDDTech reserves all rights on this code. You may NOT copy these contracts.
interface ILPWallet {
function checkLPTrigger() external view returns (bool);
function getBalance() external view returns (uint256);
function sendEthToTaxHelper() external returns(uint256);
function transferBalanceToTaxHelper() external;
function updateThreshold(uint256 _newThreshold) external;
function getThreshold() external view returns (uint256);
}
// File contracts/interfaces/ISettings.sol
//
// ALL RIGHTS RESERVED
// Unicrypt by SDDTech reserves all rights on this code. You may NOT copy these contracts.
interface ISettingsFacet {
function getFacetAddressFromSelector(bytes4 _sig) external view returns (address);
function createBuyBackWallet(address _factory, address _token) external returns (address);
function createLPWallet(address _factory, address _token) external returns (address);
}
// File contracts/interfaces/IWallets.sol
//
// ALL RIGHTS RESERVED
// Unicrypt by SDDTech reserves all rights on this code. You may NOT copy these contracts.
interface IWalletsFacet {
function createBuyBackWallet(address _factory, address _token, uint256 _newThreshold) external returns (address);
function createLPWallet(address _factory, address _token, uint256 _newThreshold) external returns (address);
function updateBuyBackWalletThreshold(uint256 _newThreshold) external;
function updateLPWalletThreshold(uint256 _newThreshold) external;
}
// File contracts/facets/Constructor.sol
//
// ALL RIGHTS RESERVED
// Unicrypt by SDDTech reserves all rights on this code. You may NOT copy these contracts.
contract ConstructorFacet is Ownable {
Storage internal s;
event ExcludedAccount(address account);
event AdminChanged(address indexed previousAdmin, address indexed newAdmin);
event RecoveryAdminChanged(address indexed previousAdmin, address indexed newAdmin);
event UpdatedCustomTaxes(CustomTax[] _customTaxes);
event UpdatedTaxFees(Fees _updatedFees);
event UpdatedTransactionTaxAddress(address _newAddress);
event UpdatedLockedSettings(TaxSettings _updatedLocks);
event UpdatedSettings(TaxSettings _updatedSettings);
event UpdatedTaxHelperIndex(uint _newIndex);
event UpdatedAntiBotSettings(AntiBotSettings _antiBotSettings);
event UpdatedSwapWhitelistingSettings(SwapWhitelistingSettings _swapWhitelistingSettings);
event UpdatedMaxBalanceAfterBuy(uint256 _newMaxBalance);
event AddedLPToken(address _newLPToken);
event TokenCreated(string name, string symbol, uint8 decimals, uint256 totalSupply, uint256 reflectionTotalSupply);
event Transfer(address indexed from, address indexed to, uint256 value);
struct ConstructorParams {
string name_;
string symbol_;
uint8 decimals_;
address creator_;
uint256 tTotal_;
uint256 _maxTax;
TaxSettings _settings;
TaxSettings _lockedSettings;
Fees _fees;
address _transactionTaxWallet;
CustomTax[] _customTaxes;
uint256 lpWalletThreshold;
uint256 buyBackWalletThreshold;
uint256 _taxHelperIndex;
address admin_;
address recoveryAdmin_;
bool isLossless_;
AntiBotSettings _antiBotSettings;
uint256 _maxBalanceAfterBuy;
SwapWhitelistingSettings _swapWhitelistingSettings;
}
function constructorHandler(ConstructorParams calldata params, address _factory) external {
require(IMintFactory(_factory).tokenGeneratorIsAllowed(msg.sender), "RA");
require(params.creator_ != address(0), "ZA");
require(params._transactionTaxWallet != address(0), "ZA");
require(params.admin_ != address(0), "ZA");
require(params.recoveryAdmin_ != address(0), "ZA");
require(_factory != address(0), "ZA");
// Set inital values
s.CONTRACT_VERSION = 1;
s.customTaxLength = 0;
s.MaxTax = 3000;
s.MaxCustom = 10;
s.MAX = ~uint256(0);
s.isPaused = false;
s.isTaxed = false;
s.marketInit = false;
s._name = params.name_;
s._symbol = params.symbol_;
s._decimals = params.decimals_;
s._creator = params.creator_;
s._isExcluded[params.creator_] = true;
s._excluded.push(params.creator_);
emit ExcludedAccount(s._creator);
// Lossless
s.isLosslessOn = params.isLossless_;
s.admin = params.admin_;
emit AdminChanged(address(0), s.admin);
s.recoveryAdmin = params.recoveryAdmin_;
emit RecoveryAdminChanged(address(0), s.recoveryAdmin);
s.timelockPeriod = 7 days;
address lossless = IMintFactory(_factory).getLosslessController();
s._isExcluded[lossless] = true;
s._excluded.push(lossless);
emit ExcludedAccount(lossless);
// Tax Settings
require(params._maxTax <= s.MaxTax, "MT");
s.MaxTax = params._maxTax;
s.taxSettings = params._settings;
emit UpdatedSettings(s.taxSettings);
s.isLocked = params._lockedSettings;
s.isLocked.holderTax = true;
if(s.taxSettings.holderTax) {
s.taxSettings.canMint = false;
s.isLocked.canMint = true;
}
emit UpdatedLockedSettings(s.isLocked);
s.fees = params._fees;
emit UpdatedTaxFees(s.fees);
require(params._customTaxes.length < s.MaxCustom + 1, "MCT");
for(uint i = 0; i < params._customTaxes.length; i++) {
require(params._customTaxes[i].wallet != address(0));
s.customTaxes.push(params._customTaxes[i]);
}
emit UpdatedCustomTaxes(s.customTaxes);
s.customTaxLength = params._customTaxes.length;
s.transactionTaxWallet = params._transactionTaxWallet;
emit UpdatedTransactionTaxAddress(s.transactionTaxWallet);
// Factory, Wallets, Pair Address
s.factory = _factory;
s.taxHelperIndex = params._taxHelperIndex;
emit UpdatedTaxHelperIndex(s.taxHelperIndex);
address taxHelper = IMintFactory(s.factory).getTaxHelperAddress(s.taxHelperIndex);
s.pairAddress = ITaxHelper(taxHelper).createLPToken();
addLPToken(s.pairAddress);
address wallets = IFacetHelper(IMintFactory(s.factory).getFacetHelper()).getWalletsFacet();
s.buyBackWallet = IWalletsFacet(wallets).createBuyBackWallet(s.factory, address(this), params.buyBackWalletThreshold);
s.lpWallet = IWalletsFacet(wallets).createLPWallet(s.factory, address(this), params.lpWalletThreshold);
// Total Supply and other info
s._rTotal = (s.MAX - (s.MAX % params.tTotal_));
s._rOwned[params.creator_] = s._rTotal;
s.DENOMINATOR = 10000;
s._isExcluded[taxHelper] = true;
s._excluded.push(taxHelper);
emit ExcludedAccount(taxHelper);
require(checkMaxTax(true), "BF");
require(checkMaxTax(false), "SF");
transferOwnership(params.creator_);
_mintInitial(params.creator_, params.tTotal_);
// AntiBot Settings
require(params._antiBotSettings.endDate <= 48, "ED");
require(params._swapWhitelistingSettings.endDate <= 48, "ED");
s.antiBotSettings = params._antiBotSettings;
emit UpdatedAntiBotSettings(s.antiBotSettings);
s.maxBalanceAfterBuy = params._maxBalanceAfterBuy;
emit UpdatedMaxBalanceAfterBuy(s.maxBalanceAfterBuy);
s.swapWhitelistingSettings = params._swapWhitelistingSettings;
emit UpdatedSwapWhitelistingSettings(s.swapWhitelistingSettings);
emit TokenCreated(s._name, s._symbol, s._decimals, s._tTotal, s._rTotal);
}
function _mintInitial(address account, uint256 amount) internal virtual {
s._tTotal += amount;
s._tOwned[account] += amount;
emit Transfer(address(0), account, amount);
}
function checkMaxTax(bool isBuy) internal view returns (bool) {
uint256 totalTaxes;
if(isBuy) {
totalTaxes += s.fees.transactionTax.buy;
totalTaxes += s.fees.holderTax;
for(uint i = 0; i < s.customTaxes.length; i++) {
totalTaxes += s.customTaxes[i].fee.buy;
}
} else {
totalTaxes += s.fees.transactionTax.sell;
totalTaxes += s.fees.lpTax;
totalTaxes += s.fees.holderTax;
totalTaxes += s.fees.buyBackTax;
for(uint i = 0; i < s.customTaxes.length; i++) {
totalTaxes += s.customTaxes[i].fee.sell;
}
}
if(totalTaxes <= s.MaxTax) {
return true;
}
return false;
}
function addLPToken(address _newLPToken) internal {
s.lpTokens[_newLPToken] = true;
emit AddedLPToken(_newLPToken);
}
}
// File contracts/facets/Lossless.sol
//
// ALL RIGHTS RESERVED
// Unicrypt by SDDTech reserves all rights on this code. You may NOT copy these contracts.
contract LosslessFacet is Ownable {
Storage internal s;
event AdminChanged(address indexed previousAdmin, address indexed newAdmin);
event RecoveryAdminChangeProposed(address indexed candidate);
event RecoveryAdminChanged(address indexed previousAdmin, address indexed newAdmin);
event LosslessTurnOffProposed(uint256 turnOffDate);
event LosslessTurnedOff();
event LosslessTurnedOn();
function onlyRecoveryAdminCheck() internal view {
require(_msgSender() == s.recoveryAdmin, "LRA");
}
modifier onlyRecoveryAdmin() {
onlyRecoveryAdminCheck();
_;
}
// --- LOSSLESS management ---
function getAdmin() external view returns (address) {
return s.admin;
}
function setLosslessAdmin(address newAdmin) external onlyRecoveryAdmin {
require(newAdmin != address(0), "LZ");
emit AdminChanged(s.admin, newAdmin);
s.admin = newAdmin;
}
function transferRecoveryAdminOwnership(address candidate, bytes32 keyHash) external onlyRecoveryAdmin {
require(candidate != address(0), "LZ");
s.recoveryAdminCandidate = candidate;
s.recoveryAdminKeyHash = keyHash;
emit RecoveryAdminChangeProposed(candidate);
}
function acceptRecoveryAdminOwnership(bytes memory key) external {
require(_msgSender() == s.recoveryAdminCandidate, "LC");
require(keccak256(key) == s.recoveryAdminKeyHash, "LIK");
emit RecoveryAdminChanged(s.recoveryAdmin, s.recoveryAdminCandidate);
s.recoveryAdmin = s.recoveryAdminCandidate;
}
function proposeLosslessTurnOff() external onlyRecoveryAdmin {
s.losslessTurnOffTimestamp = block.timestamp + s.timelockPeriod;
s.isLosslessTurnOffProposed = true;
emit LosslessTurnOffProposed(s.losslessTurnOffTimestamp);
}
function executeLosslessTurnOff() external onlyRecoveryAdmin {
require(s.isLosslessTurnOffProposed, "LTNP");
require(s.losslessTurnOffTimestamp <= block.timestamp, "LTL");
s.isLosslessOn = false;
s.isLosslessTurnOffProposed = false;
emit LosslessTurnedOff();
}
function executeLosslessTurnOn() external onlyRecoveryAdmin {
s.isLosslessTurnOffProposed = false;
s.isLosslessOn = true;
emit LosslessTurnedOn();
}
}
// File contracts/facets/Multicall.sol
//
// ALL RIGHTS RESERVED
// Unicrypt by SDDTech reserves all rights on this code. You may NOT copy these contracts.
contract MulticallFacet is Ownable {
Storage internal s;
event UpdatedSettings(TaxSettings _updatedSettings);
event UpdatedLockedSettings(TaxSettings _updatedLocks);
event UpdatedCustomTaxes(CustomTax[] _customTaxes);
event UpdatedTaxFees(Fees _updatedFees);
event UpdatedTransactionTaxAddress(address _newAddress);
event UpdatedMaxBalanceAfterBuy(uint256 _newMaxBalance);
event UpdatedBuyBackWalletThreshold(uint256 _newThreshold);
event UpdatedLPWalletThreshold(uint256 _newThreshold);
event UpdatedAntiBotIncrement(uint256 _updatedIncrement);
event UpdatedAntiBotEndDate(uint256 _updatedEndDate);
event UpdatedAntiBotInitialMaxHold(uint256 _updatedInitialMaxHold);
event UpdatedAntiBotActiveStatus(bool _isActive);
event UpdatedSwapWhitelistingEndDate(uint256 _updatedEndDate);
event UpdatedSwapWhitelistingActiveStatus(bool _isActive);
struct MulticallAdminUpdateParams {
TaxSettings _taxSettings;
TaxSettings _lockSettings;
CustomTax[] _customTaxes;
Fees _fees;
address _transactionTaxWallet;
uint256 _maxBalanceAfterBuy;
uint256 _lpWalletThreshold;
uint256 _buyBackWalletThreshold;
}
function multicallAdminUpdate(MulticallAdminUpdateParams calldata params) public onlyOwner {
// Tax Settings
if(!s.isLocked.transactionTax && s.taxSettings.transactionTax != params._taxSettings.transactionTax) {
s.taxSettings.transactionTax = params._taxSettings.transactionTax;
}
if(!s.isLocked.holderTax && s.taxSettings.holderTax != params._taxSettings.holderTax && !params._taxSettings.canMint) {
s.taxSettings.holderTax = params._taxSettings.holderTax;
}
if(!s.isLocked.buyBackTax && s.taxSettings.buyBackTax != params._taxSettings.buyBackTax) {
s.taxSettings.buyBackTax = params._taxSettings.buyBackTax;
}
if(!s.isLocked.lpTax && s.taxSettings.lpTax != params._taxSettings.lpTax) {
s.taxSettings.lpTax = params._taxSettings.lpTax;
}
if(!s.isLocked.canMint && s.taxSettings.canMint != params._taxSettings.canMint && !s.taxSettings.holderTax) {
s.taxSettings.canMint = params._taxSettings.canMint;
}
if(!s.isLocked.canPause && s.taxSettings.canPause != params._taxSettings.canPause) {
s.taxSettings.canPause = params._taxSettings.canPause;
}
if(!s.isLocked.canBlacklist && s.taxSettings.canBlacklist != params._taxSettings.canBlacklist) {
s.taxSettings.canBlacklist = params._taxSettings.canBlacklist;
}
if(!s.isLocked.maxBalanceAfterBuy && s.taxSettings.maxBalanceAfterBuy != params._taxSettings.maxBalanceAfterBuy) {
s.taxSettings.maxBalanceAfterBuy = params._taxSettings.maxBalanceAfterBuy;
}
emit UpdatedSettings(s.taxSettings);
// Lock Settings
if(!s.isLocked.transactionTax) {
s.isLocked.transactionTax = params._lockSettings.transactionTax;
}
if(!s.isLocked.holderTax) {
s.isLocked.holderTax = params._lockSettings.holderTax;
}
if(!s.isLocked.buyBackTax) {
s.isLocked.buyBackTax = params._lockSettings.buyBackTax;
}
if(!s.isLocked.lpTax) {
s.isLocked.lpTax = params._lockSettings.lpTax;
}
if(!s.isLocked.canMint) {
s.isLocked.canMint = params._lockSettings.canMint;
}
if(!s.isLocked.canPause) {
s.isLocked.canPause = params._lockSettings.canPause;
}
if(!s.isLocked.canBlacklist) {
s.isLocked.canBlacklist = params._lockSettings.canBlacklist;
}
if(!s.isLocked.maxBalanceAfterBuy) {
s.isLocked.maxBalanceAfterBuy = params._lockSettings.maxBalanceAfterBuy;
}
emit UpdatedLockedSettings(s.isLocked);
// Custom Taxes
require(params._customTaxes.length < s.MaxCustom + 1, "MCT");
delete s.customTaxes;
for(uint i = 0; i < params._customTaxes.length; i++) {
require(params._customTaxes[i].wallet != address(0), "ZA");
s.customTaxes.push(params._customTaxes[i]);
}
s.customTaxLength = params._customTaxes.length;
emit UpdatedCustomTaxes(params._customTaxes);
// Fees
s.fees.transactionTax.buy = params._fees.transactionTax.buy;
s.fees.transactionTax.sell = params._fees.transactionTax.sell;
s.fees.buyBackTax = params._fees.buyBackTax;
s.fees.holderTax = params._fees.holderTax;
s.fees.lpTax = params._fees.lpTax;
require(checkMaxTax(true), "BF");
require(checkMaxTax(false), "SF");
emit UpdatedTaxFees(params._fees);
// transactionTax address
require(params._transactionTaxWallet != address(0), "ZA");
s.transactionTaxWallet = params._transactionTaxWallet;
emit UpdatedTransactionTaxAddress(params._transactionTaxWallet);
// maxBalanceAfterBuy
if(s.taxSettings.maxBalanceAfterBuy) {
s.maxBalanceAfterBuy = params._maxBalanceAfterBuy;
emit UpdatedMaxBalanceAfterBuy(params._maxBalanceAfterBuy);
}
// update wallet thresholds
ILPWallet(s.lpWallet).updateThreshold(params._lpWalletThreshold);
emit UpdatedLPWalletThreshold(params._lpWalletThreshold);
IBuyBackWallet(s.buyBackWallet).updateThreshold(params._buyBackWalletThreshold);
emit UpdatedBuyBackWalletThreshold(params._buyBackWalletThreshold);
}
function checkMaxTax(bool isBuy) internal view returns (bool) {
uint256 totalTaxes;
if(isBuy) {
totalTaxes += s.fees.transactionTax.buy;
totalTaxes += s.fees.holderTax;
for(uint i = 0; i < s.customTaxes.length; i++) {
totalTaxes += s.customTaxes[i].fee.buy;
}
} else {
totalTaxes += s.fees.transactionTax.sell;
totalTaxes += s.fees.lpTax;
totalTaxes += s.fees.holderTax;
totalTaxes += s.fees.buyBackTax;
for(uint i = 0; i < s.customTaxes.length; i++) {
totalTaxes += s.customTaxes[i].fee.sell;
}
}
if(totalTaxes <= s.MaxTax) {
return true;
}
return false;
}
struct AntiBotUpdateParams {
AntiBotSettings _antiBotSettings;
SwapWhitelistingSettings _swapWhitelistingSettings;
}
// Multicall AntiBot Update
function multicallAntiBotUpdate(AntiBotUpdateParams calldata params) public onlyOwner {
// AntiBot
s.antiBotSettings.increment = params._antiBotSettings.increment;
emit UpdatedAntiBotIncrement(s.antiBotSettings.increment);
require(params._antiBotSettings.endDate <= 48, "ED");
s.antiBotSettings.endDate = params._antiBotSettings.endDate;
emit UpdatedAntiBotEndDate(s.antiBotSettings.endDate);
s.antiBotSettings.initialMaxHold = params._antiBotSettings.initialMaxHold;
emit UpdatedAntiBotInitialMaxHold(s.antiBotSettings.initialMaxHold);
if(!s.marketInit) {
s.antiBotSettings.isActive = params._antiBotSettings.isActive;
emit UpdatedAntiBotActiveStatus(s.antiBotSettings.isActive);
}
// SwapWhitelisting
require(params._swapWhitelistingSettings.endDate <= 48, "ED");
s.swapWhitelistingSettings.endDate = params._swapWhitelistingSettings.endDate;
emit UpdatedSwapWhitelistingEndDate(s.antiBotSettings.endDate);
if(!s.marketInit) {
s.swapWhitelistingSettings.isActive = params._swapWhitelistingSettings.isActive;
emit UpdatedSwapWhitelistingActiveStatus(s.swapWhitelistingSettings.isActive);
}
}
}
// File contracts/interfaces/IFeeHelper.sol
//
// ALL RIGHTS RESERVED
// Unicrypt by SDDTech reserves all rights on this code. You may NOT copy these contracts.
interface IFeeHelper {
function getFee() view external returns(uint256);
function getFeeDenominator() view external returns(uint256);
function setFee(uint _fee) external;
function getFeeAddress() view external returns(address);
function setFeeAddress(address payable _feeAddress) external;
function getGeneratorFee() view external returns(uint256);
function setGeneratorFee(uint256 _fee) external;
}
// File contracts/LPWallet.sol
//
// ALL RIGHTS RESERVED
// Unicrypt by SDDTech reserves all rights on this code. You may NOT copy these contracts.
contract LPWallet is Ownable{
ITaxToken public token;
IMintFactory public factory;
uint256 private threshold;
event UpdatedThreshold(uint256 _newThreshold);
event ETHtoTaxHelper(uint256 amount);
event TransferBalancetoTaxHelper(uint256 tokenBalance);
constructor(address _factory, address _token, uint256 _newThreshold) {
token = ITaxToken(_token);
factory = IMintFactory(_factory);
threshold = _newThreshold;
emit UpdatedThreshold(_newThreshold);
transferOwnership(_token);
}
function checkLPTrigger() public view returns (bool) {
return address(this).balance > threshold;
}
function getBalance() public view returns (uint256) {
return address(this).balance;
}
function sendEthToTaxHelper() external returns (uint256) {
uint index = token.taxHelperIndex();
require(msg.sender == factory.getTaxHelperAddress(index), "RA");
uint256 amount = address(this).balance;
(bool sent,) = msg.sender.call{value: amount}("");
require(sent, "Failed to send Ether");
emit ETHtoTaxHelper(amount);
return amount;
}
function transferBalanceToTaxHelper() external {
uint index = token.taxHelperIndex();
require(msg.sender == factory.getTaxHelperAddress(index));
uint256 tokenBalance = token.balanceOf(address(this));
token.transfer(msg.sender, tokenBalance);
emit TransferBalancetoTaxHelper(tokenBalance);
}
function updateThreshold(uint256 _newThreshold) external onlyOwner {
threshold = _newThreshold;
emit UpdatedThreshold(_newThreshold);
}
function getThreshold() external view returns (uint256) {
return threshold;
}
receive() payable external {
}
}
// File contracts/facets/Settings.sol
//
// ALL RIGHTS RESERVED
// Unicrypt by SDDTech reserves all rights on this code. You may NOT copy these contracts.
contract SettingsFacet is Ownable {
Storage internal s;
event AddedLPToken(address _newLPToken);
event RemovedLPToken(address _lpToken);
event AddedBlacklistAddress(address _address);
event RemovedBlacklistAddress(address _address);
event ToggledPause(bool _isPaused);
event UpdatedCustomTaxes(CustomTax[] _customTaxes);
event UpdatedTaxFees(Fees _updatedFees);
event UpdatedTransactionTaxAddress(address _newAddress);
event UpdatedLockedSettings(TaxSettings _updatedLocks);
event UpdatedSettings(TaxSettings _updatedSettings);
event UpdatedPairAddress(address _newPairAddress);
event UpdatedTaxHelperIndex(uint _newIndex);
event AddedTaxWhitelistAddress(address _address);
event RemovedTaxWhitelistAddress(address _address);
function canBlacklistRequire() internal view {
require(s.taxSettings.canBlacklist, "NB");
}
modifier canBlacklist {
canBlacklistRequire();
_;
}
function addLPToken(address _newLPToken) public onlyOwner {
s.lpTokens[_newLPToken] = true;
emit AddedLPToken(_newLPToken);
}
function removeLPToken(address _lpToken) public onlyOwner {
s.lpTokens[_lpToken] = false;
emit RemovedLPToken(_lpToken);
}
function checkMaxTax(bool isBuy) internal view returns (bool) {
uint256 totalTaxes;
if(isBuy) {
totalTaxes += s.fees.transactionTax.buy;
totalTaxes += s.fees.holderTax;
for(uint i = 0; i < s.customTaxes.length; i++) {
totalTaxes += s.customTaxes[i].fee.buy;
}
} else {
totalTaxes += s.fees.transactionTax.sell;
totalTaxes += s.fees.lpTax;
totalTaxes += s.fees.holderTax;
totalTaxes += s.fees.buyBackTax;
for(uint i = 0; i < s.customTaxes.length; i++) {
totalTaxes += s.customTaxes[i].fee.sell;
}
}
if(totalTaxes <= s.MaxTax) {
return true;
}
return false;
}
function paused() public view returns (bool) {
if(s.taxSettings.canPause == false) {
return false;
}
return s.isPaused;
}
function togglePause() public onlyOwner returns (bool) {
require(s.taxSettings.canPause, "NP");
s.isPaused = !s.isPaused;
emit ToggledPause(s.isPaused);
return s.isPaused;
}
function addBlacklistedAddress(address _address) public onlyOwner canBlacklist {
IFeeHelper feeHelper = IFeeHelper(IMintFactory(s.factory).getFeeHelper());
address feeAddress = feeHelper.getFeeAddress();
require(_address != feeAddress);
s.blacklist[_address] = true;
emit AddedBlacklistAddress(_address);
}
function removeBlacklistedAddress(address _address) public onlyOwner canBlacklist {
s.blacklist[_address] = false;
emit RemovedBlacklistAddress(_address);
}
function updateBlacklistBatch(address[] calldata _updatedAddresses, bool _isBlacklisted) public onlyOwner canBlacklist {
IFeeHelper feeHelper = IFeeHelper(IMintFactory(s.factory).getFeeHelper());
address feeAddress = feeHelper.getFeeAddress();
for(uint i = 0; i < _updatedAddresses.length; i++) {
if(_updatedAddresses[i] != feeAddress) {
s.blacklist[_updatedAddresses[i]] = _isBlacklisted;
if(_isBlacklisted) {
emit AddedBlacklistAddress(_updatedAddresses[i]);
} else {
emit RemovedBlacklistAddress(_updatedAddresses[i]);
}
}
}
}
function isBlacklisted(address _address) public view returns (bool) {
return s.blacklist[_address];
}
function updateCustomTaxes(CustomTax[] calldata _customTaxes) public onlyOwner {
require(_customTaxes.length < s.MaxCustom + 1, "MCT");
delete s.customTaxes;
for(uint i = 0; i < _customTaxes.length; i++) {
require(_customTaxes[i].wallet != address(0));
s.customTaxes.push(_customTaxes[i]);
}
s.customTaxLength = _customTaxes.length;
require(checkMaxTax(true), "BF");
require(checkMaxTax(false), "SF");
emit UpdatedCustomTaxes(_customTaxes);
}
function updateTaxFees(Fees calldata _updatedFees) public onlyOwner {
s.fees.transactionTax.buy = _updatedFees.transactionTax.buy;
s.fees.transactionTax.sell = _updatedFees.transactionTax.sell;
s.fees.buyBackTax = _updatedFees.buyBackTax;
s.fees.holderTax = _updatedFees.holderTax;
s.fees.lpTax = _updatedFees.lpTax;
require(checkMaxTax(true), "BF");
require(checkMaxTax(false), "SF");
emit UpdatedTaxFees(_updatedFees);
}
function updateTransactionTaxAddress(address _newAddress) public onlyOwner {
// confirm if this is updateable
require(_newAddress != address(0));
s.transactionTaxWallet = _newAddress;
emit UpdatedTransactionTaxAddress(_newAddress);
}
function lockSettings(TaxSettings calldata _updatedLocks) public onlyOwner {
if(!s.isLocked.transactionTax) {
s.isLocked.transactionTax = _updatedLocks.transactionTax;
}
if(!s.isLocked.holderTax) {
s.isLocked.holderTax = _updatedLocks.holderTax;
}
if(!s.isLocked.buyBackTax) {
s.isLocked.buyBackTax = _updatedLocks.buyBackTax;
}
if(!s.isLocked.lpTax) {
s.isLocked.lpTax = _updatedLocks.lpTax;
}
if(!s.isLocked.canMint) {
s.isLocked.canMint = _updatedLocks.canMint;
}
if(!s.isLocked.canPause) {
s.isLocked.canPause = _updatedLocks.canPause;
}
if(!s.isLocked.canBlacklist) {
s.isLocked.canBlacklist = _updatedLocks.canBlacklist;
}
if(!s.isLocked.maxBalanceAfterBuy) {
s.isLocked.maxBalanceAfterBuy = _updatedLocks.maxBalanceAfterBuy;
}
emit UpdatedLockedSettings(s.isLocked);
}
function updateSettings(TaxSettings calldata _updatedSettings) public onlyOwner {
if(!s.isLocked.transactionTax && s.taxSettings.transactionTax != _updatedSettings.transactionTax) {
s.taxSettings.transactionTax = _updatedSettings.transactionTax;
}
if(!s.isLocked.holderTax && s.taxSettings.holderTax != _updatedSettings.holderTax && !_updatedSettings.canMint) {
s.taxSettings.holderTax = _updatedSettings.holderTax;
}
if(!s.isLocked.buyBackTax && s.taxSettings.buyBackTax != _updatedSettings.buyBackTax) {
s.taxSettings.buyBackTax = _updatedSettings.buyBackTax;
}
if(!s.isLocked.lpTax && s.taxSettings.lpTax != _updatedSettings.lpTax) {
s.taxSettings.lpTax = _updatedSettings.lpTax;
}
if(!s.isLocked.canMint && s.taxSettings.canMint != _updatedSettings.canMint && !s.taxSettings.holderTax) {
s.taxSettings.canMint = _updatedSettings.canMint;
}
if(!s.isLocked.canPause && s.taxSettings.canPause != _updatedSettings.canPause) {
s.taxSettings.canPause = _updatedSettings.canPause;
}
if(!s.isLocked.canBlacklist && s.taxSettings.canBlacklist != _updatedSettings.canBlacklist) {
s.taxSettings.canBlacklist = _updatedSettings.canBlacklist;
}
if(!s.isLocked.maxBalanceAfterBuy && s.taxSettings.maxBalanceAfterBuy != _updatedSettings.maxBalanceAfterBuy) {
s.taxSettings.maxBalanceAfterBuy = _updatedSettings.maxBalanceAfterBuy;
}
emit UpdatedSettings(s.taxSettings);
}
function updatePairAddress(address _newPairAddress) public onlyOwner {
s.pairAddress = _newPairAddress;
s.lpTokens[_newPairAddress] = true;
emit AddedLPToken(_newPairAddress);
emit UpdatedPairAddress(_newPairAddress);
}
function updateTaxHelperIndex(uint8 _newIndex) public onlyOwner {
s.taxHelperIndex = _newIndex;
emit UpdatedTaxHelperIndex(_newIndex);
}
function addTaxWhitelistedAddress(address _address) public onlyOwner {
s.taxWhitelist[_address] = true;
emit AddedTaxWhitelistAddress(_address);
}
function removeTaxWhitelistedAddress(address _address) public onlyOwner {
s.taxWhitelist[_address] = false;
emit RemovedTaxWhitelistAddress(_address);
}
function updateTaxWhitelistBatch(address[] calldata _updatedAddresses, bool _isTaxWhitelisted) public onlyOwner {
for(uint i = 0; i < _updatedAddresses.length; i++) {
s.taxWhitelist[_updatedAddresses[i]] = _isTaxWhitelisted;
if(_isTaxWhitelisted) {
emit AddedTaxWhitelistAddress(_updatedAddresses[i]);
} else {
emit RemovedTaxWhitelistAddress(_updatedAddresses[i]);
}
}
}
}
// File contracts/libraries/FullMath.sol
//
/// @title Contains 512-bit math functions
/// @notice Facilitates multiplication and division that can have overflow of an intermediate value without any loss of precision
/// @dev Handles "phantom overflow" i.e., allows multiplication and division where an intermediate value overflows 256 bits
library FullMath {
/// @notice Calculates floor(a×b÷denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
/// @param a The multiplicand
/// @param b The multiplier
/// @param denominator The divisor
/// @return result The 256-bit result
/// @dev Credit to Remco Bloemen under MIT license https://xn--2-umb.com/21/muldiv
function mulDiv(
uint256 a,
uint256 b,
uint256 denominator
) internal pure returns (uint256 result) {
// 512-bit multiply [prod1 prod0] = a * b
// Compute the product mod 2**256 and mod 2**256 - 1
// then use the Chinese Remainder Theorem to reconstruct
// the 512 bit result. The result is stored in two 256
// variables such that product = prod1 * 2**256 + prod0
uint256 prod0; // Least significant 256 bits of the product
uint256 prod1; // Most significant 256 bits of the product
assembly {
let mm := mulmod(a, b, not(0))
prod0 := mul(a, b)
prod1 := sub(sub(mm, prod0), lt(mm, prod0))
}
// Handle non-overflow cases, 256 by 256 division
if (prod1 == 0) {
require(denominator > 0);
assembly {
result := div(prod0, denominator)
}
return result;
}
// Make sure the result is less than 2**256.
// Also prevents denominator == 0
require(denominator > prod1);
///////////////////////////////////////////////
// 512 by 256 division.
///////////////////////////////////////////////
// Make division exact by subtracting the remainder from [prod1 prod0]
// Compute remainder using mulmod
uint256 remainder;
assembly {
remainder := mulmod(a, b, denominator)
}
// Subtract 256 bit number from 512 bit number
assembly {
prod1 := sub(prod1, gt(remainder, prod0))
prod0 := sub(prod0, remainder)
}
// Factor powers of two out of denominator
// Compute largest power of two divisor of denominator.
// Always >= 1.
unchecked {
uint256 twos = (type(uint256).max - denominator + 1) & denominator;
// Divide denominator by power of two
assembly {
denominator := div(denominator, twos)
}
// Divide [prod1 prod0] by the factors of two
assembly {
prod0 := div(prod0, twos)
}
// Shift in bits from prod1 into prod0. For this we need
// to flip `twos` such that it is 2**256 / twos.
// If twos is zero, then it becomes one
assembly {
twos := add(div(sub(0, twos), twos), 1)
}
prod0 |= prod1 * twos;
// Invert denominator mod 2**256
// Now that denominator is an odd number, it has an inverse
// modulo 2**256 such that denominator * inv = 1 mod 2**256.
// Compute the inverse by starting with a seed that is correct
// correct for four bits. That is, denominator * inv = 1 mod 2**4
uint256 inv = (3 * denominator) ^ 2;
// Now use Newton-Raphson iteration to improve the precision.
// Thanks to Hensel's lifting lemma, this also works in modular
// arithmetic, doubling the correct bits in each step.
inv *= 2 - denominator * inv; // inverse mod 2**8
inv *= 2 - denominator * inv; // inverse mod 2**16
inv *= 2 - denominator * inv; // inverse mod 2**32
inv *= 2 - denominator * inv; // inverse mod 2**64
inv *= 2 - denominator * inv; // inverse mod 2**128
inv *= 2 - denominator * inv; // inverse mod 2**256
// Because the division is now exact we can divide by multiplying
// with the modular inverse of denominator. This will give us the
// correct result modulo 2**256. Since the precoditions guarantee
// that the outcome is less than 2**256, this is the final result.
// We don't need to compute the high bits of the result and prod1
// is no longer required.
result = prod0 * inv;
return result;
}
}
/// @notice Calculates ceil(a×b÷denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
/// @param a The multiplicand
/// @param b The multiplier
/// @param denominator The divisor
/// @return result The 256-bit result
function mulDivRoundingUp(
uint256 a,
uint256 b,
uint256 denominator
) internal pure returns (uint256 result) {
result = mulDiv(a, b, denominator);
if (mulmod(a, b, denominator) > 0) {
require(result < type(uint256).max);
result++;
}
}
}
// File contracts/facets/Tax.sol
//
// ALL RIGHTS RESERVED
// Unicrypt by SDDTech reserves all rights on this code. You may NOT copy these contracts.
// This contract logs all tokens on the platform
contract TaxFacet is Ownable {
Storage internal s;
event MarketInit(uint256 timestamp, uint256 blockNumber);
event BuyBackTaxInitiated(address _sender, uint256 _fee, address _wallet, bool _isBuy);
event TransactionTaxInitiated(address _sender, uint256 _fee, address _wallet, bool _isBuy);
event LPTaxInitiated(address _sender, uint256 _fee, address _wallet, bool _isBuy);
event CustomTaxInitiated(address _sender, uint256 _fee, address _wallet, bool _isBuy);
event Transfer(address indexed from, address indexed to, uint256 value);
event Reflect(uint256 tAmount, uint256 rAmount, uint256 rTotal_, uint256 teeTotal_);
event ExcludedAccount(address account);
event IncludedAccount(address account);
function paused() internal view returns (bool) {
return s.isPaused;
}
function isBlacklisted(address _address) internal view returns (bool) {
return s.blacklist[_address];
}
/// @notice Handles the taxes for the token.
/// Calls the appropriate tax helper contract to handle
/// LP and BuyBack tax logic
/// @dev handles every tax within the tax facet.
/// @param sender the one sending the transaction
/// @param recipient the one receiving the transaction
/// @param amount the amount of tokens being sent
/// @return totalTaxAmount the total amount of the token taxed
function handleTaxes(address sender, address recipient, uint256 amount) public virtual returns (uint256 totalTaxAmount) {
// restrict it to being only called by registered tokens
require(IMintFactory(s.factory).tokenIsRegistered(address(this)));
bool isBuy = false;
if(s.lpTokens[sender]) {
isBuy = true;
if(!s.marketInit) {
s.marketInit = true;
s.antiBotSettings.startBlock = block.number;
s.marketInitBlockTime = block.timestamp;
emit MarketInit(block.timestamp, block.number);
}
}
if(!s.lpTokens[sender] && !s.lpTokens[recipient]) {
return 0;
}
if(isBuy && s.taxWhitelist[recipient]) {
return 0;
}
if(!isBuy && s.taxWhitelist[sender]) {
return 0;
}
ITaxHelper TaxHelper = ITaxHelper(IMintFactory(s.factory).getTaxHelperAddress(s.taxHelperIndex));
if(sender == address(TaxHelper) || recipient == address(TaxHelper)) {
return 0;
}
totalTaxAmount;
uint256 fee;
if(s.taxSettings.buyBackTax && !isBuy) {
if(TaxHelper.lpTokenHasReserves(s.pairAddress)) {
fee = amount * s.fees.buyBackTax / s.DENOMINATOR;
}
if(fee != 0) {
_transfer(sender, address(TaxHelper), fee);
TaxHelper.initiateBuyBackTax(address(this), address(s.buyBackWallet));
emit BuyBackTaxInitiated(sender, fee, address(s.buyBackWallet), isBuy);
totalTaxAmount += fee;
}
fee = 0;
}
if(s.taxSettings.transactionTax) {
if(isBuy) {
fee = amount * s.fees.transactionTax.buy / s.DENOMINATOR;
} else {
fee = amount * s.fees.transactionTax.sell / s.DENOMINATOR;
}
if(fee != 0) {
_transfer(sender, s.transactionTaxWallet, fee);
emit TransactionTaxInitiated(sender, fee, s.transactionTaxWallet, isBuy);
totalTaxAmount += fee;
}
fee = 0;
}
if(s.taxSettings.lpTax && !isBuy) {
if(TaxHelper.lpTokenHasReserves(s.pairAddress)) {
fee = amount * s.fees.lpTax / s.DENOMINATOR;
}
if(fee != 0) {
_transfer(sender, address(TaxHelper), fee);
TaxHelper.initiateLPTokenTax(address(this), address(s.lpWallet));
emit LPTaxInitiated(sender, fee, address(s.lpWallet), isBuy);
totalTaxAmount += fee;
}
fee = 0;
}
if(s.customTaxes.length > 0) {
for(uint8 i = 0; i < s.customTaxes.length; i++) {
uint256 customFee;
if(isBuy) {
customFee = amount * s.customTaxes[i].fee.buy / s.DENOMINATOR;
} else {
customFee = amount * s.customTaxes[i].fee.sell / s.DENOMINATOR;
}
fee += customFee;
if(fee != 0) {
totalTaxAmount += fee;
_transfer(sender, s.customTaxes[i].wallet, fee);
emit CustomTaxInitiated(sender, fee, s.customTaxes[i].wallet, isBuy);
fee = 0;
}
}
}
}
/// @notice internal transfer method
/// @dev includes checks for all features not handled by handleTaxes()
/// @param sender the one sending the transaction
/// @param recipient the one receiving the transaction
/// @param amount the amount of tokens being sent
function _transfer(address sender, address recipient, uint256 amount) public {
// restrict it to being only called by registered tokens
if(!IMintFactory(s.factory).tokenGeneratorIsAllowed(msg.sender)) {
require(IMintFactory(s.factory).tokenIsRegistered(address(this)));
}
require(sender != address(0), "ETFZ");
require(recipient != address(0), "ETTZ");
require(amount > 0, "TGZ");
require(!paused(), "TP");
require(!isBlacklisted(sender), "SB");
require(!isBlacklisted(recipient), "RB");
require(!isBlacklisted(tx.origin), "SB");
// Reflection Transfers
if(s.taxSettings.holderTax) {
if (s._isExcluded[sender] && !s._isExcluded[recipient]) {
_transferFromExcluded(sender, recipient, amount);
} else if (!s._isExcluded[sender] && s._isExcluded[recipient]) {
_transferToExcluded(sender, recipient, amount);
} else if (!s._isExcluded[sender] && !s._isExcluded[recipient]) {
_transferStandard(sender, recipient, amount);
} else if (s._isExcluded[sender] && s._isExcluded[recipient]) {
_transferBothExcluded(sender, recipient, amount);
} else {
_transferStandard(sender, recipient, amount);
}
} else {
// Non Reflection Transfer
_beforeTokenTransfer(sender, recipient, amount);
uint256 senderBalance = s._tOwned[sender];
require(senderBalance >= amount, "ETA");
s._tOwned[sender] = senderBalance - amount;
s._tOwned[recipient] += amount;
emit Transfer(sender, recipient, amount);
}
}
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
// Reflection Functions
function reflect(uint256 tAmount) public {
address sender = _msgSender();
require(!s._isExcluded[sender], "EA");
(uint256 rAmount,,,,) = _getValues(tAmount);
s._rOwned[sender] = s._rOwned[sender] - rAmount;
s._rTotal = s._rTotal - rAmount;
s._tFeeTotal = s._tFeeTotal + tAmount;
emit Reflect(tAmount, rAmount, s._rTotal, s._tFeeTotal);
ITaxHelper TaxHelper = ITaxHelper(IMintFactory(s.factory).getTaxHelperAddress(s.taxHelperIndex));
TaxHelper.sync(s.pairAddress);
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) {
require(tAmount <= s._tTotal, "ALS");
if (!deductTransferFee) {
(uint256 rAmount,,,,) = _getValues(tAmount);
return rAmount;
} else {
(,uint256 rTransferAmount,,,) = _getValues(tAmount);
return rTransferAmount;
}
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
require(rAmount <= s._rTotal, "ALR");
uint256 currentRate = _getRate();
return rAmount / currentRate;
}
function excludeAccount(address account) external onlyOwner {
require(!s._isExcluded[account], "AE");
if(s._rOwned[account] > 0) {
s._tOwned[account] = tokenFromReflection(s._rOwned[account]);
}
s._isExcluded[account] = true;
s._excluded.push(account);
emit ExcludedAccount(account);
}
function includeAccount(address account) external onlyOwner {
require(s._isExcluded[account], "AI");
for (uint256 i = 0; i < s._excluded.length; i++) {
if (s._excluded[i] == account) {
s._excluded[i] = s._excluded[s._excluded.length - 1];
s._tOwned[account] = 0;
s._isExcluded[account] = false;
s._excluded.pop();
break;
}
}
emit IncludedAccount(account);
}
function isExcluded(address account) external view returns(bool) {
return s._isExcluded[account];
}
function _transferStandard(address sender, address recipient, uint256 tAmount) private {
(uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee) = _getValues(tAmount);
s._rOwned[sender] = s._rOwned[sender] - rAmount;
s._rOwned[recipient] = s._rOwned[recipient] + rTransferAmount;
_reflectFee(rFee, tFee);
emit Transfer(sender, recipient, tTransferAmount);
}
function _transferToExcluded(address sender, address recipient, uint256 tAmount) private {
(uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee) = _getValues(tAmount);
s._rOwned[sender] = s._rOwned[sender] - rAmount;
s._tOwned[recipient] = s._tOwned[recipient] + tTransferAmount;
s._rOwned[recipient] = s._rOwned[recipient] + rTransferAmount;
_reflectFee(rFee, tFee);
emit Transfer(sender, recipient, tTransferAmount);
}
function _transferFromExcluded(address sender, address recipient, uint256 tAmount) private {
(uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee) = _getValues(tAmount);
s._tOwned[sender] = s._tOwned[sender] - tAmount;
s._rOwned[sender] = s._rOwned[sender] - rAmount;
s._rOwned[recipient] = s._rOwned[recipient] + rTransferAmount;
_reflectFee(rFee, tFee);
emit Transfer(sender, recipient, tTransferAmount);
}
function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private {
(uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee) = _getValues(tAmount);
s._tOwned[sender] = s._tOwned[sender] - tAmount;
s._rOwned[sender] = s._rOwned[sender] - rAmount;
s._tOwned[recipient] = s._tOwned[recipient] + tTransferAmount;
s._rOwned[recipient] = s._rOwned[recipient] + rTransferAmount;
_reflectFee(rFee, tFee);
emit Transfer(sender, recipient, tTransferAmount);
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
s._rTotal = s._rTotal - rFee;
s._tFeeTotal = s._tFeeTotal + tFee;
}
function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256) {
(uint256 tTransferAmount, uint256 tFee) = _getTValues(tAmount);
uint256 currentRate = _getRate();
(uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, currentRate);
return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee);
}
function _getTValues(uint256 tAmount) private view returns (uint256, uint256) {
uint256 tFee = tAmount / s.fees.holderTax;
uint256 tTransferAmount = tAmount - tFee;
return (tTransferAmount, tFee);
}
function _getRValues(uint256 tAmount, uint256 tFee, uint256 currentRate) private pure returns (uint256, uint256, uint256) {
uint256 rAmount = tAmount * currentRate;
uint256 rFee = tFee * currentRate;
uint256 rTransferAmount = rAmount - rFee;
return (rAmount, rTransferAmount, rFee);
}
function _getRate() private view returns(uint256) {
(uint256 rSupply, uint256 tSupply) = _getCurrentSupply();
return rSupply / tSupply;
}
function _getCurrentSupply() private view returns(uint256, uint256) {
uint256 rSupply = s._rTotal;
uint256 tSupply = s._tTotal;
for (uint256 i = 0; i < s._excluded.length; i++) {
if (s._rOwned[s._excluded[i]] > rSupply || s._tOwned[s._excluded[i]] > tSupply) return (s._rTotal, s._tTotal);
rSupply = rSupply - s._rOwned[s._excluded[i]];
tSupply = tSupply - s._tOwned[s._excluded[i]];
}
if (rSupply < s._rTotal / s._tTotal) return (s._rTotal, s._tTotal);
return (rSupply, tSupply);
}
function burn(uint256 amount) public {
address taxHelper = IMintFactory(s.factory).getTaxHelperAddress(s.taxHelperIndex);
require(msg.sender == taxHelper || msg.sender == owner(), "RA");
_burn(owner(), amount);
}
/// @notice custom burn to handle reflection
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "EBZ");
if (s.isLosslessOn) {
ILosslessController(IMintFactory(s.factory).getLosslessController()).beforeBurn(account, amount);
}
_beforeTokenTransfer(account, address(0), amount);
if(s.taxSettings.holderTax && !s._isExcluded[account]) {
(uint256 rAmount,,,,) = _getValues(amount);
s._rOwned[account] = s._rOwned[account] - rAmount;
s._rTotal = s._rTotal - rAmount;
s._tFeeTotal = s._tFeeTotal + amount;
}
uint256 accountBalance = s._tOwned[account];
require(accountBalance >= amount, "EBB");
s._tOwned[account] = accountBalance - amount;
s._tTotal -= amount;
emit Transfer(account, address(0), amount);
}
}
// File contracts/facets/Wallets.sol
//
// ALL RIGHTS RESERVED
// Unicrypt by SDDTech reserves all rights on this code. You may NOT copy these contracts.
contract WalletsFacet is Ownable {
Storage internal s;
event CreatedBuyBackWallet(address _wallet);
event CreatedLPWallet(address _wallet);
event UpdatedBuyBackWalletThreshold(uint256 _newThreshold);
event UpdatedLPWalletThreshold(uint256 _newThreshold);
function createBuyBackWallet(address _factory, address _token, uint256 _newThreshold) external returns (address) {
BuyBackWallet newBuyBackWallet = new BuyBackWallet(_factory, _token,_newThreshold);
emit CreatedBuyBackWallet(address(newBuyBackWallet));
return address(newBuyBackWallet);
}
function createLPWallet(address _factory, address _token, uint256 _newThreshold) external returns (address) {
LPWallet newLPWallet = new LPWallet(_factory, _token, _newThreshold);
emit CreatedLPWallet(address(newLPWallet));
return address(newLPWallet);
}
function updateBuyBackWalletThreshold(uint256 _newThreshold) public onlyOwner {
IBuyBackWallet(s.buyBackWallet).updateThreshold(_newThreshold);
emit UpdatedBuyBackWalletThreshold(_newThreshold);
}
function updateLPWalletThreshold(uint256 _newThreshold) public onlyOwner {
ILPWallet(s.lpWallet).updateThreshold(_newThreshold);
emit UpdatedLPWalletThreshold(_newThreshold);
}
}
// File contracts/FeeHelper.sol
//
// ALL RIGHTS RESERVED
// Unicrypt by SDDTech reserves all rights on this code. You may NOT copy these contracts.
contract FeeHelper is Ownable{
struct Settings {
uint256 GENERATOR_FEE;
uint256 FEE;
uint256 DENOMINATOR;
address payable FEE_ADDRESS;
}
Settings public SETTINGS;
constructor() {
SETTINGS.GENERATOR_FEE = 0;
SETTINGS.FEE = 100;
SETTINGS.DENOMINATOR = 10000;
SETTINGS.FEE_ADDRESS = payable(msg.sender);
}
function getGeneratorFee() external view returns(uint256) {
return SETTINGS.GENERATOR_FEE;
}
function getFee() external view returns(uint256) {
return SETTINGS.FEE;
}
function getFeeDenominator() external view returns(uint256) {
return SETTINGS.DENOMINATOR;
}
function setGeneratorFee(uint256 _fee) external onlyOwner {
SETTINGS.GENERATOR_FEE = _fee;
}
function setFee(uint _fee) external onlyOwner {
SETTINGS.FEE = _fee;
}
function getFeeAddress() external view returns(address) {
return SETTINGS.FEE_ADDRESS;
}
function setFeeAddress(address payable _feeAddress) external onlyOwner {
SETTINGS.FEE_ADDRESS = _feeAddress;
}
}
// File contracts/interfaces/IUniswapV2Router01.sol
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);
}
// File contracts/interfaces/ICamelotV2Router.sol
interface ICamelotRouter 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,
address referrer,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
address referrer,
uint deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
address referrer,
uint deadline
) external;
}
// File contracts/interfaces/IUniswapV2Router02.sol
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;
}
// File contracts/libraries/ERC20.sol
//
// File @openzeppelin/contracts/token/ERC20/ERC20.sol@v4.0.0
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin guidelines: functions revert instead
* of returning `false` on failure. This behavior is nonetheless conventional
* and does not conflict with the expectations of ERC20 applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 is Context, IERC20 {
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* The defaut value of {decimals} is 18. To select a different value for
* {decimals} you should overload it.
*
* All three of these values are immutable: they can only be set once during
* construction.
*/
constructor (string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless this function is
* overloaded;
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* Requirements:
*
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* - the caller must have allowance for ``sender``'s tokens of at least
* `amount`.
*/
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
uint256 currentAllowance = _allowances[sender][_msgSender()];
require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
_approve(sender, _msgSender(), currentAllowance - amount);
return true;
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
return true;
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
uint256 currentAllowance = _allowances[_msgSender()][spender];
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
_approve(_msgSender(), spender, currentAllowance - subtractedValue);
return true;
}
/**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
*/
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
uint256 senderBalance = _balances[sender];
require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
_balances[sender] = senderBalance - amount;
_balances[recipient] += amount;
emit Transfer(sender, recipient, amount);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `to` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += amount;
_balances[account] += amount;
emit Transfer(address(0), account, amount);
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
_balances[account] = accountBalance - amount;
_totalSupply -= amount;
emit Transfer(account, address(0), amount);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
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);
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be to transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}
// File contracts/libraries/Pausable.sol
//
// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
abstract contract Pausable is Context {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev Initializes the contract in unpaused state.
*/
constructor() {
_paused = false;
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
return _paused;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
require(!paused(), "Pausable: paused");
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
require(paused(), "Pausable: not paused");
_;
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
}
// File contracts/libraries/EnumerableSet.sol
//
// OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol)
/**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the ordering.
*
* ```
* contract Example {
* // Add the library methods
* using EnumerableSet for EnumerableSet.AddressSet;
*
* // Declare a set state variable
* EnumerableSet.AddressSet private mySet;
* }
* ```
*
* As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
* and `uint256` (`UintSet`) are supported.
*/
library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just wrappers around the
// underlying Set.
// This means that we can only create new EnumerableSets for types that fit
// in bytes32.
struct Set {
// Storage of set values
bytes32[] _values;
// Position of the value in the `values` array, plus 1 because index 0
// means a value is not in the set.
mapping(bytes32 => uint256) _indexes;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function _add(Set storage set, bytes32 value) private returns (bool) {
if (!_contains(set, value)) {
set._values.push(value);
// The value is stored at length-1, but we add 1 to all indexes
// and use 0 as a sentinel value
set._indexes[value] = set._values.length;
return true;
} else {
return false;
}
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function _remove(Set storage set, bytes32 value) private returns (bool) {
// We read and store the value's index to prevent multiple reads from the same storage slot
uint256 valueIndex = set._indexes[value];
if (valueIndex != 0) {
// Equivalent to contains(set, value)
// To delete an element from the _values array in O(1), we swap the element to delete with the last one in
// the array, and then remove the last element (sometimes called as 'swap and pop').
// This modifies the order of the array, as noted in {at}.
uint256 toDeleteIndex = valueIndex - 1;
uint256 lastIndex = set._values.length - 1;
if (lastIndex != toDeleteIndex) {
bytes32 lastvalue = set._values[lastIndex];
// Move the last value to the index where the value to delete is
set._values[toDeleteIndex] = lastvalue;
// Update the index for the moved value
set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex
}
// Delete the slot where the moved value was stored
set._values.pop();
// Delete the index for the deleted slot
delete set._indexes[value];
return true;
} else {
return false;
}
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function _contains(Set storage set, bytes32 value) private view returns (bool) {
return set._indexes[value] != 0;
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function _length(Set storage set) private view returns (uint256) {
return set._values.length;
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function _at(Set storage set, uint256 index) private view returns (bytes32) {
return set._values[index];
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function _values(Set storage set) private view returns (bytes32[] memory) {
return set._values;
}
// Bytes32Set
struct Bytes32Set {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _add(set._inner, value);
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _remove(set._inner, value);
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
return _contains(set._inner, value);
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(Bytes32Set storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
return _at(set._inner, index);
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
return _values(set._inner);
}
// AddressSet
struct AddressSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(AddressSet storage set, address value) internal returns (bool) {
return _add(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(AddressSet storage set, address value) internal returns (bool) {
return _remove(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(AddressSet storage set, address value) internal view returns (bool) {
return _contains(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(AddressSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(AddressSet storage set, uint256 index) internal view returns (address) {
return address(uint160(uint256(_at(set._inner, index))));
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function values(AddressSet storage set) internal view returns (address[] memory) {
bytes32[] memory store = _values(set._inner);
address[] memory result;
assembly {
result := store
}
return result;
}
// UintSet
struct UintSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(UintSet storage set, uint256 value) internal returns (bool) {
return _add(set._inner, bytes32(value));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(UintSet storage set, uint256 value) internal returns (bool) {
return _remove(set._inner, bytes32(value));
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
return _contains(set._inner, bytes32(value));
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function length(UintSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
return uint256(_at(set._inner, index));
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function values(UintSet storage set) internal view returns (uint256[] memory) {
bytes32[] memory store = _values(set._inner);
uint256[] memory result;
assembly {
result := store
}
return result;
}
}
// File contracts/MintFactory.sol
//
// ALL RIGHTS RESERVED
// Unicrypt by SDDTech reserves all rights on this code. You may NOT copy these contracts.
// This contract logs all tokens on the platform
contract MintFactory is Ownable {
using EnumerableSet for EnumerableSet.AddressSet;
EnumerableSet.AddressSet private tokens;
EnumerableSet.AddressSet private tokenGenerators;
struct TaxHelper {
string Name;
address Address;
uint256 Index;
}
mapping(uint => TaxHelper) private taxHelpersData;
address[] private taxHelpers;
mapping(address => address[]) private tokenOwners;
address private FacetHelper;
address private FeeHelper;
address private LosslessController;
event TokenRegistered(address tokenOwner, address tokenContract);
event AllowTokenGenerator(address _address, bool _allow);
event AddedTaxHelper(string _name, address _address, uint256 _index);
event UpdatedTaxHelper(address _newAddress, uint256 _index);
event UpdatedFacetHelper(address _newAddress);
event UpdatedFeeHelper(address _newAddress);
event UpdatedLosslessController(address _newAddress);
function adminAllowTokenGenerator (address _address, bool _allow) public onlyOwner {
if (_allow) {
tokenGenerators.add(_address);
} else {
tokenGenerators.remove(_address);
}
emit AllowTokenGenerator(_address, _allow);
}
function addTaxHelper(string calldata _name, address _address) public onlyOwner {
uint256 index = taxHelpers.length;
TaxHelper memory newTaxHelper;
newTaxHelper.Name = _name;
newTaxHelper.Address = _address;
newTaxHelper.Index = index;
taxHelpersData[index] = newTaxHelper;
taxHelpers.push(_address);
emit AddedTaxHelper(_name, _address, index);
}
function updateTaxHelper(uint256 _index, address _address) public onlyOwner {
taxHelpersData[_index].Address = _address;
taxHelpers[_index] = _address;
emit UpdatedTaxHelper(_address, _index);
}
function getTaxHelperAddress(uint256 _index) public view returns(address){
return taxHelpers[_index];
}
function getTaxHelpersDataByIndex(uint256 _index) public view returns(TaxHelper memory) {
return taxHelpersData[_index];
}
/**
* @notice called by a registered tokenGenerator upon token creation
*/
function registerToken (address _tokenOwner, address _tokenAddress) public {
require(tokenGenerators.contains(msg.sender), 'FORBIDDEN');
tokens.add(_tokenAddress);
tokenOwners[_tokenOwner].push(_tokenAddress);
emit TokenRegistered(_tokenOwner, _tokenAddress);
}
/**
* @notice gets a token at index registered under a user address
* @return token addresses registered to the user address
*/
function getTokenByOwnerAtIndex(address _tokenOwner, uint256 _index) external view returns(address) {
return tokenOwners[_tokenOwner][_index];
}
/**
* @notice gets the total of tokens registered under a user address
* @return uint total of token addresses registered to the user address
*/
function getTokensLengthByOwner(address _tokenOwner) external view returns(uint256) {
return tokenOwners[_tokenOwner].length;
}
/**
* @notice Number of allowed tokenGenerators
*/
function tokenGeneratorsLength() external view returns (uint256) {
return tokenGenerators.length();
}
/**
* @notice Gets the address of a registered tokenGenerator at specified index
*/
function tokenGeneratorAtIndex(uint256 _index) external view returns (address) {
return tokenGenerators.at(_index);
}
/**
* @notice returns true if user is allowed to generate tokens
*/
function tokenGeneratorIsAllowed(address _tokenGenerator) external view returns (bool) {
return tokenGenerators.contains(_tokenGenerator);
}
/**
* @notice returns true if the token address was generated by the Unicrypt token platform
*/
function tokenIsRegistered(address _tokenAddress) external view returns (bool) {
return tokens.contains(_tokenAddress);
}
/**
* @notice The length of all tokens on the platform
*/
function tokensLength() external view returns (uint256) {
return tokens.length();
}
/**
* @notice gets a token at a specific index. Although using Enumerable Set, since tokens are only added and not removed, indexes will never change
* @return the address of the token contract at index
*/
function tokenAtIndex(uint256 _index) external view returns (address) {
return tokens.at(_index);
}
// Helpers and Controllers
function getFacetHelper() public view returns (address) {
return FacetHelper;
}
function updateFacetHelper(address _newFacetHelperAddress) public onlyOwner {
require(_newFacetHelperAddress != address(0));
FacetHelper = _newFacetHelperAddress;
emit UpdatedFacetHelper(_newFacetHelperAddress);
}
function getFeeHelper() public view returns (address) {
return FeeHelper;
}
function updateFeeHelper(address _newFeeHelperAddress) public onlyOwner {
require(_newFeeHelperAddress != address(0));
FeeHelper = _newFeeHelperAddress;
emit UpdatedFeeHelper(_newFeeHelperAddress);
}
function getLosslessController() public view returns (address) {
return LosslessController;
}
function updateLosslessController(address _newLosslessControllerAddress) public onlyOwner {
require(_newLosslessControllerAddress != address(0));
LosslessController = _newLosslessControllerAddress;
emit UpdatedLosslessController(_newLosslessControllerAddress);
}
}
// File contracts/TaxToken.sol
//
// ALL RIGHTS RESERVED
// Unicrypt by SDDTech reserves all rights on this code. You may NOT copy these contracts.
contract TaxToken is Ownable{
Storage internal s;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
struct ConstructorParams {
string name_;
string symbol_;
uint8 decimals_;
address creator_;
uint256 tTotal_;
uint256 _maxTax;
TaxSettings _settings;
TaxSettings _lockedSettings;
Fees _fees;
address _transactionTaxWallet;
CustomTax[] _customTaxes;
uint256 lpWalletThreshold;
uint256 buyBackWalletThreshold;
uint256 _taxHelperIndex;
address admin_;
address recoveryAdmin_;
bool isLossless_;
AntiBotSettings _antiBotSettings;
uint256 _maxBalanceAfterBuy;
SwapWhitelistingSettings _swapWhitelistingSettings;
}
constructor(
ConstructorParams memory params,
address _factory
) {
address constructorFacetAddress = IFacetHelper(IMintFactory(_factory).getFacetHelper()).getConstructorFacet();
(bool success, bytes memory result) = constructorFacetAddress.delegatecall(abi.encodeWithSignature("constructorHandler((string,string,uint8,address,uint256,uint256,(bool,bool,bool,bool,bool,bool,bool,bool),(bool,bool,bool,bool,bool,bool,bool,bool),((uint256,uint256),uint256,uint256,uint256),address,(string,(uint256,uint256),address,bool)[],uint256,uint256,uint256,address,address,bool,(uint256,uint256,uint256,uint256,bool),uint256,(uint256,bool)),address)", params, _factory));
if (!success) {
if (result.length < 68) revert();
revert(abi.decode(result, (string)));
}
IFeeHelper feeHelper = IFeeHelper(IMintFactory(s.factory).getFeeHelper());
uint256 fee = FullMath.mulDiv(params.tTotal_, feeHelper.getFee(), feeHelper.getFeeDenominator());
address feeAddress = feeHelper.getFeeAddress();
_approve(params.creator_, msg.sender, fee);
s.isTaxed = true;
transferFrom(params.creator_, feeAddress, fee);
}
/// @notice this is the power behind Lossless
function transferOutBlacklistedFunds(address[] calldata from) external {
require(s.isLosslessOn); // added by us for extra protection
require(_msgSender() == address(IMintFactory(s.factory).getLosslessController()), "LOL");
for (uint i = 0; i < from.length; i++) {
_transfer(from[i], address(IMintFactory(s.factory).getLosslessController()), balanceOf(from[i]));
}
}
/// @notice Checks whether an address is blacklisted
/// @param _address the address to check
/// @return bool is blacklisted or not
function isBlacklisted(address _address) public view returns (bool) {
return s.blacklist[_address];
}
/// @notice Checks whether the contract has paused transactions
/// @return bool is paused or not
function paused() public view returns (bool) {
if(s.taxSettings.canPause == false) {
return false;
}
return s.isPaused;
}
/// @notice Handles the burning of token during the buyback tax process
/// @dev must first receive the amount to be burned from the taxHelper contract (see initial transfer in function)
/// @param _amount the amount to burn
function buyBackBurn(uint256 _amount) external {
address taxHelper = IMintFactory(s.factory).getTaxHelperAddress(s.taxHelperIndex);
require(msg.sender == taxHelper, "RA");
_transfer(taxHelper, owner(), _amount);
address taxFacetAddress = IFacetHelper(IMintFactory(s.factory).getFacetHelper()).getTaxFacet();
(bool success, bytes memory result) = taxFacetAddress.delegatecall(abi.encodeWithSignature("burn(uint256)", _amount));
if (!success) {
if (result.length < 68) revert();
revert(abi.decode(result, (string)));
}
}
/// @notice Handles the taxes for the token.
/// @dev handles every tax within the tax facet.
/// @param sender the one sending the transaction
/// @param recipient the one receiving the transaction
/// @param amount the amount of tokens being sent
/// @return totalTaxAmount the total amount of the token taxed
function handleTaxes(address sender, address recipient, uint256 amount) internal virtual returns (uint256 totalTaxAmount) {
address taxFacetAddress = IFacetHelper(IMintFactory(s.factory).getFacetHelper()).getTaxFacet();
(bool success, bytes memory result) = taxFacetAddress.delegatecall(abi.encodeWithSignature("handleTaxes(address,address,uint256)", sender, recipient, amount));
if (!success) {
if (result.length < 68) revert();
revert(abi.decode(result, (string)));
}
return abi.decode(result, (uint256));
}
// Getters
function name() public view returns (string memory) {
return s._name;
}
function symbol() public view returns (string memory) {
return s._symbol;
}
function decimals() public view returns (uint8) {
return s._decimals;
}
function totalSupply() public view returns (uint256) {
return s._tTotal;
}
function CONTRACT_VERSION() public view returns (uint256) {
return s.CONTRACT_VERSION;
}
function taxSettings() public view returns (TaxSettings memory) {
return s.taxSettings;
}
function isLocked() public view returns (TaxSettings memory) {
return s.isLocked;
}
function fees() public view returns (Fees memory) {
return s.fees;
}
function customTaxes(uint _index) public view returns (CustomTax memory) {
return s.customTaxes[_index];
}
function transactionTaxWallet() public view returns (address) {
return s.transactionTaxWallet;
}
function customTaxLength() public view returns (uint256) {
return s.customTaxLength;
}
function MaxTax() public view returns (uint256) {
return s.MaxTax;
}
function MaxCustom() public view returns (uint8) {
return s.MaxCustom;
}
function _allowances(address _address1, address _address2) public view returns (uint256) {
return s._allowances[_address1][_address2];
}
function _isExcluded(address _address) public view returns (bool) {
return s._isExcluded[_address];
}
function _tFeeTotal() public view returns (uint256) {
return s._tFeeTotal;
}
function lpTokens(address _address) public view returns (bool) {
return s.lpTokens[_address];
}
function factory() public view returns (address) {
return s.factory;
}
function buyBackWallet() public view returns (address) {
return s.buyBackWallet;
}
function lpWallet() public view returns (address) {
return s.lpWallet;
}
function pairAddress() public view returns (address) {
return s.pairAddress;
}
function taxHelperIndex() public view returns (uint256) {
return s.taxHelperIndex;
}
function marketInit() public view returns (bool) {
return s.marketInit;
}
function marketInitBlockTime() public view returns (uint256) {
return s.marketInitBlockTime;
}
function antiBotSettings() public view returns (AntiBotSettings memory) {
return s.antiBotSettings;
}
function maxBalanceAfterBuy() public view returns (uint256) {
return s.maxBalanceAfterBuy;
}
function swapWhitelistingSettings() public view returns (SwapWhitelistingSettings memory) {
return s.swapWhitelistingSettings;
}
function recoveryAdmin() public view returns (address) {
return s.recoveryAdmin;
}
function admin() public view returns (address) {
return s.admin;
}
function timelockPeriod() public view returns (uint256) {
return s.timelockPeriod;
}
function losslessTurnOffTimestamp() public view returns (uint256) {
return s.losslessTurnOffTimestamp;
}
function isLosslessTurnOffProposed() public view returns (bool) {
return s.isLosslessTurnOffProposed;
}
function isLosslessOn() public view returns (bool) {
return s.isLosslessOn;
}
function lossless() public view returns (ILosslessController) {
return ILosslessController(IMintFactory(s.factory).getLosslessController());
}
// ERC20 Functions
/// @dev modified to handle if the token has reflection active in it settings
function balanceOf(address account) public view returns (uint256) {
if(s.taxSettings.holderTax) {
if (s._isExcluded[account]) return s._tOwned[account];
return tokenFromReflection(s._rOwned[account]);
}
return s._tOwned[account];
}
// Reflection Functions
// necessary to get reflection balance
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
require(rAmount <= s._rTotal, "ALR");
uint256 currentRate = _getRate();
return rAmount / currentRate;
}
function _getRate() public view returns(uint256) {
(uint256 rSupply, uint256 tSupply) = _getCurrentSupply();
return rSupply / tSupply;
}
function _getCurrentSupply() public view returns(uint256, uint256) {
uint256 rSupply = s._rTotal;
uint256 tSupply = s._tTotal;
for (uint256 i = 0; i < s._excluded.length; i++) {
if (s._rOwned[s._excluded[i]] > rSupply || s._tOwned[s._excluded[i]] > tSupply) return (s._rTotal, s._tTotal);
rSupply = rSupply - s._rOwned[s._excluded[i]];
tSupply = tSupply - s._tOwned[s._excluded[i]];
}
if (rSupply < s._rTotal / s._tTotal) return (s._rTotal, s._tTotal);
return (rSupply, tSupply);
}
// ERC20 Functions continued
/// @dev modified slightly to add taxes
function transfer(address recipient, uint256 amount) public returns (bool) {
if(!s.isTaxed) {
s.isTaxed = true;
uint256 totalTaxAmount = handleTaxes(_msgSender(), recipient, amount);
amount -= totalTaxAmount;
}
if (s.isLosslessOn) {
ILosslessController(IMintFactory(s.factory).getLosslessController()).beforeTransfer(_msgSender(), recipient, amount);
}
_transfer(_msgSender(), recipient, amount);
s.isTaxed = false;
if (s.isLosslessOn) {
ILosslessController(IMintFactory(s.factory).getLosslessController()).afterTransfer(_msgSender(), recipient, amount);
}
return true;
}
function allowance(address _owner, address spender) public view returns (uint256) {
return s._allowances[_owner][spender];
}
function approve(address spender, uint256 amount) public returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {
if(!s.isTaxed) {
s.isTaxed = true;
uint256 totalTaxAmount = handleTaxes(sender, recipient, amount);
amount -= totalTaxAmount;
}
if (s.isLosslessOn) {
ILosslessController(IMintFactory(s.factory).getLosslessController()).beforeTransferFrom(_msgSender(), sender, recipient, amount);
}
_transfer(sender, recipient, amount);
uint256 currentAllowance = s._allowances[sender][_msgSender()];
require(currentAllowance >= amount, "ETA");
_approve(sender, _msgSender(), s._allowances[sender][_msgSender()] - amount);
s.isTaxed = false;
if (s.isLosslessOn) {
ILosslessController(IMintFactory(s.factory).getLosslessController()).afterTransfer(_msgSender(), recipient, amount);
}
return true;
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
if (s.isLosslessOn) {
ILosslessController(IMintFactory(s.factory).getLosslessController()).beforeIncreaseAllowance(_msgSender(), spender, addedValue);
}
_approve(_msgSender(), spender, s._allowances[_msgSender()][spender] + addedValue);
return true;
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
if (s.isLosslessOn) {
ILosslessController(IMintFactory(s.factory).getLosslessController()).beforeDecreaseAllowance(_msgSender(), spender, subtractedValue);
}
uint256 currentAllowance = s._allowances[_msgSender()][spender];
require(currentAllowance >= subtractedValue, "EABZ");
_approve(_msgSender(), spender, currentAllowance - subtractedValue);
return true;
}
function _approve(address _owner, address spender, uint256 amount) private {
require(_owner != address(0), "EAFZ");
require(spender != address(0), "EATZ");
if (s.isLosslessOn) {
ILosslessController(IMintFactory(s.factory).getLosslessController()).beforeApprove(_owner, spender, amount);
}
s._allowances[_owner][spender] = amount;
emit Approval(_owner, spender, amount);
}
function _transfer(address sender, address recipient, uint256 amount) private {
// AntiBot Checks
address antiBotFacetAddress = IFacetHelper(IMintFactory(s.factory).getFacetHelper()).getAntiBotFacet();
if(s.marketInit && s.antiBotSettings.isActive && s.lpTokens[sender]) {
(bool success, bytes memory result) = antiBotFacetAddress.delegatecall(abi.encodeWithSignature("antiBotCheck(uint256,address)", amount, recipient));
if (!success) {
if (result.length < 68) revert();
revert(abi.decode(result, (string)));
}
}
if(s.taxSettings.maxBalanceAfterBuy && s.lpTokens[sender]) {
(bool success2, bytes memory result2) = antiBotFacetAddress.delegatecall(abi.encodeWithSignature("maxBalanceAfterBuyCheck(uint256,address)", amount, recipient));
if (!success2) {
if (result2.length < 68) revert();
revert(abi.decode(result2, (string)));
}
}
if(s.marketInit && s.swapWhitelistingSettings.isActive && s.lpTokens[sender]) {
(bool success3, bytes memory result3) = antiBotFacetAddress.delegatecall(abi.encodeWithSignature("swapWhitelistingCheck(address)", recipient));
if (!success3) {
if (result3.length < 68) revert();
revert(abi.decode(result3, (string)));
}
}
address taxFacetAddress = IFacetHelper(IMintFactory(s.factory).getFacetHelper()).getTaxFacet();
(bool success4, bytes memory result4) = taxFacetAddress.delegatecall(abi.encodeWithSignature("_transfer(address,address,uint256)", sender, recipient, amount));
if (!success4) {
if (result4.length < 68) revert();
revert(abi.decode(result4, (string)));
}
}
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
function mint(uint256 amount) public onlyOwner {
_mint(msg.sender, amount);
}
/// @notice custom mint to handle fees
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "EMZ");
require(s.taxSettings.canMint, "NM");
require(!s.taxSettings.holderTax, "NM");
if (s.isLosslessOn) {
ILosslessController(IMintFactory(s.factory).getLosslessController()).beforeMint(account, amount);
}
IFeeHelper feeHelper = IFeeHelper(IMintFactory(s.factory).getFeeHelper());
uint256 fee = FullMath.mulDiv(amount, feeHelper.getFee(), feeHelper.getFeeDenominator());
address feeAddress = feeHelper.getFeeAddress();
_beforeTokenTransfer(address(0), account, amount);
s._tTotal += amount;
s._tOwned[feeAddress] += fee;
s._tOwned[account] += amount - fee;
emit Transfer(address(0), feeAddress, fee);
emit Transfer(address(0), account, amount - fee);
}
function burn(uint256 amount) public {
address taxFacetAddress = IFacetHelper(IMintFactory(s.factory).getFacetHelper()).getTaxFacet();
(bool success, bytes memory result) = taxFacetAddress.delegatecall(abi.encodeWithSignature("burn(uint256)", amount));
if (!success) {
if (result.length < 68) revert();
revert(abi.decode(result, (string)));
}
}
/// @notice Handles all facet logic
/// @dev Implements a customized version of the EIP-2535 Diamond Standard to add extra functionality to the contract
/// https://github.com/mudgen/diamond-3
fallback() external {
address facetHelper = IMintFactory(s.factory).getFacetHelper();
address facet = IFacetHelper(facetHelper).facetAddress(msg.sig);
require(facet != address(0), "Function does not exist");
assembly {
let ptr := mload(0x40)
calldatacopy(ptr, 0, calldatasize())
let result := delegatecall(
gas(),
facet,
ptr,
calldatasize(),
0,
0
)
let size := returndatasize()
returndatacopy(ptr, 0, size)
switch result
case 0 {
revert(ptr, size)
}
default {
return(ptr, size)
}
}
}
}
// File contracts/MintGenerator.sol
//
// ALL RIGHTS RESERVED
// Unicrypt by SDDTech reserves all rights on this code. You may NOT copy these contracts.
// This contract generates Token01 contracts and registers them in the TokenFactory.
// Ideally you should not interact with this contract directly, and use the Unicrypt token app instead so warnings can be shown where necessary.
contract MintGenerator is Ownable {
uint256 public CONTRACT_VERSION = 1;
IMintFactory public MINT_FACTORY;
IFeeHelper public FEE_HELPER;
constructor(address _mintFactory, address _feeHelper) {
MINT_FACTORY = IMintFactory(_mintFactory);
FEE_HELPER = IFeeHelper(_feeHelper);
}
/**
* @notice Creates a new Token contract and registers it in the TokenFactory.sol.
*/
function createToken (
TaxToken.ConstructorParams calldata params
) public payable returns (address){
require(msg.value == FEE_HELPER.getGeneratorFee(), 'FEE NOT MET');
payable(FEE_HELPER.getFeeAddress()).transfer(FEE_HELPER.getGeneratorFee());
TaxToken newToken = new TaxToken(params, address(MINT_FACTORY));
MINT_FACTORY.registerToken(msg.sender, address(newToken));
return address(newToken);
}
}
// File contracts/interfaces/IUniswapV2Factory.sol
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;
}
// File contracts/interfaces/IUniswapV2Pair.sol
interface IUniswapV2Pair {
event Approval(address indexed owner, address indexed spender, uint value);
event Transfer(address indexed from, address indexed to, uint value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint);
function balanceOf(address owner) external view returns (uint);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint value) external returns (bool);
function transfer(address to, uint value) external returns (bool);
function transferFrom(address from, address to, uint value) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint);
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
event Mint(address indexed sender, uint amount0, uint amount1);
event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
event Swap(
address indexed sender,
uint amount0In,
uint amount1In,
uint amount0Out,
uint amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function price0CumulativeLast() external view returns (uint);
function price1CumulativeLast() external view returns (uint);
function kLast() external view returns (uint);
function mint(address to) external returns (uint liquidity);
function burn(address to) external returns (uint amount0, uint amount1);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}
// File contracts/TaxHelperCamelotV2.sol
//
// ALL RIGHTS RESERVED
// Unicrypt by SDDTech reserves all rights on this code. You may NOT copy these contracts.
// add events
contract TaxHelperCamelotV2 is Ownable{
ICamelotRouter router;
IUniswapV2Factory factory;
IMintFactory mintFactory;
// event Buy
event CreatedLPToken(address token0, address token1, address LPToken);
constructor(address swapV2Router, address swapV2Factory, address _mintFactory) {
router = ICamelotRouter(swapV2Router);
factory = IUniswapV2Factory(swapV2Factory);
mintFactory = IMintFactory(_mintFactory);
}
modifier isToken() {
require(mintFactory.tokenIsRegistered(msg.sender), "RA");
_;
}
function initiateBuyBackTax(address _token, address _wallet) payable external isToken returns(bool) {
ITaxToken token = ITaxToken(_token);
uint256 _amount = token.balanceOf(address(this));
address[] memory addressPaths = new address[](2);
addressPaths[0] = _token;
addressPaths[1] = router.WETH();
token.approve(address(router), _amount);
if(_amount > 0) {
router.swapExactTokensForETHSupportingFeeOnTransferTokens(_amount, 0, addressPaths, _wallet, address(0), block.timestamp);
}
IBuyBackWallet buyBackWallet = IBuyBackWallet(_wallet);
bool res = buyBackWallet.checkBuyBackTrigger();
if(res) {
addressPaths[0] = router.WETH();
addressPaths[1] = _token;
uint256 amountEth = buyBackWallet.sendEthToTaxHelper();
uint256 balanceBefore = token.balanceOf(address(this));
router.swapExactETHForTokensSupportingFeeOnTransferTokens{value: amountEth}(0, addressPaths, address(this), address(0), block.timestamp);
// burn baby burn!
uint256 balanceAfter = token.balanceOf(address(this));
uint256 amountToBurn = balanceAfter - balanceBefore;
token.approve(token.owner(), amountToBurn);
token.buyBackBurn(amountToBurn);
}
return true;
}
function initiateLPTokenTax(address _token, address _wallet) external isToken returns (bool) {
ITaxToken token = ITaxToken(_token);
uint256 _amount = token.balanceOf(address(this));
address[] memory addressPaths = new address[](2);
addressPaths[0] = _token;
addressPaths[1] = router.WETH();
uint256 halfAmount = _amount / 2;
uint256 otherHalf = _amount - halfAmount;
token.transfer(_wallet, otherHalf);
token.approve(address(router), halfAmount);
if(halfAmount > 0) {
router.swapExactTokensForETHSupportingFeeOnTransferTokens(halfAmount, 0, addressPaths, _wallet, address(0), block.timestamp);
}
ILPWallet lpWallet = ILPWallet(_wallet);
bool res = lpWallet.checkLPTrigger();
if(res) {
lpWallet.transferBalanceToTaxHelper();
uint256 amountEth = lpWallet.sendEthToTaxHelper();
uint256 tokenBalance = token.balanceOf(address(this));
token.approve(address(router), tokenBalance);
router.addLiquidityETH{value: amountEth}(_token, tokenBalance, 0, 0, token.owner(), block.timestamp + 20 minutes);
uint256 ethDust = address(this).balance;
if(ethDust > 0) {
(bool sent,) = _wallet.call{value: ethDust}("");
require(sent, "Failed to send Ether");
}
uint256 tokenDust = token.balanceOf(address(this));
if(tokenDust > 0) {
token.transfer(_wallet, tokenDust);
}
}
return true;
}
function createLPToken() external returns(address lpToken) {
// lpToken = factory.createPair(msg.sender, router.WETH());
// emit CreatedLPToken(msg.sender, router.WETH(), lpToken);
// Camelot V2 fails upon LP creation during the constructor
// return zaero address to be updated after creation.
return address(0);
}
function lpTokenHasReserves(address _lpToken) public view returns (bool) {
(uint112 reserve0, uint112 reserve1,) = IUniswapV2Pair(_lpToken).getReserves();
return reserve0 > 0 && reserve1 > 0;
}
function sync(address _lpToken) public {
IUniswapV2Pair(_lpToken).sync();
}
receive() payable external {
}
}
// File contracts/TaxHelperUniswapV2.sol
//
// ALL RIGHTS RESERVED
// Unicrypt by SDDTech reserves all rights on this code. You may NOT copy these contracts.
// add events
contract TaxHelperUniswapV2 is Ownable{
IUniswapV2Router02 router;
IUniswapV2Factory factory;
IMintFactory mintFactory;
// event Buy
event CreatedLPToken(address token0, address token1, address LPToken);
constructor(address swapV2Router, address swapV2Factory, address _mintFactory) {
router = IUniswapV2Router02(swapV2Router);
factory = IUniswapV2Factory(swapV2Factory);
mintFactory = IMintFactory(_mintFactory);
}
modifier isToken() {
require(mintFactory.tokenIsRegistered(msg.sender), "RA");
_;
}
function initiateBuyBackTax(address _token, address _wallet) payable external isToken returns(bool) {
ITaxToken token = ITaxToken(_token);
uint256 _amount = token.balanceOf(address(this));
address[] memory addressPaths = new address[](2);
addressPaths[0] = _token;
addressPaths[1] = router.WETH();
token.approve(address(router), _amount);
if(_amount > 0) {
router.swapExactTokensForETHSupportingFeeOnTransferTokens(_amount, 0, addressPaths, _wallet, block.timestamp);
}
IBuyBackWallet buyBackWallet = IBuyBackWallet(_wallet);
bool res = buyBackWallet.checkBuyBackTrigger();
if(res) {
addressPaths[0] = router.WETH();
addressPaths[1] = _token;
uint256 amountEth = buyBackWallet.sendEthToTaxHelper();
uint256 balanceBefore = token.balanceOf(address(this));
router.swapExactETHForTokensSupportingFeeOnTransferTokens{value: amountEth}(0, addressPaths, address(this), block.timestamp);
// burn baby burn!
uint256 balanceAfter = token.balanceOf(address(this));
uint256 amountToBurn = balanceAfter - balanceBefore;
token.approve(token.owner(), amountToBurn);
token.buyBackBurn(amountToBurn);
}
return true;
}
function initiateLPTokenTax(address _token, address _wallet) external isToken returns (bool) {
ITaxToken token = ITaxToken(_token);
uint256 _amount = token.balanceOf(address(this));
address[] memory addressPaths = new address[](2);
addressPaths[0] = _token;
addressPaths[1] = router.WETH();
uint256 halfAmount = _amount / 2;
uint256 otherHalf = _amount - halfAmount;
token.transfer(_wallet, otherHalf);
token.approve(address(router), halfAmount);
if(halfAmount > 0) {
router.swapExactTokensForETHSupportingFeeOnTransferTokens(halfAmount, 0, addressPaths, _wallet, block.timestamp);
}
ILPWallet lpWallet = ILPWallet(_wallet);
bool res = lpWallet.checkLPTrigger();
if(res) {
lpWallet.transferBalanceToTaxHelper();
uint256 amountEth = lpWallet.sendEthToTaxHelper();
uint256 tokenBalance = token.balanceOf(address(this));
token.approve(address(router), tokenBalance);
router.addLiquidityETH{value: amountEth}(_token, tokenBalance, 0, 0, token.owner(), block.timestamp + 20 minutes);
uint256 ethDust = address(this).balance;
if(ethDust > 0) {
(bool sent,) = _wallet.call{value: ethDust}("");
require(sent, "Failed to send Ether");
}
uint256 tokenDust = token.balanceOf(address(this));
if(tokenDust > 0) {
token.transfer(_wallet, tokenDust);
}
}
return true;
}
function createLPToken() external returns(address lpToken) {
lpToken = factory.createPair(msg.sender, router.WETH());
emit CreatedLPToken(msg.sender, router.WETH(), lpToken);
}
function lpTokenHasReserves(address _lpToken) public view returns (bool) {
(uint112 reserve0, uint112 reserve1,) = IUniswapV2Pair(_lpToken).getReserves();
return reserve0 > 0 && reserve1 > 0;
}
function sync(address _lpToken) public {
IUniswapV2Pair(_lpToken).sync();
}
receive() payable external {
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_wallet","type":"address"}],"name":"CreatedBuyBackWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_wallet","type":"address"}],"name":"CreatedLPWallet","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":false,"internalType":"uint256","name":"_newThreshold","type":"uint256"}],"name":"UpdatedBuyBackWalletThreshold","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_newThreshold","type":"uint256"}],"name":"UpdatedLPWalletThreshold","type":"event"},{"inputs":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_newThreshold","type":"uint256"}],"name":"createBuyBackWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_newThreshold","type":"uint256"}],"name":"createLPWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newThreshold","type":"uint256"}],"name":"updateBuyBackWalletThreshold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newThreshold","type":"uint256"}],"name":"updateLPWalletThreshold","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
608060405234801561001057600080fd5b5060006100216100c460201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506100cc565b600033905090565b61379e806100db6000396000f3fe60806040523480156200001157600080fd5b5060043610620000885760003560e01c8063819e30d91162000063578063819e30d914620000d95780638da5cb5b146200010f578063f2fde38b1462000131578063f49119e414620001515762000088565b80632b5e21c5146200008d578063715018a614620000ad57806378a460b214620000b9575b600080fd5b620000ab6004803603810190620000a59190620008b9565b62000187565b005b620000b7620002da565b005b620000d76004803603810190620000d19190620008b9565b6200041b565b005b620000f76004803603810190620000f1919062000950565b6200056e565b604051620001069190620009bd565b60405180910390f35b62000119620005f4565b604051620001289190620009bd565b60405180910390f35b6200014f6004803603810190620001499190620009da565b6200061d565b005b6200016f600480360381019062000169919062000950565b620007cf565b6040516200017e9190620009bd565b60405180910390f35b6200019162000855565b73ffffffffffffffffffffffffffffffffffffffff16620001b1620005f4565b73ffffffffffffffffffffffffffffffffffffffff16146200020a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620002019062000a6d565b60405180910390fd5b6001601d0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d7d7442f826040518263ffffffff1660e01b81526004016200026a919062000aa0565b600060405180830381600087803b1580156200028557600080fd5b505af11580156200029a573d6000803e3d6000fd5b505050507facad5e9e7c1f7e2e95be4fb56378227c587145f44faf5ef845ffcbc165904e0f81604051620002cf919062000aa0565b60405180910390a150565b620002e462000855565b73ffffffffffffffffffffffffffffffffffffffff1662000304620005f4565b73ffffffffffffffffffffffffffffffffffffffff16146200035d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620003549062000a6d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6200042562000855565b73ffffffffffffffffffffffffffffffffffffffff1662000445620005f4565b73ffffffffffffffffffffffffffffffffffffffff16146200049e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620004959062000a6d565b60405180910390fd5b6001601c0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d7d7442f826040518263ffffffff1660e01b8152600401620004fe919062000aa0565b600060405180830381600087803b1580156200051957600080fd5b505af11580156200052e573d6000803e3d6000fd5b505050507f48fab2251c771ee50980594bc8a7939093f6fd4e93592e2e825d57fdc0088ab28160405162000563919062000aa0565b60405180910390a150565b60008084848460405162000582906200085d565b620005909392919062000abd565b604051809103906000f080158015620005ad573d6000803e3d6000fd5b5090507ff92289c9b1d4cff66cfc328bf43e84325c4e416086f62e60361f865d30bdcf0181604051620005e19190620009bd565b60405180910390a1809150509392505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6200062762000855565b73ffffffffffffffffffffffffffffffffffffffff1662000647620005f4565b73ffffffffffffffffffffffffffffffffffffffff1614620006a0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620006979062000a6d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160362000712576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620007099062000b70565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080848484604051620007e3906200086b565b620007f19392919062000abd565b604051809103906000f0801580156200080e573d6000803e3d6000fd5b5090507fbf4e66c3db80a7adc4d456d3f7ad862beee664cf258987e73f6eaa321405eb3381604051620008429190620009bd565b60405180910390a1809150509392505050565b600033905090565b6117af8062000b9383390190565b611427806200234283390190565b600080fd5b6000819050919050565b62000893816200087e565b81146200089f57600080fd5b50565b600081359050620008b38162000888565b92915050565b600060208284031215620008d257620008d162000879565b5b6000620008e284828501620008a2565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006200091882620008eb565b9050919050565b6200092a816200090b565b81146200093657600080fd5b50565b6000813590506200094a816200091f565b92915050565b6000806000606084860312156200096c576200096b62000879565b5b60006200097c8682870162000939565b93505060206200098f8682870162000939565b9250506040620009a286828701620008a2565b9150509250925092565b620009b7816200090b565b82525050565b6000602082019050620009d46000830184620009ac565b92915050565b600060208284031215620009f357620009f262000879565b5b600062000a038482850162000939565b91505092915050565b600082825260208201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600062000a5560208362000a0c565b915062000a628262000a1d565b602082019050919050565b6000602082019050818103600083015262000a888162000a46565b9050919050565b62000a9a816200087e565b82525050565b600060208201905062000ab7600083018462000a8f565b92915050565b600060608201905062000ad46000830186620009ac565b62000ae36020830185620009ac565b62000af2604083018462000a8f565b949350505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600062000b5860268362000a0c565b915062000b658262000afa565b604082019050919050565b6000602082019050818103600083015262000b8b8162000b49565b905091905056fe60806040523480156200001157600080fd5b50604051620017af380380620017af833981810160405281019062000037919062000457565b600062000049620001c360201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806003819055507f78c34957a47c9ef62a6f6f2f8720f71e2394a6438100e7e20d139c3cbe774d0381604051620001a19190620004c4565b60405180910390a1620001ba82620001cb60201b60201c565b505050620005fc565b600033905090565b620001db620001c360201b60201c565b73ffffffffffffffffffffffffffffffffffffffff16620002016200038960201b60201c565b73ffffffffffffffffffffffffffffffffffffffff16146200025a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620002519062000542565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603620002cc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620002c390620005da565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620003e482620003b7565b9050919050565b620003f681620003d7565b81146200040257600080fd5b50565b6000815190506200041681620003eb565b92915050565b6000819050919050565b62000431816200041c565b81146200043d57600080fd5b50565b600081519050620004518162000426565b92915050565b600080600060608486031215620004735762000472620003b2565b5b6000620004838682870162000405565b9350506020620004968682870162000405565b9250506040620004a98682870162000440565b9150509250925092565b620004be816200041c565b82525050565b6000602082019050620004db6000830184620004b3565b92915050565b600082825260208201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006200052a602083620004e1565b91506200053782620004f2565b602082019050919050565b600060208201905081810360008301526200055d816200051b565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000620005c2602683620004e1565b9150620005cf8262000564565b604082019050919050565b60006020820190508181036000830152620005f581620005b3565b9050919050565b6111a3806200060c6000396000f3fe6080604052600436106100a05760003560e01c8063c45a015511610064578063c45a01551461016f578063d7d7442f1461019a578063dcd09e8a146101c3578063e75235b8146101da578063f2fde38b14610205578063fc0c546a1461022e576100a7565b806312065fe0146100ac57806312e92c89146100d757806346c6722514610102578063715018a61461012d5780638da5cb5b14610144576100a7565b366100a757005b600080fd5b3480156100b857600080fd5b506100c1610259565b6040516100ce9190610c20565b60405180910390f35b3480156100e357600080fd5b506100ec610261565b6040516100f99190610c56565b60405180910390f35b34801561010e57600080fd5b5061011761026d565b6040516101249190610c20565b60405180910390f35b34801561013957600080fd5b506101426104fd565b005b34801561015057600080fd5b50610159610637565b6040516101669190610cb2565b60405180910390f35b34801561017b57600080fd5b50610184610660565b6040516101919190610d2c565b60405180910390f35b3480156101a657600080fd5b506101c160048036038101906101bc9190610d78565b610686565b005b3480156101cf57600080fd5b506101d8610743565b005b3480156101e657600080fd5b506101ef610a27565b6040516101fc9190610c20565b60405180910390f35b34801561021157600080fd5b5061022c60048036038101906102279190610dd1565b610a31565b005b34801561023a57600080fd5b50610243610bd9565b6040516102509190610e1f565b60405180910390f35b600047905090565b60006003544711905090565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fa86f8ce6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103019190610e4f565b9050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633c5c45e0826040518263ffffffff1660e01b815260040161035e9190610c20565b602060405180830381865afa15801561037b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061039f9190610e91565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461040c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161040390610f1b565b60405180910390fd5b600047905060003373ffffffffffffffffffffffffffffffffffffffff168260405161043790610f6c565b60006040518083038185875af1925050503d8060008114610474576040519150601f19603f3d011682016040523d82523d6000602084013e610479565b606091505b50509050806104bd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104b490610fcd565b60405180910390fd5b7fe82822432d99eedd070b3278dea879be412cb905cc407c7448d2272ea4cf2166826040516104ec9190610c20565b60405180910390a181935050505090565b610505610bff565b73ffffffffffffffffffffffffffffffffffffffff16610523610637565b73ffffffffffffffffffffffffffffffffffffffff1614610579576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161057090611039565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61068e610bff565b73ffffffffffffffffffffffffffffffffffffffff166106ac610637565b73ffffffffffffffffffffffffffffffffffffffff1614610702576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106f990611039565b60405180910390fd5b806003819055507f78c34957a47c9ef62a6f6f2f8720f71e2394a6438100e7e20d139c3cbe774d03816040516107389190610c20565b60405180910390a150565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fa86f8ce6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d69190610e4f565b9050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633c5c45e0826040518263ffffffff1660e01b81526004016108339190610c20565b602060405180830381865afa158015610850573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108749190610e91565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108ab57600080fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016109089190610cb2565b602060405180830381865afa158015610925573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109499190610e4f565b9050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b81526004016109a8929190611059565b6020604051808303816000875af11580156109c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109eb91906110ae565b507f2012b63db929358e14b0fc01fdc084736e0f680ffcfe0688c8cf31ad00745aab81604051610a1b9190610c20565b60405180910390a15050565b6000600354905090565b610a39610bff565b73ffffffffffffffffffffffffffffffffffffffff16610a57610637565b73ffffffffffffffffffffffffffffffffffffffff1614610aad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aa490611039565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610b1c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b139061114d565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600033905090565b6000819050919050565b610c1a81610c07565b82525050565b6000602082019050610c356000830184610c11565b92915050565b60008115159050919050565b610c5081610c3b565b82525050565b6000602082019050610c6b6000830184610c47565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610c9c82610c71565b9050919050565b610cac81610c91565b82525050565b6000602082019050610cc76000830184610ca3565b92915050565b6000819050919050565b6000610cf2610ced610ce884610c71565b610ccd565b610c71565b9050919050565b6000610d0482610cd7565b9050919050565b6000610d1682610cf9565b9050919050565b610d2681610d0b565b82525050565b6000602082019050610d416000830184610d1d565b92915050565b600080fd5b610d5581610c07565b8114610d6057600080fd5b50565b600081359050610d7281610d4c565b92915050565b600060208284031215610d8e57610d8d610d47565b5b6000610d9c84828501610d63565b91505092915050565b610dae81610c91565b8114610db957600080fd5b50565b600081359050610dcb81610da5565b92915050565b600060208284031215610de757610de6610d47565b5b6000610df584828501610dbc565b91505092915050565b6000610e0982610cf9565b9050919050565b610e1981610dfe565b82525050565b6000602082019050610e346000830184610e10565b92915050565b600081519050610e4981610d4c565b92915050565b600060208284031215610e6557610e64610d47565b5b6000610e7384828501610e3a565b91505092915050565b600081519050610e8b81610da5565b92915050565b600060208284031215610ea757610ea6610d47565b5b6000610eb584828501610e7c565b91505092915050565b600082825260208201905092915050565b7f5241000000000000000000000000000000000000000000000000000000000000600082015250565b6000610f05600283610ebe565b9150610f1082610ecf565b602082019050919050565b60006020820190508181036000830152610f3481610ef8565b9050919050565b600081905092915050565b50565b6000610f56600083610f3b565b9150610f6182610f46565b600082019050919050565b6000610f7782610f49565b9150819050919050565b7f4661696c656420746f2073656e64204574686572000000000000000000000000600082015250565b6000610fb7601483610ebe565b9150610fc282610f81565b602082019050919050565b60006020820190508181036000830152610fe681610faa565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000611023602083610ebe565b915061102e82610fed565b602082019050919050565b6000602082019050818103600083015261105281611016565b9050919050565b600060408201905061106e6000830185610ca3565b61107b6020830184610c11565b9392505050565b61108b81610c3b565b811461109657600080fd5b50565b6000815190506110a881611082565b92915050565b6000602082840312156110c4576110c3610d47565b5b60006110d284828501611099565b91505092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000611137602683610ebe565b9150611142826110db565b604082019050919050565b600060208201905081810360008301526111668161112a565b905091905056fea26469706673582212202efa4f65382a3215be3f0e3e7ae39e1f8ea5bec7f7aa3ce0f34bf1a41570dd6264736f6c6343000811003360806040523480156200001157600080fd5b506040516200142738038062001427833981810160405281019062000037919062000457565b600062000049620001c360201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806003819055507f78c34957a47c9ef62a6f6f2f8720f71e2394a6438100e7e20d139c3cbe774d0381604051620001a19190620004c4565b60405180910390a1620001ba82620001cb60201b60201c565b505050620005fc565b600033905090565b620001db620001c360201b60201c565b73ffffffffffffffffffffffffffffffffffffffff16620002016200038960201b60201c565b73ffffffffffffffffffffffffffffffffffffffff16146200025a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620002519062000542565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603620002cc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620002c390620005da565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620003e482620003b7565b9050919050565b620003f681620003d7565b81146200040257600080fd5b50565b6000815190506200041681620003eb565b92915050565b6000819050919050565b62000431816200041c565b81146200043d57600080fd5b50565b600081519050620004518162000426565b92915050565b600080600060608486031215620004735762000472620003b2565b5b6000620004838682870162000405565b9350506020620004968682870162000405565b9250506040620004a98682870162000440565b9150509250925092565b620004be816200041c565b82525050565b6000602082019050620004db6000830184620004b3565b92915050565b600082825260208201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006200052a602083620004e1565b91506200053782620004f2565b602082019050919050565b600060208201905081810360008301526200055d816200051b565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000620005c2602683620004e1565b9150620005cf8262000564565b604082019050919050565b60006020820190508181036000830152620005f581620005b3565b9050919050565b610e1b806200060c6000396000f3fe6080604052600436106100955760003560e01c8063d2ade69911610059578063d2ade69914610164578063d7d7442f1461018f578063e75235b8146101b8578063f2fde38b146101e3578063fc0c546a1461020c5761009c565b806312065fe0146100a157806346c67225146100cc578063715018a6146100f75780638da5cb5b1461010e578063c45a0155146101395761009c565b3661009c57005b600080fd5b3480156100ad57600080fd5b506100b6610237565b6040516100c3919061091a565b60405180910390f35b3480156100d857600080fd5b506100e161023f565b6040516100ee919061091a565b60405180910390f35b34801561010357600080fd5b5061010c6104cf565b005b34801561011a57600080fd5b50610123610609565b6040516101309190610976565b60405180910390f35b34801561014557600080fd5b5061014e610632565b60405161015b91906109f0565b60405180910390f35b34801561017057600080fd5b50610179610658565b6040516101869190610a26565b60405180910390f35b34801561019b57600080fd5b506101b660048036038101906101b19190610a72565b610664565b005b3480156101c457600080fd5b506101cd610721565b6040516101da919061091a565b60405180910390f35b3480156101ef57600080fd5b5061020a60048036038101906102059190610acb565b61072b565b005b34801561021857600080fd5b506102216108d3565b60405161022e9190610b19565b60405180910390f35b600047905090565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fa86f8ce6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102d39190610b49565b9050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633c5c45e0826040518263ffffffff1660e01b8152600401610330919061091a565b602060405180830381865afa15801561034d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103719190610b8b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d590610c15565b60405180910390fd5b600047905060003373ffffffffffffffffffffffffffffffffffffffff168260405161040990610c66565b60006040518083038185875af1925050503d8060008114610446576040519150601f19603f3d011682016040523d82523d6000602084013e61044b565b606091505b505090508061048f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161048690610cc7565b60405180910390fd5b7fe82822432d99eedd070b3278dea879be412cb905cc407c7448d2272ea4cf2166826040516104be919061091a565b60405180910390a181935050505090565b6104d76108f9565b73ffffffffffffffffffffffffffffffffffffffff166104f5610609565b73ffffffffffffffffffffffffffffffffffffffff161461054b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054290610d33565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006003544711905090565b61066c6108f9565b73ffffffffffffffffffffffffffffffffffffffff1661068a610609565b73ffffffffffffffffffffffffffffffffffffffff16146106e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106d790610d33565b60405180910390fd5b806003819055507f78c34957a47c9ef62a6f6f2f8720f71e2394a6438100e7e20d139c3cbe774d0381604051610716919061091a565b60405180910390a150565b6000600354905090565b6107336108f9565b73ffffffffffffffffffffffffffffffffffffffff16610751610609565b73ffffffffffffffffffffffffffffffffffffffff16146107a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079e90610d33565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610816576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161080d90610dc5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600033905090565b6000819050919050565b61091481610901565b82525050565b600060208201905061092f600083018461090b565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061096082610935565b9050919050565b61097081610955565b82525050565b600060208201905061098b6000830184610967565b92915050565b6000819050919050565b60006109b66109b16109ac84610935565b610991565b610935565b9050919050565b60006109c88261099b565b9050919050565b60006109da826109bd565b9050919050565b6109ea816109cf565b82525050565b6000602082019050610a0560008301846109e1565b92915050565b60008115159050919050565b610a2081610a0b565b82525050565b6000602082019050610a3b6000830184610a17565b92915050565b600080fd5b610a4f81610901565b8114610a5a57600080fd5b50565b600081359050610a6c81610a46565b92915050565b600060208284031215610a8857610a87610a41565b5b6000610a9684828501610a5d565b91505092915050565b610aa881610955565b8114610ab357600080fd5b50565b600081359050610ac581610a9f565b92915050565b600060208284031215610ae157610ae0610a41565b5b6000610aef84828501610ab6565b91505092915050565b6000610b03826109bd565b9050919050565b610b1381610af8565b82525050565b6000602082019050610b2e6000830184610b0a565b92915050565b600081519050610b4381610a46565b92915050565b600060208284031215610b5f57610b5e610a41565b5b6000610b6d84828501610b34565b91505092915050565b600081519050610b8581610a9f565b92915050565b600060208284031215610ba157610ba0610a41565b5b6000610baf84828501610b76565b91505092915050565b600082825260208201905092915050565b7f5241000000000000000000000000000000000000000000000000000000000000600082015250565b6000610bff600283610bb8565b9150610c0a82610bc9565b602082019050919050565b60006020820190508181036000830152610c2e81610bf2565b9050919050565b600081905092915050565b50565b6000610c50600083610c35565b9150610c5b82610c40565b600082019050919050565b6000610c7182610c43565b9150819050919050565b7f4661696c656420746f2073656e64204574686572000000000000000000000000600082015250565b6000610cb1601483610bb8565b9150610cbc82610c7b565b602082019050919050565b60006020820190508181036000830152610ce081610ca4565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000610d1d602083610bb8565b9150610d2882610ce7565b602082019050919050565b60006020820190508181036000830152610d4c81610d10565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000610daf602683610bb8565b9150610dba82610d53565b604082019050919050565b60006020820190508181036000830152610dde81610da2565b905091905056fea264697066735822122032a4c11a47235c41ebc142b4cc10d5d7308f841e7c7fdfed34279bf4cebca2c164736f6c63430008110033a26469706673582212207cf6f64d134e4211a0534dc4157700fa06df1846d3a05bdf060ccd832dd3da3264736f6c63430008110033
Deployed Bytecode
0x60806040523480156200001157600080fd5b5060043610620000885760003560e01c8063819e30d91162000063578063819e30d914620000d95780638da5cb5b146200010f578063f2fde38b1462000131578063f49119e414620001515762000088565b80632b5e21c5146200008d578063715018a614620000ad57806378a460b214620000b9575b600080fd5b620000ab6004803603810190620000a59190620008b9565b62000187565b005b620000b7620002da565b005b620000d76004803603810190620000d19190620008b9565b6200041b565b005b620000f76004803603810190620000f1919062000950565b6200056e565b604051620001069190620009bd565b60405180910390f35b62000119620005f4565b604051620001289190620009bd565b60405180910390f35b6200014f6004803603810190620001499190620009da565b6200061d565b005b6200016f600480360381019062000169919062000950565b620007cf565b6040516200017e9190620009bd565b60405180910390f35b6200019162000855565b73ffffffffffffffffffffffffffffffffffffffff16620001b1620005f4565b73ffffffffffffffffffffffffffffffffffffffff16146200020a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620002019062000a6d565b60405180910390fd5b6001601d0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d7d7442f826040518263ffffffff1660e01b81526004016200026a919062000aa0565b600060405180830381600087803b1580156200028557600080fd5b505af11580156200029a573d6000803e3d6000fd5b505050507facad5e9e7c1f7e2e95be4fb56378227c587145f44faf5ef845ffcbc165904e0f81604051620002cf919062000aa0565b60405180910390a150565b620002e462000855565b73ffffffffffffffffffffffffffffffffffffffff1662000304620005f4565b73ffffffffffffffffffffffffffffffffffffffff16146200035d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620003549062000a6d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6200042562000855565b73ffffffffffffffffffffffffffffffffffffffff1662000445620005f4565b73ffffffffffffffffffffffffffffffffffffffff16146200049e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620004959062000a6d565b60405180910390fd5b6001601c0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d7d7442f826040518263ffffffff1660e01b8152600401620004fe919062000aa0565b600060405180830381600087803b1580156200051957600080fd5b505af11580156200052e573d6000803e3d6000fd5b505050507f48fab2251c771ee50980594bc8a7939093f6fd4e93592e2e825d57fdc0088ab28160405162000563919062000aa0565b60405180910390a150565b60008084848460405162000582906200085d565b620005909392919062000abd565b604051809103906000f080158015620005ad573d6000803e3d6000fd5b5090507ff92289c9b1d4cff66cfc328bf43e84325c4e416086f62e60361f865d30bdcf0181604051620005e19190620009bd565b60405180910390a1809150509392505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6200062762000855565b73ffffffffffffffffffffffffffffffffffffffff1662000647620005f4565b73ffffffffffffffffffffffffffffffffffffffff1614620006a0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620006979062000a6d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160362000712576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620007099062000b70565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080848484604051620007e3906200086b565b620007f19392919062000abd565b604051809103906000f0801580156200080e573d6000803e3d6000fd5b5090507fbf4e66c3db80a7adc4d456d3f7ad862beee664cf258987e73f6eaa321405eb3381604051620008429190620009bd565b60405180910390a1809150509392505050565b600033905090565b6117af8062000b9383390190565b611427806200234283390190565b600080fd5b6000819050919050565b62000893816200087e565b81146200089f57600080fd5b50565b600081359050620008b38162000888565b92915050565b600060208284031215620008d257620008d162000879565b5b6000620008e284828501620008a2565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006200091882620008eb565b9050919050565b6200092a816200090b565b81146200093657600080fd5b50565b6000813590506200094a816200091f565b92915050565b6000806000606084860312156200096c576200096b62000879565b5b60006200097c8682870162000939565b93505060206200098f8682870162000939565b9250506040620009a286828701620008a2565b9150509250925092565b620009b7816200090b565b82525050565b6000602082019050620009d46000830184620009ac565b92915050565b600060208284031215620009f357620009f262000879565b5b600062000a038482850162000939565b91505092915050565b600082825260208201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600062000a5560208362000a0c565b915062000a628262000a1d565b602082019050919050565b6000602082019050818103600083015262000a888162000a46565b9050919050565b62000a9a816200087e565b82525050565b600060208201905062000ab7600083018462000a8f565b92915050565b600060608201905062000ad46000830186620009ac565b62000ae36020830185620009ac565b62000af2604083018462000a8f565b949350505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600062000b5860268362000a0c565b915062000b658262000afa565b604082019050919050565b6000602082019050818103600083015262000b8b8162000b49565b905091905056fe60806040523480156200001157600080fd5b50604051620017af380380620017af833981810160405281019062000037919062000457565b600062000049620001c360201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806003819055507f78c34957a47c9ef62a6f6f2f8720f71e2394a6438100e7e20d139c3cbe774d0381604051620001a19190620004c4565b60405180910390a1620001ba82620001cb60201b60201c565b505050620005fc565b600033905090565b620001db620001c360201b60201c565b73ffffffffffffffffffffffffffffffffffffffff16620002016200038960201b60201c565b73ffffffffffffffffffffffffffffffffffffffff16146200025a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620002519062000542565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603620002cc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620002c390620005da565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620003e482620003b7565b9050919050565b620003f681620003d7565b81146200040257600080fd5b50565b6000815190506200041681620003eb565b92915050565b6000819050919050565b62000431816200041c565b81146200043d57600080fd5b50565b600081519050620004518162000426565b92915050565b600080600060608486031215620004735762000472620003b2565b5b6000620004838682870162000405565b9350506020620004968682870162000405565b9250506040620004a98682870162000440565b9150509250925092565b620004be816200041c565b82525050565b6000602082019050620004db6000830184620004b3565b92915050565b600082825260208201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006200052a602083620004e1565b91506200053782620004f2565b602082019050919050565b600060208201905081810360008301526200055d816200051b565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000620005c2602683620004e1565b9150620005cf8262000564565b604082019050919050565b60006020820190508181036000830152620005f581620005b3565b9050919050565b6111a3806200060c6000396000f3fe6080604052600436106100a05760003560e01c8063c45a015511610064578063c45a01551461016f578063d7d7442f1461019a578063dcd09e8a146101c3578063e75235b8146101da578063f2fde38b14610205578063fc0c546a1461022e576100a7565b806312065fe0146100ac57806312e92c89146100d757806346c6722514610102578063715018a61461012d5780638da5cb5b14610144576100a7565b366100a757005b600080fd5b3480156100b857600080fd5b506100c1610259565b6040516100ce9190610c20565b60405180910390f35b3480156100e357600080fd5b506100ec610261565b6040516100f99190610c56565b60405180910390f35b34801561010e57600080fd5b5061011761026d565b6040516101249190610c20565b60405180910390f35b34801561013957600080fd5b506101426104fd565b005b34801561015057600080fd5b50610159610637565b6040516101669190610cb2565b60405180910390f35b34801561017b57600080fd5b50610184610660565b6040516101919190610d2c565b60405180910390f35b3480156101a657600080fd5b506101c160048036038101906101bc9190610d78565b610686565b005b3480156101cf57600080fd5b506101d8610743565b005b3480156101e657600080fd5b506101ef610a27565b6040516101fc9190610c20565b60405180910390f35b34801561021157600080fd5b5061022c60048036038101906102279190610dd1565b610a31565b005b34801561023a57600080fd5b50610243610bd9565b6040516102509190610e1f565b60405180910390f35b600047905090565b60006003544711905090565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fa86f8ce6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103019190610e4f565b9050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633c5c45e0826040518263ffffffff1660e01b815260040161035e9190610c20565b602060405180830381865afa15801561037b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061039f9190610e91565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461040c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161040390610f1b565b60405180910390fd5b600047905060003373ffffffffffffffffffffffffffffffffffffffff168260405161043790610f6c565b60006040518083038185875af1925050503d8060008114610474576040519150601f19603f3d011682016040523d82523d6000602084013e610479565b606091505b50509050806104bd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104b490610fcd565b60405180910390fd5b7fe82822432d99eedd070b3278dea879be412cb905cc407c7448d2272ea4cf2166826040516104ec9190610c20565b60405180910390a181935050505090565b610505610bff565b73ffffffffffffffffffffffffffffffffffffffff16610523610637565b73ffffffffffffffffffffffffffffffffffffffff1614610579576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161057090611039565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61068e610bff565b73ffffffffffffffffffffffffffffffffffffffff166106ac610637565b73ffffffffffffffffffffffffffffffffffffffff1614610702576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106f990611039565b60405180910390fd5b806003819055507f78c34957a47c9ef62a6f6f2f8720f71e2394a6438100e7e20d139c3cbe774d03816040516107389190610c20565b60405180910390a150565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fa86f8ce6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d69190610e4f565b9050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633c5c45e0826040518263ffffffff1660e01b81526004016108339190610c20565b602060405180830381865afa158015610850573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108749190610e91565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108ab57600080fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016109089190610cb2565b602060405180830381865afa158015610925573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109499190610e4f565b9050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b81526004016109a8929190611059565b6020604051808303816000875af11580156109c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109eb91906110ae565b507f2012b63db929358e14b0fc01fdc084736e0f680ffcfe0688c8cf31ad00745aab81604051610a1b9190610c20565b60405180910390a15050565b6000600354905090565b610a39610bff565b73ffffffffffffffffffffffffffffffffffffffff16610a57610637565b73ffffffffffffffffffffffffffffffffffffffff1614610aad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aa490611039565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610b1c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b139061114d565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600033905090565b6000819050919050565b610c1a81610c07565b82525050565b6000602082019050610c356000830184610c11565b92915050565b60008115159050919050565b610c5081610c3b565b82525050565b6000602082019050610c6b6000830184610c47565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610c9c82610c71565b9050919050565b610cac81610c91565b82525050565b6000602082019050610cc76000830184610ca3565b92915050565b6000819050919050565b6000610cf2610ced610ce884610c71565b610ccd565b610c71565b9050919050565b6000610d0482610cd7565b9050919050565b6000610d1682610cf9565b9050919050565b610d2681610d0b565b82525050565b6000602082019050610d416000830184610d1d565b92915050565b600080fd5b610d5581610c07565b8114610d6057600080fd5b50565b600081359050610d7281610d4c565b92915050565b600060208284031215610d8e57610d8d610d47565b5b6000610d9c84828501610d63565b91505092915050565b610dae81610c91565b8114610db957600080fd5b50565b600081359050610dcb81610da5565b92915050565b600060208284031215610de757610de6610d47565b5b6000610df584828501610dbc565b91505092915050565b6000610e0982610cf9565b9050919050565b610e1981610dfe565b82525050565b6000602082019050610e346000830184610e10565b92915050565b600081519050610e4981610d4c565b92915050565b600060208284031215610e6557610e64610d47565b5b6000610e7384828501610e3a565b91505092915050565b600081519050610e8b81610da5565b92915050565b600060208284031215610ea757610ea6610d47565b5b6000610eb584828501610e7c565b91505092915050565b600082825260208201905092915050565b7f5241000000000000000000000000000000000000000000000000000000000000600082015250565b6000610f05600283610ebe565b9150610f1082610ecf565b602082019050919050565b60006020820190508181036000830152610f3481610ef8565b9050919050565b600081905092915050565b50565b6000610f56600083610f3b565b9150610f6182610f46565b600082019050919050565b6000610f7782610f49565b9150819050919050565b7f4661696c656420746f2073656e64204574686572000000000000000000000000600082015250565b6000610fb7601483610ebe565b9150610fc282610f81565b602082019050919050565b60006020820190508181036000830152610fe681610faa565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000611023602083610ebe565b915061102e82610fed565b602082019050919050565b6000602082019050818103600083015261105281611016565b9050919050565b600060408201905061106e6000830185610ca3565b61107b6020830184610c11565b9392505050565b61108b81610c3b565b811461109657600080fd5b50565b6000815190506110a881611082565b92915050565b6000602082840312156110c4576110c3610d47565b5b60006110d284828501611099565b91505092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000611137602683610ebe565b9150611142826110db565b604082019050919050565b600060208201905081810360008301526111668161112a565b905091905056fea26469706673582212202efa4f65382a3215be3f0e3e7ae39e1f8ea5bec7f7aa3ce0f34bf1a41570dd6264736f6c6343000811003360806040523480156200001157600080fd5b506040516200142738038062001427833981810160405281019062000037919062000457565b600062000049620001c360201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806003819055507f78c34957a47c9ef62a6f6f2f8720f71e2394a6438100e7e20d139c3cbe774d0381604051620001a19190620004c4565b60405180910390a1620001ba82620001cb60201b60201c565b505050620005fc565b600033905090565b620001db620001c360201b60201c565b73ffffffffffffffffffffffffffffffffffffffff16620002016200038960201b60201c565b73ffffffffffffffffffffffffffffffffffffffff16146200025a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620002519062000542565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603620002cc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620002c390620005da565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620003e482620003b7565b9050919050565b620003f681620003d7565b81146200040257600080fd5b50565b6000815190506200041681620003eb565b92915050565b6000819050919050565b62000431816200041c565b81146200043d57600080fd5b50565b600081519050620004518162000426565b92915050565b600080600060608486031215620004735762000472620003b2565b5b6000620004838682870162000405565b9350506020620004968682870162000405565b9250506040620004a98682870162000440565b9150509250925092565b620004be816200041c565b82525050565b6000602082019050620004db6000830184620004b3565b92915050565b600082825260208201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006200052a602083620004e1565b91506200053782620004f2565b602082019050919050565b600060208201905081810360008301526200055d816200051b565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000620005c2602683620004e1565b9150620005cf8262000564565b604082019050919050565b60006020820190508181036000830152620005f581620005b3565b9050919050565b610e1b806200060c6000396000f3fe6080604052600436106100955760003560e01c8063d2ade69911610059578063d2ade69914610164578063d7d7442f1461018f578063e75235b8146101b8578063f2fde38b146101e3578063fc0c546a1461020c5761009c565b806312065fe0146100a157806346c67225146100cc578063715018a6146100f75780638da5cb5b1461010e578063c45a0155146101395761009c565b3661009c57005b600080fd5b3480156100ad57600080fd5b506100b6610237565b6040516100c3919061091a565b60405180910390f35b3480156100d857600080fd5b506100e161023f565b6040516100ee919061091a565b60405180910390f35b34801561010357600080fd5b5061010c6104cf565b005b34801561011a57600080fd5b50610123610609565b6040516101309190610976565b60405180910390f35b34801561014557600080fd5b5061014e610632565b60405161015b91906109f0565b60405180910390f35b34801561017057600080fd5b50610179610658565b6040516101869190610a26565b60405180910390f35b34801561019b57600080fd5b506101b660048036038101906101b19190610a72565b610664565b005b3480156101c457600080fd5b506101cd610721565b6040516101da919061091a565b60405180910390f35b3480156101ef57600080fd5b5061020a60048036038101906102059190610acb565b61072b565b005b34801561021857600080fd5b506102216108d3565b60405161022e9190610b19565b60405180910390f35b600047905090565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fa86f8ce6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102d39190610b49565b9050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633c5c45e0826040518263ffffffff1660e01b8152600401610330919061091a565b602060405180830381865afa15801561034d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103719190610b8b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d590610c15565b60405180910390fd5b600047905060003373ffffffffffffffffffffffffffffffffffffffff168260405161040990610c66565b60006040518083038185875af1925050503d8060008114610446576040519150601f19603f3d011682016040523d82523d6000602084013e61044b565b606091505b505090508061048f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161048690610cc7565b60405180910390fd5b7fe82822432d99eedd070b3278dea879be412cb905cc407c7448d2272ea4cf2166826040516104be919061091a565b60405180910390a181935050505090565b6104d76108f9565b73ffffffffffffffffffffffffffffffffffffffff166104f5610609565b73ffffffffffffffffffffffffffffffffffffffff161461054b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054290610d33565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006003544711905090565b61066c6108f9565b73ffffffffffffffffffffffffffffffffffffffff1661068a610609565b73ffffffffffffffffffffffffffffffffffffffff16146106e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106d790610d33565b60405180910390fd5b806003819055507f78c34957a47c9ef62a6f6f2f8720f71e2394a6438100e7e20d139c3cbe774d0381604051610716919061091a565b60405180910390a150565b6000600354905090565b6107336108f9565b73ffffffffffffffffffffffffffffffffffffffff16610751610609565b73ffffffffffffffffffffffffffffffffffffffff16146107a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079e90610d33565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610816576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161080d90610dc5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600033905090565b6000819050919050565b61091481610901565b82525050565b600060208201905061092f600083018461090b565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061096082610935565b9050919050565b61097081610955565b82525050565b600060208201905061098b6000830184610967565b92915050565b6000819050919050565b60006109b66109b16109ac84610935565b610991565b610935565b9050919050565b60006109c88261099b565b9050919050565b60006109da826109bd565b9050919050565b6109ea816109cf565b82525050565b6000602082019050610a0560008301846109e1565b92915050565b60008115159050919050565b610a2081610a0b565b82525050565b6000602082019050610a3b6000830184610a17565b92915050565b600080fd5b610a4f81610901565b8114610a5a57600080fd5b50565b600081359050610a6c81610a46565b92915050565b600060208284031215610a8857610a87610a41565b5b6000610a9684828501610a5d565b91505092915050565b610aa881610955565b8114610ab357600080fd5b50565b600081359050610ac581610a9f565b92915050565b600060208284031215610ae157610ae0610a41565b5b6000610aef84828501610ab6565b91505092915050565b6000610b03826109bd565b9050919050565b610b1381610af8565b82525050565b6000602082019050610b2e6000830184610b0a565b92915050565b600081519050610b4381610a46565b92915050565b600060208284031215610b5f57610b5e610a41565b5b6000610b6d84828501610b34565b91505092915050565b600081519050610b8581610a9f565b92915050565b600060208284031215610ba157610ba0610a41565b5b6000610baf84828501610b76565b91505092915050565b600082825260208201905092915050565b7f5241000000000000000000000000000000000000000000000000000000000000600082015250565b6000610bff600283610bb8565b9150610c0a82610bc9565b602082019050919050565b60006020820190508181036000830152610c2e81610bf2565b9050919050565b600081905092915050565b50565b6000610c50600083610c35565b9150610c5b82610c40565b600082019050919050565b6000610c7182610c43565b9150819050919050565b7f4661696c656420746f2073656e64204574686572000000000000000000000000600082015250565b6000610cb1601483610bb8565b9150610cbc82610c7b565b602082019050919050565b60006020820190508181036000830152610ce081610ca4565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000610d1d602083610bb8565b9150610d2882610ce7565b602082019050919050565b60006020820190508181036000830152610d4c81610d10565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000610daf602683610bb8565b9150610dba82610d53565b604082019050919050565b60006020820190508181036000830152610dde81610da2565b905091905056fea264697066735822122032a4c11a47235c41ebc142b4cc10d5d7308f841e7c7fdfed34279bf4cebca2c164736f6c63430008110033a26469706673582212207cf6f64d134e4211a0534dc4157700fa06df1846d3a05bdf060ccd832dd3da3264736f6c63430008110033
Deployed Bytecode Sourcemap
92113:1342:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;93251:199;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;8314:148;;;:::i;:::-;;93024:219;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;92730:286;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;7663:87;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;8617:244;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;92402:320;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;93251:199;7894:12;:10;:12::i;:::-;7883:23;;:7;:5;:7::i;:::-;:23;;;7875:68;;;;;;;;;;;;:::i;:::-;;;;;;;;;93345:1:::1;:10;;;;;;;;;;;;93335:37;;;93373:13;93335:52;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;93403:39;93428:13;93403:39;;;;;;:::i;:::-;;;;;;;;93251:199:::0;:::o;8314:148::-;7894:12;:10;:12::i;:::-;7883:23;;:7;:5;:7::i;:::-;:23;;;7875:68;;;;;;;;;;;;:::i;:::-;;;;;;;;;8421:1:::1;8384:40;;8405:6;::::0;::::1;;;;;;;;8384:40;;;;;;;;;;;;8452:1;8435:6:::0;::::1;:19;;;;;;;;;;;;;;;;;;8314:148::o:0;93024:219::-;7894:12;:10;:12::i;:::-;7883:23;;:7;:5;:7::i;:::-;:23;;;7875:68;;;;;;;;;;;;:::i;:::-;;;;;;;;;93128:1:::1;:15;;;;;;;;;;;;93113:47;;;93161:13;93113:62;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;93191:44;93221:13;93191:44;;;;;;:::i;:::-;;;;;;;;93024:219:::0;:::o;92730:286::-;92829:7;92849:20;92885:8;92895:6;92903:13;92872:45;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;92849:68;;92933:37;92957:11;92933:37;;;;;;:::i;:::-;;;;;;;;92996:11;92981:27;;;92730:286;;;;;:::o;7663:87::-;7709:7;7736:6;;;;;;;;;;;7729:13;;7663:87;:::o;8617:244::-;7894:12;:10;:12::i;:::-;7883:23;;:7;:5;:7::i;:::-;:23;;;7875:68;;;;;;;;;;;;:::i;:::-;;;;;;;;;8726:1:::1;8706:22;;:8;:22;;::::0;8698:73:::1;;;;;;;;;;;;:::i;:::-;;;;;;;;;8816:8;8787:38;;8808:6;::::0;::::1;;;;;;;;8787:38;;;;;;;;;;;;8845:8;8836:6;::::0;:17:::1;;;;;;;;;;;;;;;;;;8617:244:::0;:::o;92402:320::-;92506:7;92526:30;92577:8;92587:6;92594:13;92559:49;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;92526:82;;92624:47;92653:16;92624:47;;;;;;:::i;:::-;;;;;;;;92697:16;92682:32;;;92402:320;;;;;:::o;6192:98::-;6245:7;6272:10;6265:17;;6192:98;:::o;-1:-1:-1:-;;;;;;;;:::o;:::-;;;;;;;;:::o;88:117:1:-;197:1;194;187:12;334:77;371:7;400:5;389:16;;334:77;;;:::o;417:122::-;490:24;508:5;490:24;:::i;:::-;483:5;480:35;470:63;;529:1;526;519:12;470:63;417:122;:::o;545:139::-;591:5;629:6;616:20;607:29;;645:33;672:5;645:33;:::i;:::-;545:139;;;;:::o;690:329::-;749:6;798:2;786:9;777:7;773:23;769:32;766:119;;;804:79;;:::i;:::-;766:119;924:1;949:53;994:7;985:6;974:9;970:22;949:53;:::i;:::-;939:63;;895:117;690:329;;;;:::o;1025:126::-;1062:7;1102:42;1095:5;1091:54;1080:65;;1025:126;;;:::o;1157:96::-;1194:7;1223:24;1241:5;1223:24;:::i;:::-;1212:35;;1157:96;;;:::o;1259:122::-;1332:24;1350:5;1332:24;:::i;:::-;1325:5;1322:35;1312:63;;1371:1;1368;1361:12;1312:63;1259:122;:::o;1387:139::-;1433:5;1471:6;1458:20;1449:29;;1487:33;1514:5;1487:33;:::i;:::-;1387:139;;;;:::o;1532:619::-;1609:6;1617;1625;1674:2;1662:9;1653:7;1649:23;1645:32;1642:119;;;1680:79;;:::i;:::-;1642:119;1800:1;1825:53;1870:7;1861:6;1850:9;1846:22;1825:53;:::i;:::-;1815:63;;1771:117;1927:2;1953:53;1998:7;1989:6;1978:9;1974:22;1953:53;:::i;:::-;1943:63;;1898:118;2055:2;2081:53;2126:7;2117:6;2106:9;2102:22;2081:53;:::i;:::-;2071:63;;2026:118;1532:619;;;;;:::o;2157:118::-;2244:24;2262:5;2244:24;:::i;:::-;2239:3;2232:37;2157:118;;:::o;2281:222::-;2374:4;2412:2;2401:9;2397:18;2389:26;;2425:71;2493:1;2482:9;2478:17;2469:6;2425:71;:::i;:::-;2281:222;;;;:::o;2509:329::-;2568:6;2617:2;2605:9;2596:7;2592:23;2588:32;2585:119;;;2623:79;;:::i;:::-;2585:119;2743:1;2768:53;2813:7;2804:6;2793:9;2789:22;2768:53;:::i;:::-;2758:63;;2714:117;2509:329;;;;:::o;2844:169::-;2928:11;2962:6;2957:3;2950:19;3002:4;2997:3;2993:14;2978:29;;2844:169;;;;:::o;3019:182::-;3159:34;3155:1;3147:6;3143:14;3136:58;3019:182;:::o;3207:366::-;3349:3;3370:67;3434:2;3429:3;3370:67;:::i;:::-;3363:74;;3446:93;3535:3;3446:93;:::i;:::-;3564:2;3559:3;3555:12;3548:19;;3207:366;;;:::o;3579:419::-;3745:4;3783:2;3772:9;3768:18;3760:26;;3832:9;3826:4;3822:20;3818:1;3807:9;3803:17;3796:47;3860:131;3986:4;3860:131;:::i;:::-;3852:139;;3579:419;;;:::o;4004:118::-;4091:24;4109:5;4091:24;:::i;:::-;4086:3;4079:37;4004:118;;:::o;4128:222::-;4221:4;4259:2;4248:9;4244:18;4236:26;;4272:71;4340:1;4329:9;4325:17;4316:6;4272:71;:::i;:::-;4128:222;;;;:::o;4356:442::-;4505:4;4543:2;4532:9;4528:18;4520:26;;4556:71;4624:1;4613:9;4609:17;4600:6;4556:71;:::i;:::-;4637:72;4705:2;4694:9;4690:18;4681:6;4637:72;:::i;:::-;4719;4787:2;4776:9;4772:18;4763:6;4719:72;:::i;:::-;4356:442;;;;;;:::o;4804:225::-;4944:34;4940:1;4932:6;4928:14;4921:58;5013:8;5008:2;5000:6;4996:15;4989:33;4804:225;:::o;5035:366::-;5177:3;5198:67;5262:2;5257:3;5198:67;:::i;:::-;5191:74;;5274:93;5363:3;5274:93;:::i;:::-;5392:2;5387:3;5383:12;5376:19;;5035:366;;;:::o;5407:419::-;5573:4;5611:2;5600:9;5596:18;5588:26;;5660:9;5654:4;5650:20;5646:1;5635:9;5631:17;5624:47;5688:131;5814:4;5688:131;:::i;:::-;5680:139;;5407:419;;;:::o
Swarm Source
ipfs://7cf6f64d134e4211a0534dc4157700fa06df1846d3a05bdf060ccd832dd3da32
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.