-
Notifications
You must be signed in to change notification settings - Fork 76
Replace subprocess with direct python calls #169
Replace subprocess with direct python calls #169
Conversation
if signature is None: | ||
signature = [] | ||
|
||
tx = Declare( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we sending the transaction at this low level instead of using the declare function directly?
I think we are trying to address two problems at the same time, the first one being replacing subprocess calls with direct python calls (as the name of the PR states), and the second one is obtaining output in a better format than string (from print statements).
To solve the first problem, we can import and use the commands from the starknet.cli
module directly, (like declare), we don't need to simulate the implementation of that command (as I think we are trying to do with the current code). The current code solves the second problem though, because sadly starknet doesn't provide a Runtime Environment, so to get the output in a better format, we need to "hack" the cli.
Summarizing I think we could replace subprocess more easily by using the CLI commands where we currently call subprocess (I may be missing the full picture). But I think the second problem of course is still super important (could be separated into a different issue maybe?).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ericnordelo I totally agree with the above points^ haha that's why in the new PR (#236), we are using the starknet_cli
directly. I'll close this PR to avoid further confusion. Sorry about that!
This PR proposes to replace subprocess with direct python calls for StarkNet interaction.
Resolves #161.