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

Make wallet.getContractInstance fetch contract instance from both PXE and AztecNode #10787

Open
benesjan opened this issue Dec 17, 2024 · 0 comments
Labels
A-ux/devex Area: relates to external ux / devex. (Users typically are devs) (See also A-internal-devex)

Comments

@benesjan
Copy link
Contributor

@porco-rosso-j reported the following:

Currently, PXE doesn't have an easy way to register ( import ) an existing contract that's been deployed in other PXEs. Contract instance, one of the pxe.registerContract()'s param, has to be manually reconstructed which requires several params such as, salt, constructor args, public keys, deployer wallet address, etc.

*pxe.getContractInstance() only returns instance stored in db if it's already been registered, or undefined.

Santiago proposed that the best solution would be to have the function on wallet request for the instance both in PXE and in AztecNode and return undefined only if the instance was not found in any of these.

I think this is a reasonable solution as it allows us to declutter PXE (currently in plenty of the endpoints we just forward the requests to aztec node which is not great).

@benesjan benesjan added the A-ux/devex Area: relates to external ux / devex. (Users typically are devs) (See also A-internal-devex) label Dec 17, 2024
@benesjan benesjan changed the title Make wallet.getContractInstance fetcg contract instance from both PXE and AztecNode Make wallet.getContractInstance fetch contract instance from both PXE and AztecNode Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ux/devex Area: relates to external ux / devex. (Users typically are devs) (See also A-internal-devex)
Projects
None yet
Development

No branches or pull requests

2 participants
@benesjan and others