Awesome list of DSA Connectors
Go to file
2020-05-15 23:59:48 +05:30
contracts Removed TODO 2020-05-15 23:59:48 +05:30
migrations Minor change in migration script. 2020-05-03 05:44:25 +05:30
.gitignore
package-lock.json
package.json Updated package.json 2020-05-03 05:42:58 +05:30
README.md Updated Readme 2020-05-04 07:26:42 +05:30
truffle-config.js Added mainnet truffle config 2020-05-04 06:21:01 +05:30

DSA Connectors

Connectors are standard modules that let DeFi Smart Account interact with various smart contracts, and make the important actions accessible like cross protocol interoperability.

Add Custom Connectors

  1. Fork and clone it
  2. Create a feature branch: git checkout -b new-connector
  3. Add the connector solidity file to contracts/connectors
  4. Commit changes: git commit -am 'Added a connector'
  5. Push to the remote branch: git push origin new-connector
  6. Create a new Pull Request.

Requirements

  • Import common files from contracts/common directory.
  • The contracts should not have selfdestruct().
  • The contracts should not have delegatecall().
  • Use uint(-1) for maximum amount everywhere.
  • Use getEthAddr() to denote Ethereum (non-ERC20).
  • Use address(this) instead of msg.sender for fetching balance on-chain, etc.
  • While giving ERC20 allowance to contracts, only approve() the limited amount, which needs to be 0 by the end of the spells.
  • If required, Add two additional parameter, getId & setId in external public functions.
  • Use getUint() or setUint() functions to fetch or store values.
  • Call emitEvent() after every external public functions.

Be sure to check this mock file for reference.

Support

If you can't find something you're looking for or have any questions, ask them at our developers community on Telegram, Discord or simply send an Email.