-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Using bindings to deploy #801
-
Hi,
I recently started migrating my project to foundry and so far it has been great.
I'm at the phase where I want to deploy my entire system to testnet. What I thought the steps would be:
- Build the contracts
- Generate rust bindings
- Use the generated bindings in a rust program to create my deploy procedure.
Sadly, I haven't been able to make it work: bindings only contain the ABI and the ContractFactory requires the bytecode.
In the example, it uses ethers to compile inside the program, which gives the byte code and ABI but is redundant since I already built.
Is there a way to get a ContractFactory using only the binding? If not, what's the most compact way to deploy contracts knowing that the deploy procedure is a bit complex and bash+forge+cast would be less readable.
As a suggestion, I would have loved to have a factory in the bindings that knows the type of the constructor arguments
Beta Was this translation helpful? Give feedback.