Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ jobs:
- name: "Install: Foundry"
uses: foundry-rs/foundry-toolchain@v1
with:
version: v1.5.1
version: nightly-c07d504b4ae67754584f4e05ff0c547a43c50f7b

- name: "Show: Versioning"
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
- name: "Install: Foundry"
uses: foundry-rs/foundry-toolchain@v1
with:
version: v1.5.1
version: nightly-c07d504b4ae67754584f4e05ff0c547a43c50f7b

- name: "Install: Node.js"
uses: actions/setup-node@v4
Expand Down
28 changes: 25 additions & 3 deletions ethexe/cli/src/commands/tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,14 @@ pub struct TxCommand {
#[arg(long, alias = "eth-router")]
pub ethereum_router: Option<Address>,

/// Ethereum EIP-1559 fee increase percentage (from "medium").
#[arg(long, alias = "eth-eip1559-fee-increase-percentage")]
pub eip1559_fee_increase_percentage: Option<u64>,

/// Ethereum blob gas multiplier.
#[arg(long, alias = "eth-blob-gas-multiplier")]
pub blob_gas_multiplier: Option<u128>,

/// Sender address or public key to use. Must have a corresponding private key in the key store.
#[arg(long)]
pub sender: Option<Address>,
Expand Down Expand Up @@ -248,6 +256,19 @@ impl TxCommand {
.take()
.or_else(|| params.ethereum.as_ref().and_then(|p| p.ethereum_router));

self.eip1559_fee_increase_percentage =
self.eip1559_fee_increase_percentage.take().or_else(|| {
params
.ethereum
.as_ref()
.and_then(|p| p.eip1559_fee_increase_percentage)
});

self.blob_gas_multiplier = self
.blob_gas_multiplier
.take()
.or_else(|| params.ethereum.as_ref().and_then(|p| p.blob_gas_multiplier));

self
}

Expand Down Expand Up @@ -277,14 +298,15 @@ impl TxCommand {

let sender = self.sender.ok_or_else(|| anyhow!("missing `sender`"))?;

// INCREASED_BLOB_GAS_MULTIPLIER (TODO: from config, default is increased)
let ethereum = Ethereum::new(
&rpc,
router_addr,
signer.clone(),
sender,
NO_EIP1559_FEE_INCREASE_PERCENTAGE,
INCREASED_BLOB_GAS_MULTIPLIER,
self.eip1559_fee_increase_percentage
.unwrap_or(NO_EIP1559_FEE_INCREASE_PERCENTAGE),
self.blob_gas_multiplier
.unwrap_or(INCREASED_BLOB_GAS_MULTIPLIER),
)
.await
.with_context(|| "failed to create Ethereum client")?;
Expand Down
9 changes: 2 additions & 7 deletions ethexe/ethereum/src/router/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,16 +143,11 @@ impl Router {
) -> Result<(TransactionReceipt, CodeId)> {
let code_id = CodeId::generate(code);

let chain_id = self.instance.provider().get_chain_id().await?;
let builder = self
.instance
.requestCodeValidation(code_id.into_bytes().into());
let builder = if chain_id == 31337 {
// TODO: remove when https://github.com/foundry-rs/foundry/pull/12404 is merged
builder.sidecar(SidecarBuilder::<SimpleCoder>::from_slice(code).build()?)
} else {
builder.sidecar_7594(SidecarBuilder::<SimpleCoder>::from_slice(code).build_7594()?)
};
let builder =
builder.sidecar_7594(SidecarBuilder::<SimpleCoder>::from_slice(code).build_7594()?);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also want to experiment with EIP-7594 txs here: @vara-eth/api (API is currently broken on testnet and we could backport wevm/viem#4022 to fix it). The thing is that Foundry updates quite slowly and I switched it to nightly so that we could use only one transaction type for blobs - EIP-7594.


let receipt = builder
.send()
Expand Down
Loading