Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Cannot replay transactions - examples from docs don't work #550

Closed
RomanBrodetski opened this issue Jan 17, 2025 · 1 comment
Closed
Labels
bug 🐛 Something isn't working

Comments

@RomanBrodetski
Copy link

🐛 Bug Report for anvil-zksync

📝 Description

When running replay_tx command from docs, I get the following error:

anvil-zksync --show-calls=user --resolve-hashes replay_tx sepolia-testnet 0x7119045573862797257e4441ff48bf5a3bc4d133a00d167c18dc955eda12cfac

➜  src anvil-zksync --show-calls=user --resolve-hashes replay_tx sepolia-testnet 0x7119045573862797257e4441ff48bf5a3bc4d133a00d167c18dc955eda12cfac

error: unrecognized subcommand 'sepolia-testnet'

Usage: anvil-zksync [OPTIONS] [COMMAND]

For more information, try '--help'.

Interestingly, when changing the command slightly, it hangs:

anvil-zksync replay_tx --fork-url sepolia-testnet 0xeb494ee11fe95551e5e227538ce3db60dc0c80e6f9140431d94e2672d098baf8

But if I add the params mentioned above, it complains on --fork-url:

➜  src anvil-zksync  --show-calls=user --resolve-hashes replay_tx --fork-url sepolia-testnet 0x7119045573862797257e4441ff48bf5a3bc4d133a00d167c18dc955eda12cfac
error: unexpected argument '--fork-url' found

Usage: anvil-zksync <--offline|--health-check-endpoint|--config-out <OUT_FILE>|--port <PORT>|--host <IP_ADDR>|--chain-id <CHAIN_ID>|--debug-mode|--show-node-config [<SHOW_NODE_CONFIG>]|--show-tx-summary [<SHOW_TX_SUMMARY>]|--disable-console-log [<DISABLE_CONSOLE_LOG>]|--show-event-logs [<SHOW_EVENT_LOGS>]|--show-calls <SHOW_CALLS>|--show-outputs [<SHOW_OUTPUTS>]|--show-storage-logs <SHOW_STORAGE_LOGS>|--show-vm-details <SHOW_VM_DETAILS>|--show-gas-details <SHOW_GAS_DETAILS>|--resolve-hashes [<RESOLVE_HASHES>]|--l1-gas-price <L1_GAS_PRICE>|--l2-gas-price <L2_GAS_PRICE>|--l1-pubdata-price <L1_PUBDATA_PRICE>|--price-scale-factor <PRICE_SCALE_FACTOR>|--limit-scale-factor <LIMIT_SCALE_FACTOR>|--override-bytecodes-dir <OVERRIDE_BYTECODES_DIR>|--dev-system-contracts <DEV_SYSTEM_CONTRACTS>|--emulate-evm|--log <LOG>|--log-file-path <LOG_FILE_PATH>|--silent [<SILENT>]|--cache <CACHE>|--reset-cache <RESET_CACHE>|--cache-dir <CACHE_DIR>|--accounts <NUM>|--balance <NUM>|--timestamp <NUM>|--init <PATH>|--state <PATH>|--state-interval <SECONDS>|--dump-state <PATH>|--preserve-historical-states|--load-state <PATH>|--mnemonic <MNEMONIC>|--mnemonic-random [<MNEMONIC_RANDOM>]|--mnemonic-seed-unsafe <MNEMONIC_SEED>|--derivation-path <DERIVATION_PATH>|--auto-impersonate|--block-time <SECONDS>|--no-mining|--allow-origin <ALLOW_ORIGIN>|--no-cors|--order <ORDER>>

however if I put this param before replay_tx, it tips me that it actually exists:

➜  src anvil-zksync  --show-calls=user --resolve-hashes --fork-url sepolia-testnet replay_tx  0x7119045573862797257e4441ff48bf5a3bc4d133a00d167c18dc955eda12cfac
error: unexpected argument '--fork-url' found

  tip: 'replay_tx --fork-url' exists

📋 Version

➜  src anvil-zksync --version                                                                                                                                    
anvil-zksync 0.2.4

@RomanBrodetski RomanBrodetski added the bug 🐛 Something isn't working label Jan 17, 2025
@RomanBrodetski RomanBrodetski changed the title Cannot replay transactions: examples from docs don't work Bug: Cannot replay transactions - examples from docs don't work Jan 17, 2025
@dutterbutter
Copy link
Collaborator

dutterbutter commented Jan 17, 2025

@RomanBrodetski this was just fixed here: #544 and I've updated the docs here: matter-labs/zksync-docs#307

We will make a release Monday. In the meantime you can install from source and run:

anvil-zksync --show-calls=all --resolve-hashes=true replay_tx --fork-url sepolia-testnet 0x7119045573862797257e4441ff48bf5a3bc4d133a00d167c18dc955eda12cfac

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants