Commit 8a98e21f authored by elenadimitrova's avatar elenadimitrova Committed by Kelvin Fichter

Rebasing fixes

parent 11bec4c5
......@@ -255,17 +255,17 @@ describe('[GAS BENCHMARK] CanonicalTransactionChain', () => {
let ENQUEUE_L2_GAS_PREPAID
let data
beforeEach(async () => {
OVM_CanonicalTransactionChain =
OVM_CanonicalTransactionChain.connect(sequencer)
CanonicalTransactionChain =
CanonicalTransactionChain.connect(sequencer)
ENQUEUE_L2_GAS_PREPAID =
await OVM_CanonicalTransactionChain.ENQUEUE_L2_GAS_PREPAID()
await CanonicalTransactionChain.ENQUEUE_L2_GAS_PREPAID()
data = '0x' + '12'.repeat(1234)
})
it('cost to enqueue a transaction above the prepaid threshold', async () => {
const l2GasLimit = 2 * ENQUEUE_L2_GAS_PREPAID
const res = await OVM_CanonicalTransactionChain.enqueue(
const res = await CanonicalTransactionChain.enqueue(
NON_ZERO_ADDRESS,
l2GasLimit,
data
......@@ -279,7 +279,7 @@ describe('[GAS BENCHMARK] CanonicalTransactionChain', () => {
it('cost to enqueue a transaction below the prepaid threshold', async () => {
const l2GasLimit = ENQUEUE_L2_GAS_PREPAID - 1
const res = await OVM_CanonicalTransactionChain.enqueue(
const res = await CanonicalTransactionChain.enqueue(
NON_ZERO_ADDRESS,
l2GasLimit,
data
......
......@@ -252,27 +252,27 @@ describe('CanonicalTransactionChain', () => {
describe('with _gaslimit below the ENQUEUE_L2_GAS_PREPAID threshold', async () => {
it('the cost to enqueue transactions is consistent for different L2 gas amounts below the prepaid threshold', async () => {
const ENQUEUE_L2_GAS_PREPAID =
await OVM_CanonicalTransactionChain.ENQUEUE_L2_GAS_PREPAID()
await CanonicalTransactionChain.ENQUEUE_L2_GAS_PREPAID()
const data = '0x' + '12'.repeat(1234)
const l2GasLimit1 = ENQUEUE_L2_GAS_PREPAID - 1
const l2GasLimit2 = ENQUEUE_L2_GAS_PREPAID - 100
// The first enqueue is more expensive because it's writing to an empty slot,
// so we need to pre-load the buffer or the test will fail.
await OVM_CanonicalTransactionChain.enqueue(
await CanonicalTransactionChain.enqueue(
NON_ZERO_ADDRESS,
l2GasLimit1,
data
)
const res1 = await OVM_CanonicalTransactionChain.enqueue(
const res1 = await CanonicalTransactionChain.enqueue(
NON_ZERO_ADDRESS,
l2GasLimit1,
data
)
const receipt1 = await res1.wait()
const res2 = await OVM_CanonicalTransactionChain.enqueue(
const res2 = await CanonicalTransactionChain.enqueue(
NON_ZERO_ADDRESS,
l2GasLimit2,
data
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment