//Move ERC20 Tokens from L1 to L2
async depositErc20(value_Wei_String, currency, currencyL2) {
const L1_TEST_Contract = this.L1_TEST_Contract.attach(currency)
let allowance_BN = await L1_TEST_Contract.allowance(
allAddresses.L1StandardBridgeAddress
const allowed = allowance_BN.gte(BigNumber.from(value_Wei_String))
const approveStatus = await L1_TEST_Contract.approve(
allAddresses.L1StandardBridgeAddress,
await approveStatus.wait()
console.log("ERC 20 L1 ops approved:",approveStatus)
const depositTxStatus = await this.L1StandardBridgeContract.depositERC20(
utils.formatBytes32String(new Date().getTime().toString())
//at this point the tx has been submitted, and we are waiting...
await depositTxStatus.wait()
const [l1ToL2msgHash] = await this.watcher.getMessageHashesFromL1Tx(
console.log(' got L1->L2 message hash', l1ToL2msgHash)
const l2Receipt = await this.watcher.getL2TransactionReceipt(
console.log(' completed Deposit! L2 tx hash:', l2Receipt.transactionHash)