MidasFactory721

MidasFactory721

Contract used to deploy and register new MidasPairs. Enables setting fee parameters, protocol fees and Midas Pair implementation.

constructor

constructor(address _royaltyEngine)

Parameters

OwnerChanged

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);

PairCreated

event PairCreated(address indexed tokenX, address indexed tokenY, address indexed pair, address lpToken);

feeRecipient

function feeRecipient() external view

View function to get the recipient address which receives the protocol fee.

Return Values

createERC721Pair

function createERC721Pair(address _tokenX, address _tokenY) external override noDelegateCall

Function to create a new Midas Pair for _token0 and _token1.

Parameters

Return Values

setOwner

function setOwner(address _owner) external

Function to set up a new owner of the factory.

Parameters

setRoyaltyInfo

function setRoyaltyInfo(address _nftAddress, address _pair) public 

Function to update royalty info for the specific MidasPair.

Parameters

setRoyaltyEngine

function setRoyaltyEngine(address _newRoyaltyEngine) external 

Function to update royalty engine contract address.

Parameters

setRoyaltyInfo

 function setRoyaltyInfo(address _tokenX, address _tokenY, bool isZero) external

Function to set a new royalty rate for all the following MidasPair.

Parameters

setPairImplementation

function setPairImplementation(address _newPairImplementation) external 

Function to set a new implementation of MidasPair to be cloned.

Parameters

setLptImplementation

function setLptImplementation(address _newLptImplementation) external 

Function to set a new implementation of LPToken to be cloned.

Parameters

flashLoan

function flashLoan(address _token0, address _token1, IMidasFlashLoanCallback receiver, uint256[] calldata _tokenIds, bytes calldata data) external

Function to execute flash loans towards the specific MidasPair.

Parameters

Last updated