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

add Cardano Blockchain Plugin #1768

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

haskell-monad
Copy link

Relates to:

Risks

  • no new risks presented

Background

What does this PR do?

Introduce new Eliza Agent Plugin to manage a Cardano Wallet

What kind of change is this?

Features (non-breaking change which adds functionality)

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

Add the ability for Eliza agents to interface with the Cardano Blockchain.

Documentation changes needed?

My changes do not require a change to the project documentation.

Testing

Where should a reviewer start?

  • get free maestro api key and set plugin-cardano/src/tests/wallet.test.ts#L52
    • const maestro = "";
  • Goto packages/plugin-cardano directory
  • Run pnpm i
  • Run pnpm test
Cache miss for fetchPortfolioValue
Cache miss for fetchPrices

 ❯ src/tests/wallet.test.ts (1)
   ❯ Wallet provider (1)
     ❯ Wallet Integration (1)
stdout | src/tests/wallet.test.ts > Wallet provider > Wallet Integration > should check wallet address
Wallet balance:  [
  { unit: 'lovelace', quantity: '146812325' },
  {
    unit: '16aa7cc0a0e79122e8132fbb2f88f30488a3ef32f9a079b33c6214595441555344',
    quantity: '10'
  },
  {
    unit: '4f752be20bd3027c0fdded74f78fea0f9ab2355a3fe9152f909206e50014df10574f57',
    quantity: '100'
  }
]
Fetched portfolio: { totalUsd: '144.8009961475', totalAda: '146.812325' }
Cache miss for fetchPrices

stdout | src/tests/wallet.test.ts > Wallet provider > Wallet Integration > should check wallet address
Wallet balance:  [
  { unit: 'lovelace', quantity: '146812325' },
  {
    unit: '16aa7cc0a0e79122e8132fbb2f88f30488a3ef32f9a079b33c6214595441555344',
    quantity: '10'
  },
  {
    unit: '4f752be20bd3027c0fdded74f78fea0f9ab2355a3fe9152f909206e50014df10574f57',
    quantity: '100'
  }
]
portfolio:  { totalUsd: '144.8009961475', totalAda: '146.812325' }

stdout | src/tests/wallet.test.ts > Wallet provider > Wallet Integration > should check wallet address
txId:  1988f9bd0abf9e6ea45e8ad6b6495be0dc50bf1494427c5876992a1c83cb293b

 ✓ src/tests/wallet.test.ts (1) 4395ms
   ✓ Wallet provider (1) 4395ms
     ✓ Wallet Integration (1) 4350ms
       ✓ should check wallet address 4349ms

 Test Files  1 passed (1)
      Tests  1 passed (1)
   Start at  00:58:12
   Duration  6.75s (transform 311ms, setup 0ms, collect 1.89s, tests 4.40s, environment 0ms, prepare 88ms)

Detailed testing steps

For e2e Test:

  • Replace Default Character Here
    // Replace the existing character initialization with custom setup
    const character = defaultCharacter;

    character.plugins = [cardanoPlugin];
    character.modelProvider = ModelProviderName.GOOGLE;
    let characters = [character];
image

Discord username

@sell_ada_buy_sol

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Hi @haskell-monad! Welcome to the ai16z community. Thanks for submitting your first pull request; your efforts are helping us accelerate towards AGI. We'll review it shortly. You are now a ai16z contributor!

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.

1 participant