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 node/service/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ where
fee_history_cache,
fee_history_limit,
10,
true,
false,
forced_parent_hashes,
pending_create_inherent_data_providers,
Some(pending_consenus_data_provider),
Expand Down
2 changes: 1 addition & 1 deletion pallets/ethereum-xcm/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ impl pallet_evm::Config for Test {

parameter_types! {
pub const PostBlockAndTxnHashes: PostLogContent = PostLogContent::BlockAndTxnHashes;
pub const AllowUnprotectedTxs: bool = true;
pub const AllowUnprotectedTxs: bool = false;
}

impl pallet_ethereum::Config for Test {
Expand Down
2 changes: 1 addition & 1 deletion pallets/moonbeam-foreign-assets/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ impl pallet_evm::Config for Test {

parameter_types! {
pub const PostBlockAndTxnHashes: PostLogContent = PostLogContent::BlockAndTxnHashes;
pub const AllowUnprotectedTxs: bool = true;
pub const AllowUnprotectedTxs: bool = false;
}

impl pallet_ethereum::Config for Test {
Expand Down
2 changes: 1 addition & 1 deletion runtime/moonbase/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ impl fp_rpc::ConvertTransaction<opaque::UncheckedExtrinsic> for TransactionConve

parameter_types! {
pub const PostBlockAndTxnHashes: PostLogContent = PostLogContent::BlockAndTxnHashes;
pub const AllowUnprotectedTxs: bool = true;
pub const AllowUnprotectedTxs: bool = false;
}

impl pallet_ethereum::Config for Runtime {
Expand Down
2 changes: 1 addition & 1 deletion runtime/moonbase/tests/xcm_mock/parachain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ impl xcm_primitives::HrmpEncodeCall for MockHrmpEncoder {

parameter_types! {
pub const PostBlockAndTxnHashes: PostLogContent = PostLogContent::BlockAndTxnHashes;
pub const AllowUnprotectedTxs: bool = true;
pub const AllowUnprotectedTxs: bool = false;
}

impl pallet_ethereum::Config for Runtime {
Expand Down
2 changes: 1 addition & 1 deletion runtime/moonbeam/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ impl fp_rpc::ConvertTransaction<opaque::UncheckedExtrinsic> for TransactionConve

parameter_types! {
pub const PostBlockAndTxnHashes: PostLogContent = PostLogContent::BlockAndTxnHashes;
pub const AllowUnprotectedTxs: bool = true;
pub const AllowUnprotectedTxs: bool = false;
}

impl pallet_ethereum::Config for Runtime {
Expand Down
2 changes: 1 addition & 1 deletion runtime/moonbeam/tests/xcm_mock/parachain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ impl xcm_primitives::HrmpEncodeCall for MockHrmpEncoder {

parameter_types! {
pub const PostBlockAndTxnHashes: PostLogContent = PostLogContent::BlockAndTxnHashes;
pub const AllowUnprotectedTxs: bool = true;
pub const AllowUnprotectedTxs: bool = false;
}

impl pallet_ethereum::Config for Runtime {
Expand Down
2 changes: 1 addition & 1 deletion runtime/moonriver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ impl fp_rpc::ConvertTransaction<opaque::UncheckedExtrinsic> for TransactionConve

parameter_types! {
pub const PostBlockAndTxnHashes: PostLogContent = PostLogContent::BlockAndTxnHashes;
pub const AllowUnprotectedTxs: bool = true;
pub const AllowUnprotectedTxs: bool = false;
}

impl pallet_ethereum::Config for Runtime {
Expand Down
2 changes: 1 addition & 1 deletion runtime/moonriver/tests/xcm_mock/parachain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ impl xcm_primitives::HrmpEncodeCall for MockHrmpEncoder {

parameter_types! {
pub const PostBlockAndTxnHashes: PostLogContent = PostLogContent::BlockAndTxnHashes;
pub const AllowUnprotectedTxs: bool = true;
pub const AllowUnprotectedTxs: bool = false;
}

impl pallet_ethereum::Config for Runtime {
Expand Down
13 changes: 7 additions & 6 deletions test/suites/dev/moonbase/test-balance/test-balance-transfer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,10 @@ describeSuite({
await context.createBlock();
const rawTx = (await createRawTransfer(context, randomAddress, 512n, {
privateKey: CHARLETH_PRIVATE_KEY,
gasPrice: GENESIS_BASE_FEE,
maxFeePerGas: GENESIS_BASE_FEE,
maxPriorityFeePerGas: 0n,
gas: 21000n,
txnType: "legacy",
txnType: "eip1559",
})) as `0x${string}`;
await sendRawTransaction(context, rawTx);

Expand All @@ -81,17 +82,17 @@ describeSuite({
title: "should decrease from account",
test: async function () {
const balanceBefore = await context.viem().getBalance({ address: CHARLETH_ADDRESS });
const fees = 21000n * GENESIS_BASE_FEE;
await context.createBlock(
await createRawTransfer(context, randomAddress, 512n, {
gas: 21000n,
gasPrice: GENESIS_BASE_FEE,
txnType: "legacy",
maxFeePerGas: GENESIS_BASE_FEE,
maxPriorityFeePerGas: 0n,
txnType: "eip1559",
privateKey: CHARLETH_PRIVATE_KEY,
})
);
const balanceAfter = await context.viem().getBalance({ address: CHARLETH_ADDRESS });
expect(balanceBefore - balanceAfter - fees).toBe(512n);
expect(balanceBefore - balanceAfter).toBeGreaterThan(512n);
},
});

Expand Down
11 changes: 2 additions & 9 deletions test/suites/dev/moonbase/test-eth-tx/test-test-tx-nonce.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,23 +148,16 @@ describeSuite({
abi: fetchCompiledContract("Incrementor").abi,
functionName: "incr",
});
const { result } = await context.createBlock(
await context.createBlock(
context.createTxn!({
privateKey: BALTATHAR_PRIVATE_KEY,
to: incrementorAddress,
data,
value: 0n,
gasLimit: 21000,
txnType: "legacy",
txnType: "eip1559",
})
);
const receipt = await context
.viem()
.getTransactionReceipt({ hash: result!.hash as `0x${string}` });
const block = await context.viem().getBlock({ blockHash: receipt.blockHash });
expect(block.transactions.length, "should include the transaction in the block").to.be.eq(
1
);
expect(
await context.viem().getTransactionCount({ address: BALTATHAR_ADDRESS }),
"should increase the sender nonce"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,10 @@ describeSuite({
to: PRECOMPILES.Xtokens,
value: 0n,
data,
txnType: "legacy",
txnType: "eip1559",
gas: 500_000n,
gasPrice: BigInt(DEFAULT_TXN_MAX_BASE_FEE),
maxFeePerGas: BigInt(DEFAULT_TXN_MAX_BASE_FEE),
maxPriorityFeePerGas: 0n,
privateKey: CHARLETH_PRIVATE_KEY,
});

Expand All @@ -250,7 +251,7 @@ describeSuite({

expectEVMResult(result!.events, "Succeed");

const fees = receipt.gasUsed * BigInt(DEFAULT_TXN_MAX_BASE_FEE);
const fees = receipt.gasUsed * receipt.effectiveGasPrice;
expect(balBefore - balAfter).to.equal(amountTransferred + fees);
await verifyLatestBlockFees(context, amountTransferred);
},
Expand Down
Loading