Commit 57c66bb9 authored by smartcontracts's avatar smartcontracts Committed by GitHub

Merge pull request #2166 from ethereum-optimism/sc/reorg-core-utils

refactor: improve core-utils folder structure
parents 7de1a032 3c2acd91
---
'@eth-optimism/core-utils': patch
---
Refactor folder structure of @eth-optimism/core-utils.
export * from './sequencer-batch'
import { ethers } from 'ethers'
import { remove0x, add0x } from './common/hex-strings'
import { remove0x, add0x } from './hex-strings'
/**
* Converts an ethers BigNumber into an equivalent Ethereum address representation.
......
/**
* Common JavaScript/TypeScript utilities
*/
export * from './basic-types'
export * from './bn'
export * from './hex-strings'
export * from './misc'
export * from './test-utils'
/**
* Utilities related to BCFG
*/
export * from './bcfg-types'
/**
* Utilities that extend or enhance the ethers.js library
*/
export * from './fallback-provider'
/**
* Utilities related to go-ethereum (Geth)
*/
export * from './geth-types'
export * from './geth'
/**
* Utilities related to specific external projects
*/
export * from './bcfg'
export * from './rollup'
export * from './basic'
export * from './ethers'
export * from './geth'
export * from './coders'
export * from './common'
export * from './watcher'
export * from './l2context'
export * from './types'
export * from './fees'
export * from './provider'
export * from './alias'
export * from './types'
export * from './bn'
export * from './external'
export * from './optimism'
import { ethers } from 'ethers'
import { bnToAddress } from './bn'
import { bnToAddress } from '../common'
// Constant representing the alias to apply to the msg.sender when a contract sends an L1 => L2
// message. We need this aliasing scheme because a contract can be deployed to the same address
......
......@@ -4,7 +4,7 @@
import { BigNumber } from 'ethers'
import { remove0x } from './common'
import { remove0x } from '../common'
const txDataZeroGas = 4
const txDataNonZeroGasEIP2028 = 16
......
/**
* Utils specifically related to Optimism.
*/
export * from './alias'
export * from './batch-encoding'
export * from './fees'
export * from './l2context'
export * from './rollup-types'
export * from './watcher'
import { expect } from './setup'
import { applyL1ToL2Alias, undoL1ToL2Alias } from '../src/alias'
import { applyL1ToL2Alias, undoL1ToL2Alias } from '../src'
describe('address aliasing utils', () => {
describe('applyL1ToL2Alias', () => {
......
import * as fees from '../src/fees'
import { zeroesAndOnes } from '../src'
describe('Fees', () => {
it('should count zeros and ones', () => {
......@@ -10,7 +10,7 @@ describe('Fees', () => {
]
for (const test of cases) {
const [zeros, ones] = fees.zeroesAndOnes(test.input)
const [zeros, ones] = zeroesAndOnes(test.input)
zeros.should.eq(test.zeros)
ones.should.eq(test.ones)
}
......
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