Installation

To install the DZapDcaClient SDK, use either npm or yarn:

npm install dzap-dca-client 
# or
yarn add dzap-dca-client 

Prerequisites

Before using the DCA functionalities, it's essential to grant token allowances to the DZap DCA contract. The DZapDcaClient SDK supports two approval methods:

  • Permit2 Approval: Recommended for most use cases, this standard method enables users to authorize the DZap DCA contract to manage tokens by signing a permit.

  • ERC20 Token Approval: In this method, users directly approve token allowance to the DZap DCA contract.

Developers should choose an appropriate approval method based on user needs and project requirements.

Allowance and Approval

To allow the DZap DCA contract to manage trades on behalf of users, set up token allowances. The default method for allowances is Permit2. If you prefer direct ERC20 approvals, change the default behavior using the setConfig method.

Last updated