createLongShortPair() :
This function creates a LongShortPair, which is a type of synthetic token pair. It takes in a set of parameters (CreatorParams memory params) which include the names and symbols of the long and short synthetic tokens, as well as the address of the collateral token. It then creates two ExpandedIERC20 tokens, one for the long synthetic token and one for the short synthetic token, using the tokenFactory. It then creates a LongShortPair using the converted parameters and the addresses of the two tokens. Finally, it adds the LongShortPair address as a minter and burner for both tokens, and sets the LongShortPair address as the owner of both tokens. It then emits an event to (autogenerated documentation)
_convertParams() :
This function is used to convert the parameters passed in by the creator of a LongShortPair into the parameters needed by the LongShortPair constructor. It takes in the CreatorParams memory creatorParams, ExpandedIERC20 longToken, and ExpandedIERC20 shortToken as inputs and returns a LongShortPair.ConstructorParams memory constructorParams as output. The function sets the pairName, expirationTimestamp, collateralPerPair, priceIdentifier, enableEarlyExpiration, collateralToken, financialProductLibrary, customAncillaryData, proposerReward, optimisticOracleLivenessTime, and optimisticOracleProposerBond fields of the constructorParams to the corresponding values from the creator (autogenerated documentation)
_getSyntheticDecimals() :
This function is used to get the number of decimals associated with a given ERC20 token. It does this by attempting to call the decimals() function of the token, and if it fails, it returns a default value of 18. (autogenerated documentation)