transferTokensTo(address,uint256) :
This function allows the owner of a contract to transfer a specified amount of tokens to a given address. It works by calling the _transfer() function, which is a built-in function that transfers tokens from one address to another. The address of the contract is passed as the first parameter, the address of the recipient is passed as the second parameter, and the amount of tokens to be transferred is passed as the third parameter. (autogenerated documentation)
changeWalletWhitelist(address,bool) :
This function allows the owner of the contract to change the whitelist status of a wallet address. It takes two parameters, an address and a boolean value. The address is the wallet address to be whitelisted or unwhitelisted, and the boolean value is either true or false, depending on whether the address should be whitelisted or unwhitelisted. The function then sets the whitelistedWallets mapping to the boolean value, thus changing the whitelist status of the address. (autogenerated documentation)
setPoolParameters(address,uint24) :
This function sets the parameters for a pool, including the address of the USDC token, the pool fee, and the authorized pool address. It does this by first setting the USDC address and pool fee, then whitelisting the authorized pool address. It then creates a unique address for the authorized pool by taking the keccak256 hash of the token0, token1, poolFee, and a bytes32 value. Finally, it whitelists the authorized pool address. (autogenerated documentation)
switchFreeTrade() :
This function allows the owner of the contract to switch the freeTrade boolean variable between true and false. When freeTrade is true, users are able to trade tokens without any restrictions. When freeTrade is false, users are restricted from trading tokens. (autogenerated documentation)
switchSwapEnabled() :
This function allows the owner of the contract to switch the swapEnabled boolean variable between true and false. This variable is used to control whether or not the contract is able to perform swaps. When the variable is set to true, the contract is able to perform swaps, and when it is set to false, the contract is not able to perform swaps. (autogenerated documentation)
setFeeOnSwap(uint24) :
This function allows the owner of the contract to set the fee on swap. The fee on swap is a uint24 value that is used to determine the amount of fee that is charged for each swap transaction. The function takes in a uint24 value as an argument and sets the feeOnSwap variable to that value. (autogenerated documentation)
setFeeSplits() :
This function sets the fee splits for the contract. It takes an array of FeeSplit objects as an argument and checks that the total of all the fees in the array is equal to 100. If it is, it deletes the existing fee splits and replaces them with the new ones. It then sets the feeSplitsLength variable to the length of the new array. (autogenerated documentation)
distributeFee(uint256) :
This function distributes a given amount of USDC tokens to a list of recipients according to a set of predefined fee splits. It works by looping through the list of fee splits, calculating the amount to be distributed to each recipient based on their fee percentage, and then transferring the calculated amount to the recipient's address. If the total amount distributed is not equal to the given amount, the remaining amount is transferred to the first recipient in the list. (autogenerated documentation)
_beforeTokenTransfer(address,address,uint256) :
This function is an override of the _beforeTokenTransfer function in the ERC20 contract. It is used to check the conditions of a token transfer before it is executed. It checks that the sender and receiver are whitelisted, that the hard cap on the wallet is not exceeded, that the token is not paused, and that the sender's wallet is not locked. If any of these conditions are not met, the transfer will not be executed. (autogenerated documentation)
() :
This function is used to mint new tokens and add them to the account specified in the parameter. The amount of tokens to be minted is also specified in the parameter. This function is only allowed to be called by the owner of the contract. The minting process is done by increasing the totalSupply of the token and adding the amount of tokens to the balance of the specified account. (autogenerated documentation)
_mint(address,uint256) :
This function mints a specified amount of tokens to a specified account. It first checks that the total supply of tokens plus the amount to be minted does not exceed the hard cap on the token. If the hard cap is not exceeded, the function calls the _mint function from the ERC20 contract to mint the tokens to the specified account. (autogenerated documentation)
hardCapOnToken() :
This function returns the maximum amount of tokens that can be issued. It works by multiplying the fixed supply of tokens by 10 to the power of the number of decimals. This ensures that the maximum amount of tokens is accurately represented. (autogenerated documentation)
hardCapOnWallet() :
This function returns the hard cap on the wallet, which is the maximum amount of tokens that can be stored in the wallet. It works by multiplying the capOnWallet value with 10 to the power of the number of decimals of the token. This ensures that the hard cap is expressed in the smallest denomination of the token. (autogenerated documentation)
calculateFeeOnSwap(uint256) :
This function calculates the fee on a swap transaction. It takes in an amount (in wei) as an argument and returns the fee (in wei) as a result. The fee is calculated by multiplying the amount by the feeOnSwap variable (which is set as a percentage) and then dividing by 100. (autogenerated documentation)
lockUnlockWallet(address,bool,uint256) :
This function allows an authorized locker to lock or unlock a wallet associated with a given address. If the locker chooses to lock the wallet, the amount specified in the function will be added to the total amount of locked funds associated with the address. If the locker chooses to unlock the wallet, the amount of locked funds associated with the address will be set to 0. (autogenerated documentation)
pause() :
This function pauses the contract, preventing any further transactions from being processed. It can only be called by the owner of the contract and works by calling the _pause() internal function. (autogenerated documentation)
unpause() :
This function allows the owner of the contract to unpause the contract. This is done by calling the _unpause() internal function, which sets the paused state of the contract to false. (autogenerated documentation)
swapToExactOutput(uint256,uint256,uint256) :
This function allows a user to swap a certain amount of tokens for a different token. It takes in three parameters: amountInMaximum, amountOut, and deadline. The amountInMaximum is the maximum amount of tokens the user is willing to exchange, the amountOut is the amount of tokens the user wants to receive, and the deadline is the time at which the swap must be completed. The function first checks if the swap is enabled or if the user is whitelisted. It then transfers the amountInMaximum from the user to the contract and approves the swapRouter to transfer the amountInMaximum. It then sets the parameters for the swapRouter's exactOutputSingle function, which will execute the swap. The (autogenerated documentation)
swapToExactInput(uint256,uint256,uint256) :
This function allows a user to swap a given amount of tokens for USDC. The user must provide an amount of tokens to be swapped, the minimum amount of USDC they are willing to receive, and a deadline for the swap. The function then transfers the tokens to the contract, approves the swap router to transfer the tokens, and calls the exactInputSingle function on the swap router. This function calculates the amount of USDC to be received by the user, subtracts the fee, and transfers the USDC to the user. The fee is then distributed to the swap pool. Finally, an event is emitted to log the swap and the amount of tokens and USDC swapped. (autogenerated documentation)
swapFromExactOutput(uint256,uint256,uint256) :
This function allows a user to swap USDC tokens for tokens of the contract's token. It takes in three parameters: amountInMaximum, amountOut, and deadline. It first transfers the amountInMaximum of USDC tokens from the user to the contract. It then calculates the fee for the swap and distributes it. It then sets the deadline to 30 minutes if it is not provided. It then approves the swapRouter to transfer the amountSwap of USDC tokens from the contract to the swapRouter. It then calls the exactOutputSingle function of the swapRouter, which returns the amountIn of the contract's tokens. It then transfers the amountOut of the contract's tokens to the user. Finally, it (autogenerated documentation)
swapFromExactInput(uint256,uint256,uint256) :
This function allows a user to swap USDC tokens for tokens of the contract. It requires that the swap is enabled or the user is whitelisted. It then calculates the fee for the swap and transfers the amount of USDC tokens from the user to the contract. It then approves the amount of USDC tokens to be sent to the swap router. It then sets the deadline for the swap and creates the parameters for the exactInputSingle function of the swap router. Finally, it calls the exactInputSingle function and transfers the amount of tokens from the contract to the user. It then emits an event to log the swap. (autogenerated documentation)