Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(v3): non-18 decimal custom gas token support #445

Merged
merged 171 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
171 commits
Select commit Hold shift + click to select a range
d5bd73e
init
brtkx Apr 3, 2024
0a3ac4c
unused import
brtkx Apr 3, 2024
938f285
update
brtkx Apr 10, 2024
95abec9
clean up
brtkx Apr 10, 2024
831a66f
unused var
brtkx Apr 11, 2024
22de060
non-18 decimals tests
brtkx Apr 17, 2024
7fd4fdb
fix
brtkx Apr 17, 2024
01e38b8
update
brtkx Apr 24, 2024
2e03bad
fix
brtkx Apr 24, 2024
ac74a83
fix
brtkx Apr 24, 2024
a9ce5ff
fix
brtkx Apr 24, 2024
f185565
Merge branch 'main' of ssh://github.com/OffchainLabs/arbitrum-sdk int…
brtkx Apr 25, 2024
0edd090
try
brtkx Apr 26, 2024
a092305
remove option
brtkx Apr 26, 2024
e96140f
Merge branch 'main' of ssh://github.com/OffchainLabs/arbitrum-sdk int…
brtkx May 10, 2024
f8b5b82
fix
brtkx May 10, 2024
4ea46d5
fix
brtkx May 10, 2024
97e9503
fix decimals
brtkx May 16, 2024
ec69bc9
fix
brtkx May 16, 2024
3d24c3a
try fix decimals
brtkx May 16, 2024
fdd51b5
try fix decimals
brtkx May 16, 2024
2b6b3e8
try
brtkx May 16, 2024
4dd8b9f
try
brtkx May 16, 2024
5a44827
try
brtkx May 16, 2024
7fa6fd1
try
brtkx May 16, 2024
27bda5d
try
brtkx May 16, 2024
702293c
fix
brtkx May 16, 2024
970cc0b
logs
brtkx May 16, 2024
11b5cad
logs
brtkx May 17, 2024
b58ad44
try different amount
brtkx May 17, 2024
6b544a9
bump nitro
brtkx May 17, 2024
420b0d0
fix
brtkx May 17, 2024
9b81d9b
log
brtkx May 17, 2024
0f391a1
check balance
brtkx May 20, 2024
dc848e1
check balance
brtkx May 20, 2024
a0b7458
increase funds
brtkx May 20, 2024
898e94f
nit
brtkx May 20, 2024
a18372d
try
brtkx May 20, 2024
9c7b5e6
clean up and logs
brtkx May 20, 2024
70052d1
try
brtkx May 20, 2024
0be4f9f
try
brtkx May 20, 2024
03263d2
try
brtkx May 20, 2024
6069dc0
fix
brtkx May 20, 2024
0872e0f
fix
brtkx May 20, 2024
596d624
fix
brtkx May 20, 2024
249c8a4
clean up
brtkx May 20, 2024
8343b27
clean up
brtkx May 20, 2024
d5afac6
update build
brtkx May 20, 2024
b9b00b5
config
brtkx May 20, 2024
d9b83cb
fix decimals
brtkx May 20, 2024
54b58d5
try
brtkx May 20, 2024
b193202
fix
brtkx May 20, 2024
f4832fa
clean up
brtkx May 21, 2024
ea82f65
clean up
brtkx May 21, 2024
e6a6a81
addressing comments
brtkx Jun 11, 2024
433e151
fix
brtkx Jun 11, 2024
ebd8546
fix
brtkx Jun 11, 2024
fca5738
enable custom gateway register
brtkx Jun 11, 2024
d9a0a30
24 decimals tests
brtkx Jun 11, 2024
4f9f8bd
fixes
brtkx Jun 11, 2024
130f71e
fixes
brtkx Jun 11, 2024
71c9877
fixes
brtkx Jun 11, 2024
1844511
Merge branch 'main' of ssh://github.com/OffchainLabs/arbitrum-sdk int…
brtkx Jun 14, 2024
2ba0b21
try 20 decimals
brtkx Jun 14, 2024
6aeb47e
scale funding
brtkx Jun 14, 2024
58117a4
fixes
brtkx Jun 14, 2024
2cc774b
fix
brtkx Jun 14, 2024
bc6fabd
try fix
brtkx Jun 17, 2024
23c8b4f
add some logs
brtkx Jun 17, 2024
15dbfcc
more logs
brtkx Jun 17, 2024
f95bad7
logs
brtkx Jun 17, 2024
0ee68e3
log
brtkx Jun 17, 2024
bcd921c
try fix
brtkx Jun 17, 2024
9608131
logs
brtkx Jun 17, 2024
104bff0
try
brtkx Jun 17, 2024
8842179
try
brtkx Jun 18, 2024
5dca1b7
try
brtkx Jun 18, 2024
45eb655
check balance
brtkx Jun 18, 2024
b9242c7
remove double fund
brtkx Jun 18, 2024
447b58b
fix balances
brtkx Jun 18, 2024
da25e3f
try
brtkx Jun 18, 2024
b1aa4d0
try fund
brtkx Jun 18, 2024
4e3c294
try
brtkx Jun 18, 2024
71f6394
Merge branch 'main' of ssh://github.com/OffchainLabs/arbitrum-sdk int…
brtkx Jun 18, 2024
5595c8f
try
brtkx Jun 18, 2024
a6c7829
try
brtkx Jun 18, 2024
4df99df
check rpc urls
brtkx Jun 19, 2024
efc2553
clean up
brtkx Jun 19, 2024
83cc83f
check before and after balances
brtkx Jun 19, 2024
4d27dfb
tests for rescaled gas
brtkx Jun 19, 2024
88d9914
bump gas
brtkx Jun 19, 2024
2fa378b
Merge branch 'main' of ssh://github.com/OffchainLabs/arbitrum-sdk int…
brtkx Jun 19, 2024
690f2ad
clean up
brtkx Jun 19, 2024
fb7b87e
cleanup
brtkx Jun 19, 2024
a8d5173
cleanup
brtkx Jun 19, 2024
40a2c52
cleanup
brtkx Jun 19, 2024
f556c88
18 decimals tests
brtkx Jun 19, 2024
ba40b53
fixes
brtkx Jun 19, 2024
908f551
fixes
brtkx Jun 19, 2024
a584a58
fix
brtkx Jun 19, 2024
6cc45ec
fix
brtkx Jun 19, 2024
c7d969d
try fund
brtkx Jun 19, 2024
49a0bd5
try
brtkx Jun 19, 2024
1652717
try
brtkx Jun 19, 2024
e44e760
try
brtkx Jun 19, 2024
d03ea37
clean up
brtkx Jun 19, 2024
5b6cf50
try
brtkx Jun 19, 2024
bcb6452
clean up
brtkx Jun 20, 2024
ae45f1a
clean up build
brtkx Jun 20, 2024
65836b2
skip custom gas token
brtkx Jul 2, 2024
e16aa17
fix eth
brtkx Jul 2, 2024
bf721bf
unit tests
brtkx Jul 3, 2024
a9b7d61
remove async
brtkx Jul 3, 2024
ab57c2f
retryable data run
brtkx Jul 4, 2024
9d7e343
build fix
brtkx Jul 8, 2024
18df208
build fix
brtkx Jul 8, 2024
a346f2b
build fix
brtkx Jul 8, 2024
ad507e7
build fix
brtkx Jul 8, 2024
acf2317
build fix
brtkx Jul 8, 2024
8f915e4
build fix
brtkx Jul 8, 2024
9f4c551
build fix
brtkx Jul 8, 2024
bc911f2
build fix
brtkx Jul 8, 2024
b97aabe
build fix
brtkx Jul 8, 2024
00da206
build fix
brtkx Jul 8, 2024
0caaf60
fix
brtkx Jul 8, 2024
b9bee8c
fix
brtkx Jul 8, 2024
6e26a1f
fix
brtkx Jul 8, 2024
aeefffa
fix
brtkx Jul 8, 2024
9571717
try
brtkx Jul 8, 2024
b606ede
Merge branch 'main' into non-18-decimal-rescale
brtkx Jul 8, 2024
aff4ccc
fix
brtkx Jul 9, 2024
fd82f48
Merge branch 'non-18-decimal-rescale' of ssh://github.com/OffchainLab…
brtkx Jul 9, 2024
72fa130
fix
brtkx Jul 9, 2024
6b59204
fix
brtkx Jul 9, 2024
3e7e73c
fix
brtkx Jul 9, 2024
6b69913
fixes
brtkx Jul 9, 2024
e160c5f
Merge branch 'main' of ssh://github.com/OffchainLabs/arbitrum-sdk int…
brtkx Jul 9, 2024
e7e005a
fix
brtkx Jul 9, 2024
f56ab96
fix l2callvalue
brtkx Jul 9, 2024
1c985e9
fix
brtkx Jul 9, 2024
fff9d5f
fix
brtkx Jul 9, 2024
a1c34df
fix
brtkx Jul 9, 2024
1866990
fix
brtkx Jul 9, 2024
0ff5862
try
brtkx Jul 15, 2024
37a0197
try
brtkx Jul 15, 2024
4199ec9
try testnode ref
brtkx Jul 15, 2024
a7aa3e2
disable some tests
brtkx Jul 15, 2024
f135552
try no overrides
brtkx Jul 15, 2024
f96ac29
try
brtkx Jul 15, 2024
e5104aa
try
brtkx Jul 15, 2024
ca70e38
clean up
brtkx Jul 15, 2024
2bdc2f0
clean up
brtkx Jul 15, 2024
358f50f
fix
brtkx Jul 15, 2024
072653e
fix
brtkx Jul 15, 2024
7474bc9
log
brtkx Jul 15, 2024
1a45cff
try fix
brtkx Jul 15, 2024
e563099
try
brtkx Jul 15, 2024
ac68c25
logs
brtkx Jul 15, 2024
4dd1fe1
logs
brtkx Jul 15, 2024
8d09fb0
fixes l1l3
brtkx Jul 17, 2024
43988b7
Merge branch 'main' of ssh://github.com/OffchainLabs/arbitrum-sdk int…
brtkx Jul 17, 2024
f85d9e4
try
brtkx Jul 17, 2024
322dd95
try
brtkx Jul 17, 2024
63cf5aa
fixes
brtkx Jul 17, 2024
c3bb004
fixes
brtkx Jul 17, 2024
31c5355
fixes and more tests
brtkx Jul 17, 2024
bde2893
fix tests
brtkx Jul 17, 2024
75b1294
clean up
brtkx Jul 17, 2024
75649e2
fix tests matrix
brtkx Jul 17, 2024
b1a7f5e
revert
brtkx Jul 17, 2024
2ea4226
fix
brtkx Jul 18, 2024
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
38 changes: 30 additions & 8 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,25 +124,47 @@ jobs:
run: CI=true yarn test:unit

test-integration:
name: Test (Integration) on Node.js v${{ matrix.node-version }}${{ matrix.orbit-test == '1' && ' with L3' || '' }}${{ matrix.custom-fee == '1' && ' with custom gas token' || '' }}
name: Test (Integration) on Node.js v${{ matrix.node-version }}${{ matrix.orbit-test == '1' && ' with L3' || '' }}${{ matrix.decimals == '16' && ' with custom gas token (16 decimals)' || matrix.decimals == '20' && ' with custom gas token (20 decimals)' || matrix.decimals == '18' && ' with custom gas token (18 decimals)' || '' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false # runs all tests to completion even if one fails
matrix:
node-version: [18, 20]
orbit-test: ['0', '1']
custom-fee: ['0']
include:
- orbit-test: '0'
node-version: 18
- orbit-test: '0'
node-version: 20

- orbit-test: '1'
node-version: 18
- orbit-test: '1'
node-version: 20

- orbit-test: '1'
decimals: 16
node-version: 18
- orbit-test: '1'
decimals: 16
node-version: 20

- orbit-test: '1'
decimals: 18
node-version: 18
- orbit-test: '1'
decimals: 18
node-version: 20

- orbit-test: '1'
custom-fee: '1'
decimals: 20
node-version: 18
- orbit-test: '1'
custom-fee: '1'
decimals: 20
node-version: 20

needs: install
env:
ORBIT_TEST: ${{ matrix.orbit-test }}
DECIMALS: ${{ matrix.decimals || '18' }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -158,9 +180,9 @@ jobs:
- name: Set up the local node
uses: OffchainLabs/actions/run-nitro-test-node@main
with:
nitro-testnode-ref: ed3cda65c4723b58a2f8be0fbc0c41f4ff2609cd
nitro-testnode-ref: adapt-bridge-amount
l3-node: ${{ matrix.orbit-test == '1' }}
args: ${{ matrix.custom-fee == '1' && '--l3-fee-token' || '' }}
args: ${{ matrix.decimals == 16 && '--l3-fee-token --l3-fee-token-decimals 16' || matrix.decimals == 20 && '--l3-fee-token --l3-fee-token-decimals 20' || matrix.decimals == 18 && '--l3-fee-token' || '' }}

- name: Copy .env
run: cp ./.env-sample ./.env
Expand Down
48 changes: 38 additions & 10 deletions src/lib/assetBridger/erc20Bridger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ import { OmitTyped, RequiredPick } from '../utils/types'
import { RetryableDataTools } from '../dataEntities/retryableData'
import { EventArgs } from '../dataEntities/event'
import { L1ToL2MessageGasParams } from '../message/L1ToL2MessageCreator'
import { isArbitrumChain } from '../utils/lib'
import {
getNativeTokenDecimals,
isArbitrumChain,
scaleToNativeTokenDecimals,
} from '../utils/lib'
import { L2ERC20Gateway__factory } from '../abi/factories/L2ERC20Gateway__factory'

export interface TokenApproveParams {
Expand Down Expand Up @@ -580,7 +584,8 @@ export class Erc20Bridger extends AssetBridger<
* @returns
*/
private getDepositRequestOutboundTransferInnerData(
depositParams: OmitTyped<L1ToL2MessageGasParams, 'deposit'>
depositParams: OmitTyped<L1ToL2MessageGasParams, 'deposit'>,
decimals: number
) {
if (!this.nativeTokenIsEth) {
return defaultAbiCoder.encode(
Expand All @@ -591,9 +596,12 @@ export class Erc20Bridger extends AssetBridger<
// callHookData
'0x',
// nativeTokenTotalFee
depositParams.gasLimit
.mul(depositParams.maxFeePerGas)
.add(depositParams.maxSubmissionCost), // will be zero
scaleToNativeTokenDecimals({
amount: depositParams.gasLimit
.mul(depositParams.maxFeePerGas)
.add(depositParams.maxSubmissionCost), // will be zero
decimals,
}),
]
)
}
Expand Down Expand Up @@ -645,15 +653,22 @@ export class Erc20Bridger extends AssetBridger<
}
}

const decimals = await getNativeTokenDecimals({
l1Provider,
l2Network: this.l2Network,
})

const depositFunc = (
depositParams: OmitTyped<L1ToL2MessageGasParams, 'deposit'>
) => {
depositParams.maxSubmissionCost =
params.maxSubmissionCost || depositParams.maxSubmissionCost

const iGatewayRouter = L1GatewayRouter__factory.createInterface()
const innerData =
this.getDepositRequestOutboundTransferInnerData(depositParams)
const innerData = this.getDepositRequestOutboundTransferInnerData(
depositParams,
decimals
)

const functionData =
defaultedParams.excessFeeRefundAddress !== defaultedParams.from
Expand Down Expand Up @@ -1019,6 +1034,11 @@ export class AdminErc20Bridger extends Erc20Bridger {
)
}

const nativeTokenDecimals = await getNativeTokenDecimals({
l1Provider,
l2Network: this.l2Network,
})

type GasParams = {
maxSubmissionCost: BigNumber
gasLimit: BigNumber
Expand Down Expand Up @@ -1051,14 +1071,22 @@ export class AdminErc20Bridger extends Erc20Bridger {
setTokenGas.gasLimit,
setGatewayGas.gasLimit,
doubleFeePerGas,
setTokenDeposit,
setGatewayDeposit,
scaleToNativeTokenDecimals({
amount: setTokenDeposit,
decimals: nativeTokenDecimals,
}),
scaleToNativeTokenDecimals({
amount: setGatewayDeposit,
decimals: nativeTokenDecimals,
}),
l1SenderAddress,
])

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to set value in the return here? I think it only should be set if L3 chains use ETH as the native currency?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, value should be provided if ETH is used to pay for fees

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated so that we only pass value when ETH is the native currency

return {
data,
value: setTokenDeposit.add(setGatewayDeposit),
value: this.nativeTokenIsEth
? setTokenDeposit.add(setGatewayDeposit)
: BigNumber.from(0),
to: l1Token.address,
from,
}
Expand Down
18 changes: 16 additions & 2 deletions src/lib/assetBridger/ethBridger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ import { SignerProviderUtils } from '../dataEntities/signerOrProvider'
import { MissingProviderArbSdkError } from '../dataEntities/errors'
import { getL2Network } from '../dataEntities/networks'
import { ERC20__factory } from '../abi/factories/ERC20__factory'
import { isArbitrumChain } from '../utils/lib'
import {
getNativeTokenDecimals,
isArbitrumChain,
nativeTokenDecimalsTo18Decimals,
} from '../utils/lib'

export type ApproveGasTokenParams = {
/**
Expand Down Expand Up @@ -312,10 +316,20 @@ export class EthBridger extends AssetBridger<
public async getDepositToRequest(
params: EthDepositToRequestParams
): Promise<L1ToL2TransactionRequest> {
const decimals = await getNativeTokenDecimals({
l1Provider: params.l1Provider,
l2Network: this.l2Network,
})

const amountToBeMintedOnChildChain = nativeTokenDecimalsTo18Decimals({
amount: params.amount,
decimals,
})

const requestParams = {
...params,
to: params.destinationAddress,
l2CallValue: params.amount,
l2CallValue: amountToBeMintedOnChildChain,
callValueRefundAddress: params.destinationAddress,
data: '0x',
}
Expand Down
23 changes: 17 additions & 6 deletions src/lib/message/L1ToL2MessageGasEstimator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ import {
RetryableDataTools,
} from '../dataEntities/retryableData'
import { L1ToL2TransactionRequest } from '../dataEntities/transactionRequest'
import { getBaseFee, isDefined } from '../utils/lib'
import {
getBaseFee,
getNativeTokenDecimals,
isDefined,
scaleToNativeTokenDecimals,
} from '../utils/lib'
import { OmitTyped } from '../utils/types'
import {
L1ToL2MessageGasParams,
Expand Down Expand Up @@ -220,7 +225,10 @@ export class L1ToL2MessageGasEstimator {
const { data } = retryableEstimateData
const gasLimitDefaults = this.applyGasLimitDefaults(options?.gasLimit)

// estimate the l2 gas price
const l2Network = await getL2Network(this.l2Provider)
const decimals = await getNativeTokenDecimals({ l1Provider, l2Network })

// estimate the l1 gas price
const maxFeePerGasPromise = this.estimateMaxFeePerGas(options?.maxFeePerGas)

// estimate the submission fee
Expand Down Expand Up @@ -254,10 +262,13 @@ export class L1ToL2MessageGasEstimator {

const deposit =
options?.deposit?.base ||
gasLimit
.mul(maxFeePerGas)
.add(maxSubmissionFee)
.add(retryableEstimateData.l2CallValue)
scaleToNativeTokenDecimals({
amount: gasLimit
.mul(maxFeePerGas)
.add(maxSubmissionFee)
.add(retryableEstimateData.l2CallValue),
decimals,
})

return {
gasLimit,
Expand Down
77 changes: 75 additions & 2 deletions src/lib/utils/lib.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { BigNumber, constants } from 'ethers'
import { Provider } from '@ethersproject/abstract-provider'
import { TransactionReceipt, JsonRpcProvider } from '@ethersproject/providers'
import { ArbSdkError } from '../dataEntities/errors'
import { ArbitrumProvider } from './arbProvider'
import { l2Networks } from '../dataEntities/networks'
import { L2Network, l2Networks } from '../dataEntities/networks'
import { ArbSys__factory } from '../abi/factories/ArbSys__factory'
import { ARB_SYS_ADDRESS } from '../dataEntities/constants'
import { BigNumber } from 'ethers'
import { ERC20__factory } from '../abi/factories/ERC20__factory'

export const wait = (ms: number): Promise<void> =>
new Promise(res => setTimeout(res, ms))
Expand Down Expand Up @@ -195,3 +196,75 @@ export const getBlockRangesForL1Block = async (

return [result[0], props.maxL2Block]
}

export async function getNativeTokenDecimals({
l1Provider,
l2Network,
}: {
l1Provider: Provider
l2Network: L2Network
}) {
const nativeTokenAddress = l2Network.nativeToken

if (!nativeTokenAddress || nativeTokenAddress === constants.AddressZero) {
return 18
}

const nativeTokenContract = ERC20__factory.connect(
nativeTokenAddress,
l1Provider
)

try {
return await nativeTokenContract.decimals()
} catch {
return 0
}
}

export function scaleToNativeTokenDecimals({
amount,
decimals,
}: {
amount: BigNumber
decimals: number
}) {
// do nothing for 18 decimals
if (decimals === 18) {
return amount
}

if (decimals < 18) {
const scaledAmount = amount.div(
BigNumber.from(10).pow(BigNumber.from(18 - decimals))
)
// round up if necessary
if (
scaledAmount
.mul(BigNumber.from(10).pow(BigNumber.from(18 - decimals)))
.lt(amount)
) {
return scaledAmount.add(BigNumber.from(1))
}
return scaledAmount
}

// decimals > 18
return amount.mul(BigNumber.from(10).pow(BigNumber.from(decimals - 18)))
}

export function nativeTokenDecimalsTo18Decimals({
amount,
decimals,
}: {
amount: BigNumber
decimals: number
}) {
if (decimals < 18) {
return amount.mul(BigNumber.from(10).pow(18 - decimals))
} else if (decimals > 18) {
return amount.div(BigNumber.from(10).pow(decimals - 18))
}

return amount
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { expect } from 'chai'
import { ethers, constants, Wallet } from 'ethers'
import dotenv from 'dotenv'

import { parseEther } from '@ethersproject/units'
import { parseEther, parseUnits } from '@ethersproject/units'

import {
fundL1 as fundL1Ether,
Expand All @@ -30,6 +30,7 @@ import {
} from '../testHelpers'
import { L2ToL1Message, L2ToL1MessageStatus } from '../../../src'
import { describeOnlyWhenCustomGasToken } from './mochaExtensions'
import { getNativeTokenDecimals } from '../../../src/lib/utils/lib'

dotenv.config()

Expand All @@ -48,8 +49,15 @@ describeOnlyWhenCustomGasToken(
})

it('approves the custom fee token to be spent by the Inbox on the parent chain (arbitrary amount, using params)', async function () {
const { ethBridger, nativeTokenContract, l1Signer } = await testSetup()
const amount = ethers.utils.parseEther('1')
const {
ethBridger,
nativeTokenContract,
l1Signer,
l1Provider,
l2Network,
} = await testSetup()
const decimals = await getNativeTokenDecimals({ l1Provider, l2Network })
const amount = ethers.utils.parseUnits('1', decimals)

await fundL1Ether(l1Signer)
await fundL1CustomFeeToken(l1Signer)
Expand Down Expand Up @@ -158,11 +166,17 @@ describeOnlyWhenCustomGasToken(
l1Provider,
l2Signer,
l2Provider,
l2Network,
ethBridger,
nativeTokenContract,
} = await testSetup()
const decimals = await getNativeTokenDecimals({
l1Provider,
l2Network,
})

const bridge = ethBridger.l2Network.ethBridge.bridge
const amount = parseEther('0.2')
const amount = parseUnits('0.2', decimals)

await fundL1Ether(l1Signer)
await fundL2CustomFeeToken(l2Signer)
Expand Down
Loading
Loading