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

feat: add coinbase plugin starting with cb commerce functionality #513

Merged
merged 38 commits into from
Nov 22, 2024

Conversation

monilpat
Copy link
Collaborator

Relates to:

Integration of a Coinbase Commerce plugin into the project, starting with charge creation functionality. This ticket covers initial support for interacting with the Coinbase Commerce API and lays the foundation for extending features to the broader Coinbase SDK.


Risks

  • Medium: Integration with external APIs can introduce potential downtime or unexpected behavior due to changes in the Coinbase Commerce API.
  • Low: Incorrect API usage or configuration could result in failed requests or unhandled errors affecting the user experience.
  • Medium: Mismanagement of sensitive API keys could lead to security vulnerabilities.

Background

What does this PR do?

This PR introduces a plugin for interacting with the Coinbase Commerce API, enabling the creation of payment charges. It includes:

  • Charge Creation: Allows users to create charges with parameters like price, currency, name, and description.
  • Fetch All Charges: Retrieves a list of all charges created via the API.
  • Get Charge Details: Fetches detailed information for a specific charge using its unique ID.
  • Provides a foundation for extending functionality to other Coinbase SDK features (e.g., payments, events).

What kind of change is this?

  • Feature: Non-breaking change that adds new functionality.

Why are we doing this? Any context or related work?

This integration enables seamless payment handling using Coinbase Commerce, allowing users to:

  • Generate crypto-based payment links.
  • Fetch and manage charges efficiently.
  • Extend payment functionality across Coinbase's ecosystem as the plugin evolves.

Documentation changes needed?

  • Yes:
    • Update the project documentation to include usage instructions for the Coinbase Commerce plugin.
    • Provide details on required API keys, configuration, and example commands for creating and managing charges.

Testing

Where should a reviewer start?

  • Review the coinbaseCommercePlugin implementation in the plugins directory.
  • Focus on the createCharge, getAllCharges, and getChargeDetails functions to ensure proper API handling and validation.

Detailed testing steps

  1. Setup:

    • Ensure a valid Coinbase Commerce API key is available.
    • Configure the API key in the plugin's settings.
  2. Test Charge Creation:

    • Execute the charge creation action with valid parameters (e.g., price, currency, name, and description).
    • Verify the charge is created successfully and the API response matches expectations.
  3. Test Fetch All Charges:

    • Call the fetch-all-charges action.
    • Verify the response includes all previously created charges.
  4. Test Fetch Charge Details:

    • Call the get-charge-details action using a valid charge ID.
    • Verify the response contains the expected details for the specified charge.

https://drive.google.com/file/d/1GyZlESqB7UL7TL5ti--reaEi2UbpDZa8/view?usp=sharing

Deploy Notes

  • Ensure the environment has the COINBASE_COMMERCE_KEY set correctly.
  • Verify network access to the Coinbase Commerce API.
  • No database changes are required for this feature.

Deployment instructions

  1. Deploy the updated plugin files to the production environment.
  2. Set the COINBASE_COMMERCE_KEY environment variable with a valid API key.
  3. Test the integration with the live Coinbase Commerce API to ensure functionality.

Discord username

0x8664

monilpat and others added 11 commits November 20, 2024 12:00
Add comprehensive documentation for template and client configurations:
- Document all available template override options
- Add client configuration settings for bot and DM handling
- Include JSON examples and best practices
- Add configuration guidelines for Discord, Telegram and Twitter clients

Part of the documentation improvement effort to help users better understand 
and customize their character's behavior across different platforms.
@monilpat monilpat marked this pull request as ready for review November 22, 2024 05:47
@monilpat monilpat marked this pull request as draft November 22, 2024 05:47
@monilpat monilpat marked this pull request as ready for review November 22, 2024 05:55
Copy link
Contributor

@pgoos pgoos left a comment

Choose a reason for hiding this comment

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

Great work @monilpat . I left one comment not blocking.

@jkbrooks
Copy link
Contributor

Two conflicts

.env.example
pnpm-lock.yaml

@pgoos @monilpat

…ckages

test: add linter to all packages and enable vitest
@monilpat
Copy link
Collaborator Author

Two conflicts

.env.example
pnpm-lock.yaml

@pgoos @monilpat

Yeah for sure taking a look :)

@jkbrooks jkbrooks merged commit 5ea1551 into elizaOS:main Nov 22, 2024
2 checks passed
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.

8 participants