createPairETH(address,uint128,uint96,uint128,uint256[]) :
This function creates a new LSSVMPairETH, which is a type of liquidity pool that allows users to trade ERC721 tokens. It takes in a number of parameters, including the IERC721 token to be used, the ICurve bonding curve, the address of the asset recipient, the pool type, the delta, the fee, the spot price, and an array of initial NFTIDs. It then checks if the IERC721 token is enumerable, and sets the template accordingly. Finally, it initializes the pair with the given parameters and emits an event to signal that a new pair has been created. (autogenerated documentation)
createPairERC20() :
This function creates a new ERC20 pair on the LSSVM platform. It takes in a set of parameters (CreateERC20PairParams) which include the bonding curve, the NFT, the pool type, the token, the asset recipient, the delta, the fee, the spot price, the initial NFT IDs, and the initial token balance. It then checks to see if the NFT supports the ERC721 Enumerable interface, and sets the template accordingly. It then creates a new LSSVMPairERC20 instance, and calls the _initializePairERC20 function to set the parameters. Finally, it emits a NewPair event. (autogenerated documentation)
isPair(address) :
This function is used to determine whether a given address is a valid pair for a given variant. It does this by using the LSSVMPairCloner contract to compare the potential pair address to the address of the corresponding template contract for the given variant. If the two addresses match, the function returns true, otherwise it returns false. (autogenerated documentation)
withdrawETHProtocolFees() :
This function allows the owner of the contract to withdraw the ETH fees collected by the protocol. It works by transferring the balance of the contract to the protocol fee recipient's address. (autogenerated documentation)
withdrawERC20ProtocolFees(uint256) :
This function allows the owner of the contract to withdraw ERC20 tokens from the contract and transfer them to the protocol fee recipient. It does this by using the token's safeTransfer() function, which transfers the specified amount of tokens from the contract to the protocol fee recipient. (autogenerated documentation)
changeProtocolFeeRecipient(address) :
This function allows the owner of the contract to update the address of the protocol fee recipient. It requires that the address provided is not the zero address, and then sets the protocolFeeRecipient variable to the address provided. It then emits an event to notify that the protocol fee recipient has been updated. (autogenerated documentation)
changeProtocolFeeMultiplier(uint256) :
This function allows the owner of the contract to update the protocol fee multiplier. The protocol fee multiplier is a value that is used to calculate the fee that is charged for each transaction. The function requires that the new value is less than or equal to the maximum protocol fee, and then updates the protocol fee multiplier with the new value. Finally, an event is emitted to notify other contracts of the update. (autogenerated documentation)
setBondingCurveAllowed(bool) :
This function allows the owner of the contract to set whether a particular bonding curve (identified by the ICurve parameter) is allowed or not. If the isAllowed parameter is set to true, then the bonding curve is allowed, and if it is set to false, then the bonding curve is not allowed. The function then emits an event, BondingCurveStatusUpdate, which notifies any listeners of the new status of the bonding curve. (autogenerated documentation)
setCallAllowed(address,bool) :
This function allows the owner of the contract to set whether a given address is allowed to call the contract. It takes two parameters, an address and a boolean value. If the boolean value is set to true, the function will check to make sure that the address has never been allowed to call the contract before. If the boolean value is set to false, the function will set the address to not be allowed to call the contract. Finally, the function emits an event to notify any listeners that the call target status has been updated. (autogenerated documentation)
setRouterAllowed(bool) :
This function sets the status of a given LSSVMRouter to either allowed or not allowed. It takes in the router address and a boolean value as parameters. If the boolean value is true, the function checks to make sure that the router has not already been allowed. If the boolean value is false, the router status is set to not allowed. The function then emits an event to update the router status. (autogenerated documentation)
_initializePairETH(address,uint128,uint96,uint128,uint256[]) :
This function is used to initialize a LSSVMPairETH contract. It takes in a number of parameters, including an IERC721 contract, an asset recipient address, a delta, a fee, a spot price, and an array of initial NFT IDs. It first calls the initialize function of the LSSVMPairETH contract, passing in the sender address, the asset recipient address, the delta, the fee, and the spot price. It then transfers any ETH sent with the transaction to the LSSVMPairETH contract. Finally, it loops through the array of initial NFT IDs and calls the safeTransferFrom function of the IERC721 contract to transfer each NFT from the sender to the (autogenerated documentation)
_initializePairERC20(address,uint128,uint96,uint128,uint256[],uint256) :
This function is used to initialize a LSSVMPairERC20 contract. It takes in a number of parameters, including an ERC20 token, an IERC721 non-fungible token, an asset recipient address, a delta, a fee, a spot price, an array of initial NFT IDs, and an initial token balance. It then calls the initialize() function of the LSSVMPairERC20 contract, transferring the initial token balance to the contract address and transferring the initial NFTs to the contract address. (autogenerated documentation)
depositNFTs(uint256[],address) :
This function allows users to deposit Non-Fungible Tokens (NFTs) to a recipient address. It takes in an IERC721 contract, an array of ids, and a recipient address as parameters. It then loops through the array of ids and uses the safeTransferFrom function to transfer the NFTs from the sender to the recipient. Finally, it emits an NFTDeposit event if the recipient is a pair variant of enumerable ERC20, enumerable ETH, missing enumerable ERC20, or missing enumerable ETH. (autogenerated documentation)
depositERC20(address,uint256) :
This function allows a user to deposit an ERC20 token into a recipient address. It first calls the token's safeTransferFrom function to transfer the amount of tokens from the sender to the recipient. It then checks if the recipient is a pair with either an enumerable ERC20 token or a missing enumerable ERC20 token. If it is, it checks if the token being deposited is the same as the token associated with the pair. If it is, it emits a TokenDeposit event. (autogenerated documentation)