Overview
S Balance
0 S
S Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Name:
AgentToken
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import "forge-std/console.sol"; import "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol"; import "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol"; import "openzeppelin-contracts-upgradeable/contracts/access/Ownable2StepUpgradeable.sol"; import "openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol"; import "openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol"; import "../pool/IUniswapV2Router02.sol"; import "../pool/IUniswapV2Factory.sol"; import "./IAgentToken.sol"; import "./IAgentFactory.sol"; contract AgentToken is ContextUpgradeable, IAgentToken, Ownable2StepUpgradeable { using EnumerableSet for EnumerableSet.AddressSet; using SafeERC20 for IERC20; uint256 internal constant BP_DENOM = 10000; uint256 internal constant ROUND_DEC = 100000000000; uint256 internal constant MAX_SWAP_THRESHOLD_MULTIPLE = 20; address public uniswapV2Pair; bool internal _tokenHasTax; IUniswapV2Router02 internal _uniswapRouter; uint32 public fundedDate; uint16 public projectBuyTaxBasisPoints; uint16 public projectSellTaxBasisPoints; uint16 public swapThresholdBasisPoints; address public pairToken; // The token used to trade for this token /** * @dev {_autoSwapInProgress} We start with {_autoSwapInProgress} ON, as we don't want to * call autoswap when processing initial liquidity from this address. We turn this OFF when * liquidity has been loaded, and use this bool to control processing during auto-swaps * from that point onwards. */ bool private _autoSwapInProgress; address public projectTaxRecipient; uint128 public projectTaxPendingSwap; string private _name; string private _symbol; uint256 private _totalSupply; address public vault; /** * @dev {_balances} Addresses balances */ mapping(address => uint256) private _balances; /** * @dev {_allowances} Addresses allocance details */ mapping(address => mapping(address => uint256)) private _allowances; /** * @dev {_liquidityPools} Enumerable set for liquidity pool addresses */ EnumerableSet.AddressSet private _liquidityPools; IAgentFactory private _factory; /** * @dev {onlyOwnerOrFactory} * * Throws if called by any account other than the owner, factory or pool. */ modifier onlyOwnerOrFactory() { if (owner() != _msgSender() && address(_factory) != _msgSender()) { revert CallerIsNotAdminNorFactory(); } _; } constructor() { _disableInitializers(); } function initialize( address[3] memory integrationAddresses_, bytes memory baseParams_, bytes memory supplyParams_, bytes memory taxParams_ ) external initializer { _decodeBaseParams(integrationAddresses_[0], baseParams_); _uniswapRouter = IUniswapV2Router02(integrationAddresses_[1]); pairToken = integrationAddresses_[2]; ERC20SupplyParameters memory supplyParams = abi.decode(supplyParams_, (ERC20SupplyParameters)); ERC20TaxParameters memory taxParams = abi.decode(taxParams_, (ERC20TaxParameters)); _processSupplyParams(supplyParams); uint256 lpSupply = supplyParams.lpSupply * (10 ** decimals()); uint256 vaultSupply = supplyParams.vaultSupply * (10 ** decimals()); _tokenHasTax = _processTaxParams(taxParams); swapThresholdBasisPoints = uint16(taxParams.taxSwapThresholdBasisPoints); projectTaxRecipient = taxParams.projectTaxRecipient; _mintBalances(lpSupply, vaultSupply); uniswapV2Pair = _createPair(); _factory = IAgentFactory(_msgSender()); _autoSwapInProgress = true; // We don't want to tax initial liquidity } /** * @dev function {_decodeBaseParams} * * Decode NFT Parameters * * @param projectOwner_ The owner of this contract * @param encodedBaseParams_ The base params encoded into a bytes array */ function _decodeBaseParams(address projectOwner_, bytes memory encodedBaseParams_) internal { _transferOwnership(projectOwner_); (_name, _symbol) = abi.decode(encodedBaseParams_, (string, string)); } /** * @dev function {_processSupplyParams} * * Process provided supply params * * @param erc20SupplyParameters_ The supply params */ function _processSupplyParams(ERC20SupplyParameters memory erc20SupplyParameters_) internal { if (erc20SupplyParameters_.maxSupply != erc20SupplyParameters_.lpSupply + erc20SupplyParameters_.vaultSupply) { revert SupplyTotalMismatch(); } if (erc20SupplyParameters_.maxSupply > type(uint128).max) { revert MaxSupplyTooHigh(); } vault = erc20SupplyParameters_.vault; } /** * @dev function {_processTaxParams} * * Process provided tax params * * @param erc20TaxParameters_ The tax params */ function _processTaxParams(ERC20TaxParameters memory erc20TaxParameters_) internal returns (bool tokenHasTax_) { /** * @dev If this * token does NOT have tax applied then there is no need to store or read these parameters, and we can * avoid this simply by checking the immutable var. Pass back the value for this var from this method. */ if (erc20TaxParameters_.projectBuyTaxBasisPoints == 0 && erc20TaxParameters_.projectSellTaxBasisPoints == 0) { return false; } else { projectBuyTaxBasisPoints = uint16(erc20TaxParameters_.projectBuyTaxBasisPoints); projectSellTaxBasisPoints = uint16(erc20TaxParameters_.projectSellTaxBasisPoints); return true; } } /** * @dev function {_mintBalances} * * Mint initial balances * * @param lpMint_ The number of tokens for liquidity */ function _mintBalances(uint256 lpMint_, uint256 vaultMint_) internal { if (lpMint_ > 0) { _mint(address(this), lpMint_); } if (vaultMint_ > 0) { _mint(vault, vaultMint_); } } /** * @dev function {_createPair} * * Create the uniswap pair * * @return uniswapV2Pair_ The pair address */ function _createPair() internal returns (address uniswapV2Pair_) { uniswapV2Pair_ = IUniswapV2Factory(_uniswapRouter.factory()).createPair(address(this), pairToken); _liquidityPools.add(uniswapV2Pair_); emit LiquidityPoolCreated(uniswapV2Pair_); return (uniswapV2Pair_); } /** * @dev function {addInitialLiquidity} * * Add initial liquidity to the uniswap pair * * @param lpOwner The recipient of LP tokens */ function addInitialLiquidity(address lpOwner) external onlyOwnerOrFactory { _addInitialLiquidity(lpOwner); } /** * @dev function {_addInitialLiquidity} * * Add initial liquidity to the uniswap pair (internal function that does processing) * * * @param lpOwner The recipient of LP tokens */ function _addInitialLiquidity(address lpOwner) internal { // Funded date is the date of first funding. We can only add initial liquidity once. If this date is set, // we cannot proceed if (fundedDate != 0) { revert InitialLiquidityAlreadyAdded(); } fundedDate = uint32(block.timestamp); // Can only do this if this contract holds tokens: if (balanceOf(address(this)) == 0) { revert NoTokenForLiquidityPair(); } // Approve the uniswap router for an inifinite amount (max uint256) // This means that we don't need to worry about later incrememtal // approvals on tax swaps, as the uniswap router allowance will never // be decreased (see code in decreaseAllowance for reference) _approve(address(this), address(_uniswapRouter), type(uint256).max); IERC20(pairToken).approve(address(_uniswapRouter), type(uint256).max); // Add the liquidity: (uint256 amountA, uint256 amountB, uint256 lpTokens) = _uniswapRouter.addLiquidity( address(this), pairToken, balanceOf(address(this)), IERC20(pairToken).balanceOf(address(this)), 0, 0, address(this), block.timestamp ); emit InitialLiquidityAdded(amountA, amountB, lpTokens); // We now set this to false so that future transactions can be eligibile for autoswaps _autoSwapInProgress = false; IERC20(uniswapV2Pair).transfer(lpOwner, lpTokens); } /** * @dev function {isLiquidityPool} * * Return if an address is a liquidity pool * * @param queryAddress_ The address being queried * @return bool The address is / isn't a liquidity pool */ function isLiquidityPool(address queryAddress_) public view returns (bool) { /** * @dev We check the uniswapV2Pair address first as this is an immutable variable and therefore does not need * to be fetched from storage, saving gas if this address IS the uniswapV2Pool. We also add this address * to the enumerated set for ease of reference (for example it is returned in the getter), and it does * not add gas to any other calls, that still complete in 0(1) time. */ return (queryAddress_ == uniswapV2Pair || _liquidityPools.contains(queryAddress_)); } /** * @dev function {liquidityPools} * * Returns a list of all liquidity pools * * @return liquidityPools_ a list of all liquidity pools */ function liquidityPools() external view returns (address[] memory liquidityPools_) { return (_liquidityPools.values()); } /** * @dev function {addLiquidityPool} onlyOwnerOrFactory * * Allows the manager to add a liquidity pool to the pool enumerable set * * @param newLiquidityPool_ The address of the new liquidity pool */ function addLiquidityPool(address newLiquidityPool_) public onlyOwnerOrFactory { // Don't allow calls that didn't pass an address: if (newLiquidityPool_ == address(0)) { revert LiquidityPoolCannotBeAddressZero(); } // Only allow smart contract addresses to be added, as only these can be pools: if (newLiquidityPool_.code.length == 0) { revert LiquidityPoolMustBeAContractAddress(); } // Add this to the enumerated list: _liquidityPools.add(newLiquidityPool_); emit LiquidityPoolAdded(newLiquidityPool_); } /** * @dev function {removeLiquidityPool} onlyOwnerOrFactory * * Allows the manager to remove a liquidity pool * * @param removedLiquidityPool_ The address of the old removed liquidity pool */ function removeLiquidityPool(address removedLiquidityPool_) external onlyOwnerOrFactory { // Remove this from the enumerated list: _liquidityPools.remove(removedLiquidityPool_); emit LiquidityPoolRemoved(removedLiquidityPool_); } /** * @dev function {setProjectTaxRecipient} onlyOwnerOrFactory * * Allows the manager to set the project tax recipient address * * @param projectTaxRecipient_ New recipient address */ function setProjectTaxRecipient(address projectTaxRecipient_) external onlyOwnerOrFactory { projectTaxRecipient = projectTaxRecipient_; emit ProjectTaxRecipientUpdated(projectTaxRecipient_); } /** * @dev function {setSwapThresholdBasisPoints} onlyOwnerOrFactory * * Allows the manager to set the autoswap threshold * * @param swapThresholdBasisPoints_ New swap threshold in basis points */ function setSwapThresholdBasisPoints(uint16 swapThresholdBasisPoints_) external onlyOwnerOrFactory { uint256 oldswapThresholdBasisPoints = swapThresholdBasisPoints; swapThresholdBasisPoints = swapThresholdBasisPoints_; emit AutoSwapThresholdUpdated(oldswapThresholdBasisPoints, swapThresholdBasisPoints_); } /** * @dev function {setProjectTaxRates} onlyOwnerOrFactory * * Change the tax rates, subject to only ever decreasing * * @param newProjectBuyTaxBasisPoints_ The new buy tax rate * @param newProjectSellTaxBasisPoints_ The new sell tax rate */ function setProjectTaxRates(uint16 newProjectBuyTaxBasisPoints_, uint16 newProjectSellTaxBasisPoints_) external onlyOwnerOrFactory { uint16 oldBuyTaxBasisPoints = projectBuyTaxBasisPoints; uint16 oldSellTaxBasisPoints = projectSellTaxBasisPoints; projectBuyTaxBasisPoints = newProjectBuyTaxBasisPoints_; projectSellTaxBasisPoints = newProjectSellTaxBasisPoints_; emit ProjectTaxBasisPointsChanged( oldBuyTaxBasisPoints, newProjectBuyTaxBasisPoints_, oldSellTaxBasisPoints, newProjectSellTaxBasisPoints_ ); } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override 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 default value returned by this function, unless * it's overridden. * * 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 override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev totalBuyTaxBasisPoints * * Provide easy to view tax total: */ function totalBuyTaxBasisPoints() public view returns (uint256) { return projectBuyTaxBasisPoints; } /** * @dev totalSellTaxBasisPoints * * Provide easy to view tax total: */ function totalSellTaxBasisPoints() public view returns (uint256) { return projectSellTaxBasisPoints; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override(IERC20) returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount, (isLiquidityPool(owner) || isLiquidityPool(to))); 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}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, 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}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount, (isLiquidityPool(from) || isLiquidityPool(to))); 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) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, 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) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); if (currentAllowance < subtractedValue) { revert AllowanceDecreasedBelowZero(); } unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `from` to `to`. * * This 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: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer(address from, address to, uint256 amount, bool applyTax) internal virtual { _beforeTokenTransfer(from, to, amount); // Perform pre-tax validation (e.g. amount doesn't exceed balance, max txn amount) uint256 fromBalance = _pretaxValidationAndLimits(from, to, amount); // Perform autoswap if eligible _autoSwap(from, to); // Process taxes uint256 amountMinusTax = _taxProcessing(applyTax, to, from, amount); _balances[from] = fromBalance - amount; _balances[to] += amountMinusTax; emit Transfer(from, to, amountMinusTax); _afterTokenTransfer(from, to, amount); } /** * @dev function {_pretaxValidationAndLimits} * * Perform validation on pre-tax amounts * * @param from_ From address for the transaction * @param to_ To address for the transaction * @param amount_ Amount of the transaction */ function _pretaxValidationAndLimits(address from_, address to_, uint256 amount_) internal view returns (uint256 fromBalance_) { // This can't be a transfer to the liquidity pool before the funding date // UNLESS the from address is this contract. This ensures that the initial // LP funding transaction is from this contract using the supply of tokens // designated for the LP pool, and therefore the initial price in the pool // is being set as expected. // // This protects from, for example, tokens from a team minted supply being // paired with ETH and added to the pool, setting the initial price, BEFORE // the initial liquidity is added through this contract. if (to_ == uniswapV2Pair && from_ != address(this) && fundedDate == 0) { revert InitialLiquidityNotYetAdded(); } if (from_ == address(0)) { revert TransferFromZeroAddress(); } if (to_ == address(0)) { revert TransferToZeroAddress(); } fromBalance_ = _balances[from_]; if (fromBalance_ < amount_) { revert TransferAmountExceedsBalance(); } return (fromBalance_); } /** * @dev function {_taxProcessing} * * Perform tax processing * * @param applyTax_ Do we apply tax to this transaction? * @param to_ The reciever of the token * @param from_ The sender of the token * @param sentAmount_ The amount being send * @return amountLessTax_ The amount that will be recieved, i.e. the send amount minus tax */ function _taxProcessing(bool applyTax_, address to_, address from_, uint256 sentAmount_) internal returns (uint256 amountLessTax_) { amountLessTax_ = sentAmount_; unchecked { if (_tokenHasTax && applyTax_ && !_autoSwapInProgress) { uint256 tax; // on sell if (isLiquidityPool(to_) && totalSellTaxBasisPoints() > 0) { if (projectSellTaxBasisPoints > 0) { uint256 projectTax = ((sentAmount_ * projectSellTaxBasisPoints) / BP_DENOM); projectTaxPendingSwap += uint128(projectTax); tax += projectTax; } } // on buy else if (isLiquidityPool(from_) && totalBuyTaxBasisPoints() > 0) { if (projectBuyTaxBasisPoints > 0) { uint256 projectTax = ((sentAmount_ * projectBuyTaxBasisPoints) / BP_DENOM); projectTaxPendingSwap += uint128(projectTax); tax += projectTax; } } if (tax > 0) { _balances[address(this)] += tax; emit Transfer(from_, address(this), tax); amountLessTax_ -= tax; } } } return (amountLessTax_); } /** * @dev function {_autoSwap} * * Automate the swap of accumulated tax fees to native token * * @param from_ The sender of the token * @param to_ The recipient of the token */ function _autoSwap(address from_, address to_) internal { if (_tokenHasTax) { uint256 contractBalance = balanceOf(address(this)); uint256 swapBalance = contractBalance; uint256 swapThresholdInTokens = (_totalSupply * swapThresholdBasisPoints) / BP_DENOM; if (_eligibleForSwap(from_, to_, swapBalance, swapThresholdInTokens)) { // Store that a swap back is in progress: _autoSwapInProgress = true; // Check if we need to reduce the amount of tokens for this swap: if (swapBalance > swapThresholdInTokens * MAX_SWAP_THRESHOLD_MULTIPLE) { swapBalance = swapThresholdInTokens * MAX_SWAP_THRESHOLD_MULTIPLE; } // Perform the auto swap to pair token _swapTax(swapBalance, contractBalance); // Flag that the autoswap is complete: _autoSwapInProgress = false; } } } /** * @dev function {_eligibleForSwap} * * Is the current transfer eligible for autoswap * * @param from_ The sender of the token * @param to_ The recipient of the token * @param taxBalance_ The current accumulated tax balance * @param swapThresholdInTokens_ The swap threshold as a token amount */ function _eligibleForSwap(address from_, address to_, uint256 taxBalance_, uint256 swapThresholdInTokens_) internal view returns (bool) { return ( taxBalance_ >= swapThresholdInTokens_ && !_autoSwapInProgress && !isLiquidityPool(from_) && from_ != address(_uniswapRouter) && to_ != address(_uniswapRouter) ); } /** * @dev function {_swapTax} * * Swap tokens taken as tax for pair token * * @param swapBalance_ The current accumulated tax balance to swap * @param contractBalance_ The current accumulated total tax balance */ function _swapTax(uint256 swapBalance_, uint256 contractBalance_) internal { address[] memory path = new address[](2); path[0] = address(this); path[1] = pairToken; // Wrap external calls in try / catch to handle errors try _uniswapRouter.swapExactTokensForTokensSupportingFeeOnTransferTokens( swapBalance_, 0, path, projectTaxRecipient, block.timestamp + 600 ) { // We will not have swapped all tax tokens IF the amount was greater than the max auto swap. // We therefore cannot just set the pending swap counters to 0. Instead, in this scenario, // we must reduce them in proportion to the swap amount vs the remaining balance + swap // amount. // // For example: // * swap Balance is 250 // * contract balance is 385. // * projectTaxPendingSwap is 300 // // The new total for the projectTaxPendingSwap is: // = 300 - ((300 * 250) / 385) // = 300 - 194 // = 106 if (swapBalance_ < contractBalance_) { projectTaxPendingSwap -= uint128((projectTaxPendingSwap * swapBalance_) / contractBalance_); } else { projectTaxPendingSwap = 0; } } catch { // Dont allow a failed external call (in this case to uniswap) to stop a transfer. // Emit that this has occured and continue. emit ExternalCallError(5); } } /** * @dev distributeTaxTokens * * Allows the distribution of tax tokens to the designated recipient(s) * * As part of standard processing the tax token balance being above the threshold * will trigger an autoswap to ETH and distribution of this ETH to the designated * recipients. This is automatic and there is no need for user involvement. * * As part of this swap there are a number of calculations performed, particularly * if the tax balance is above MAX_SWAP_THRESHOLD_MULTIPLE. * * Testing indicates that these calculations are safe. But given the data / code * interactions it remains possible that some edge case set of scenarios may cause * an issue with these calculations. * * This method is therefore provided as a 'fallback' option to safely distribute * accumulated taxes from the contract, with a direct transfer of the ERC20 tokens * themselves. */ function distributeTaxTokens() external { if (projectTaxPendingSwap > 0) { uint256 projectDistribution = projectTaxPendingSwap; projectTaxPendingSwap = 0; _transfer(address(this), projectTaxRecipient, projectDistribution, false); } } /** * @dev function {withdrawETH} onlyOwnerOrFactory * * A withdraw function to allow ETH to be withdrawn by the manager * * This contract should never hold ETH. The only envisaged scenario where * it might hold ETH is a failed autoswap where the uniswap swap has completed, * the recipient of ETH reverts, the contract then wraps to WETH and the * wrap to WETH fails. * * This feels unlikely. But, for safety, we include this method. * * @param amount_ The amount to withdraw */ function withdrawETH(uint256 amount_) external onlyOwnerOrFactory { (bool success,) = _msgSender().call{value: amount_}(""); if (!success) { revert TransferFailed(); } } /** * @dev function {withdrawERC20} onlyOwnerOrFactory * * A withdraw function to allow ERC20s (except address(this)) to be withdrawn. * * This contract should never hold ERC20s other than tax tokens. The only envisaged * scenario where it might hold an ERC20 is a failed autoswap where the uniswap swap * has completed, the recipient of ETH reverts, the contract then wraps to WETH, the * wrap to WETH succeeds, BUT then the transfer of WETH fails. * * This feels even less likely than the scenario where ETH is held on the contract. * But, for safety, we include this method. * * @param token_ The ERC20 contract * @param amount_ The amount to withdraw */ function withdrawERC20(address token_, uint256 amount_) external onlyOwnerOrFactory { if (token_ == address(this)) { revert CannotWithdrawThisToken(); } IERC20(token_).safeTransfer(_msgSender(), 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: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { if (account == address(0)) { revert MintToZeroAddress(); } _beforeTokenTransfer(address(0), account, amount); _totalSupply += uint128(amount); unchecked { // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above. _balances[account] += amount; } emit Transfer(address(0), account, amount); _afterTokenTransfer(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 { if (account == address(0)) { revert BurnFromTheZeroAddress(); } _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; if (accountBalance < amount) { revert BurnExceedsBalance(); } unchecked { _balances[account] = accountBalance - amount; // Overflow not possible: amount <= accountBalance <= totalSupply. _totalSupply -= uint128(amount); } emit Transfer(account, address(0), amount); _afterTokenTransfer(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 { if (owner == address(0)) { revert ApproveFromTheZeroAddress(); } if (spender == address(0)) { revert ApproveToTheZeroAddress(); } _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { if (currentAllowance < amount) { revert InsufficientAllowance(); } unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Destroys a `value` amount of tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 value) public virtual { _burn(_msgSender(), value); } /** * @dev Destroys a `value` amount of tokens from `account`, deducting from * the caller's allowance. * * See {ERC20-_burn} and {ERC20-allowance}. * * Requirements: * * - the caller must have allowance for ``accounts``'s tokens of at least * `value`. */ function burnFrom(address account, uint256 value) public virtual { _spendAllowance(account, _msgSender(), value); _burn(account, value); } /** * @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 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 {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been 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 _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {} receive() external payable {} }
// SPDX-License-Identifier: MIT pragma solidity >=0.4.22 <0.9.0; library console { address constant CONSOLE_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67; function _sendLogPayloadImplementation(bytes memory payload) internal view { address consoleAddress = CONSOLE_ADDRESS; /// @solidity memory-safe-assembly assembly { pop( staticcall( gas(), consoleAddress, add(payload, 32), mload(payload), 0, 0 ) ) } } function _castToPure( function(bytes memory) internal view fnIn ) internal pure returns (function(bytes memory) pure fnOut) { assembly { fnOut := fnIn } } function _sendLogPayload(bytes memory payload) internal pure { _castToPure(_sendLogPayloadImplementation)(payload); } function log() internal pure { _sendLogPayload(abi.encodeWithSignature("log()")); } function logInt(int256 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(int256)", p0)); } function logUint(uint256 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256)", p0)); } function logString(string memory p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); } function logBool(bool p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); } function logAddress(address p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address)", p0)); } function logBytes(bytes memory p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes)", p0)); } function logBytes1(bytes1 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes1)", p0)); } function logBytes2(bytes2 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes2)", p0)); } function logBytes3(bytes3 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes3)", p0)); } function logBytes4(bytes4 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes4)", p0)); } function logBytes5(bytes5 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes5)", p0)); } function logBytes6(bytes6 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes6)", p0)); } function logBytes7(bytes7 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes7)", p0)); } function logBytes8(bytes8 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes8)", p0)); } function logBytes9(bytes9 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes9)", p0)); } function logBytes10(bytes10 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes10)", p0)); } function logBytes11(bytes11 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes11)", p0)); } function logBytes12(bytes12 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes12)", p0)); } function logBytes13(bytes13 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes13)", p0)); } function logBytes14(bytes14 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes14)", p0)); } function logBytes15(bytes15 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes15)", p0)); } function logBytes16(bytes16 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes16)", p0)); } function logBytes17(bytes17 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes17)", p0)); } function logBytes18(bytes18 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes18)", p0)); } function logBytes19(bytes19 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes19)", p0)); } function logBytes20(bytes20 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes20)", p0)); } function logBytes21(bytes21 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes21)", p0)); } function logBytes22(bytes22 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes22)", p0)); } function logBytes23(bytes23 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes23)", p0)); } function logBytes24(bytes24 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes24)", p0)); } function logBytes25(bytes25 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes25)", p0)); } function logBytes26(bytes26 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes26)", p0)); } function logBytes27(bytes27 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes27)", p0)); } function logBytes28(bytes28 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes28)", p0)); } function logBytes29(bytes29 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes29)", p0)); } function logBytes30(bytes30 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes30)", p0)); } function logBytes31(bytes31 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes31)", p0)); } function logBytes32(bytes32 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bytes32)", p0)); } function log(uint256 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256)", p0)); } function log(int256 p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(int256)", p0)); } function log(string memory p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); } function log(bool p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); } function log(address p0) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address)", p0)); } function log(uint256 p0, uint256 p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256)", p0, p1)); } function log(uint256 p0, string memory p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string)", p0, p1)); } function log(uint256 p0, bool p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool)", p0, p1)); } function log(uint256 p0, address p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address)", p0, p1)); } function log(string memory p0, uint256 p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256)", p0, p1)); } function log(string memory p0, int256 p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,int256)", p0, p1)); } function log(string memory p0, string memory p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1)); } function log(string memory p0, bool p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool)", p0, p1)); } function log(string memory p0, address p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address)", p0, p1)); } function log(bool p0, uint256 p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256)", p0, p1)); } function log(bool p0, string memory p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string)", p0, p1)); } function log(bool p0, bool p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool)", p0, p1)); } function log(bool p0, address p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address)", p0, p1)); } function log(address p0, uint256 p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256)", p0, p1)); } function log(address p0, string memory p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string)", p0, p1)); } function log(address p0, bool p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool)", p0, p1)); } function log(address p0, address p1) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address)", p0, p1)); } function log(uint256 p0, uint256 p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256)", p0, p1, p2)); } function log(uint256 p0, uint256 p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string)", p0, p1, p2)); } function log(uint256 p0, uint256 p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool)", p0, p1, p2)); } function log(uint256 p0, uint256 p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address)", p0, p1, p2)); } function log(uint256 p0, string memory p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256)", p0, p1, p2)); } function log(uint256 p0, string memory p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string)", p0, p1, p2)); } function log(uint256 p0, string memory p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool)", p0, p1, p2)); } function log(uint256 p0, string memory p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address)", p0, p1, p2)); } function log(uint256 p0, bool p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256)", p0, p1, p2)); } function log(uint256 p0, bool p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string)", p0, p1, p2)); } function log(uint256 p0, bool p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool)", p0, p1, p2)); } function log(uint256 p0, bool p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address)", p0, p1, p2)); } function log(uint256 p0, address p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256)", p0, p1, p2)); } function log(uint256 p0, address p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string)", p0, p1, p2)); } function log(uint256 p0, address p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool)", p0, p1, p2)); } function log(uint256 p0, address p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address)", p0, p1, p2)); } function log(string memory p0, uint256 p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256)", p0, p1, p2)); } function log(string memory p0, uint256 p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string)", p0, p1, p2)); } function log(string memory p0, uint256 p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool)", p0, p1, p2)); } function log(string memory p0, uint256 p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address)", p0, p1, p2)); } function log(string memory p0, string memory p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256)", p0, p1, p2)); } function log(string memory p0, string memory p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,string)", p0, p1, p2)); } function log(string memory p0, string memory p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool)", p0, p1, p2)); } function log(string memory p0, string memory p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,address)", p0, p1, p2)); } function log(string memory p0, bool p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256)", p0, p1, p2)); } function log(string memory p0, bool p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string)", p0, p1, p2)); } function log(string memory p0, bool p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool)", p0, p1, p2)); } function log(string memory p0, bool p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address)", p0, p1, p2)); } function log(string memory p0, address p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256)", p0, p1, p2)); } function log(string memory p0, address p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,string)", p0, p1, p2)); } function log(string memory p0, address p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool)", p0, p1, p2)); } function log(string memory p0, address p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,address)", p0, p1, p2)); } function log(bool p0, uint256 p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256)", p0, p1, p2)); } function log(bool p0, uint256 p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string)", p0, p1, p2)); } function log(bool p0, uint256 p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool)", p0, p1, p2)); } function log(bool p0, uint256 p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address)", p0, p1, p2)); } function log(bool p0, string memory p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256)", p0, p1, p2)); } function log(bool p0, string memory p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string)", p0, p1, p2)); } function log(bool p0, string memory p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool)", p0, p1, p2)); } function log(bool p0, string memory p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address)", p0, p1, p2)); } function log(bool p0, bool p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256)", p0, p1, p2)); } function log(bool p0, bool p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string)", p0, p1, p2)); } function log(bool p0, bool p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool)", p0, p1, p2)); } function log(bool p0, bool p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address)", p0, p1, p2)); } function log(bool p0, address p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256)", p0, p1, p2)); } function log(bool p0, address p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string)", p0, p1, p2)); } function log(bool p0, address p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool)", p0, p1, p2)); } function log(bool p0, address p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address)", p0, p1, p2)); } function log(address p0, uint256 p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256)", p0, p1, p2)); } function log(address p0, uint256 p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string)", p0, p1, p2)); } function log(address p0, uint256 p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool)", p0, p1, p2)); } function log(address p0, uint256 p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address)", p0, p1, p2)); } function log(address p0, string memory p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256)", p0, p1, p2)); } function log(address p0, string memory p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,string)", p0, p1, p2)); } function log(address p0, string memory p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool)", p0, p1, p2)); } function log(address p0, string memory p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,address)", p0, p1, p2)); } function log(address p0, bool p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256)", p0, p1, p2)); } function log(address p0, bool p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string)", p0, p1, p2)); } function log(address p0, bool p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool)", p0, p1, p2)); } function log(address p0, bool p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address)", p0, p1, p2)); } function log(address p0, address p1, uint256 p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256)", p0, p1, p2)); } function log(address p0, address p1, string memory p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,string)", p0, p1, p2)); } function log(address p0, address p1, bool p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool)", p0, p1, p2)); } function log(address p0, address p1, address p2) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,address)", p0, p1, p2)); } function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,string)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,bool)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,address)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,string)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,bool)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,address)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,string)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,bool)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,address)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,string)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,bool)", p0, p1, p2, p3)); } function log(uint256 p0, uint256 p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,address)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,string)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,bool)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,address)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,string)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,bool)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,address)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,string)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,bool)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,address)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,string)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,bool)", p0, p1, p2, p3)); } function log(uint256 p0, string memory p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,address)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,string)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,bool)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,address)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,string)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,bool)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,address)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,string)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,bool)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,address)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,string)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,bool)", p0, p1, p2, p3)); } function log(uint256 p0, bool p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,address)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,string)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,bool)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,address)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,string)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,bool)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,address)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,string)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,bool)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,address)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,uint256)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,string)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,bool)", p0, p1, p2, p3)); } function log(uint256 p0, address p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,address)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,uint256)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,string)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,address)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,uint256)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,string)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,address)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,uint256)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,uint256)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,string)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint256 p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,uint256)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,uint256)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,uint256)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,uint256)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,uint256)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,uint256)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,uint256)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,uint256)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,uint256)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,uint256)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,uint256)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,uint256)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,address)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,uint256)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,string)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,bool)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,address)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,uint256)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,string)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,bool)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,address)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,uint256)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,string)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,address)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,uint256)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,string)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,bool)", p0, p1, p2, p3)); } function log(bool p0, uint256 p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,uint256)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,uint256)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,uint256)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,uint256)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,uint256)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,uint256)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,uint256)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,uint256)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,uint256)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,uint256)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,uint256)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,uint256)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,address)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,uint256)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,string)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,bool)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,address)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,uint256)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,string)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,bool)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,address)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,uint256)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,string)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,bool)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,address)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,uint256)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,string)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,bool)", p0, p1, p2, p3)); } function log(address p0, uint256 p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,uint256)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,uint256)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,uint256)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,uint256)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,uint256)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,uint256)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,uint256)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,uint256)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,address)", p0, p1, p2, p3)); } function log(address p0, address p1, uint256 p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,uint256)", p0, p1, p2, p3)); } function log(address p0, address p1, uint256 p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,string)", p0, p1, p2, p3)); } function log(address p0, address p1, uint256 p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, uint256 p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,address)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,uint256)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,string)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,address)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,uint256)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,string)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,address)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, uint256 p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,uint256)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, string memory p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,string)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, bool p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, address p3) internal pure { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,address)", p0, p1, p2, p3)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.20; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ```solidity * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Storage of the initializable contract. * * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions * when using with upgradeable contracts. * * @custom:storage-location erc7201:openzeppelin.storage.Initializable */ struct InitializableStorage { /** * @dev Indicates that the contract has been initialized. */ uint64 _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool _initializing; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00; /** * @dev The contract is already initialized. */ error InvalidInitialization(); /** * @dev The contract is not initializing. */ error NotInitializing(); /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint64 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in * production. * * Emits an {Initialized} event. */ modifier initializer() { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); // Cache values to avoid duplicated sloads bool isTopLevelCall = !$._initializing; uint64 initialized = $._initialized; // Allowed calls: // - initialSetup: the contract is not in the initializing state and no previous version was // initialized // - construction: the contract is initialized at version 1 (no reininitialization) and the // current contract is just being deployed bool initialSetup = initialized == 0 && isTopLevelCall; bool construction = initialized == 1 && address(this).code.length == 0; if (!initialSetup && !construction) { revert InvalidInitialization(); } $._initialized = 1; if (isTopLevelCall) { $._initializing = true; } _; if (isTopLevelCall) { $._initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint64 version) { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing || $._initialized >= version) { revert InvalidInitialization(); } $._initialized = version; $._initializing = true; _; $._initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { _checkInitializing(); _; } /** * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}. */ function _checkInitializing() internal view virtual { if (!_isInitializing()) { revert NotInitializing(); } } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing) { revert InvalidInitialization(); } if ($._initialized != type(uint64).max) { $._initialized = type(uint64).max; emit Initialized(type(uint64).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint64) { return _getInitializableStorage()._initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _getInitializableStorage()._initializing; } /** * @dev Returns a pointer to the storage namespace. */ // solhint-disable-next-line var-name-mixedcase function _getInitializableStorage() private pure returns (InitializableStorage storage $) { assembly { $.slot := INITIALIZABLE_STORAGE } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable2Step.sol) pragma solidity ^0.8.20; import {OwnableUpgradeable} from "./OwnableUpgradeable.sol"; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is specified at deployment time in the constructor for `Ownable`. This * can later be changed with {transferOwnership} and {acceptOwnership}. * * This module is used through inheritance. It will make available all functions * from parent (Ownable). */ abstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable { /// @custom:storage-location erc7201:openzeppelin.storage.Ownable2Step struct Ownable2StepStorage { address _pendingOwner; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Ownable2Step")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant Ownable2StepStorageLocation = 0x237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00; function _getOwnable2StepStorage() private pure returns (Ownable2StepStorage storage $) { assembly { $.slot := Ownable2StepStorageLocation } } event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner); function __Ownable2Step_init() internal onlyInitializing { } function __Ownable2Step_init_unchained() internal onlyInitializing { } /** * @dev Returns the address of the pending owner. */ function pendingOwner() public view virtual returns (address) { Ownable2StepStorage storage $ = _getOwnable2StepStorage(); return $._pendingOwner; } /** * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual override onlyOwner { Ownable2StepStorage storage $ = _getOwnable2StepStorage(); $._pendingOwner = newOwner; emit OwnershipTransferStarted(owner(), newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner. * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual override { Ownable2StepStorage storage $ = _getOwnable2StepStorage(); delete $._pendingOwner; super._transferOwnership(newOwner); } /** * @dev The new owner accepts the ownership transfer. */ function acceptOwnership() public virtual { address sender = _msgSender(); if (pendingOwner() != sender) { revert OwnableUnauthorizedAccount(sender); } _transferOwnership(sender); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.20; /** * @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. * * ```solidity * 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. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure * unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an * array of EnumerableSet. * ==== */ 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 is the index of the value in the `values` array plus 1. // Position 0 is used to mean a value is not in the set. mapping(bytes32 value => uint256) _positions; } /** * @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._positions[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 cache the value's position to prevent multiple reads from the same storage slot uint256 position = set._positions[value]; if (position != 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 valueIndex = position - 1; uint256 lastIndex = set._values.length - 1; if (valueIndex != lastIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the lastValue to the index where the value to delete is set._values[valueIndex] = lastValue; // Update the tracked position of the lastValue (that was just moved) set._positions[lastValue] = position; } // Delete the slot where the moved value was stored set._values.pop(); // Delete the tracked position for the deleted slot delete set._positions[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._positions[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) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // 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; /// @solidity memory-safe-assembly 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 in 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; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; import {IERC20Permit} from "../extensions/IERC20Permit.sol"; import {Address} from "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; /** * @dev An operation with an ERC20 token failed. */ error SafeERC20FailedOperation(address token); /** * @dev Indicates a failed `decreaseAllowance` request. */ error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease); /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value))); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value))); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); forceApprove(token, spender, oldAllowance + value); } /** * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no * value, non-reverting calls are assumed to be successful. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal { unchecked { uint256 currentAllowance = token.allowance(address(this), spender); if (currentAllowance < requestedDecrease) { revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease); } forceApprove(token, spender, currentAllowance - requestedDecrease); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value)); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0))); _callOptionalReturn(token, approvalCall); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data); if (returndata.length != 0 && !abi.decode(returndata, (bool))) { revert SafeERC20FailedOperation(address(token)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0; } }
pragma solidity >=0.6.2; import "./IUniswapV2Router01.sol"; interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external returns (uint256 amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; }
pragma solidity >=0.5.0; interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint256); 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(uint256) external view returns (address pair); function allPairsLength() external view returns (uint256); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./IERC20Config.sol"; import "./IErrors.sol"; interface IAgentToken is IERC20, IERC20Config, IERC20Metadata, IErrors { event AutoSwapThresholdUpdated(uint256 oldThreshold, uint256 newThreshold); event ExternalCallError(uint256 identifier); event InitialLiquidityAdded(uint256 tokenA, uint256 tokenB, uint256 lpToken); event LiquidityPoolCreated(address addedPool); event LiquidityPoolAdded(address addedPool); event LiquidityPoolRemoved(address removedPool); event ProjectTaxBasisPointsChanged( uint256 oldBuyBasisPoints, uint256 newBuyBasisPoints, uint256 oldSellBasisPoints, uint256 newSellBasisPoints ); event RevenueAutoSwap(); event ProjectTaxRecipientUpdated(address treasury); /** * @dev function {addInitialLiquidity} * * Add initial liquidity to the uniswap pair * * @param lpOwner The recipient of LP tokens */ function addInitialLiquidity(address lpOwner) external; /** * @dev function {isLiquidityPool} * * Return if an address is a liquidity pool * * @param queryAddress_ The address being queried * @return bool The address is / isn't a liquidity pool */ function isLiquidityPool(address queryAddress_) external view returns (bool); /** * @dev function {liquidityPools} * * Returns a list of all liquidity pools * * @return liquidityPools_ a list of all liquidity pools */ function liquidityPools() external view returns (address[] memory liquidityPools_); /** * @dev function {addLiquidityPool} onlyOwner * * Allows the manager to add a liquidity pool to the pool enumerable set * * @param newLiquidityPool_ The address of the new liquidity pool */ function addLiquidityPool(address newLiquidityPool_) external; /** * @dev function {removeLiquidityPool} onlyOwner * * Allows the manager to remove a liquidity pool * * @param removedLiquidityPool_ The address of the old removed liquidity pool */ function removeLiquidityPool(address removedLiquidityPool_) external; /** * @dev function {setProjectTaxRecipient} onlyOwner * * Allows the manager to set the project tax recipient address * * @param projectTaxRecipient_ New recipient address */ function setProjectTaxRecipient(address projectTaxRecipient_) external; /** * @dev function {setSwapThresholdBasisPoints} onlyOwner * * Allows the manager to set the autoswap threshold * * @param swapThresholdBasisPoints_ New swap threshold in basis points */ function setSwapThresholdBasisPoints(uint16 swapThresholdBasisPoints_) external; /** * @dev function {setProjectTaxRates} onlyOwner * * Change the tax rates, subject to only ever decreasing * * @param newProjectBuyTaxBasisPoints_ The new buy tax rate * @param newProjectSellTaxBasisPoints_ The new sell tax rate */ function setProjectTaxRates(uint16 newProjectBuyTaxBasisPoints_, uint16 newProjectSellTaxBasisPoints_) external; /** * @dev totalBuyTaxBasisPoints * * Provide easy to view tax total: */ function totalBuyTaxBasisPoints() external view returns (uint256); /** * @dev totalSellTaxBasisPoints * * Provide easy to view tax total: */ function totalSellTaxBasisPoints() external view returns (uint256); /** * @dev distributeTaxTokens * * Allows the distribution of tax tokens to the designated recipient(s) * * As part of standard processing the tax token balance being above the threshold * will trigger an autoswap to ETH and distribution of this ETH to the designated * recipients. This is automatic and there is no need for user involvement. * * As part of this swap there are a number of calculations performed, particularly * if the tax balance is above MAX_SWAP_THRESHOLD_MULTIPLE. * * Testing indicates that these calculations are safe. But given the data / code * interactions it remains possible that some edge case set of scenarios may cause * an issue with these calculations. * * This method is therefore provided as a 'fallback' option to safely distribute * accumulated taxes from the contract, with a direct transfer of the ERC20 tokens * themselves. */ function distributeTaxTokens() external; /** * @dev function {withdrawETH} onlyOwner * * A withdraw function to allow ETH to be withdrawn by the manager * * This contract should never hold ETH. The only envisaged scenario where * it might hold ETH is a failed autoswap where the uniswap swap has completed, * the recipient of ETH reverts, the contract then wraps to WETH and the * wrap to WETH fails. * * This feels unlikely. But, for safety, we include this method. * * @param amount_ The amount to withdraw */ function withdrawETH(uint256 amount_) external; /** * @dev function {withdrawERC20} onlyOwner * * A withdraw function to allow ERC20s (except address(this)) to be withdrawn. * * This contract should never hold ERC20s other than tax tokens. The only envisaged * scenario where it might hold an ERC20 is a failed autoswap where the uniswap swap * has completed, the recipient of ETH reverts, the contract then wraps to WETH, the * wrap to WETH succeeds, BUT then the transfer of WETH fails. * * This feels even less likely than the scenario where ETH is held on the contract. * But, for safety, we include this method. * * @param token_ The ERC20 contract * @param amount_ The amount to withdraw */ function withdrawERC20(address token_, uint256 amount_) external; /** * @dev Destroys a `value` amount of tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 value) external; /** * @dev Destroys a `value` amount of tokens from `account`, deducting from * the caller's allowance. * * See {ERC20-_burn} and {ERC20-allowance}. * * Requirements: * * - the caller must have allowance for ``accounts``'s tokens of at least * `value`. */ function burnFrom(address account, uint256 value) external; /** * @dev {initializer} * * @param integrationAddresses_ The project owner, uniswap router, LP currency * @param baseParams_ configuration of this ERC20. * param supplyParams_ Supply configuration of this ERC20. * param taxParams_ Tax configuration of this ERC20 * param taxParams_ Launch pool configuration of this ERC20 * param lpSupply_ Initial supply to be minted for LP */ function initialize( address[3] memory integrationAddresses_, bytes memory baseParams_, bytes memory supplyParams_, bytes memory taxParams_ ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; interface IAgentFactory { function proposeAgent(string memory name, string memory symbol, string memory tokenURI) external returns (uint256); function withdraw(uint256 id) external; function totalAgents() external view returns (uint256); function initFromBondingCurve( string memory name, string memory symbol, address creator, uint256 applicationThreshold_ ) external returns (uint256); function executeBondingCurveApplication(uint256 id, uint256 totalSupply, uint256 lpSupply, address vault) external returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol"; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. 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 OwnableUpgradeable is Initializable, ContextUpgradeable { /// @custom:storage-location erc7201:openzeppelin.storage.Ownable struct OwnableStorage { address _owner; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Ownable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300; function _getOwnableStorage() private pure returns (OwnableStorage storage $) { assembly { $.slot := OwnableStorageLocation } } /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ function __Ownable_init(address initialOwner) internal onlyInitializing { __Ownable_init_unchained(initialOwner); } function __Ownable_init_unchained(address initialOwner) internal onlyInitializing { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { OwnableStorage storage $ = _getOwnableStorage(); return $._owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { OwnableStorage storage $ = _getOwnableStorage(); address oldOwner = $._owner; $._owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) 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 a `value` amount of tokens 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 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. * * ==== Security Considerations * * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be * considered as an intention to spend the allowance in any specific way. The second is that because permits have * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be * generally recommended is: * * ```solidity * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} * doThing(..., value); * } * * function doThing(..., uint256 value) public { * token.safeTransferFrom(msg.sender, address(this), value); * ... * } * ``` * * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also * {SafeERC20-safeTransferFrom}). * * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so * contracts should have entry points that don't rely on permit. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. * * CAUTION: See Security Considerations above. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol) pragma solidity ^0.8.20; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev The ETH balance of the account is not enough to perform the operation. */ error AddressInsufficientBalance(address account); /** * @dev There's no code at `target` (it is not a contract). */ error AddressEmptyCode(address target); /** * @dev A call to an address target failed. The target may have reverted. */ error FailedInnerCall(); /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { if (address(this).balance < amount) { revert AddressInsufficientBalance(address(this)); } (bool success, ) = recipient.call{value: amount}(""); if (!success) { revert FailedInnerCall(); } } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason or custom error, it is bubbled * up by this function (like regular Solidity function calls). However, if * the call reverted with no returned reason, this function reverts with a * {FailedInnerCall} error. * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { if (address(this).balance < value) { revert AddressInsufficientBalance(address(this)); } (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an * unsuccessful call. */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata ) internal view returns (bytes memory) { if (!success) { _revert(returndata); } else { // only check if target is a contract if the call was successful and the return data is empty // otherwise we already know that it was a contract if (returndata.length == 0 && target.code.length == 0) { revert AddressEmptyCode(target); } return returndata; } } /** * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the * revert reason or with a default {FailedInnerCall} error. */ function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) { if (!success) { _revert(returndata); } else { return returndata; } } /** * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}. */ function _revert(bytes memory returndata) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert FailedInnerCall(); } } }
pragma solidity >=0.6.2; interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns (uint256 amountA, uint256 amountB, uint256 liquidity); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity); function removeLiquidity( address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns (uint256 amountA, uint256 amountB); function removeLiquidityETH( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external returns (uint256 amountToken, uint256 amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountA, uint256 amountB); function removeLiquidityETHWithPermit( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountToken, uint256 amountETH); function swapExactTokensForTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapTokensForExactTokens( uint256 amountOut, uint256 amountInMax, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapExactETHForTokens(uint256 amountOutMin, address[] calldata path, address to, uint256 deadline) external payable returns (uint256[] memory amounts); function swapTokensForExactETH( uint256 amountOut, uint256 amountInMax, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapExactTokensForETH( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapETHForExactTokens(uint256 amountOut, address[] calldata path, address to, uint256 deadline) external payable returns (uint256[] memory amounts); function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pure returns (uint256 amountB); function getAmountOut(uint256 amountIn, uint256 reserveIn, uint256 reserveOut) external pure returns (uint256 amountOut); function getAmountIn(uint256 amountOut, uint256 reserveIn, uint256 reserveOut) external pure returns (uint256 amountIn); function getAmountsOut(uint256 amountIn, address[] calldata path) external view returns (uint256[] memory amounts); function getAmountsIn(uint256 amountOut, address[] calldata path) external view returns (uint256[] memory amounts); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; interface IERC20Config { struct ERC20Config { bytes baseParameters; bytes supplyParameters; bytes taxParameters; bytes poolParameters; } struct ERC20BaseParameters { string name; string symbol; } struct ERC20SupplyParameters { uint256 maxSupply; uint256 lpSupply; uint256 vaultSupply; address vault; } struct ERC20TaxParameters { uint256 projectBuyTaxBasisPoints; uint256 projectSellTaxBasisPoints; uint256 taxSwapThresholdBasisPoints; address projectTaxRecipient; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; interface IErrors { enum BondingCurveErrorType { OK, // No error INVALID_NUMITEMS, // The numItem value is 0 SPOT_PRICE_OVERFLOW // The updated spot price doesn't fit into 128 bits } error AdapterParamsMustBeEmpty(); // The adapter parameters on this LZ call must be empty. error AdditionToPoolIsBelowPerTransactionMinimum(); // The contribution amount is less than the minimum. error AdditionToPoolWouldExceedPoolCap(); // This addition to the pool would exceed the pool cap. error AdditionToPoolWouldExceedPerAddressCap(); // This addition to the pool would exceed the per address cap. error AddressAlreadySet(); // The address being set can only be set once, and is already non-0. error AllowanceDecreasedBelowZero(); // You cannot decrease the allowance below zero. error AlreadyInitialised(); // The contract is already initialised: it cannot be initialised twice! error ApprovalCallerNotOwnerNorApproved(); // The caller must own the token or be an approved operator. error ApproveFromTheZeroAddress(); // Approval cannot be called from the zero address (indeed, how have you??). error ApproveToTheZeroAddress(); // Approval cannot be given to the zero address. error ApprovalQueryForNonexistentToken(); // The token does not exist. error AuctionStatusIsNotEnded(); // Throw if the action required the auction to be closed, and it isn't. error AuctionStatusIsNotOpen(); // Throw if the action requires the auction to be open, and it isn't. error AuxCallFailed(address[] modules, uint256 value, bytes data, uint256 txGas); // An auxilliary call from the drop factory failed. error BalanceMismatch(); // An error when comparing balance amounts. error BalanceQueryForZeroAddress(); // Cannot query the balance for the zero address. error BidMustBeBelowTheFloorWhenReducingQuantity(); // Only bids that are below the floor can reduce the quantity of the bid. error BidMustBeBelowTheFloorForRefundDuringAuction(); // Only bids that are below the floor can be refunded during the auction. error BondingCurveError(BondingCurveErrorType error); // An error of the type specified has occured in bonding curve processing. error BurnExceedsBalance(); // The amount you have selected to burn exceeds the addresses balance. error BurnFromTheZeroAddress(); // Tokens cannot be burned from the zero address. (Also, how have you called this!?!) error CallerIsNotDepositBoxOwner(); // The caller is not the owner of the deposit box. error CallerIsNotFactory(); // The caller of this function must match the factory address in storage. error CallerIsNotFactoryOrProjectOwner(); // The caller of this function must match the factory address OR project owner address. error CallerIsNotFactoryProjectOwnerOrPool(); // The caller of this function must match the factory address, project owner or pool address. error CallerIsNotTheOwner(); // The caller is not the owner of this contract. error CallerIsNotTheManager(); // The caller is not the manager of this contract. error CallerMustBeLzApp(); // The caller must be an LZ application. error CallerIsNotPlatformAdmin(address caller); // The caller of this function must be part of the platformAdmin group. error CallerIsNotSuperAdmin(address caller); // The caller of this function must match the superAdmin address in storage. error CannotAddLiquidityOnCreateAndUseDRIPool(); // Cannot use both liquidity added on create and a DRIPool in the same token. error CannotSetNewOwnerToTheZeroAddress(); // You can't set the owner of this contract to the zero address (address(0)). error CannotSetToZeroAddress(); // The corresponding address cannot be set to the zero address (address(0)). error CannotSetNewManagerToTheZeroAddress(); // Cannot transfer the manager to the zero address (address(0)). error CannotWithdrawThisToken(); // Cannot withdraw the specified token. error CanOnlyReduce(); // The given operation can only reduce the value specified. error CollectionAlreadyRevealed(); // The collection is already revealed; you cannot call reveal again. error ContractIsDecommissioned(); // This contract is decommissioned! error ContractIsPaused(); // The call requires the contract to be unpaused, and it is paused. error ContractIsNotPaused(); // The call required the contract to be paused, and it is NOT paused. error DecreasedAllowanceBelowZero(); // The request would decrease the allowance below zero, and that is not allowed. error DestinationIsNotTrustedSource(); // The destination that is being called through LZ has not been set as trusted. error DeployerOnly(); // This method can only be called by the deployer address. error DeploymentError(); // Error on deployment. error DepositBoxIsNotOpen(); // This action cannot complete as the deposit box is not open. error DriPoolAddressCannotBeAddressZero(); // The Dri Pool address cannot be the zero address. error GasLimitIsTooLow(); // The gas limit for the LayerZero call is too low. error IncorrectConfirmationValue(); // You need to enter the right confirmation value to call this funtion (usually 69420). error IncorrectPayment(); // The function call did not include passing the correct payment. error InitialLiquidityAlreadyAdded(); // Initial liquidity has already been added. You can't do it again. error InitialLiquidityNotYetAdded(); // Initial liquidity needs to have been added for this to succedd. error InsufficientAllowance(); // There is not a high enough allowance for this operation. error InvalidAdapterParams(); // The current adapter params for LayerZero on this contract won't work :(. error InvalidAddress(); // An address being processed in the function is not valid. error InvalidEndpointCaller(); // The calling address is not a valid LZ endpoint. The LZ endpoint was set at contract creation // and cannot be altered after. Check the address LZ endpoint address on the contract. error InvalidMinGas(); // The minimum gas setting for LZ in invalid. error InvalidOracleSignature(); // The signature provided with the contract call is not valid, either in format or signer. error InvalidPayload(); // The LZ payload is invalid error InvalidReceiver(); // The address used as a target for funds is not valid. error InvalidSourceSendingContract(); // The LZ message is being related from a source contract on another chain that is NOT trusted. error InvalidTotalShares(); // Total shares must equal 100 percent in basis points. error LimitsCanOnlyBeRaised(); // Limits are UP ONLY. error ListLengthMismatch(); // Two or more lists were compared and they did not match length. error LiquidityPoolMustBeAContractAddress(); // Cannot add a non-contract as a liquidity pool. error LiquidityPoolCannotBeAddressZero(); // Cannot add a liquidity pool from the zero address. error LPLockUpMustFitUint88(); // LP lockup is held in a uint88, so must fit. error NoTrustedPathRecord(); // LZ needs a trusted path record for this to work. What's that, you ask? error MachineAddressCannotBeAddressZero(); // Cannot set the machine address to the zero address. error ManagerUnauthorizedAccount(); // The caller is not the pending manager. error MaxBidQuantityIs255(); // Validation: as we use a uint8 array to track bid positions the max bid quantity is 255. error MaxPublicMintAllowanceExceeded(uint256 requested, uint256 alreadyMinted, uint256 maxAllowance); // The calling address has requested a quantity that would exceed the max allowance. error MaxSupplyTooHigh(); // Max supply must fit in a uint128. error MaxTokensPerWalletExceeded(); // The transfer would exceed the max tokens per wallet limit. error MaxTokensPerTxnExceeded(); // The transfer would exceed the max tokens per transaction limit. error MetadataIsLocked(); // The metadata on this contract is locked; it cannot be altered! error MinGasLimitNotSet(); // The minimum gas limit for LayerZero has not been set. error MintERC2309QuantityExceedsLimit(); // The `quantity` minted with ERC2309 exceeds the safety limit. error MintingIsClosedForever(); // Minting is, as the error suggests, so over (and locked forever). error MintToZeroAddress(); // Cannot mint to the zero address. error MintZeroQuantity(); // The quantity of tokens minted must be more than zero. error NewBuyTaxBasisPointsExceedsMaximum(); // Project owner trying to set the tax rate too high. error NewSellTaxBasisPointsExceedsMaximum(); // Project owner trying to set the tax rate too high. error NoETHForLiquidityPair(); // No ETH has been provided for the liquidity pair. error TaxPeriodStillInForce(); // The minimum tax period has not yet expired. error NoPaymentDue(); // No payment is due for this address. error NoRefundForCaller(); // Error thrown when the calling address has no refund owed. error NoStoredMessage(); // There is no stored message matching the passed parameters. error NothingToClaim(); // The calling address has nothing to claim. error NoTokenForLiquidityPair(); // There is no token to add to the LP. error OperationDidNotSucceed(); // The operation failed (vague much?). error OracleSignatureHasExpired(); // A signature has been provided but it is too old. error OwnershipNotInitializedForExtraData(); // The `extraData` cannot be set on an uninitialized ownership slot. error OwnerQueryForNonexistentToken(); // The token does not exist. error CallerIsNotAdminNorFactory(); // The caller of this function must match the factory address or be an admin. error ParametersDoNotMatchSignedMessage(); // The parameters passed with the signed message do not match the message itself. error ParamTooLargeStartDate(); // The passed parameter exceeds the var type max. error ParamTooLargeEndDate(); // The passed parameter exceeds the var type max. error ParamTooLargeMinETH(); // The passed parameter exceeds the var type max. error ParamTooLargePerAddressMax(); // The passed parameter exceeds the var type max. error ParamTooLargeVestingDays(); // The passed parameter exceeds the var type max. error ParamTooLargePoolSupply(); // The passed parameter exceeds the var type max. error ParamTooLargePoolPerTxnMinETH(); // The passed parameter exceeds the var type max. error PassedConfigDoesNotMatchApproved(); // The config provided on the call does not match the approved config. error PauseCutOffHasPassed(); // The time period in which we can pause has passed; this contract can no longer be paused. error PaymentMustCoverPerMintFee(); // The payment passed must at least cover the per mint fee for the quantity requested. error PermitDidNotSucceed(); // The safeERC20 permit failed. error PlatformAdminCannotBeAddressZero(); // We cannot use the zero address (address(0)) as a platformAdmin. error PlatformTreasuryCannotBeAddressZero(); // The treasury address cannot be set to the zero address. error PoolIsAboveMinimum(); // You required the pool to be below the minimum, and it is not error PoolIsBelowMinimum(); // You required the pool to be above the minimum, and it is not error PoolPhaseIsClosed(); // The block.timestamp is either before the pool is open or after it is closed. error PoolPhaseIsNotAfter(); // The block.timestamp is either before or during the pool open phase. error PoolVestingNotYetComplete(); // Tokens in the pool are not yet vested. error ProjectOwnerCannotBeAddressZero(); // The project owner has to be a non zero address. error ProofInvalid(); // The provided proof is not valid with the provided arguments. error QuantityExceedsRemainingCollectionSupply(); // The requested quantity would breach the collection supply. error QuantityExceedsRemainingPhaseSupply(); // The requested quantity would breach the phase supply. error QuantityExceedsMaxPossibleCollectionSupply(); // The requested quantity would breach the maximum trackable supply error ReferralIdAlreadyUsed(); // This referral ID has already been used; they are one use only. error RequestingMoreThanAvailableBalance(); // The request exceeds the available balance. error RequestingMoreThanRemainingAllocation( uint256 previouslyMinted, uint256 requested, uint256 remainingAllocation ); // Number of tokens requested for this mint exceeds the remaining allocation (taking the // original allocation from the list and deducting minted tokens). error RoyaltyFeeWillExceedSalePrice(); // The ERC2981 royalty specified will exceed the sale price. error ShareTotalCannotBeZero(); // The total of all the shares cannot be nothing. error SliceOutOfBounds(); // The bytes slice operation was out of bounds. error SliceOverflow(); // The bytes slice operation overlowed. error SuperAdminCannotBeAddressZero(); // The superAdmin cannot be the sero address (address(0)). error SupplyTotalMismatch(); // The sum of the team supply and lp supply does not match. error SupportWindowIsNotOpen(); // The project owner has not requested support within the support request expiry window. error TaxFreeAddressCannotBeAddressZero(); // A tax free address cannot be address(0) error TemplateCannotBeAddressZero(); // The address for a template cannot be address zero (address(0)). error TemplateNotFound(); // There is no template that matches the passed template Id. error ThisMintIsClosed(); // It's over (well, this mint is, anyway). error TotalSharesMustMatchDenominator(); // The total of all shares must equal the denominator value. error TransferAmountExceedsBalance(); // The transfer amount exceeds the accounts available balance. error TransferCallerNotOwnerNorApproved(); // The caller must own the token or be an approved operator. error TransferFailed(); // The transfer has failed. error TransferFromIncorrectOwner(); // The token must be owned by `from`. error TransferToNonERC721ReceiverImplementer(); // Cannot safely transfer to a contract that does not implement the ERC721Receiver interface. error TransferFromZeroAddress(); // Cannot transfer from the zero address. Indeed, this surely is impossible, and likely a waste to check?? error TransferToZeroAddress(); // Cannot transfer to the zero address. error UnrecognisedVRFMode(); // Currently supported VRF modes are 0: chainlink and 1: arrng error URIQueryForNonexistentToken(); // The token does not exist. error ValueExceedsMaximum(); // The value sent exceeds the maximum allowed (super useful explanation huh?). error VRFCoordinatorCannotBeAddressZero(); // The VRF coordinator cannot be the zero address (address(0)). }
{ "remappings": [ "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/", "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "ds-test/=lib/openzeppelin-contracts-upgradeable/lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "v2-core/=lib/v2-core/contracts/", "v2-periphery/=lib/v2-periphery/contracts/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "viaIR": false, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AdapterParamsMustBeEmpty","type":"error"},{"inputs":[],"name":"AdditionToPoolIsBelowPerTransactionMinimum","type":"error"},{"inputs":[],"name":"AdditionToPoolWouldExceedPerAddressCap","type":"error"},{"inputs":[],"name":"AdditionToPoolWouldExceedPoolCap","type":"error"},{"inputs":[],"name":"AddressAlreadySet","type":"error"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"AllowanceDecreasedBelowZero","type":"error"},{"inputs":[],"name":"AlreadyInitialised","type":"error"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApproveFromTheZeroAddress","type":"error"},{"inputs":[],"name":"ApproveToTheZeroAddress","type":"error"},{"inputs":[],"name":"AuctionStatusIsNotEnded","type":"error"},{"inputs":[],"name":"AuctionStatusIsNotOpen","type":"error"},{"inputs":[{"internalType":"address[]","name":"modules","type":"address[]"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256","name":"txGas","type":"uint256"}],"name":"AuxCallFailed","type":"error"},{"inputs":[],"name":"BalanceMismatch","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"BidMustBeBelowTheFloorForRefundDuringAuction","type":"error"},{"inputs":[],"name":"BidMustBeBelowTheFloorWhenReducingQuantity","type":"error"},{"inputs":[{"internalType":"enum IErrors.BondingCurveErrorType","name":"error","type":"uint8"}],"name":"BondingCurveError","type":"error"},{"inputs":[],"name":"BurnExceedsBalance","type":"error"},{"inputs":[],"name":"BurnFromTheZeroAddress","type":"error"},{"inputs":[],"name":"CallerIsNotAdminNorFactory","type":"error"},{"inputs":[],"name":"CallerIsNotDepositBoxOwner","type":"error"},{"inputs":[],"name":"CallerIsNotFactory","type":"error"},{"inputs":[],"name":"CallerIsNotFactoryOrProjectOwner","type":"error"},{"inputs":[],"name":"CallerIsNotFactoryProjectOwnerOrPool","type":"error"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"CallerIsNotPlatformAdmin","type":"error"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"CallerIsNotSuperAdmin","type":"error"},{"inputs":[],"name":"CallerIsNotTheManager","type":"error"},{"inputs":[],"name":"CallerIsNotTheOwner","type":"error"},{"inputs":[],"name":"CallerMustBeLzApp","type":"error"},{"inputs":[],"name":"CanOnlyReduce","type":"error"},{"inputs":[],"name":"CannotAddLiquidityOnCreateAndUseDRIPool","type":"error"},{"inputs":[],"name":"CannotSetNewManagerToTheZeroAddress","type":"error"},{"inputs":[],"name":"CannotSetNewOwnerToTheZeroAddress","type":"error"},{"inputs":[],"name":"CannotSetToZeroAddress","type":"error"},{"inputs":[],"name":"CannotWithdrawThisToken","type":"error"},{"inputs":[],"name":"CollectionAlreadyRevealed","type":"error"},{"inputs":[],"name":"ContractIsDecommissioned","type":"error"},{"inputs":[],"name":"ContractIsNotPaused","type":"error"},{"inputs":[],"name":"ContractIsPaused","type":"error"},{"inputs":[],"name":"DecreasedAllowanceBelowZero","type":"error"},{"inputs":[],"name":"DeployerOnly","type":"error"},{"inputs":[],"name":"DeploymentError","type":"error"},{"inputs":[],"name":"DepositBoxIsNotOpen","type":"error"},{"inputs":[],"name":"DestinationIsNotTrustedSource","type":"error"},{"inputs":[],"name":"DriPoolAddressCannotBeAddressZero","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"GasLimitIsTooLow","type":"error"},{"inputs":[],"name":"IncorrectConfirmationValue","type":"error"},{"inputs":[],"name":"IncorrectPayment","type":"error"},{"inputs":[],"name":"InitialLiquidityAlreadyAdded","type":"error"},{"inputs":[],"name":"InitialLiquidityNotYetAdded","type":"error"},{"inputs":[],"name":"InsufficientAllowance","type":"error"},{"inputs":[],"name":"InvalidAdapterParams","type":"error"},{"inputs":[],"name":"InvalidAddress","type":"error"},{"inputs":[],"name":"InvalidEndpointCaller","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"InvalidMinGas","type":"error"},{"inputs":[],"name":"InvalidOracleSignature","type":"error"},{"inputs":[],"name":"InvalidPayload","type":"error"},{"inputs":[],"name":"InvalidReceiver","type":"error"},{"inputs":[],"name":"InvalidSourceSendingContract","type":"error"},{"inputs":[],"name":"InvalidTotalShares","type":"error"},{"inputs":[],"name":"LPLockUpMustFitUint88","type":"error"},{"inputs":[],"name":"LimitsCanOnlyBeRaised","type":"error"},{"inputs":[],"name":"LiquidityPoolCannotBeAddressZero","type":"error"},{"inputs":[],"name":"LiquidityPoolMustBeAContractAddress","type":"error"},{"inputs":[],"name":"ListLengthMismatch","type":"error"},{"inputs":[],"name":"MachineAddressCannotBeAddressZero","type":"error"},{"inputs":[],"name":"ManagerUnauthorizedAccount","type":"error"},{"inputs":[],"name":"MaxBidQuantityIs255","type":"error"},{"inputs":[{"internalType":"uint256","name":"requested","type":"uint256"},{"internalType":"uint256","name":"alreadyMinted","type":"uint256"},{"internalType":"uint256","name":"maxAllowance","type":"uint256"}],"name":"MaxPublicMintAllowanceExceeded","type":"error"},{"inputs":[],"name":"MaxSupplyTooHigh","type":"error"},{"inputs":[],"name":"MaxTokensPerTxnExceeded","type":"error"},{"inputs":[],"name":"MaxTokensPerWalletExceeded","type":"error"},{"inputs":[],"name":"MetadataIsLocked","type":"error"},{"inputs":[],"name":"MinGasLimitNotSet","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"MintingIsClosedForever","type":"error"},{"inputs":[],"name":"NewBuyTaxBasisPointsExceedsMaximum","type":"error"},{"inputs":[],"name":"NewSellTaxBasisPointsExceedsMaximum","type":"error"},{"inputs":[],"name":"NoETHForLiquidityPair","type":"error"},{"inputs":[],"name":"NoPaymentDue","type":"error"},{"inputs":[],"name":"NoRefundForCaller","type":"error"},{"inputs":[],"name":"NoStoredMessage","type":"error"},{"inputs":[],"name":"NoTokenForLiquidityPair","type":"error"},{"inputs":[],"name":"NoTrustedPathRecord","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[],"name":"NothingToClaim","type":"error"},{"inputs":[],"name":"OperationDidNotSucceed","type":"error"},{"inputs":[],"name":"OracleSignatureHasExpired","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"ParamTooLargeEndDate","type":"error"},{"inputs":[],"name":"ParamTooLargeMinETH","type":"error"},{"inputs":[],"name":"ParamTooLargePerAddressMax","type":"error"},{"inputs":[],"name":"ParamTooLargePoolPerTxnMinETH","type":"error"},{"inputs":[],"name":"ParamTooLargePoolSupply","type":"error"},{"inputs":[],"name":"ParamTooLargeStartDate","type":"error"},{"inputs":[],"name":"ParamTooLargeVestingDays","type":"error"},{"inputs":[],"name":"ParametersDoNotMatchSignedMessage","type":"error"},{"inputs":[],"name":"PassedConfigDoesNotMatchApproved","type":"error"},{"inputs":[],"name":"PauseCutOffHasPassed","type":"error"},{"inputs":[],"name":"PaymentMustCoverPerMintFee","type":"error"},{"inputs":[],"name":"PermitDidNotSucceed","type":"error"},{"inputs":[],"name":"PlatformAdminCannotBeAddressZero","type":"error"},{"inputs":[],"name":"PlatformTreasuryCannotBeAddressZero","type":"error"},{"inputs":[],"name":"PoolIsAboveMinimum","type":"error"},{"inputs":[],"name":"PoolIsBelowMinimum","type":"error"},{"inputs":[],"name":"PoolPhaseIsClosed","type":"error"},{"inputs":[],"name":"PoolPhaseIsNotAfter","type":"error"},{"inputs":[],"name":"PoolVestingNotYetComplete","type":"error"},{"inputs":[],"name":"ProjectOwnerCannotBeAddressZero","type":"error"},{"inputs":[],"name":"ProofInvalid","type":"error"},{"inputs":[],"name":"QuantityExceedsMaxPossibleCollectionSupply","type":"error"},{"inputs":[],"name":"QuantityExceedsRemainingCollectionSupply","type":"error"},{"inputs":[],"name":"QuantityExceedsRemainingPhaseSupply","type":"error"},{"inputs":[],"name":"ReferralIdAlreadyUsed","type":"error"},{"inputs":[],"name":"RequestingMoreThanAvailableBalance","type":"error"},{"inputs":[{"internalType":"uint256","name":"previouslyMinted","type":"uint256"},{"internalType":"uint256","name":"requested","type":"uint256"},{"internalType":"uint256","name":"remainingAllocation","type":"uint256"}],"name":"RequestingMoreThanRemainingAllocation","type":"error"},{"inputs":[],"name":"RoyaltyFeeWillExceedSalePrice","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[],"name":"ShareTotalCannotBeZero","type":"error"},{"inputs":[],"name":"SliceOutOfBounds","type":"error"},{"inputs":[],"name":"SliceOverflow","type":"error"},{"inputs":[],"name":"SuperAdminCannotBeAddressZero","type":"error"},{"inputs":[],"name":"SupplyTotalMismatch","type":"error"},{"inputs":[],"name":"SupportWindowIsNotOpen","type":"error"},{"inputs":[],"name":"TaxFreeAddressCannotBeAddressZero","type":"error"},{"inputs":[],"name":"TaxPeriodStillInForce","type":"error"},{"inputs":[],"name":"TemplateCannotBeAddressZero","type":"error"},{"inputs":[],"name":"TemplateNotFound","type":"error"},{"inputs":[],"name":"ThisMintIsClosed","type":"error"},{"inputs":[],"name":"TotalSharesMustMatchDenominator","type":"error"},{"inputs":[],"name":"TransferAmountExceedsBalance","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFailed","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferFromZeroAddress","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"UnrecognisedVRFMode","type":"error"},{"inputs":[],"name":"VRFCoordinatorCannotBeAddressZero","type":"error"},{"inputs":[],"name":"ValueExceedsMaximum","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldThreshold","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newThreshold","type":"uint256"}],"name":"AutoSwapThresholdUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"identifier","type":"uint256"}],"name":"ExternalCallError","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenA","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokenB","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lpToken","type":"uint256"}],"name":"InitialLiquidityAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"addedPool","type":"address"}],"name":"LiquidityPoolAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"addedPool","type":"address"}],"name":"LiquidityPoolCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"removedPool","type":"address"}],"name":"LiquidityPoolRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldBuyBasisPoints","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newBuyBasisPoints","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"oldSellBasisPoints","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newSellBasisPoints","type":"uint256"}],"name":"ProjectTaxBasisPointsChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"treasury","type":"address"}],"name":"ProjectTaxRecipientUpdated","type":"event"},{"anonymous":false,"inputs":[],"name":"RevenueAutoSwap","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"lpOwner","type":"address"}],"name":"addInitialLiquidity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newLiquidityPool_","type":"address"}],"name":"addLiquidityPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"distributeTaxTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fundedDate","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[3]","name":"integrationAddresses_","type":"address[3]"},{"internalType":"bytes","name":"baseParams_","type":"bytes"},{"internalType":"bytes","name":"supplyParams_","type":"bytes"},{"internalType":"bytes","name":"taxParams_","type":"bytes"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"queryAddress_","type":"address"}],"name":"isLiquidityPool","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"liquidityPools","outputs":[{"internalType":"address[]","name":"liquidityPools_","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pairToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"projectBuyTaxBasisPoints","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"projectSellTaxBasisPoints","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"projectTaxPendingSwap","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"projectTaxRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"removedLiquidityPool_","type":"address"}],"name":"removeLiquidityPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"newProjectBuyTaxBasisPoints_","type":"uint16"},{"internalType":"uint16","name":"newProjectSellTaxBasisPoints_","type":"uint16"}],"name":"setProjectTaxRates","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"projectTaxRecipient_","type":"address"}],"name":"setProjectTaxRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"swapThresholdBasisPoints_","type":"uint16"}],"name":"setSwapThresholdBasisPoints","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swapThresholdBasisPoints","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBuyTaxBasisPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSellTaxBasisPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"uniswapV2Pair","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"withdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040523480156200001157600080fd5b506200001c62000022565b620000d6565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff1615620000735760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b0390811614620000d35780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b612e8d80620000e66000396000f3fe60806040526004361061024a5760003560e01c80638da5cb5b11610139578063b2c5c9eb116100b6578063ea8b24241161007a578063ea8b242414610702578063ee6a934c14610722578063eeae0f9714610742578063f14210a614610762578063f2fde38b14610782578063fbfa77cf146107a257600080fd5b8063b2c5c9eb14610669578063d6efd7c31461068b578063dd62ed3e146106ad578063e30c3978146106cd578063e85455d7146106e257600080fd5b8063a457c2d7116100fd578063a457c2d7146105af578063a45cae02146105cf578063a9059cbb146105f1578063ae22107f14610611578063b0d750971461063157600080fd5b80638da5cb5b14610525578063936b29341461053a57806395d89b411461055a5780639808751d1461056f578063a1db97821461058f57600080fd5b80633de35b79116101c757806370a082311161018b57806370a0823114610485578063715018a6146104bb57806379ba5097146104d057806379cc6790146104e557806384b1df521461050557600080fd5b80633de35b79146103b857806342966c68146103f057806349bd5a5e146104105780634bed5ad21461043057806359cabbe41461046557600080fd5b806323b872dd1161020e57806323b872dd146103255780632ead095514610345578063313ce5671461035c578063326b3b8b14610378578063395093511461039857600080fd5b8063038272b61461025657806306fdde0314610285578063095ea7b3146102a757806310b828c9146102d757806318160ddd1461031057600080fd5b3661025157005b600080fd5b34801561026257600080fd5b50600154600160d01b900461ffff165b6040519081526020015b60405180910390f35b34801561029157600080fd5b5061029a6107c2565b60405161027c919061258b565b3480156102b357600080fd5b506102c76102c23660046125d3565b610854565b604051901515815260200161027c565b3480156102e357600080fd5b506001546102fb90600160a01b900463ffffffff1681565b60405163ffffffff909116815260200161027c565b34801561031c57600080fd5b50600754610272565b34801561033157600080fd5b506102c76103403660046125ff565b61086e565b34801561035157600080fd5b5061035a6108ac565b005b34801561036857600080fd5b506040516012815260200161027c565b34801561038457600080fd5b5061035a610393366004612652565b6108f9565b3480156103a457600080fd5b506102c76103b33660046125d3565b6109b2565b3480156103c457600080fd5b506002546103d8906001600160a01b031681565b6040516001600160a01b03909116815260200161027c565b3480156103fc57600080fd5b5061035a61040b36600461266d565b6109d4565b34801561041c57600080fd5b506000546103d8906001600160a01b031681565b34801561043c57600080fd5b5060015461045290600160e01b900461ffff1681565b60405161ffff909116815260200161027c565b34801561047157600080fd5b5061035a610480366004612686565b6109de565b34801561049157600080fd5b506102726104a0366004612686565b6001600160a01b031660009081526009602052604090205490565b3480156104c757600080fd5b5061035a610a30565b3480156104dc57600080fd5b5061035a610a42565b3480156104f157600080fd5b5061035a6105003660046125d3565b610a8c565b34801561051157600080fd5b5061035a610520366004612791565b610aa5565b34801561053157600080fd5b506103d8610d2d565b34801561054657600080fd5b5061035a61055536600461286d565b610d62565b34801561056657600080fd5b5061029a610e41565b34801561057b57600080fd5b5061035a61058a366004612686565b610e50565b34801561059b57600080fd5b5061035a6105aa3660046125d3565b610eee565b3480156105bb57600080fd5b506102c76105ca3660046125d3565b610f74565b3480156105db57600080fd5b5060015461045290600160c01b900461ffff1681565b3480156105fd57600080fd5b506102c761060c3660046125d3565b610fbd565b34801561061d57600080fd5b5061035a61062c366004612686565b610fcf565b34801561063d57600080fd5b50600454610651906001600160801b031681565b6040516001600160801b03909116815260200161027c565b34801561067557600080fd5b5060015461045290600160d01b900461ffff1681565b34801561069757600080fd5b506106a061105d565b60405161027c91906128e4565b3480156106b957600080fd5b506102726106c83660046128f7565b61106e565b3480156106d957600080fd5b506103d8611099565b3480156106ee57600080fd5b506102c76106fd366004612686565b6110c2565b34801561070e57600080fd5b506003546103d8906001600160a01b031681565b34801561072e57600080fd5b5061035a61073d366004612686565b6110e5565b34801561074e57600080fd5b50600154600160c01b900461ffff16610272565b34801561076e57600080fd5b5061035a61077d36600461266d565b6111c5565b34801561078e57600080fd5b5061035a61079d366004612686565b611277565b3480156107ae57600080fd5b506008546103d8906001600160a01b031681565b6060600580546107d190612930565b80601f01602080910402602001604051908101604052809291908181526020018280546107fd90612930565b801561084a5780601f1061081f5761010080835404028352916020019161084a565b820191906000526020600020905b81548152906001019060200180831161082d57829003601f168201915b5050505050905090565b6000336108628185856112fc565b60019150505b92915050565b60003361087c8582856113ac565b61089f85858561088b896110c2565b8061089a575061089a886110c2565b6113f7565b60019150505b9392505050565b6004546001600160801b0316156108f757600480546001600160801b031981169091556003546001600160801b03909116906108f59030906001600160a01b03168360006113f7565b505b565b33610902610d2d565b6001600160a01b0316141580156109245750600d546001600160a01b03163314155b156109425760405163faa39fbf60e01b815260040160405180910390fd5b6001805461ffff838116600160e01b90810261ffff60e01b198416179093556040519290910416907fe4351c45b53ffb7ebad0b66cc0f1a3dfe2963c099421eeaded141104df39206a906109a6908390859091825261ffff16602082015260400190565b60405180910390a15050565b6000336108628185856109c5838361106e565b6109cf9190612980565b6112fc565b6108f533826114ab565b336109e7610d2d565b6001600160a01b031614158015610a095750600d546001600160a01b03163314155b15610a275760405163faa39fbf60e01b815260040160405180910390fd5b6108f581611560565b610a3861188a565b6108f760006118bc565b3380610a4c611099565b6001600160a01b031614610a835760405163118cdaa760e01b81526001600160a01b03821660048201526024015b60405180910390fd5b6108f5816118bc565b610a978233836113ac565b610aa182826114ab565b5050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff16600081158015610aeb5750825b905060008267ffffffffffffffff166001148015610b085750303b155b905081158015610b16575080155b15610b345760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315610b5e57845460ff60401b1916600160401b1785555b8851610b6a90896118f4565b6020808a0151600180546001600160a01b039283166001600160a01b03199182161790915560408c0151600280549190931691161790558751600091610bb6918a018101908a01612a19565b9050600087806020019051810190610bce9190612a19565b9050610bd98261192e565b6000610be76012600a612b19565b8360200151610bf69190612b28565b90506000610c066012600a612b19565b8460400151610c159190612b28565b9050610c20836119b0565b60008054911515600160a01b0260ff60a01b1990921691909117905560408301516001805461ffff909216600160e01b0261ffff60e01b199092169190911790556060830151600380546001600160a01b039092166001600160a01b0319909216919091179055610c918282611a17565b610c99611a43565b600080546001600160a01b03929092166001600160a01b0319928316179055600d805490911633179055505060028054600160a01b60ff60a01b1990911617905550508315610d2257845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050565b6000807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005b546001600160a01b031692915050565b33610d6b610d2d565b6001600160a01b031614158015610d8d5750600d546001600160a01b03163314155b15610dab5760405163faa39fbf60e01b815260040160405180910390fd5b6001805461ffff838116600160d01b81810261ffff60d01b19888516600160c01b8181029290921663ffffffff60c01b1988161792909217909655604080519686048516808852602088019290925291909404909216918401829052606084015290917f8da1f77a22734510b762a9625e69e737d7c0cc48984e810e5802fb341eb80a3e9060800160405180910390a150505050565b6060600680546107d190612930565b33610e59610d2d565b6001600160a01b031614158015610e7b5750600d546001600160a01b03163314155b15610e995760405163faa39fbf60e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527fa4eea51cd2f21eac6612ba054a363ae2fd59698fc258ab414313cd73f69f2b85906020015b60405180910390a150565b33610ef7610d2d565b6001600160a01b031614158015610f195750600d546001600160a01b03163314155b15610f375760405163faa39fbf60e01b815260040160405180910390fd5b306001600160a01b03831603610f605760405163992501b360e01b815260040160405180910390fd5b610aa16001600160a01b0383163383611b73565b60003381610f82828661106e565b905083811015610fa557604051637b5591b560e11b815260040160405180910390fd5b610fb282868684036112fc565b506001949350505050565b60003361086281858561088b836110c2565b33610fd8610d2d565b6001600160a01b031614158015610ffa5750600d546001600160a01b03163314155b156110185760405163faa39fbf60e01b815260040160405180910390fd5b611023600b82611bc5565b506040516001600160a01b03821681527f59c3fbcae88f30e9b0e35c132a7f68c53231dffa4722f197c7ecb0ee013eee6090602001610ee3565b6060611069600b611bda565b905090565b6001600160a01b039182166000908152600a6020908152604080832093909416825291909152205490565b6000807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00610d52565b600080546001600160a01b03838116911614806108685750610868600b83611be7565b336110ee610d2d565b6001600160a01b0316141580156111105750600d546001600160a01b03163314155b1561112e5760405163faa39fbf60e01b815260040160405180910390fd5b6001600160a01b0381166111555760405163b47cdee560e01b815260040160405180910390fd5b806001600160a01b03163b60000361118057604051630f9da0c760e41b815260040160405180910390fd5b61118b600b82611c09565b506040516001600160a01b03821681527fb893f883ef734b712208a877459424ee509832c57e0461fb1ac99ed4d42f2d8990602001610ee3565b336111ce610d2d565b6001600160a01b0316141580156111f05750600d546001600160a01b03163314155b1561120e5760405163faa39fbf60e01b815260040160405180910390fd5b604051600090339083908381818185875af1925050503d8060008114611250576040519150601f19603f3d011682016040523d82523d6000602084013e611255565b606091505b5050905080610aa1576040516312171d8360e31b815260040160405180910390fd5b61127f61188a565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319166001600160a01b03831690811782556112c3610d2d565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b6001600160a01b038316611323576040516356fdae6560e11b815260040160405180910390fd5b6001600160a01b03821661134a5760405163b2fa1ef360e01b815260040160405180910390fd5b6001600160a01b038381166000818152600a602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b60006113b8848461106e565b905060001981146113f157818110156113e4576040516313be252b60e01b815260040160405180910390fd5b6113f184848484036112fc565b50505050565b6000611404858585611c1e565b90506114108585611d05565b600061141e83868887611dbc565b905061142a8483612b3f565b6001600160a01b038088166000908152600960205260408082209390935590871681529081208054839290611460908490612980565b92505081905550846001600160a01b0316866001600160a01b0316600080516020612e388339815191528360405161149a91815260200190565b60405180910390a35b505050505050565b6001600160a01b0382166114d2576040516304fca6bd60e41b815260040160405180910390fd5b6001600160a01b0382166000908152600960205260409020548181101561150c5760405163588569f760e01b815260040160405180910390fd5b6001600160a01b03831660008181526009602090815260408083208686039055600780546001600160801b0388169003905551858152919291600080516020612e38833981519152910161139f565b505050565b600154600160a01b900463ffffffff161561158e5760405163b1f3376760e01b815260040160405180910390fd5b6001805463ffffffff60a01b1916600160a01b4263ffffffff1602179055306000908152600960205260409020546000036115dc576040516330d86fb160e11b815260040160405180910390fd5b6001546115f69030906001600160a01b03166000196112fc565b60025460015460405163095ea7b360e01b81526001600160a01b039182166004820152600019602482015291169063095ea7b3906044016020604051808303816000875af115801561164c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116709190612b52565b50600154600254600091829182916001600160a01b039081169163e8e33700913091166116b2826001600160a01b031660009081526009602052604090205490565b6002546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156116fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061171e9190612b74565b6040516001600160e01b031960e087901b1681526001600160a01b0394851660048201529390921660248401526044830152606482015260006084820181905260a48201523060c48201524260e4820152610104016060604051808303816000875af1158015611792573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117b69190612b8d565b604080518481526020810184905290810182905292955090935091507fbf59dda00152e02f20e18cab7307c8afe0714e7f69cf24a1377cbbddcb40f9bb9060600160405180910390a16002805460ff60a01b1916905560005460405163a9059cbb60e01b81526001600160a01b038681166004830152602482018490529091169063a9059cbb906044016020604051808303816000875af115801561185f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118839190612b52565b5050505050565b33611893610d2d565b6001600160a01b0316146108f75760405163118cdaa760e01b8152336004820152602401610a7a565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319168155610aa182611f48565b6118fd826118bc565b808060200190518101906119119190612c00565b6005600060066119218482612caa565b5061188390508382612caa565b806040015181602001516119429190612980565b815114611962576040516361cf53d560e01b815260040160405180910390fd5b80516001600160801b03101561198b57604051637f47720f60e11b815260040160405180910390fd5b60600151600880546001600160a01b0319166001600160a01b03909216919091179055565b80516000901580156119c457506020820151155b156119d157506000919050565b5080516001805460209093015161ffff908116600160d01b0261ffff60d01b1991909316600160c01b021663ffffffff60c01b199093169290921717815590565b919050565b8115611a2757611a273083611fb9565b8015610aa157600854610aa1906001600160a01b031682611fb9565b6001546040805163c45a015560e01b815290516000926001600160a01b03169163c45a01559160048083019260209291908290030181865afa158015611a8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab19190612d6a565b6002546040516364e329cb60e11b81523060048201526001600160a01b03918216602482015291169063c9c65396906044016020604051808303816000875af1158015611b02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b269190612d6a565b9050611b33600b82611c09565b506040516001600160a01b03821681527f969ffc8569f9af3993220e04ac05164e5db4e3d9f8b1a47f64e7de9a04b8ea2f9060200160405180910390a190565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261155b908490612041565b60006108a5836001600160a01b0384166120a4565b606060006108a58361219e565b6001600160a01b038116600090815260018301602052604081205415156108a5565b60006108a5836001600160a01b0384166121fa565b600080546001600160a01b038481169116148015611c4557506001600160a01b0384163014155b8015611c5e5750600154600160a01b900463ffffffff16155b15611c7c57604051630d970b4560e21b815260040160405180910390fd5b6001600160a01b038416611ca357604051630b07e54560e11b815260040160405180910390fd5b6001600160a01b038316611cca57604051633a954ecd60e21b815260040160405180910390fd5b506001600160a01b038316600090815260096020526040902054818110156108a557604051635dd58b8b60e01b815260040160405180910390fd5b600054600160a01b900460ff1615610aa15730600090815260096020526040812054600154600754919250829160009161271091611d4e91600160e01b900461ffff1690612b28565b611d589190612d87565b9050611d6685858484612249565b15611883576002805460ff60a01b1916600160a01b179055611d89601482612b28565b821115611d9e57611d9b601482612b28565b91505b611da882846122b4565b6002805460ff60a01b191690555050505050565b6000548190600160a01b900460ff168015611dd45750845b8015611dea5750600254600160a01b900460ff16155b15611f40576000611dfa856110c2565b8015611e145750600154600090600160d01b900461ffff16115b15611e7057600154600160d01b900461ffff1615611e6b57600154600480546001600160801b0380821661271061ffff600160d01b90960495909516880294909404938401166001600160801b0319909116179055015b611eea565b611e79846110c2565b8015611e935750600154600090600160c01b900461ffff16115b15611eea57600154600160c01b900461ffff1615611eea57600154600480546001600160801b0380821661271061ffff600160c01b90960495909516880294909404938401166001600160801b0319909116179055015b8015611f3e573060008181526009602052604090819020805484019055516001600160a01b03861690600080516020612e3883398151915290611f309085815260200190565b60405180910390a380820391505b505b949350505050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b6001600160a01b038216611fdf57604051622e076360e81b815260040160405180910390fd5b806001600160801b031660076000828254611ffa9190612980565b90915550506001600160a01b038216600081815260096020908152604080832080548601905551848152600080516020612e38833981519152910160405180910390a35050565b60006120566001600160a01b03841683612460565b9050805160001415801561207b5750808060200190518101906120799190612b52565b155b1561155b57604051635274afe760e01b81526001600160a01b0384166004820152602401610a7a565b6000818152600183016020526040812054801561218d5760006120c8600183612b3f565b85549091506000906120dc90600190612b3f565b90508082146121415760008660000182815481106120fc576120fc612993565b906000526020600020015490508087600001848154811061211f5761211f612993565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061215257612152612da9565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610868565b6000915050610868565b5092915050565b6060816000018054806020026020016040519081016040528092919081815260200182805480156121ee57602002820191906000526020600020905b8154815260200190600101908083116121da575b50505050509050919050565b600081815260018301602052604081205461224157508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610868565b506000610868565b60008183101580156122655750600254600160a01b900460ff16155b80156122775750612275856110c2565b155b801561229157506001546001600160a01b03868116911614155b80156122ab57506001546001600160a01b03858116911614155b95945050505050565b60408051600280825260608201835260009260208301908036833701905050905030816000815181106122e9576122e9612993565b6001600160a01b03928316602091820292909201015260025482519116908290600190811061231a5761231a612993565b6001600160a01b03928316602091820292909201015260015460035490821691635c11d79591869160009186911661235442610258612980565b6040518663ffffffff1660e01b8152600401612374959493929190612dbf565b600060405180830381600087803b15801561238e57600080fd5b505af192505050801561239f575060015b6123dc57604051600581527f60dc41faad9fe4f70f304dcef26d96d71e98ec8e21e4a340921d94dfe46307dc9060200160405180910390a1505050565b8183101561244b5760045482906123fd9085906001600160801b0316612b28565b6124079190612d87565b600480546000906124229084906001600160801b0316612dfb565b92506101000a8154816001600160801b0302191690836001600160801b03160217905550505050565b600480546001600160801b0319169055505050565b60606108a58383600084600080856001600160a01b031684866040516124869190612e1b565b60006040518083038185875af1925050503d80600081146124c3576040519150601f19603f3d011682016040523d82523d6000602084013e6124c8565b606091505b50915091506124d88683836124e2565b9695505050505050565b6060826124f7576124f28261253e565b6108a5565b815115801561250e57506001600160a01b0384163b155b1561253757604051639996b31560e01b81526001600160a01b0385166004820152602401610a7a565b50806108a5565b80511561254e5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b60005b8381101561258257818101518382015260200161256a565b50506000910152565b60208152600082518060208401526125aa816040850160208701612567565b601f01601f19169190910160400192915050565b6001600160a01b03811681146108f557600080fd5b600080604083850312156125e657600080fd5b82356125f1816125be565b946020939093013593505050565b60008060006060848603121561261457600080fd5b833561261f816125be565b9250602084013561262f816125be565b929592945050506040919091013590565b803561ffff81168114611a1257600080fd5b60006020828403121561266457600080fd5b6108a582612640565b60006020828403121561267f57600080fd5b5035919050565b60006020828403121561269857600080fd5b81356108a5816125be565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff811182821017156126dc576126dc6126a3565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561270b5761270b6126a3565b604052919050565b600067ffffffffffffffff82111561272d5761272d6126a3565b50601f01601f191660200190565b600082601f83011261274c57600080fd5b813561275f61275a82612713565b6126e2565b81815284602083860101111561277457600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060c085870312156127a757600080fd5b85601f8601126127b657600080fd5b6127be6126b9565b8060608701888111156127d057600080fd5b875b818110156127f35780356127e5816125be565b8452602093840193016127d2565b5090955035905067ffffffffffffffff8082111561281057600080fd5b61281c8883890161273b565b9450608087013591508082111561283257600080fd5b61283e8883890161273b565b935060a087013591508082111561285457600080fd5b506128618782880161273b565b91505092959194509250565b6000806040838503121561288057600080fd5b61288983612640565b915061289760208401612640565b90509250929050565b600081518084526020808501945080840160005b838110156128d95781516001600160a01b0316875295820195908201906001016128b4565b509495945050505050565b6020815260006108a560208301846128a0565b6000806040838503121561290a57600080fd5b8235612915816125be565b91506020830135612925816125be565b809150509250929050565b600181811c9082168061294457607f821691505b60208210810361296457634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156108685761086861296a565b634e487b7160e01b600052603260045260246000fd5b6000608082840312156129bb57600080fd5b6040516080810181811067ffffffffffffffff821117156129de576129de6126a3565b80604052508091508251815260208301516020820152604083015160408201526060830151612a0c816125be565b6060919091015292915050565b600060808284031215612a2b57600080fd5b6108a583836129a9565b600181815b80851115612a70578160001904821115612a5657612a5661296a565b80851615612a6357918102915b93841c9390800290612a3a565b509250929050565b600082612a8757506001610868565b81612a9457506000610868565b8160018114612aaa5760028114612ab457612ad0565b6001915050610868565b60ff841115612ac557612ac561296a565b50506001821b610868565b5060208310610133831016604e8410600b8410161715612af3575081810a610868565b612afd8383612a35565b8060001904821115612b1157612b1161296a565b029392505050565b60006108a560ff841683612a78565b80820281158282048414176108685761086861296a565b818103818111156108685761086861296a565b600060208284031215612b6457600080fd5b815180151581146108a557600080fd5b600060208284031215612b8657600080fd5b5051919050565b600080600060608486031215612ba257600080fd5b8351925060208401519150604084015190509250925092565b600082601f830112612bcc57600080fd5b8151612bda61275a82612713565b818152846020838601011115612bef57600080fd5b611f40826020830160208701612567565b60008060408385031215612c1357600080fd5b825167ffffffffffffffff80821115612c2b57600080fd5b612c3786838701612bbb565b93506020850151915080821115612c4d57600080fd5b50612c5a85828601612bbb565b9150509250929050565b601f82111561155b57600081815260208120601f850160051c81016020861015612c8b5750805b601f850160051c820191505b818110156114a357828155600101612c97565b815167ffffffffffffffff811115612cc457612cc46126a3565b612cd881612cd28454612930565b84612c64565b602080601f831160018114612d0d5760008415612cf55750858301515b600019600386901b1c1916600185901b1785556114a3565b600085815260208120601f198616915b82811015612d3c57888601518255948401946001909101908401612d1d565b5085821015612d5a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060208284031215612d7c57600080fd5b81516108a5816125be565b600082612da457634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603160045260246000fd5b85815284602082015260a060408201526000612dde60a08301866128a0565b6001600160a01b0394909416606083015250608001529392505050565b6001600160801b038281168282160390808211156121975761219761296a565b60008251612e2d818460208701612567565b919091019291505056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa264697066735822122050403a1913e7e4dc0a7feea9945a06f2c24338113df3ac537bc597a32a530b8664736f6c63430008140033
Deployed Bytecode
0x60806040526004361061024a5760003560e01c80638da5cb5b11610139578063b2c5c9eb116100b6578063ea8b24241161007a578063ea8b242414610702578063ee6a934c14610722578063eeae0f9714610742578063f14210a614610762578063f2fde38b14610782578063fbfa77cf146107a257600080fd5b8063b2c5c9eb14610669578063d6efd7c31461068b578063dd62ed3e146106ad578063e30c3978146106cd578063e85455d7146106e257600080fd5b8063a457c2d7116100fd578063a457c2d7146105af578063a45cae02146105cf578063a9059cbb146105f1578063ae22107f14610611578063b0d750971461063157600080fd5b80638da5cb5b14610525578063936b29341461053a57806395d89b411461055a5780639808751d1461056f578063a1db97821461058f57600080fd5b80633de35b79116101c757806370a082311161018b57806370a0823114610485578063715018a6146104bb57806379ba5097146104d057806379cc6790146104e557806384b1df521461050557600080fd5b80633de35b79146103b857806342966c68146103f057806349bd5a5e146104105780634bed5ad21461043057806359cabbe41461046557600080fd5b806323b872dd1161020e57806323b872dd146103255780632ead095514610345578063313ce5671461035c578063326b3b8b14610378578063395093511461039857600080fd5b8063038272b61461025657806306fdde0314610285578063095ea7b3146102a757806310b828c9146102d757806318160ddd1461031057600080fd5b3661025157005b600080fd5b34801561026257600080fd5b50600154600160d01b900461ffff165b6040519081526020015b60405180910390f35b34801561029157600080fd5b5061029a6107c2565b60405161027c919061258b565b3480156102b357600080fd5b506102c76102c23660046125d3565b610854565b604051901515815260200161027c565b3480156102e357600080fd5b506001546102fb90600160a01b900463ffffffff1681565b60405163ffffffff909116815260200161027c565b34801561031c57600080fd5b50600754610272565b34801561033157600080fd5b506102c76103403660046125ff565b61086e565b34801561035157600080fd5b5061035a6108ac565b005b34801561036857600080fd5b506040516012815260200161027c565b34801561038457600080fd5b5061035a610393366004612652565b6108f9565b3480156103a457600080fd5b506102c76103b33660046125d3565b6109b2565b3480156103c457600080fd5b506002546103d8906001600160a01b031681565b6040516001600160a01b03909116815260200161027c565b3480156103fc57600080fd5b5061035a61040b36600461266d565b6109d4565b34801561041c57600080fd5b506000546103d8906001600160a01b031681565b34801561043c57600080fd5b5060015461045290600160e01b900461ffff1681565b60405161ffff909116815260200161027c565b34801561047157600080fd5b5061035a610480366004612686565b6109de565b34801561049157600080fd5b506102726104a0366004612686565b6001600160a01b031660009081526009602052604090205490565b3480156104c757600080fd5b5061035a610a30565b3480156104dc57600080fd5b5061035a610a42565b3480156104f157600080fd5b5061035a6105003660046125d3565b610a8c565b34801561051157600080fd5b5061035a610520366004612791565b610aa5565b34801561053157600080fd5b506103d8610d2d565b34801561054657600080fd5b5061035a61055536600461286d565b610d62565b34801561056657600080fd5b5061029a610e41565b34801561057b57600080fd5b5061035a61058a366004612686565b610e50565b34801561059b57600080fd5b5061035a6105aa3660046125d3565b610eee565b3480156105bb57600080fd5b506102c76105ca3660046125d3565b610f74565b3480156105db57600080fd5b5060015461045290600160c01b900461ffff1681565b3480156105fd57600080fd5b506102c761060c3660046125d3565b610fbd565b34801561061d57600080fd5b5061035a61062c366004612686565b610fcf565b34801561063d57600080fd5b50600454610651906001600160801b031681565b6040516001600160801b03909116815260200161027c565b34801561067557600080fd5b5060015461045290600160d01b900461ffff1681565b34801561069757600080fd5b506106a061105d565b60405161027c91906128e4565b3480156106b957600080fd5b506102726106c83660046128f7565b61106e565b3480156106d957600080fd5b506103d8611099565b3480156106ee57600080fd5b506102c76106fd366004612686565b6110c2565b34801561070e57600080fd5b506003546103d8906001600160a01b031681565b34801561072e57600080fd5b5061035a61073d366004612686565b6110e5565b34801561074e57600080fd5b50600154600160c01b900461ffff16610272565b34801561076e57600080fd5b5061035a61077d36600461266d565b6111c5565b34801561078e57600080fd5b5061035a61079d366004612686565b611277565b3480156107ae57600080fd5b506008546103d8906001600160a01b031681565b6060600580546107d190612930565b80601f01602080910402602001604051908101604052809291908181526020018280546107fd90612930565b801561084a5780601f1061081f5761010080835404028352916020019161084a565b820191906000526020600020905b81548152906001019060200180831161082d57829003601f168201915b5050505050905090565b6000336108628185856112fc565b60019150505b92915050565b60003361087c8582856113ac565b61089f85858561088b896110c2565b8061089a575061089a886110c2565b6113f7565b60019150505b9392505050565b6004546001600160801b0316156108f757600480546001600160801b031981169091556003546001600160801b03909116906108f59030906001600160a01b03168360006113f7565b505b565b33610902610d2d565b6001600160a01b0316141580156109245750600d546001600160a01b03163314155b156109425760405163faa39fbf60e01b815260040160405180910390fd5b6001805461ffff838116600160e01b90810261ffff60e01b198416179093556040519290910416907fe4351c45b53ffb7ebad0b66cc0f1a3dfe2963c099421eeaded141104df39206a906109a6908390859091825261ffff16602082015260400190565b60405180910390a15050565b6000336108628185856109c5838361106e565b6109cf9190612980565b6112fc565b6108f533826114ab565b336109e7610d2d565b6001600160a01b031614158015610a095750600d546001600160a01b03163314155b15610a275760405163faa39fbf60e01b815260040160405180910390fd5b6108f581611560565b610a3861188a565b6108f760006118bc565b3380610a4c611099565b6001600160a01b031614610a835760405163118cdaa760e01b81526001600160a01b03821660048201526024015b60405180910390fd5b6108f5816118bc565b610a978233836113ac565b610aa182826114ab565b5050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff16600081158015610aeb5750825b905060008267ffffffffffffffff166001148015610b085750303b155b905081158015610b16575080155b15610b345760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315610b5e57845460ff60401b1916600160401b1785555b8851610b6a90896118f4565b6020808a0151600180546001600160a01b039283166001600160a01b03199182161790915560408c0151600280549190931691161790558751600091610bb6918a018101908a01612a19565b9050600087806020019051810190610bce9190612a19565b9050610bd98261192e565b6000610be76012600a612b19565b8360200151610bf69190612b28565b90506000610c066012600a612b19565b8460400151610c159190612b28565b9050610c20836119b0565b60008054911515600160a01b0260ff60a01b1990921691909117905560408301516001805461ffff909216600160e01b0261ffff60e01b199092169190911790556060830151600380546001600160a01b039092166001600160a01b0319909216919091179055610c918282611a17565b610c99611a43565b600080546001600160a01b03929092166001600160a01b0319928316179055600d805490911633179055505060028054600160a01b60ff60a01b1990911617905550508315610d2257845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050565b6000807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005b546001600160a01b031692915050565b33610d6b610d2d565b6001600160a01b031614158015610d8d5750600d546001600160a01b03163314155b15610dab5760405163faa39fbf60e01b815260040160405180910390fd5b6001805461ffff838116600160d01b81810261ffff60d01b19888516600160c01b8181029290921663ffffffff60c01b1988161792909217909655604080519686048516808852602088019290925291909404909216918401829052606084015290917f8da1f77a22734510b762a9625e69e737d7c0cc48984e810e5802fb341eb80a3e9060800160405180910390a150505050565b6060600680546107d190612930565b33610e59610d2d565b6001600160a01b031614158015610e7b5750600d546001600160a01b03163314155b15610e995760405163faa39fbf60e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527fa4eea51cd2f21eac6612ba054a363ae2fd59698fc258ab414313cd73f69f2b85906020015b60405180910390a150565b33610ef7610d2d565b6001600160a01b031614158015610f195750600d546001600160a01b03163314155b15610f375760405163faa39fbf60e01b815260040160405180910390fd5b306001600160a01b03831603610f605760405163992501b360e01b815260040160405180910390fd5b610aa16001600160a01b0383163383611b73565b60003381610f82828661106e565b905083811015610fa557604051637b5591b560e11b815260040160405180910390fd5b610fb282868684036112fc565b506001949350505050565b60003361086281858561088b836110c2565b33610fd8610d2d565b6001600160a01b031614158015610ffa5750600d546001600160a01b03163314155b156110185760405163faa39fbf60e01b815260040160405180910390fd5b611023600b82611bc5565b506040516001600160a01b03821681527f59c3fbcae88f30e9b0e35c132a7f68c53231dffa4722f197c7ecb0ee013eee6090602001610ee3565b6060611069600b611bda565b905090565b6001600160a01b039182166000908152600a6020908152604080832093909416825291909152205490565b6000807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00610d52565b600080546001600160a01b03838116911614806108685750610868600b83611be7565b336110ee610d2d565b6001600160a01b0316141580156111105750600d546001600160a01b03163314155b1561112e5760405163faa39fbf60e01b815260040160405180910390fd5b6001600160a01b0381166111555760405163b47cdee560e01b815260040160405180910390fd5b806001600160a01b03163b60000361118057604051630f9da0c760e41b815260040160405180910390fd5b61118b600b82611c09565b506040516001600160a01b03821681527fb893f883ef734b712208a877459424ee509832c57e0461fb1ac99ed4d42f2d8990602001610ee3565b336111ce610d2d565b6001600160a01b0316141580156111f05750600d546001600160a01b03163314155b1561120e5760405163faa39fbf60e01b815260040160405180910390fd5b604051600090339083908381818185875af1925050503d8060008114611250576040519150601f19603f3d011682016040523d82523d6000602084013e611255565b606091505b5050905080610aa1576040516312171d8360e31b815260040160405180910390fd5b61127f61188a565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319166001600160a01b03831690811782556112c3610d2d565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b6001600160a01b038316611323576040516356fdae6560e11b815260040160405180910390fd5b6001600160a01b03821661134a5760405163b2fa1ef360e01b815260040160405180910390fd5b6001600160a01b038381166000818152600a602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b60006113b8848461106e565b905060001981146113f157818110156113e4576040516313be252b60e01b815260040160405180910390fd5b6113f184848484036112fc565b50505050565b6000611404858585611c1e565b90506114108585611d05565b600061141e83868887611dbc565b905061142a8483612b3f565b6001600160a01b038088166000908152600960205260408082209390935590871681529081208054839290611460908490612980565b92505081905550846001600160a01b0316866001600160a01b0316600080516020612e388339815191528360405161149a91815260200190565b60405180910390a35b505050505050565b6001600160a01b0382166114d2576040516304fca6bd60e41b815260040160405180910390fd5b6001600160a01b0382166000908152600960205260409020548181101561150c5760405163588569f760e01b815260040160405180910390fd5b6001600160a01b03831660008181526009602090815260408083208686039055600780546001600160801b0388169003905551858152919291600080516020612e38833981519152910161139f565b505050565b600154600160a01b900463ffffffff161561158e5760405163b1f3376760e01b815260040160405180910390fd5b6001805463ffffffff60a01b1916600160a01b4263ffffffff1602179055306000908152600960205260409020546000036115dc576040516330d86fb160e11b815260040160405180910390fd5b6001546115f69030906001600160a01b03166000196112fc565b60025460015460405163095ea7b360e01b81526001600160a01b039182166004820152600019602482015291169063095ea7b3906044016020604051808303816000875af115801561164c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116709190612b52565b50600154600254600091829182916001600160a01b039081169163e8e33700913091166116b2826001600160a01b031660009081526009602052604090205490565b6002546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156116fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061171e9190612b74565b6040516001600160e01b031960e087901b1681526001600160a01b0394851660048201529390921660248401526044830152606482015260006084820181905260a48201523060c48201524260e4820152610104016060604051808303816000875af1158015611792573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117b69190612b8d565b604080518481526020810184905290810182905292955090935091507fbf59dda00152e02f20e18cab7307c8afe0714e7f69cf24a1377cbbddcb40f9bb9060600160405180910390a16002805460ff60a01b1916905560005460405163a9059cbb60e01b81526001600160a01b038681166004830152602482018490529091169063a9059cbb906044016020604051808303816000875af115801561185f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118839190612b52565b5050505050565b33611893610d2d565b6001600160a01b0316146108f75760405163118cdaa760e01b8152336004820152602401610a7a565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319168155610aa182611f48565b6118fd826118bc565b808060200190518101906119119190612c00565b6005600060066119218482612caa565b5061188390508382612caa565b806040015181602001516119429190612980565b815114611962576040516361cf53d560e01b815260040160405180910390fd5b80516001600160801b03101561198b57604051637f47720f60e11b815260040160405180910390fd5b60600151600880546001600160a01b0319166001600160a01b03909216919091179055565b80516000901580156119c457506020820151155b156119d157506000919050565b5080516001805460209093015161ffff908116600160d01b0261ffff60d01b1991909316600160c01b021663ffffffff60c01b199093169290921717815590565b919050565b8115611a2757611a273083611fb9565b8015610aa157600854610aa1906001600160a01b031682611fb9565b6001546040805163c45a015560e01b815290516000926001600160a01b03169163c45a01559160048083019260209291908290030181865afa158015611a8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab19190612d6a565b6002546040516364e329cb60e11b81523060048201526001600160a01b03918216602482015291169063c9c65396906044016020604051808303816000875af1158015611b02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b269190612d6a565b9050611b33600b82611c09565b506040516001600160a01b03821681527f969ffc8569f9af3993220e04ac05164e5db4e3d9f8b1a47f64e7de9a04b8ea2f9060200160405180910390a190565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261155b908490612041565b60006108a5836001600160a01b0384166120a4565b606060006108a58361219e565b6001600160a01b038116600090815260018301602052604081205415156108a5565b60006108a5836001600160a01b0384166121fa565b600080546001600160a01b038481169116148015611c4557506001600160a01b0384163014155b8015611c5e5750600154600160a01b900463ffffffff16155b15611c7c57604051630d970b4560e21b815260040160405180910390fd5b6001600160a01b038416611ca357604051630b07e54560e11b815260040160405180910390fd5b6001600160a01b038316611cca57604051633a954ecd60e21b815260040160405180910390fd5b506001600160a01b038316600090815260096020526040902054818110156108a557604051635dd58b8b60e01b815260040160405180910390fd5b600054600160a01b900460ff1615610aa15730600090815260096020526040812054600154600754919250829160009161271091611d4e91600160e01b900461ffff1690612b28565b611d589190612d87565b9050611d6685858484612249565b15611883576002805460ff60a01b1916600160a01b179055611d89601482612b28565b821115611d9e57611d9b601482612b28565b91505b611da882846122b4565b6002805460ff60a01b191690555050505050565b6000548190600160a01b900460ff168015611dd45750845b8015611dea5750600254600160a01b900460ff16155b15611f40576000611dfa856110c2565b8015611e145750600154600090600160d01b900461ffff16115b15611e7057600154600160d01b900461ffff1615611e6b57600154600480546001600160801b0380821661271061ffff600160d01b90960495909516880294909404938401166001600160801b0319909116179055015b611eea565b611e79846110c2565b8015611e935750600154600090600160c01b900461ffff16115b15611eea57600154600160c01b900461ffff1615611eea57600154600480546001600160801b0380821661271061ffff600160c01b90960495909516880294909404938401166001600160801b0319909116179055015b8015611f3e573060008181526009602052604090819020805484019055516001600160a01b03861690600080516020612e3883398151915290611f309085815260200190565b60405180910390a380820391505b505b949350505050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b6001600160a01b038216611fdf57604051622e076360e81b815260040160405180910390fd5b806001600160801b031660076000828254611ffa9190612980565b90915550506001600160a01b038216600081815260096020908152604080832080548601905551848152600080516020612e38833981519152910160405180910390a35050565b60006120566001600160a01b03841683612460565b9050805160001415801561207b5750808060200190518101906120799190612b52565b155b1561155b57604051635274afe760e01b81526001600160a01b0384166004820152602401610a7a565b6000818152600183016020526040812054801561218d5760006120c8600183612b3f565b85549091506000906120dc90600190612b3f565b90508082146121415760008660000182815481106120fc576120fc612993565b906000526020600020015490508087600001848154811061211f5761211f612993565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061215257612152612da9565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610868565b6000915050610868565b5092915050565b6060816000018054806020026020016040519081016040528092919081815260200182805480156121ee57602002820191906000526020600020905b8154815260200190600101908083116121da575b50505050509050919050565b600081815260018301602052604081205461224157508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610868565b506000610868565b60008183101580156122655750600254600160a01b900460ff16155b80156122775750612275856110c2565b155b801561229157506001546001600160a01b03868116911614155b80156122ab57506001546001600160a01b03858116911614155b95945050505050565b60408051600280825260608201835260009260208301908036833701905050905030816000815181106122e9576122e9612993565b6001600160a01b03928316602091820292909201015260025482519116908290600190811061231a5761231a612993565b6001600160a01b03928316602091820292909201015260015460035490821691635c11d79591869160009186911661235442610258612980565b6040518663ffffffff1660e01b8152600401612374959493929190612dbf565b600060405180830381600087803b15801561238e57600080fd5b505af192505050801561239f575060015b6123dc57604051600581527f60dc41faad9fe4f70f304dcef26d96d71e98ec8e21e4a340921d94dfe46307dc9060200160405180910390a1505050565b8183101561244b5760045482906123fd9085906001600160801b0316612b28565b6124079190612d87565b600480546000906124229084906001600160801b0316612dfb565b92506101000a8154816001600160801b0302191690836001600160801b03160217905550505050565b600480546001600160801b0319169055505050565b60606108a58383600084600080856001600160a01b031684866040516124869190612e1b565b60006040518083038185875af1925050503d80600081146124c3576040519150601f19603f3d011682016040523d82523d6000602084013e6124c8565b606091505b50915091506124d88683836124e2565b9695505050505050565b6060826124f7576124f28261253e565b6108a5565b815115801561250e57506001600160a01b0384163b155b1561253757604051639996b31560e01b81526001600160a01b0385166004820152602401610a7a565b50806108a5565b80511561254e5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b60005b8381101561258257818101518382015260200161256a565b50506000910152565b60208152600082518060208401526125aa816040850160208701612567565b601f01601f19169190910160400192915050565b6001600160a01b03811681146108f557600080fd5b600080604083850312156125e657600080fd5b82356125f1816125be565b946020939093013593505050565b60008060006060848603121561261457600080fd5b833561261f816125be565b9250602084013561262f816125be565b929592945050506040919091013590565b803561ffff81168114611a1257600080fd5b60006020828403121561266457600080fd5b6108a582612640565b60006020828403121561267f57600080fd5b5035919050565b60006020828403121561269857600080fd5b81356108a5816125be565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff811182821017156126dc576126dc6126a3565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561270b5761270b6126a3565b604052919050565b600067ffffffffffffffff82111561272d5761272d6126a3565b50601f01601f191660200190565b600082601f83011261274c57600080fd5b813561275f61275a82612713565b6126e2565b81815284602083860101111561277457600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060c085870312156127a757600080fd5b85601f8601126127b657600080fd5b6127be6126b9565b8060608701888111156127d057600080fd5b875b818110156127f35780356127e5816125be565b8452602093840193016127d2565b5090955035905067ffffffffffffffff8082111561281057600080fd5b61281c8883890161273b565b9450608087013591508082111561283257600080fd5b61283e8883890161273b565b935060a087013591508082111561285457600080fd5b506128618782880161273b565b91505092959194509250565b6000806040838503121561288057600080fd5b61288983612640565b915061289760208401612640565b90509250929050565b600081518084526020808501945080840160005b838110156128d95781516001600160a01b0316875295820195908201906001016128b4565b509495945050505050565b6020815260006108a560208301846128a0565b6000806040838503121561290a57600080fd5b8235612915816125be565b91506020830135612925816125be565b809150509250929050565b600181811c9082168061294457607f821691505b60208210810361296457634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156108685761086861296a565b634e487b7160e01b600052603260045260246000fd5b6000608082840312156129bb57600080fd5b6040516080810181811067ffffffffffffffff821117156129de576129de6126a3565b80604052508091508251815260208301516020820152604083015160408201526060830151612a0c816125be565b6060919091015292915050565b600060808284031215612a2b57600080fd5b6108a583836129a9565b600181815b80851115612a70578160001904821115612a5657612a5661296a565b80851615612a6357918102915b93841c9390800290612a3a565b509250929050565b600082612a8757506001610868565b81612a9457506000610868565b8160018114612aaa5760028114612ab457612ad0565b6001915050610868565b60ff841115612ac557612ac561296a565b50506001821b610868565b5060208310610133831016604e8410600b8410161715612af3575081810a610868565b612afd8383612a35565b8060001904821115612b1157612b1161296a565b029392505050565b60006108a560ff841683612a78565b80820281158282048414176108685761086861296a565b818103818111156108685761086861296a565b600060208284031215612b6457600080fd5b815180151581146108a557600080fd5b600060208284031215612b8657600080fd5b5051919050565b600080600060608486031215612ba257600080fd5b8351925060208401519150604084015190509250925092565b600082601f830112612bcc57600080fd5b8151612bda61275a82612713565b818152846020838601011115612bef57600080fd5b611f40826020830160208701612567565b60008060408385031215612c1357600080fd5b825167ffffffffffffffff80821115612c2b57600080fd5b612c3786838701612bbb565b93506020850151915080821115612c4d57600080fd5b50612c5a85828601612bbb565b9150509250929050565b601f82111561155b57600081815260208120601f850160051c81016020861015612c8b5750805b601f850160051c820191505b818110156114a357828155600101612c97565b815167ffffffffffffffff811115612cc457612cc46126a3565b612cd881612cd28454612930565b84612c64565b602080601f831160018114612d0d5760008415612cf55750858301515b600019600386901b1c1916600185901b1785556114a3565b600085815260208120601f198616915b82811015612d3c57888601518255948401946001909101908401612d1d565b5085821015612d5a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060208284031215612d7c57600080fd5b81516108a5816125be565b600082612da457634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603160045260246000fd5b85815284602082015260a060408201526000612dde60a08301866128a0565b6001600160a01b0394909416606083015250608001529392505050565b6001600160801b038281168282160390808211156121975761219761296a565b60008251612e2d818460208701612567565b919091019291505056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa264697066735822122050403a1913e7e4dc0a7feea9945a06f2c24338113df3ac537bc597a32a530b8664736f6c63430008140033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.