Giter VIP home page Giter VIP logo

launch-lsp's People

Contributors

abg4 avatar hlambur avatar md0x avatar mrice32 avatar pemulis avatar reinis-frp avatar smb2796 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

launch-lsp's Issues

ReferenceError: longShortPairCreator is not defined

Script here:

node index.js --gasprice 1000 --url "https://rpc.sx.technology/" --mnemonic "" 
--pairName "Aaron Judge Linear Token Pair" --expirationTimestamp 1665374400 
--collateralPerPair 15000000000000000000000 --priceIdentifier APT 
--longSynthName "Aaron Judge Linear Token Pair" --longSynthSymbol AJLT-1011 
--shortSynthName "Aaron Judge Linear Short Token" --shortSynthSymbol AJLST-1011 
--collateralToken 0xd9Fd6e207a2196e1C3FEd919fCFE91482f705909 --fpl Linear --lowerBound 0 
--upperBound 15000000000000000000000 --proposerReward 20000000000000000000 
--optimisticOracleProposerBond 40000000000000000000

Error:

ReferenceError: longShortPairCreator is not defined
    at F:\Workstation\AX\projects\launch-lsp\index.js:191:5
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Invalid-Number of Parameters

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

Bug with deploying with priceIdentifier BTCUSD on Kovan

I encountered an issue when trying to launch on Kovan network with BTCUSD as price identifier. It created a VM execution error.

My launch script:

node index.js --gasprice 15 --url wss://kovan.infura.io/ws/v3/PROJECTIDInfura --mnemonic "SEED PHRASE" --pairName "WHTUSDJune" --expirationTimestamp 1655312460 --collateralPerPair 1000000000 --priceIdentifier BTCUSD --longSynthName "wheat_SRW_June_long" --longSynthSymbol WHTUSDBJun --shortSynthName "wheat_SRW_June_short" --shortSynthSymbol WHTUSDSJun --collateralToken 0x7079f3762805cff9c979a5bdc6f5648bcfee76c8 --fpl Linear --lowerBound 0 --upperBound 2000000000 --proposerReward 2000000 --optimisticOracleProposerBond 200000000

The error I get:

Error: VM execution error. at WebsocketSubprovider._handleSocketMessage (C:\Users\FOLDER\launch-lsp\node_modules\@trufflesuite\web3-provider-engine\subproviders\websocket.js:121:18) at WebSocket.onMessage (C:\Users\FOLDER\launch-lsp\node_modules\ws\lib\event-target.js:120:16) at WebSocket.emit (events.js:315:20) at Receiver.receiverOnMessage (C:\Users\FOLDER\launch-lsp\node_modules\ws\lib\websocket.js:720:20) at Receiver.emit (events.js:315:20) at Receiver.dataMessage (C:\Users\FOLDER\launch-lsp\node_modules\ws\lib\receiver.js:414:14) at C:\Users\FOLDER\launch-lsp\node_modules\ws\lib\receiver.js:371:23 at C:\Users\FOLDER\launch-lsp\node_modules\ws\lib\permessage-deflate.js:307:9 at C:\Users\FOLDER\launch-lsp\node_modules\ws\lib\permessage-deflate.js:389:7 at afterWrite (_stream_writable.js:468:5) at onwrite (_stream_writable.js:448:7) at InflateRaw.afterTransform (_stream_transform.js:98:3) at Zlib.processCallback (zlib.js:580:8)

Changed the price identifier to UMAUSD and it worked. Still do not know what went wrong though.

"APT" Identifier not registered

When deploying on the Goerli Network, came across an error on my deployment script:

I'm using --priceIdentifier APT

"Simulating Deployment...
Error: execution reverted: Identifier not registered
0x08c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000194964656e746966696572206e6f74207265676973746572656400000000000000"

Fail with error 'SafeMath: subtraction overflow'

I am trying to use the "create" function from an LSP smart contract deployed on Kovan but I can not use it as it always returns the "Fail with error 'SafeMath: subtraction overflow'" error. I am using the Kovan testnet and the smart contract address is: 0xDfF8F001824D6128f6BA16eAB0Fd8d1cc43Ef053

To call this contract there needs to be USDC collateral in my account which I do have (I have around 1500USDC) and KovanEth which I also do have. Not sure what I am doing wrong.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.