Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

Add EthAccount support as plugin #344

Open
andrew-fleming opened this issue Jan 24, 2023 · 0 comments
Open

Add EthAccount support as plugin #344

andrew-fleming opened this issue Jan 24, 2023 · 0 comments
Labels

Comments

@andrew-fleming
Copy link
Contributor

Nile currently only supports the standard OZ account. While EthAccount could be integrated into Nile, I think it's preferable for EthAccount support to exist as a plugin because it's not part of the core functionality of Nile—it's a nice-to-have. If the plugin approach seems preferable, this will supersede #337.

The refactored tx flow of Nile enables a fairly simple process for creating this plugin. #341 offers a roadmap (albeit a messy one). Here's a supplemental guide for the plugin.

Artifacts

Simply compile and store the EthAccount artifact and ABI.

eth_signer

This is already done here https://github.com/andrew-fleming/nile/blob/eth-account/src/nile/signer.py#L80-L94

eth_transactions

Most (if not all) of the work is already done here https://github.com/andrew-fleming/nile/blob/eth-account/src/nile/core/types/account.py

Note that the only real changes include signing the tx with the EthSigner, passing the signature correctly, and setting the abi path to EthAccount.

eth_account

This area is partially done in the drafted PR. Take note that signer.public_key needs to be signer.eth_address. It seems like most of the work will focus on deploying EthAccount (deploy an EthAccount from a standard Account as a workaround during development). Otherwise, most of the code can be c/p from account.py.

eth_counterfactual_address

Needs to be done.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
No open projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant