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

Invoke command not working #202

Closed
ericnordelo opened this issue Sep 22, 2022 · 2 comments · Fixed by #227
Closed

Invoke command not working #202

ericnordelo opened this issue Sep 22, 2022 · 2 comments · Fixed by #227
Assignees
Milestone

Comments

@ericnordelo
Copy link
Member

In the last starknet vesion, the --no_wallet option can only be set when the target method is __execute__. We are setting --no_wallet for the invoke command, and is always raising an AssertException from starknet cli.

@ericnordelo ericnordelo moved this to 📋 Backlog in Cairo team Sep 22, 2022
@ericnordelo ericnordelo added this to the next milestone Sep 22, 2022
@ericnordelo ericnordelo self-assigned this Oct 5, 2022
@ericnordelo
Copy link
Member Author

Now starknet invoke command requires to send always transactions through accounts (either with starknet wallet or calling directly the __execute__ entry point in an account with the --no_wallet flag).

We then have two options as far as I see for the nile invoke command: we either let the command only to call accounts (NOT necessarily deployed by nile setup) directly using the __execute__ entry point, or remove it, letting send as the only option for state modifying calls.

Keeping in mind that, for using an already deployed account (maybe from other project or third-party deployer) whose version is our own (openzeppelin version), we can just add the entry to the deployments file with the address and the ABI, and we can automatically use it with the send command, as long as we have the private key matching the alias. Then invoke for __execute__ would be util only for calls to accounts that are not openzeppelin's. But for these calls, the signature must be passed directly from the CLI (or NRE) because nile won't be able to infer what kind of signature the account contract requires, even having the private key (signature type is not enforced by the protocol but defined from the account __validate__ entry point).

This feature wouldn't be used often in my opinion, and is not a requirement for nile (allowing invoke calls passing the signature manually for the specific account). Then, I think the better approach is the second option: removing the invoke command completely and supporting only send for this matter.

@ericnordelo ericnordelo moved this from 📋 Backlog to 🏗 In progress in Cairo team Oct 5, 2022
@martriay martriay modified the milestones: next, current Oct 6, 2022
@ericnordelo ericnordelo linked a pull request Oct 6, 2022 that will close this issue
@ericnordelo ericnordelo moved this from 🏗 In progress to 👀 In review in Cairo team Oct 6, 2022
@ericnordelo
Copy link
Member Author

I moved the size from Medium to Small because the issue was smaller than it seemed (removing the invoke command instead of refactoring it).

Repository owner moved this from 👀 In review to ✅ Resolved in Cairo team Oct 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants