CLI tool for launching a new LSP (Long-Short Pair). Relevant docs at Outcome.Finance: https://docs.outcome.finance/ and UMA: https://docs.umaproject.org/
Error: Invalid number of parameters for "createLongShortPair". Got 1 expected 9!
Running into this issue on our fork of 'launch-LSP' here's our code:
// LSP parameters. Pass in arguments to customize these. const lspParams = { pairName: _synthName, expirationTimestamp: _expirationTimestamp, // Timestamp that the contract will expire at. collateralPerPair: _collateralPerPair, // 18 point Decimal Format priceIdentifier: padRight(utf8ToHex("SPD"), 64), // Price identifier to use. longSynthName:long_${_synthName}, longSynthSymbol:PUT-${synthSymbol}, shortSynthName:short${_synthName}, shortSynthSymbol:CALL-${_synthName}, collateralToken: collateralToken, // Collateral token address. financialProductLibrary: _fpl, customAncillaryData: utf8ToHex(_ancillaryData), // Default to empty bytes array if no ancillary data is passed. prepaidProposerReward: proposerReward, // Default to 0 if no prepaid proposer reward is passed. optimisticOracleLivenessTime: livenessTime, optimisticOracleProposerBond: proposerBond };
// Simulate transaction to test before sending to the network. console.log("Simulating Deployment..."); const address = await lspCreator.methods.createLongShortPair(lspParams).call(transactionOptions);
Error: Invalid number of parameters for "createLongShortPair". Got 1 expected 9!
Running into this issue on our fork of 'launch-LSP' here's our code:
// LSP parameters. Pass in arguments to customize these. const lspParams = { pairName: _synthName, expirationTimestamp: _expirationTimestamp, // Timestamp that the contract will expire at. collateralPerPair: _collateralPerPair, // 18 point Decimal Format priceIdentifier: padRight(utf8ToHex("SPD"), 64), // Price identifier to use. longSynthName:
long_${_synthName}, longSynthSymbol:
PUT-${synthSymbol}, shortSynthName:
short${_synthName}, shortSynthSymbol:
CALL-${_synthName}, collateralToken: collateralToken, // Collateral token address. financialProductLibrary: _fpl, customAncillaryData: utf8ToHex(_ancillaryData), // Default to empty bytes array if no ancillary data is passed. prepaidProposerReward: proposerReward, // Default to 0 if no prepaid proposer reward is passed. optimisticOracleLivenessTime: livenessTime, optimisticOracleProposerBond: proposerBond };
// Simulate transaction to test before sending to the network. console.log("Simulating Deployment..."); const address = await lspCreator.methods.createLongShortPair(lspParams).call(transactionOptions);