MidasFactory721
Contract used to deploy and register new MidasPairs. Enables setting fee parameters, protocol fees and Midas Pair implementation.
constructor(address _royaltyEngine)
Parameters
The smart contract which provides royalty data
event OwnerChanged(address indexed oldOwner, address indexed newOwner);
PairImplementationSet
event PairImplementationSet(address indexed oldPair, address indexed newPair);
LptImplementationSet
event LptImplementationSet(address indexed oldLPT, address indexed newLPT);
event PairCreated(address indexed tokenX, address indexed tokenY, address indexed pair, address lpToken);
View function to get the recipient address which receives the protocol fee.
Return Values
The recipient address of protocol fee
createERC721Pair
Function to create a new Midas Pair for _token0 and _token1.
Parameters
The address of the first token
The address of the second token
Return Values
The address of the newly created MidasPair
Function to set up a new owner of the factory.
Parameters
The address of the new owner
Function to update royalty info for the specific MidasPair.
Parameters
The address of the NFT asset in the MidasPair
The address of the MidasPair
setRoyaltyEngine
Function to update royalty engine contract address.
Parameters
The new Royalty Engine address
Function to set a new royalty rate for all the following MidasPair.
Parameters
Initialize royalty rate for NFT
setPairImplementation
Function to set a new implementation of MidasPair to be cloned.
Parameters
The new template address of MidasPair
setLptImplementation
Function to set a new implementation of LPToken to be cloned.
Parameters
The new template address of LPToken
Function to execute flash loans towards the specific MidasPair.
Parameters
The implementation of receiver
The list of NFT tokenIds to be borrowed
The data to be transferred along with function revoking