-
Notifications
You must be signed in to change notification settings - Fork 77
Support specifying chain ID #358
Conversation
Just thinking that maybe adding a test for it would be nice but I'm not sure how to verify this chain id in the test. I'll try to find out. |
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.
The Updated the tests
checkbox shouldn't be checked if no tests were introduced.
I would recommend testing an illegal value (see test_fork_cli.py
for reference).
A way to test if MAINNET chain ID is set up correctly is to assert that transactions signed using chain_id=TESTNET fail. Notice that in test/account.py::_get_transaction_hash
we have StarknetChainId.TESTNET
hardcoded - it should be made configurable. It should be asserted that a tx is accepted when the correct chain id is used for signing.
[skip ci]
[skip ci]
[skip ci]
Usage related changes
--chain_id
argument as "MAINNET" or "TESTNET"Development related changes
DEFAULT_GENERAL_CONFIG
is now assignet tobuild_devnet_general_config()
function in tests.Checklist:
./scripts/format.sh
./scripts/lint.sh