Skip to content

Commit

Permalink
Send Solana Transaction Autonomously (#9)
Browse files Browse the repository at this point in the history
* feat: add solana SOL balance provider example

Signed-off-by: Gita Alekhya Paul <[email protected]>

* feat: send sol action

Signed-off-by: Gita Alekhya Paul <[email protected]>

---------

Signed-off-by: Gita Alekhya Paul <[email protected]>
  • Loading branch information
gitaalekhyapaul authored Jan 3, 2025
1 parent 2a485ef commit 3728ab4
Show file tree
Hide file tree
Showing 8 changed files with 516 additions and 3 deletions.
1 change: 1 addition & 0 deletions server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"@ai16z/plugin-bootstrap": "0.1.5-alpha.3",
"@grammyjs/conversations": "^1.2.0",
"@ngrok/ngrok": "^1.4.1",
"@solana/web3.js": "^1.98.0",
"axios": "^1.7.7",
"better-sqlite3": "^11.6.0",
"cookie-parser": "^1.4.7",
Expand Down
1 change: 1 addition & 0 deletions server/src/plugins/actions/collabland.action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export abstract class CollabLandBaseAction implements Action {
}

protected handleError(error: AnyType): void {
console.log(error);
if (axios.isAxiosError(error)) {
console.dir(error.response?.data, { depth: null });
throw new Error(
Expand Down
13 changes: 13 additions & 0 deletions server/src/plugins/actions/get-chain.action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,19 @@ export class GetChainAction extends CollabLandBaseAction {
action: "EXTRACT_CHAIN",
},
},
{
user: "{{user1}}",
content: {
text: "What is your account on solana?",
},
},
{
user: "{{agentName}}",
content: {
text: "",
action: "EXTRACT_CHAIN",
},
},
],
];
super(name, description, similes, examples, handler, validate);
Expand Down
Loading

0 comments on commit 3728ab4

Please sign in to comment.