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
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2025 Demerzel Solutions Limited
// SPDX-License-Identifier: LGPL-3.0-only

using System.Text;
using System.Text.Json;
using Autofac;
Expand All @@ -6,11 +9,23 @@
using Nethermind.Arbitrum.Config;
using Nethermind.Arbitrum.Data;
using Nethermind.Arbitrum.Execution.Transactions;
using Nethermind.Blockchain.Receipts;
using Nethermind.Config;
using Nethermind.Core;
using Nethermind.Core.Crypto;
using Nethermind.Core.Specs;
using Nethermind.Facade;
using Nethermind.Facade.Eth;
using Nethermind.Int256;
using Nethermind.JsonRpc;
using Nethermind.JsonRpc.Modules.Eth;
using Nethermind.JsonRpc.Modules.Eth.FeeHistory;
using Nethermind.JsonRpc.Modules.Eth.GasPrice;
using Nethermind.Network;
using Nethermind.Specs.ChainSpecStyle;
using Nethermind.State;
using Nethermind.TxPool;
using Nethermind.Wallet;

namespace Nethermind.Arbitrum.Test.Infrastructure;

Expand All @@ -25,6 +40,7 @@ private ArbitrumRpcTestBlockchain(ChainSpec chainSpec) : base(chainSpec)
{
}

public IEthRpcModule ArbitrumEthRpcModule { get; private set; } = null!;
public IArbitrumRpcModule ArbitrumRpcModule { get; private set; } = null!;
public IArbitrumSpecHelper SpecHelper => Dependencies.SpecHelper;

Expand Down Expand Up @@ -221,6 +237,25 @@ private static ArbitrumRpcTestBlockchain CreateInternal(ArbitrumRpcTestBlockchai
chain.Container.Resolve<IArbitrumConfig>())
.Create());

chain.ArbitrumEthRpcModule = new ArbitrumEthRpcModule(
chain.Container.Resolve<IJsonRpcConfig>(),
chain.Container.Resolve<IBlockchainBridge>(),
chain.BlockTree,
chain.Container.Resolve<IReceiptFinder>(),
chain.Container.Resolve<IStateReader>(),
chain.Container.Resolve<ITxPool>(),
chain.Container.Resolve<ITxSender>(),
chain.Container.Resolve<IWallet>(),
chain.LogManager,
chain.Container.Resolve<ISpecProvider>(),
chain.Container.Resolve<IGasPriceOracle>(),
chain.Container.Resolve<IEthSyncingInfo>(),
chain.Container.Resolve<IFeeHistoryOracle>(),
chain.Container.Resolve<IProtocolsManager>(),
chain.Container.Resolve<IForkInfo>(),
chain.Container.Resolve<IBlocksConfig>().SecondsPerSlot
);

return chain;
}

Expand Down Expand Up @@ -297,16 +332,13 @@ public ResultWrapper<string> MarkFeedStart(ulong to)

public record TestEthDeposit(Hash256 RequestId, UInt256 L1BaseFee, Address Sender, Address Receiver, UInt256 Value);

public record TestSubmitRetryable(Hash256 RequestId, UInt256 L1BaseFee, Address Sender, Address Receiver, Address Beneficiary, UInt256 DepositValue,
UInt256 RetryValue, UInt256 GasFee, ulong GasLimit, UInt256 MaxSubmissionFee)
public record TestSubmitRetryable(Hash256 RequestId, UInt256 L1BaseFee, Address Sender, Address Receiver, Address Beneficiary, UInt256 DepositValue, UInt256 RetryValue, UInt256 GasFee, ulong GasLimit, UInt256 MaxSubmissionFee)
{
public byte[] RetryData { get; set; } = [];
}

public record TestL2FundedByL1Transfer(Hash256 RequestId, UInt256 L1BaseFee, Address Sponsor, Address Sender, Address Receiver,
UInt256 TransferValue, UInt256 MaxFeePerGas, ulong GasLimit, UInt256 Nonce);
public record TestL2FundedByL1Transfer(Hash256 RequestId, UInt256 L1BaseFee, Address Sponsor, Address Sender, Address Receiver, UInt256 TransferValue, UInt256 MaxFeePerGas, ulong GasLimit, UInt256 Nonce);

public record TestL2FundedByL1Contract(Hash256 RequestId, UInt256 L1BaseFee, Address Sponsor, Address Sender, Address Contract,
UInt256 TransferValue, UInt256 MaxFeePerGas, ulong GasLimit, byte[] Data);
public record TestL2FundedByL1Contract(Hash256 RequestId, UInt256 L1BaseFee, Address Sponsor, Address Sender, Address Contract, UInt256 TransferValue, UInt256 MaxFeePerGas, ulong GasLimit, byte[] Data);

public record TestL2Transactions(Hash256 RequestId, UInt256 L1BaseFee, Address Sender, params Transaction[] Transactions);
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Nethermind.Core.Test.Builders;
using Nethermind.Crypto;

namespace Nethermind.Arbitrum.Test.Infrastructure;
Expand Down
Loading
Loading