Commit 3ce62c81 authored by Mark Tyneway's avatar Mark Tyneway Committed by Kelvin Fichter

core-utils: export bnToAddress

parent 51821d8f
---
'@eth-optimism/core-utils': patch
---
Export bnToAddress
......@@ -3,7 +3,8 @@ import { ethers } from 'ethers'
export const L1_TO_L2_ALIAS_OFFSET =
'0x1111000000000000000000000000000000001111'
const bnToAddress = (bn: ethers.BigNumber): string => {
export const bnToAddress = (bn: ethers.BigNumber | number): string => {
bn = ethers.BigNumber.from(bn)
if (bn.isNegative()) {
bn = ethers.BigNumber.from('0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF')
.add(bn)
......
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