Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Carbon DeFi #1

Closed
wants to merge 8 commits into from
Closed

Feature: Carbon DeFi #1

wants to merge 8 commits into from

Conversation

tiagofilipenunes
Copy link
Collaborator

No description provided.

userAddress,
blockNumber,
}: GetPositionsInput): Promise<ProtocolPosition[]> {
const carbonControllerContract = CarbonController__factory.connect(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't we pre-define these?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's auto-generated using npm run build-types - was useful in getting types for event logs. The approach is part of the acceptance criteria in the readme:

> ### Acceptance Criteria:
>
> 1. **Multiple Products Consideration:** Ensure that protocols with multiple products (e.g., farming, staking, pools) are supported by one adapter each.
> 2. **Adapter Implementation:** Successfully add a new DeFi adapter implementing the IProtocolAdapter to support the product.
> 3. **Add Adapter using CLI:**
> - Follow instructions in the "Adding a new Adapter (CLI)" section of the readme.
> 4. **Ethers Contracts Creation:**
> - Create ethers contracts to interact with the smart contracts of the protocol.
> - Refer to the "Contract Factories" section in the readme for guidance.
> 5. **LP Token Metadata Building:** Implement the `buildMetadata()` logic in the adapter to retrieve the LP token reference data and run `npm run build-metadata`. (e.g., Check out the `buildMetadata()` method in the [`StargatePoolAdapter` class](https://github.com/consensys-vertical-apps/mmi-DeFi-adapters/blob/main/src/adapters/stargate/products/pool/stargatePoolAdapter.ts).
> [output example](src/adapters/stargate/products/pool/metadata/ethereum.lp-token.json)).
> 6. **Testing:** Test the adapter(s) using the commands specified in the readme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants