dydxprotocol / dydx.js Goto Github PK
View Code? Open in Web Editor NEW[DEPRECATED] TypeScript library for interacting with the dYdX V1 protocol
License: Apache License 2.0
[DEPRECATED] TypeScript library for interacting with the dYdX V1 protocol
License: Apache License 2.0
We need to deploy the ERC20Position
contract before opening the position, because the ERC20ShortFactory
does not support admin addresses (needed to allow admin increase of token cap)
Take a look at the repo and figure out what is missing
After running npm install inside the dydx.js project and inspecting the @dydxprotocol located in the node_modules directory, the protocol/build/contracts folder seems to have all the build files. I did not find any pre/post install scripts inside the package.json file that would run truffle compile/migrate to create there build files. I am interested in knowing how these files are being generated after installation.
Part of https://github.com/dydxprotocol/issues/issues/83
Includes unit tests for all functions.
Support both promise and non-promise approaches for sending transactions.
Sometimes it's useful for the promise to resolve only when the transaction is mined, but other times it is useful to get access to the transaction hash before the transaction has been mined.
We should support both for all external-facing methods that make contract calls.
The way the tests are currently written now were based off how the protocol tested the contracts, I need to go back and rewrite these tests and helpers so they are more composable for future testing of dydx.js
Lets convert all of our public function arguments to accept a single object. This makes it easier to support optional fields, makes things less error-prone for the caller, and makes the signature more flexible in the future.
The Helper file will multiply the gas estimation by 1.5 to ensure that transactions go through successfully, however when calling closePositionDirectly
you must manually put in a high gas cost, otherwise it will throw a revert error
In createCappedShort
, the response should also include the tokenAddress for ease of use, otherwise a user would have to getPosition
in order to get the token from the owner
Add the ability to get an address's total deposited amount into all buckets
Also add the ability to get the total amount owed to a lender
Will need to determine all the buckets an address has deposited into which can be done the same way as withdrawAll
works
We should investigate the feasibility of switching to Web3 1.0. There may have been stability improvements in the newer versions, but in the past we have avoided switching because the story around the compatibility with MetaMask was unclear.
Lets invest some cycles and do some real investigation around whether or not we can transition to Web3 1.0
https://github.com/MetaMask/metamask-extension/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+web3+1.0
https://guillaumeduveau.com/en/blockchain/ethereum/metamask-web3
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.