-
Notifications
You must be signed in to change notification settings - Fork 123
Closed
Labels
good first issueGood for newcomersGood for newcomers
Description
The stellar contract invoke command currently displays __constructor as an available function to invoke, but this is misleading because:
- The
__constructorfunction is automatically called during contract deployment - It should not be listed as an available function for the invoke command
- Users may attempt to invoke it manually, which would fail or be confusing
This creates confusion for users who might think they can manually invoke the constructor after deployment, when in fact it's only called once during the deploy process. The invoke command should filter out constructor functions to avoid this confusion.
Steps to reproduce
- Deploy a contract with a constructor
- Run
stellar contract invoke --id <contract_id> --listor similar - Observe that
__constructorappears in the list of invokable functions
Expected behavior
The __constructor function should not appear in the list of functions available for invocation.
Example
$ stellar contract invoke --id testc
Usage: stellar contract invoke --id testc -- [COMMAND]
Commands:
__constructor
name
symbol
decimals
total_supply
balance_of
transfer
transfer_from
approve
allowance
mint
burn
help Print this message or the help of the given subcommand(s)
Options:
-h, --help
Print helpMetadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers
Type
Projects
Status
Done