foundry-rs / foundry

Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.
https://getfoundry.sh
Apache License 2.0
8.32k stars 1.76k forks source link

Support sending of private transactions #2933

Open frank-lim-partior opened 2 years ago

frank-lim-partior commented 2 years ago

Component

Cast

Describe the feature you would like

I'll like to use the following parameters in the cast send API, on top of parameters like value, nonce:

It'll be great to be able to use these extra options.

Additional context

This is used in both HyperLedger Besu and GoQuorum. https://besu.hyperledger.org/en/stable/private-networks/concepts/privacy/private-transactions/

frank-lim-partior commented 2 years ago

It would be great if these options could be added to forge script as well.

mattsse commented 2 years ago

this would mean we'd need to add a serde flattened other: HashMap to the Transaction type, similar to what we did with for Block

https://github.com/gakonst/ethers-rs/blob/b71e6ad00b2290e103342a2c7fe20d01865e0ba7/ethers-core/src/types/block.rs#L102-L103

I don't think this would add too much friction since most of the TX types use builder pattern, wdyt @gakonst?