dsa-connectors-old/README.md

28 lines
1.4 KiB
Markdown
Raw Normal View History

2020-05-02 12:21:03 +00:00
# DSA Connectors
2020-05-01 16:01:43 +00:00
2020-05-02 12:07:39 +00:00
Connectors are standardized modules that let Smart Account interact with various smart contracts, and make the important actions accessible to smart accounts.
## Add Custom Connectors
1. Fork and clone it
2. Create a feature branch: `git checkout -b new-connector`
3. Commit changes: `git commit -am 'Added a connector'`
4. Push to the remote branch: `git push origin new-connector`
2020-05-02 12:20:19 +00:00
5. Create a new Pull Request
2020-05-02 12:07:39 +00:00
2020-05-01 16:57:32 +00:00
## Requirements
2020-05-02 09:40:50 +00:00
- The contracts should not have `selfdestruct()`.
- The contracts should not have `delegatecall()`.
2020-05-02 12:18:39 +00:00
- Use `uint(-1)` for maximum amount everywhere.
- Import files from common directory.
- If needed, add `getId` & `setId`, two additional parameter for external public facing functions to fetch or store values.
2020-05-02 12:25:40 +00:00
- Use `getEthAddr()` to get an address to denote Ethereum (non-ERC20) related operations.
2020-05-02 12:18:39 +00:00
- Use `getUint()` or `setUint()` functions to fetch or store values.
- Call `emitEvent()` after every external public facing functions to follow a common event standard for better analytics.
2020-05-01 16:01:43 +00:00
2020-05-02 12:28:26 +00:00
Check out [mock.sol](https://github.com/InstaDApp/dsa-connectors/blob/master/contracts/connectors/mock.sol) for reference.
2020-05-02 12:07:39 +00:00
## Support
2020-05-01 16:01:43 +00:00
2020-05-02 12:07:39 +00:00
If you can't find something you're looking for or have any questions, ask them at our developers community on [Telegram](https://t.me/instadevelopers), [Discord](https://discord.gg/83vvrnY) or simply send an [Email](mailto:info@instadapp.io).