Commit 549a8566 authored by Matthew Slipper's avatar Matthew Slipper Committed by Kelvin Fichter

integration-tests: Add tests for debug_traceTransaction and debug_traceBlock

parent c684e8eb
...@@ -20,6 +20,8 @@ import { ...@@ -20,6 +20,8 @@ import {
TransactionRequest, TransactionRequest,
} from '@ethersproject/providers' } from '@ethersproject/providers'
import { solidity } from 'ethereum-waffle' import { solidity } from 'ethereum-waffle'
import simpleStorageJson from '../artifacts/contracts/SimpleStorage.sol/SimpleStorage.json'
chai.use(chaiAsPromised) chai.use(chaiAsPromised)
chai.use(solidity) chai.use(solidity)
...@@ -403,6 +405,26 @@ describe('Basic RPC tests', () => { ...@@ -403,6 +405,26 @@ describe('Basic RPC tests', () => {
}) })
}) })
describe('debug_traceTransaction', () => {
it('should match debug_traceBlock', async () => {
const storage = new ContractFactory(
simpleStorageJson.abi,
simpleStorageJson.bytecode,
env.l2Wallet
)
const tx = (await storage.deploy()).deployTransaction
const receipt = await tx.wait()
const txTrace = await provider.send('debug_traceTransaction', [
receipt.transactionHash,
])
const blockTrace = await provider.send('debug_traceBlockByHash', [
receipt.blockHash,
])
expect(txTrace).to.deep.equal(blockTrace[0].result)
})
})
// SKIP: ? // SKIP: ?
describe.skip('rollup_gasPrices', () => { describe.skip('rollup_gasPrices', () => {
it('should return the L1 and L2 gas prices', async () => { it('should return the L1 and L2 gas prices', async () => {
......
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