UMAprotocol / launch-lsp

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/
GNU Affero General Public License v3.0
14 stars 13 forks source link

Invalid-Number of Parameters #13

Closed user2745 closed 3 years ago

user2745 commented 3 years ago

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

daywiss commented 3 years ago

@user2745 im going to close this issue. please re-open it if you still need help with it