Need `--account-contract` flag when importing `IAccount`
See original GitHub issueIAccount exopses the __execute__ function which gets the cairo-compiler to yell and error like this:
Only account contracts may have a function named "__execute__". Use --account-contract flag.
Failed
Unfortunately this means I can’t write a contract that includes IAccount without adding the --account-contract flag (which is plain wrong because I’m NOT writing an account contract but simply interacting with one!).
Not sure OZ can do anything about it, I think we need to address this to the StarkWare team but just putting it out there 😃
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:12 (7 by maintainers)
Top Results From Across the Web
Utilities - OpenZeppelin Docs
Account. MockSigner ... from utils import State starknet = await State.init() ... The Account class also provides access to the account contract class...
Read more >How do I get my accounts' positions at Interactive Brokers ...
When I run the code above I get a series of (i) account numbers, (ii) the contract symbol, (iii) position and (iv) average...
Read more >Convert registered shoppers to account-based shoppers
Export registered shoppers using bulk export API to a CSV or JSON format. See the section Perform Bulk Export and Import for more...
Read more >Adding User Authentication — StarkNet documentation
A map from user (represented by account contract address) // to their balance. ... from starkware.starknet.common.syscalls import get_caller_address ...
Read more >ape-starknet - PyPI
See the section below about Testing to learn more about test accounts. However, when using a live network, you will have to import...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

This is related to the #291 and it’s already fixed in the main branch of openzeppelin-cairo-contracts.
openzeppelin-cairo-contracts v0.1.0 is broken.
No, we’re really close to
0.2.0and it would be a ton of work to cherrypick non-breaking changes to release0.1.1.I still think the flag is problematic and I vote for removing it, see https://github.com/OpenZeppelin/nile/pull/112 for example.