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 Safe Actions (Create Tx, Sign Tx, and Execute Tx) #2

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

escottalexander
Copy link
Collaborator

This doesn't work but wanted to make it visible in case someone is inspired to take a look at the issue. The issue I am seeing is that I am initializing Safe with a public provider and so it does not support signing methods (because there is no wallet attached). You can see how I get around it in the createSafe action but the rest are not working.

@escottalexander escottalexander changed the title WIP Add Safe Actions (Create Tx, Sign Tx, and Execute Tx) Feb 9, 2025
@escottalexander
Copy link
Collaborator Author

This is finally working after doing a lot from scratch. I know a lot more about Safe now though.

@escottalexander escottalexander marked this pull request as ready for review February 9, 2025 07:45
* @param message - The message to sign.
* @returns The signed message.
*/
async signMessage(message: string | { raw: `0x${string}` }): Promise<`0x${string}`> {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If you can't tell. Instead of extending ViemWalletProvider (from agentkit) I just added all the methods here then changed this one method so that you can pass the { raw: 0x${string} } object in. This was required to get a valid signature. It seems ludicrous that CB doesn't support it out of the box since Viem does.

Copy link

vercel bot commented Feb 9, 2025

@azf20 is attempting to deploy a commit to the azf20's projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

3 participants