foundry
foundry copied to clipboard
feat(cast) add creation-code method [#8973]
Motivation
As described in https://github.com/foundry-rs/foundry/issues/8973, currently there's no simple way to obtain contract creation code without compiling them locally. It is needed to deploy contracts with sol!
macro.
If this is accepted I'll add artifact
method generating file that can be used directly with sol!
macro.
Solution
This PR adds cast creation-code
method. It outputs the contract creation code.
Example usage
cast creation-code 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 --etherscan-api-key API_KEY --rpc-url RPC_URL