MidasFactory721
MidasFactory721
Contract used to deploy and register new MidasPairs. Enables setting fee parameters, protocol fees and Midas Pair implementation.
constructor
Parameters
Name
Type
Description
_royaltyEngine
address
The smart contract which provides royalty data
OwnerChanged
PairImplementationSet
LptImplementationSet
PairCreated
feeRecipient
View function to get the recipient address which receives the protocol fee.
Return Values
Name
Type
Description
_feeRecipient
address
The recipient address of protocol fee
createERC721Pair
Function to create a new Midas Pair for _token0 and _token1.
Parameters
Name
Type
Description
_tokenX
address
The address of the first token
_tokenY
address
The address of the second token
Return Values
Name
Type
Description
lpToken
address
The address of LP token
pair
address
The address of the newly created MidasPair
setOwner
Function to set up a new owner of the factory.
Parameters
Name
Type
Description
_owner
address
The address of the new owner
setRoyaltyInfo
Function to update royalty info for the specific MidasPair.
Parameters
Name
Type
Description
_nftAddress
address
The address of the NFT asset in the MidasPair
_pair
address
The address of the MidasPair
setRoyaltyEngine
Function to update royalty engine contract address.
Parameters
Name
Type
Description
_newRoyaltyEngine
address
The new Royalty Engine address
setRoyaltyInfo
Function to set a new royalty rate for all the following MidasPair.
Parameters
Name
Type
Description
address
_tokenX
The address of the NFT
address
_tokenY
The address of the FT
isZero
bool
Initialize royalty rate for NFT
setPairImplementation
Function to set a new implementation of MidasPair to be cloned.
Parameters
Name
Type
Description
_newPairImplementation
address
The new template address of MidasPair
setLptImplementation
Function to set a new implementation of LPToken to be cloned.
Parameters
Name
Type
Description
_newLptImplementation
address
The new template address of LPToken
flashLoan
Function to execute flash loans towards the specific MidasPair.
Parameters
Name
Type
Description
_tokenX
address
The address of NFT
_tokenY
address
The address of FT
receiver
IMidasFlashLoanCallback
The implementation of receiver
_tokenIds
uint256[] calldata
The list of NFT tokenIds to be borrowed
data
bytes calldata
The data to be transferred along with function revoking
Last updated