Foundry-ZKSync supported commands
This is a comprehensive review of all the Foundry commands actually supported in the actual stage of development.
π Last update: September 12, 2024
| Command | Status | Description | 
|---|---|---|
| forge bind | β Supported | Generates type-safe bindings for Solidity contracts, which can be used in other programming languages like Go. | 
| forge bind-json | β Supported | Similar to forge bind, but generates bindings directly from JSON ABI files. | 
| forge build | β Supported | Compiles Solidity contracts and generates build artifacts, such as ABI and bytecode files. | 
| forge clone | β Supported | Clones an existing project from a Git repository, setting up a new Foundry project. | 
| forge completions | β Supported | Generates shell completion scripts for forge, enhancing command-line usability. | 
| forge config | β Supported | Displays or modifies the configuration settings for a Foundry project. | 
| forge create | β Supported | Deploys a Solidity contract to a blockchain network, handling the transaction and deployment process. | 
| forge doc | β Supported | Generates documentation for Solidity contracts, extracting comments and annotations into a readable format. | 
| forge flatten | β Supported | Flattens a Solidity contract and its dependencies into a single file, useful for verification or analysis. | 
| forge coverage | β Not Supported | Runs tests and generates a code coverage report, showing how much of the code is covered by tests. | 
| forge debug | β Not Supported | Debugs a transaction on a local fork or a live network, allowing you to step through the execution. | 
| forge cache clean | β Supported | Clears the local cache, removing stored build artifacts and other cached data. | 
| forge cache ls | β Supported | Lists the contents of the local cache, including build artifacts and other data. | 
| forge clean | β Not Supported | Removes build artifacts and resets the projectβs build state. | 
| forge eip712 | β Supported | Generates EIP-712 typed data structures for Solidity contracts, used for off-chain signing and verification. | 
| forge fmt | β Supported | Formats Solidity source code according to a standard style guide, ensuring consistency. | 
| forge geiger | β Supported | Analyzes a Solidity project for unsafe or potentially insecure code patterns, helping to improve security. | 
| forge generate | β Supported | Automatically generates Solidity code or tests based on specified templates or patterns. | 
| forge generate test | β Supported | Generates boilerplate test files for Solidity contracts, speeding up the testing process. | 
| forge generate-fig-spec | β Supported | Generates a Fig spec for Forge, which can be used to create command-line autocomplete functionality. | 
| forge init | β Supported | Initializes a new Foundry project, creating the necessary directories and configuration files. | 
| forge inspect | β Not Supported | Inspects the details of a Solidity contract, such as ABI, bytecode, and other metadata. | 
| forge install | β Supported | Installs dependencies from the Foundry package manager, adding them to the project. | 
| forge remappings | β Supported | Manages remappings for Solidity imports, allowing for custom paths or package names. | 
| forge remove | β Supported | Removes a dependency from the project, cleaning up any related files or configuration. | 
| forge script | β Supported | Executes Solidity scripts, which can be used for tasks like deploying contracts or interacting with the blockchain. | 
| forge selectors | β Supported | Extracts and manages function selectors from Solidity contracts, used for interacting with contracts. | 
| forge selectors collision | β Supported | Detects and reports any selector collisions in Solidity contracts, preventing potential conflicts. | 
| forge selectors upload | β Supported | Uploads function selectors to a specified registry, making them available for use in other projects. | 
| forge selectors list | β Supported | Lists all function selectors in a Solidity contract, providing an overview of its interface. | 
| forge snapshot | β Supported | Creates a snapshot of the current state of tests, which can be used to check for regressions. | 
| forge soldeer install | β Supported | Installs a specific version of Soldeer, ensuring compatibility with the project. | 
| forge soldeer update | β Supported | Updates the Soldeer installation to the latest version, applying any necessary patches or improvements. | 
| forge soldeer login | β Supported | Logs into the Soldeer service, providing authentication for managing dependencies and projects. | 
| forge soldeer push | β Supported | Pushes changes to a Soldeer project, syncing them with the remote repository or service. | 
| forge soldeer version-dry-run | β Supported | Tests a version update of Soldeer without actually applying the changes, useful for checking compatibility. | 
| forge test | β Supported | Runs unit tests for Solidity contracts, with options for gas reporting, fuzzing, and more. | 
| forge tree | β Supported | Displays the dependency tree of the project, showing how contracts and libraries are interconnected. | 
| forge update | β Supported | Updates the projectβs dependencies to their latest versions, ensuring everything is up-to-date. | 
| forge verify-bytecode | β Not Supported | Verifies that a deployed contractβs bytecode matches the expected source code, ensuring it hasnβt been tampered with. | 
| forge verify-check | β Not Supported | Checks the verification status of a contract on a blockchain explorer like Etherscan, confirming that it has been successfully verified. | 
| forge verify-contract | β Supported | Verifies a deployed contract on Etherscan, ensuring it matches the source code. | 
| cast 4byte | β Supported | Fetches function signatures from the 4byte.directory by their selector. | 
| cast 4byte-decode | β Supported | Decodes a given 4-byte selector into its associated function signature. | 
| cast 4byte-event | β Supported | Fetches event signatures from the 4byte.directory by their selector. | 
| cast abi-decode | β Supported | Decodes ABI-encoded data into a human-readable format. | 
| cast abi-encode | β Supported | Encodes data into ABI format for function calls and transactions. | 
| cast access-list | β Not Supported | Generates an access list for a transaction, which can be used to optimize gas usage. | 
| cast address-zero | β Supported | Outputs the zero address (0x0000000000000000000000000000000000000000). | 
| cast admin | β Supported | Returns the admin of a specified proxy contract. | 
| cast age | β Supported | Calculates the age of a block in seconds. | 
| cast balance | β Supported | Retrieves the balance of an address in wei or ether. | 
| cast base-fee | β Supported | Fetches the base fee of the latest block, useful for estimating gas costs. | 
| cast bind (DEPRECATED) | β Supported | Generates Go bindings for Solidity contracts, similar to forge bind. | 
| cast block | β Supported | Retrieves detailed information about a specific block on the blockchain. | 
| cast block-number | β Supported | Returns the current block number of the Ethereum blockchain. | 
| cast call | β Supported | Executes a read-only (constant) call to a smart contract. | 
| cast call βcreate | β Not Supported | Calls a contract and creates a new contract in the same transaction. | 
| cast calldata | β Supported | Encodes function call data for a contract, which can be used in transactions. | 
| cast calldata-decode | β Supported | Decodes encoded calldata back into its original arguments. | 
| cast chain | β Not Supported | Displays information about the current Ethereum chain, including its name and ID. | 
| cast chain-id | β Supported | Returns the chain ID of the Ethereum network, which is used for transaction signing. | 
| cast client | β Supported | Fetches information about the connected Ethereum client, such as its version. | 
| cast code | β Supported | Retrieves the bytecode of a contract deployed at a specific address. | 
| cast codesize | β Supported | Returns the size of the bytecode at a specific address, in bytes. | 
| cast completions | β Supported | Generates shell completions for cast, improving command-line usability. | 
| cast compute-address | β Supported | Computes the Ethereum address for a contract deployed by a specific account. | 
| cast concat-hex | β Supported | Concatenates multiple hexadecimal values into a single hex string. | 
| cast create2 | β Supported | Computes the address of a contract deployed using the CREATE2 opcode. | 
| cast decode-eof | β Supported | Decodes Ethereum Object Format (EOF) bytecode, used in Ethereum contracts. | 
| cast decode-transaction | β Supported | Decodes the data and parameters of a raw transaction. | 
| cast disassemble | β Not Supported | Disassembles contract bytecode into readable EVM assembly instructions. | 
| cast estimate | β Not Supported | Estimates the gas cost of executing a transaction on the blockchain. | 
| cast estimate βcreate | β Not Supported | Estimates the gas cost for deploying a contract with a creation transaction. | 
| cast etherscan-source | β Supported | Fetches and displays the verified source code of a contract from Etherscan. | 
| cast find-block | β Supported | Finds a block based on a given timestamp, returning the block number. | 
| cast format-bytes32-string | β Supported | Converts a string into a bytes32 format for Solidity. | 
| cast from-bin | β Supported | Decodes binary-encoded data into a human-readable format. | 
| cast from-fixed-point | β Supported | Converts a fixed-point number into a human-readable string. | 
| cast from-rlp | β Supported | Decodes RLP-encoded data, commonly used in Ethereum transactions. | 
| cast from-utf8 | β Supported | Converts a UTF-8 string to a hex-encoded representation. | 
| cast from-wei | β Supported | Converts a value from wei (the smallest unit of ether) to ether. | 
| cast gas-price | β Supported | Fetches the current gas price on the Ethereum network. | 
| cast generate-fig-spec | β Supported | Generates a Fig spec for Cast, which can be used for command-line autocomplete functionality. | 
| cast hash-message (DEPRECATED) | β Supported | Hashes a message using Ethereumβs eth_sign method, preparing it for signing. | 
| cast hash-zero | β Supported | Returns the hash of an empty string (0x000β¦000) using Keccak-256. | 
| cast implementation | β Supported | Returns the implementation address of a specified proxy contract. | 
| cast index | β Not Supported | Fetches the indexed logs of an event from the blockchain, useful for querying historical data. | 
| cast index-erc7201 | β Supported | Fetches the logs of an ERC-7201 compliant event from the blockchain | 
| cast interface | β Not Supported | Generates a Solidity interface from a deployed contractβs ABI. | 
| cast keccak | β Supported | Computes the Keccak-256 hash of the provided input data. | 
| cast logs | β Supported | Fetches logs and events from the blockchain, based on specified filters. | 
| cast lookup-address | β Supported | Fetches the ENS name associated with a given Ethereum address, if any. | 
| cast max-int | β Supported | Outputs the maximum value for a signed 256-bit integer. | 
| cast max-uint | β Supported | Outputs the maximum value for an unsigned 256-bit integer. | 
| cast min-int | β Supported | Outputs the minimum value for a signed 256-bit integer. | 
| cast mktx | β Supported | Creates a transaction object without sending it, useful for offline signing. | 
| cast mktx βcreate | β Not Supported | Creates a transaction that deploys a contract, without sending it. | 
| cast namehash | β Supported | Computes the ENS namehash for a given domain name. | 
| cast nonce | β Supported | Retrieves the nonce of an Ethereum address, useful for determining transaction order. | 
| cast parse-bytes32-address | β Supported | Parses a bytes32 value into an Ethereum address. | 
| cast parse-bytes32-string | β Supported | Parses a bytes32 value into a human-readable string. | 
| cast pretty-calldata | β Supported | Formats calldata in a human-readable manner. | 
| cast proof | β Not Supported | Retrieves and displays a Merkle proof for a specific storage slot or account. | 
| cast publish | β Supported | Publishes a smart contractβs ABI to Etherscan. | 
| cast receipt | β Supported | Fetches and displays the receipt of a transaction, including gas used and status. | 
| cast resolve-name | β Supported | Resolves an ENS name to its associated Ethereum address. | 
| cast rpc | β Supported | Sends a raw JSON-RPC request to an Ethereum node, allowing low-level interaction. | 
| cast run | β Not Supported | Runs a script file, such as a .js or .ts file, with access to Cast functions. | 
| cast selectors | β Not Supported | Fetches the function selectors for a given contract or ABI. | 
| cast send | β Supported | Sends a transaction to the blockchain, including smart contract interactions. | 
| cast send βcreate | β Not Supported | Sends a transaction that creates a new contract on the blockchain. | 
| cast shl | β Supported | Performs a bitwise left shift on the provided input. | 
| cast shr | β Supported | Performs a bitwise right shift on the provided input. | 
| cast sig | β Supported | Outputs the Keccak-256 hash of a function signature. | 
| cast sig-event | β Supported | Outputs the Keccak-256 hash of an event signature. | 
| cast storage | β Supported | Fetches and displays the raw storage value of a contract at a specific slot. | 
| cast to-ascii | β Supported | Converts a hexadecimal string to an ASCII string. | 
| cast to-base | β Supported | Converts a number to a different base (e.g., from decimal to hexadecimal). | 
| cast to-bytes32 | β Supported | Converts input data to a bytes32 format. | 
| cast to-check-sum-address | β Supported | Converts an Ethereum address to a checksummed format, which includes capital letters for error detection. | 
| cast to-dec | β Supported | Converts input data to a decimal number. | 
| cast to-fixed-point | β Supported | Converts input data to a fixed-point number representation. | 
| cast to-hex | β Supported | Converts input data to a hexadecimal format. | 
| cast to-hexdata | β Supported | Converts input data to hex-encoded binary data. | 
| cast to-int256 | β Supported | Converts input data to a signed 256-bit integer. | 
| cast to-rlp | β Supported | Encodes input data in Recursive Length Prefix (RLP) format. | 
| cast to-uint256 | β Supported | Converts input data to an unsigned 256-bit integer. | 
| cast to-unit | β Supported | Converts ether or wei into different units, like gwei or finney. | 
| cast to-utf8 | β Supported | Converts a hexadecimal string to a UTF-8 encoded string. | 
| cast to-wei | β Supported | Converts ether or other units into wei, the smallest unit of ether. | 
| cast tx | β Supported | Fetches and displays details of a specific Ethereum transaction. | 
| cast upload-signature | β Supported | Uploads a function or event signature to the 4byte.directory. | 
| cast wallet | β Supported | A suite of wallet-related commands, allowing you to manage Ethereum wallets, create new ones, sign transactions, and more. | 
| cast wallet new | β Supported | Generates a new Ethereum wallet with a private key and address. | 
| cast wallet new-mnemonic | β Supported | Creates a new wallet using a mnemonic phrase, which can be used to recover the wallet later. | 
| cast wallet vanity | β Supported | Generates a new wallet with a custom, vanity address (e.g., one that starts with specific characters). | 
| cast wallet address | β Supported | Outputs the Ethereum address associated with a given private key. | 
| cast wallet sign | β Supported | Signs a message or transaction using the private key of a specified wallet. | 
| cast wallet sign-auth (DEPRECATED?) | β Supported | Signs an authorization message with a private key, often used in authentication workflows. | 
| cast wallet verify | β Supported | Verifies a signed message, confirming that it was signed by the holder of the private key associated with a specific address. | 
| cast wallet import | β Supported | Imports an Ethereum wallet using a private key or mnemonic phrase. | 
| cast wallet list | β Supported | Lists all wallets stored in a specific keystore. | 
| cast wallet private-key | β Supported | Outputs the private key associated with a given wallet, provided proper authentication. | 
| cast wallet decrypt-keystore | β Supported | Decrypts a keystore file to retrieve the private key, requiring the correct password. | 
| anvil | β Supported | A local Ethereum node implementation, similar to Ganache, that can be used for testing and development. | 
| anvil completions | β Supported | Generates shell completions for anvil, useful for auto-completing commands in the terminal. | 
| anvil generate-fig-spec | β Supported | Generates a Fig autocomplete spec for anvil, providing interactive command suggestions. | 
| chisel | β Supported | A tool used to interact with and modify smart contracts, providing operations like loading, listing, and clearing caches of tools. | 
| chisel list | β Supported | Lists all available chisel tools or operations that can be applied to smart contracts. | 
| chisel load | β Supported | Loads a specific chisel tool or operation, making it ready for use on a smart contract. | 
| chisel view | β Supported | Displays the details or configuration of a loaded chisel tool or operation. | 
| chisel clear-cache | β Supported | Clears the cache of chisel tools or operations, forcing a reload or update. |