MarginAccountManager.sol

This contract is responsible for creating margin accounts.

How to Create a Margin Account

    function createMarginAccount() external returns (uint marginAccountID) {
        marginAccountID = nextTokenID;
        _safeMint(msg.sender, marginAccountID);
        nextTokenID++;

        emit CreateMarginAccount(marginAccountID);
    }

Last updated