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 Aptos plugin #818

Merged
merged 5 commits into from
Dec 5, 2024
Merged

feat: add Aptos plugin #818

merged 5 commits into from
Dec 5, 2024

Conversation

0xaptosj
Copy link
Contributor

@0xaptosj 0xaptosj commented Dec 3, 2024

Relates to:

Risks

Background

What does this PR do?

Introducing new plugin for agent to manage an Aptos wallet.

What kind of change is this?

Now agent can manage an Aptos wallet and send APT token to others.

Documentation changes needed?

Testing

Where should a reviewer start?

Go to the aptos-plugin directory. To keep things simple, I only support transferring APT at the moment. Will add more functionalities later.

Detailed testing steps

Enable the aptos-plugin in the test agent, set the aptos wallet private key and network in .env.

For unit test, run pnpm test in plugin-aptos directory.

For end to end test, replace default character at this line with this custom character that enables aptos.

   const character = defaultCharacter;
    let customAptosPlugin = aptosPlugin;
    let customTransferAptToken = TransferAptosToken;
    customTransferAptToken.validate = async (content, runtime, callback) => {
        return true;
    };
    customAptosPlugin.actions = [customTransferAptToken];
    character.plugins = [customAptosPlugin];
    character.modelProvider = ModelProviderName.OPENAI;
    let characters = [character];

@0xaptosj 0xaptosj changed the title Aptos plugin feat: add Aptos plugin Dec 3, 2024
@0xaptosj
Copy link
Contributor Author

0xaptosj commented Dec 4, 2024

@shakkernerd gmgn ser I've added the unit test, feel free to take another look

@shakkernerd
Copy link
Member

@0xaptosj GM - kudos for writing the tests.
I am looking into this now.

Copy link
Member

@shakkernerd shakkernerd left a comment

Choose a reason for hiding this comment

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

LFG Aptos!

@shakkernerd shakkernerd merged commit 079d848 into elizaOS:main Dec 5, 2024
4 checks passed
@obsrvgmi
Copy link

obsrvgmi commented Dec 5, 2024

lfg

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.

4 participants