This has been archived. See the latest SDK
instadapp / dsa-sdk Goto Github PK
View Code? Open in Web Editor NEWBuild DeFi apps instantly using our SDK
License: MIT License
Build DeFi apps instantly using our SDK
License: MIT License
This has been archived. See the latest SDK
If https://github.com/Instadapp/dsa-connect is indeed the latest "The official DSA SDK for JavaScript"
please freeze/archive this repository, and say so in this repository GitHub metadata and give correct link to newer SDK
ref #108 (comment)
I find the current Spell API a little bit awkward and I would prefer a more object-oriented interface. As JavaScript is an object-oriented language, I think that would feel more "natural".
I'm thinking something like this:
spell = new dsa.Spell(); // create spell
spell.add({ ... }); // add connectors
await spell.estimateCastGas(); // estimate gas
await spell.cast(); // cast spell
What do you think?
It seems that it would be possible to offer this API without breaking backwards compatibility, simply by extracting the ad-hoc spell class from src/index.js
into a standalone class and binding the existing methods to it.
I can try working this out and submit a PR if interested.
https://docs.instadapp.io/setup/ shows example as
dsa.build().then(console.log);
and says that build
has
>an optional Object parameter
However running build() without parameters causes
(node:22117) UnhandledPromiseRejectionWarning: Error: gasPrice
is not defined.
at f.exports.getTxObj (/Users/user/Workspaces/Ethereum/Instadapp/instadapp-get-started/node_modules/dsa-sdk/build/dsa.min.js:12:395221)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async /Users/user/Workspaces/Ethereum/Instadapp/instadapp-get-started/node_modules/dsa-sdk/build/dsa.min.js:12:41342
(
So either docs or current version of sdk are wrong.
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.