From f0081409d14f5b1eab863d65afaec8bfa1030411 Mon Sep 17 00:00:00 2001 From: Furkan Nabi Sumji <103491179+furkannabisumji@users.noreply.github.com> Date: Sat, 2 Nov 2024 12:30:07 +0530 Subject: [PATCH] add smart contract verifier and eth amount for bridging --- docker-compose.yaml | 7 +++++++ scripts/chargeEthOrErc20.ts | 7 +++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 6ffd469..8473d6c 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -93,6 +93,13 @@ services: - "./config:/home/user/.arbitrum" command: --conf.file /home/user/.arbitrum/nodeConfig.json + smart-contract-verifier: + extends: + file: ./docker-compose/services/smart-contract-verifier.yml + service: smart-contract-verifier + ports: + - "127.0.0.1:8050:8050" + das-server: image: offchainlabs/nitro-node:v3.2.1-d81324d entrypoint: [ "/bin/bash", "/das-server.sh" ] diff --git a/scripts/chargeEthOrErc20.ts b/scripts/chargeEthOrErc20.ts index 819221e..e898c67 100644 --- a/scripts/chargeEthOrErc20.ts +++ b/scripts/chargeEthOrErc20.ts @@ -1,4 +1,4 @@ -import { ethers } from 'ethers' +import { BigNumber, ethers } from 'ethers' import { ERC20__factory } from '@arbitrum/sdk/dist/lib/abi/factories/ERC20__factory' import fs from 'fs' @@ -58,14 +58,13 @@ async function main() { depositEthInterface, l2Signer ) - // deposit 0.4 ETH const tx = await contract.depositEth({ - value: ethers.utils.parseEther('0.4'), + value: ethers.BigNumber.from(ethers.utils.parseEther(amount)), }) console.log('Transaction hash on parent chain: ', tx.hash) await tx.wait() console.log('Transaction has been mined') - console.log('0.4 ETHs are deposited to your account') + console.log(amount + ' ETHs are deposited to your account') } else { const nativeTokenContract = ERC20__factory.connect(nativeToken, l2Provider) const decimals = await nativeTokenContract.decimals()