Skip to content
Merged
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
2 changes: 1 addition & 1 deletion ethexe/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ homepage.workspace = true
repository.workspace = true

[dependencies]
alloy-primitives.workspace = true
alloy-primitives = { workspace = true, features = ["serde"] }
gear-core.workspace = true
sp-core.workspace = true
gprimitives.workspace = true
Expand Down
4 changes: 2 additions & 2 deletions ethexe/common/src/injected.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ mod serde_hex {
where
S: serde::Serializer,
{
alloy_primitives::hex::serialize(data.to_vec(), serializer)
alloy_primitives::serde_hex::serialize(data.to_vec(), serializer)
}

pub fn deserialize<'de, D, const N: usize>(
Expand All @@ -223,7 +223,7 @@ mod serde_hex {
where
D: serde::Deserializer<'de>,
{
let vec: Vec<u8> = alloy_primitives::hex::deserialize(deserializer)?;
let vec: Vec<u8> = alloy_primitives::serde_hex::deserialize(deserializer)?;
super::LimitedVec::<u8, N>::try_from(vec)
.map_err(|_| serde::de::Error::custom("LimitedVec deserialization overflow"))
}
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()?);
Comment thread
StackOverflowExcept1on marked this conversation as resolved.

let receipt = builder
.send()
Expand Down
Loading