smartcontractkit / external-adapters-js

Monorepo containing JavaScript implementation of external adapters
MIT License
268 stars 302 forks source link

Change set-token-index EA to return wei balances with order of magnitude matching the underlying tokens decimals. #3315

Closed cawthorne closed 3 months ago

cawthorne commented 3 months ago

Closes #DF-20071

Description

Fixes the set-token-index EA to provide token balances which are properly scaled to the correct size.

Changes

Scale down the balance of a token allocations by 10^(18-tokenDecimals), to account for the adapter contract normalising all token balances to 18 decimals:

Steps to Test

yarn && yarn setup && yarn test set-token-index

changeset-bot[bot] commented 3 months ago

🦋 Changeset detected

Latest commit: 8c177cc6168363418594798fca812aeee270f974

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ---------------------------------- | ----- | | @chainlink/set-token-index-adapter | Major |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR