From 8b3ded6cb828fe76d3b653c695afe51b0467f590 Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Mon, 20 Jun 2022 12:57:01 +0100 Subject: [PATCH 1/7] chore: move dependencies into dev dependencies (#70) * chore: move dependencies into dev dependencies * refactor: move dotenv into dev dependency * Add tsnode to dev dependency * lint * rename network id * fix: breaking change on network config --- package.json | 13 +++++----- scripts/instantiate_bridge.ts | 44 ++++++++++++++++++++------------ scripts/testSetup.ts | 2 -- src/lib/dataEntities/networks.ts | 9 ------- 4 files changed, 34 insertions(+), 34 deletions(-) diff --git a/package.json b/package.json index 832b3d248a..734ca941d2 100644 --- a/package.json +++ b/package.json @@ -48,15 +48,14 @@ "@ethersproject/address": "^5.0.8", "@ethersproject/bignumber": "^5.1.1", "@ethersproject/bytes": "^5.0.8", - "@typechain/ethers-v5": "9.0.0", - "@types/prompts": "^2.0.14", - "@types/yargs": "^17.0.9", - "dotenv": "^10.0.0", - "ethers": "^5.1.0", - "ts-node": "^10.2.1", - "typechain": "7.0.0" + "ethers": "^5.1.0" }, "devDependencies": { + "ts-node": "^10.2.1", + "dotenv": "^10.0.0", + "@typechain/ethers-v5": "9.0.0", + "@types/yargs": "^17.0.9", + "typechain": "7.0.0", "@arbitrum/nitro-contracts": "1.0.0-beta.5", "arb-bridge-peripherals": "1.0.10", "@nomiclabs/hardhat-ethers": "^2.0.4", diff --git a/scripts/instantiate_bridge.ts b/scripts/instantiate_bridge.ts index 98cc34ae69..e20c083c02 100644 --- a/scripts/instantiate_bridge.ts +++ b/scripts/instantiate_bridge.ts @@ -59,25 +59,25 @@ export const instantiateBridge = ( throw new Error('need ARB_KEY var') } - let networkID = args.networkID - if (!networkID) { + let l2NetworkID = args.networkID + if (!l2NetworkID) { console.log( 'No networkID command line arg provided; using network', defaultNetworkId ) - networkID = defaultNetworkId + l2NetworkID = defaultNetworkId } - const isL1 = isDefined(l1Networks[networkID]) - const isL2 = isDefined(l2Networks[networkID]) + const isL1 = isDefined(l1Networks[l2NetworkID]) + const isL2 = isDefined(l2Networks[l2NetworkID]) if (!isL1 && !isL2) { - throw new Error(`Unrecognized network ID: ${networkID}`) + throw new Error(`Unrecognized network ID: ${l2NetworkID}`) } if (!isL2) { - throw new Error(`Tests must specify an L2 network ID: ${networkID}`) + throw new Error(`Tests must specify an L2 network ID: ${l2NetworkID}`) } - const l2Network = l2Networks[networkID] + const l2Network = l2Networks[l2NetworkID] const l1Network = l1Networks[l2Network.partnerChainID] if (!l1Network) { @@ -86,14 +86,26 @@ export const instantiateBridge = ( ) } - if (!l1Network.rpcURL) { - throw new Error('L1 rpc url not set (see .env.sample or networks.ts)') - } - if (!l2Network.rpcURL) { - throw new Error('L2 rpc url not set (see .env.sample or utils/networks.ts)') - } - const ethProvider = new JsonRpcProvider(l1Network.rpcURL) - const arbProvider = new JsonRpcProvider(l2Network.rpcURL) + const l1Rpc = (() => { + if (l2NetworkID === 42161) return process.env['MAINNET_RPC'] as string + if (l2NetworkID === 421611) return process.env['RINKEBY_RPC'] as string + if (l2NetworkID === 1338) return 'http://127.0.0.1:8545/' + throw new Error( + 'L1 rpc url not set (see .env.sample or networks.ts) or chain id not supported' + ) + })() + const l2Rpc = (() => { + if (l2NetworkID === 42161) + return process.env['ARB_ONE_RPC'] || 'https://arb1.arbitrum.io/rpc' + if (l2NetworkID === 421611) + return process.env['RINKARBY_RPC'] || 'https://rinkeby.arbitrum.io/rpc' + throw new Error( + 'L2 rpc url not set (see .env.sample or networks.ts) or chain id not supported' + ) + })() + + const ethProvider = new JsonRpcProvider(l1Rpc) + const arbProvider = new JsonRpcProvider(l2Rpc) const l1Signer = (() => { if (l1PkParam) { diff --git a/scripts/testSetup.ts b/scripts/testSetup.ts index 69c5bb40ad..b2202d47ea 100644 --- a/scripts/testSetup.ts +++ b/scripts/testSetup.ts @@ -88,7 +88,6 @@ export const getCustomNetworks = async ( isCustom: true, name: 'EthLocal', partnerChainIDs: [l2NetworkInfo.chainId], - rpcURL: l1Url, } const l2Network: Omit = { @@ -106,7 +105,6 @@ export const getCustomNetworks = async ( isCustom: true, name: 'ArbLocal', partnerChainID: l1NetworkInfo.chainId, - rpcURL: l2Url, retryableLifetimeSeconds: 7 * 24 * 60 * 60, } return { diff --git a/src/lib/dataEntities/networks.ts b/src/lib/dataEntities/networks.ts index 8db5886ea5..624e85c5a2 100644 --- a/src/lib/dataEntities/networks.ts +++ b/src/lib/dataEntities/networks.ts @@ -16,13 +16,10 @@ /* eslint-env node */ 'use strict' -import dotenv from 'dotenv' import { SignerOrProvider, SignerProviderUtils } from './signerOrProvider' import { ArbSdkError } from '../dataEntities/errors' import { SEVEN_DAYS_IN_SECONDS } from './constants' -dotenv.config() - export interface L1Network extends Network { partnerChainIDs: number[] blockTime: number //seconds @@ -40,7 +37,6 @@ export interface Network { chainID: number name: string explorerUrl: string - rpcURL: string gif?: string isCustom: boolean } @@ -135,7 +131,6 @@ export const l1Networks: L1Networks = { explorerUrl: 'https://etherscan.io', partnerChainIDs: [42161], blockTime: 14, - rpcURL: process.env['MAINNET_RPC'] as string, isCustom: false, }, 1338: { @@ -144,7 +139,6 @@ export const l1Networks: L1Networks = { explorerUrl: 'https://etherscan.io', partnerChainIDs: [42161], blockTime: 1, - rpcURL: 'http://127.0.0.1:8545/', isCustom: false, }, 4: { @@ -153,7 +147,6 @@ export const l1Networks: L1Networks = { explorerUrl: 'https://rinkeby.etherscan.io', partnerChainIDs: [421611], blockTime: 15, - rpcURL: process.env['RINKEBY_RPC'] as string, isCustom: false, }, } @@ -168,7 +161,6 @@ export const l2Networks: L2Networks = { tokenBridge: mainnetTokenBridge, ethBridge: mainnetETHBridge, confirmPeriodBlocks: 45818, - rpcURL: process.env['ARB_ONE_RPC'] || 'https://arb1.arbitrum.io/rpc', isCustom: false, retryableLifetimeSeconds: SEVEN_DAYS_IN_SECONDS, }, @@ -181,7 +173,6 @@ export const l2Networks: L2Networks = { tokenBridge: rinkebyTokenBridge, ethBridge: rinkebyETHBridge, confirmPeriodBlocks: 6545, // TODO - rpcURL: process.env['RINKARBY_RPC'] || 'https://rinkeby.arbitrum.io/rpc', isCustom: false, retryableLifetimeSeconds: SEVEN_DAYS_IN_SECONDS, }, From 65e2825c0cdb43626722f9007bf733033b52be0e Mon Sep 17 00:00:00 2001 From: gzeon <95478735+gzeoneth@users.noreply.github.com> Date: Fri, 24 Jun 2022 22:14:57 +0800 Subject: [PATCH 2/7] fix: remove retryable from addr aliasing --- src/lib/message/L1ToL2Message.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/lib/message/L1ToL2Message.ts b/src/lib/message/L1ToL2Message.ts index 79951e462f..3391a8d0d3 100644 --- a/src/lib/message/L1ToL2Message.ts +++ b/src/lib/message/L1ToL2Message.ts @@ -126,16 +126,13 @@ export abstract class L1ToL2Message { return ethers.utils.stripZeros(value.toHexString()) } - const addressAlias = new Address(fromAddress) - - const from = addressAlias.applyAlias() const chainId = BigNumber.from(l2ChainId) const msgNum = BigNumber.from(messageNumber) const fields: any[] = [ formatNumber(chainId), zeroPad(formatNumber(msgNum), 32), - from.value, + fromAddress, formatNumber(l1BaseFee), formatNumber(l1Value), From 766382baff218bc936d293df458a3c820bdc1e4e Mon Sep 17 00:00:00 2001 From: gzeon <95478735+gzeoneth@users.noreply.github.com> Date: Fri, 24 Jun 2022 22:15:27 +0800 Subject: [PATCH 3/7] fix: race condition causing isExpired to throw --- src/lib/message/L1ToL2Message.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/lib/message/L1ToL2Message.ts b/src/lib/message/L1ToL2Message.ts index 3391a8d0d3..5b0170b39c 100644 --- a/src/lib/message/L1ToL2Message.ts +++ b/src/lib/message/L1ToL2Message.ts @@ -429,7 +429,17 @@ export class L1ToL2MessageReader extends L1ToL2Message { } // not redeemed, has it now expired - if (await this.isExpired()) { + try { + if (await this.isExpired()) { + return L1ToL2MessageStatus.EXPIRED + } + } catch (error) { + // this can happen due to a race condition that + // the retryable is redeemed/expired in between the calls + const successfulRedeemReceiptRetry = await this.getSuccessfulRedeem() + if (successfulRedeemReceiptRetry && successfulRedeemReceiptRetry.status === 1) { + return L1ToL2MessageStatus.REDEEMED + } return L1ToL2MessageStatus.EXPIRED } From 5b19efce3e5f2bcfdd167650d76cd79e5eb4528f Mon Sep 17 00:00:00 2001 From: gzeon <95478735+gzeoneth@users.noreply.github.com> Date: Fri, 24 Jun 2022 22:28:18 +0800 Subject: [PATCH 4/7] fix: lint --- src/lib/message/L1ToL2Message.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/message/L1ToL2Message.ts b/src/lib/message/L1ToL2Message.ts index 5b0170b39c..fe397bdafa 100644 --- a/src/lib/message/L1ToL2Message.ts +++ b/src/lib/message/L1ToL2Message.ts @@ -437,7 +437,10 @@ export class L1ToL2MessageReader extends L1ToL2Message { // this can happen due to a race condition that // the retryable is redeemed/expired in between the calls const successfulRedeemReceiptRetry = await this.getSuccessfulRedeem() - if (successfulRedeemReceiptRetry && successfulRedeemReceiptRetry.status === 1) { + if ( + successfulRedeemReceiptRetry && + successfulRedeemReceiptRetry.status === 1 + ) { return L1ToL2MessageStatus.REDEEMED } return L1ToL2MessageStatus.EXPIRED From fb4a469c2063fd9c919f9f6011f5cdbaa07bd115 Mon Sep 17 00:00:00 2001 From: gzeon <95478735+gzeoneth@users.noreply.github.com> Date: Fri, 24 Jun 2022 22:52:26 +0800 Subject: [PATCH 5/7] fix: delayedInboxAccs --- src/lib/inbox/inbox.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/inbox/inbox.ts b/src/lib/inbox/inbox.ts index eb2c36b411..8fba328c83 100644 --- a/src/lib/inbox/inbox.ts +++ b/src/lib/inbox/inbox.ts @@ -226,7 +226,9 @@ export class InboxTools { return null } - const delayedAcc = await bridge.inboxAccs(eventInfo.event.messageIndex) + const delayedAcc = await bridge.delayedInboxAccs( + eventInfo.event.messageIndex + ) return { ...eventInfo, delayedAcc: delayedAcc } } From 1ce22f98da75be2696713e27bb408514fe29e2f9 Mon Sep 17 00:00:00 2001 From: gzeon <95478735+gzeoneth@users.noreply.github.com> Date: Sat, 25 Jun 2022 00:26:18 +0800 Subject: [PATCH 6/7] chore: use newer nitro contracts --- package.json | 13 +++---- yarn.lock | 104 ++++++++++++++------------------------------------- 2 files changed, 34 insertions(+), 83 deletions(-) diff --git a/package.json b/package.json index 734ca941d2..c98be12876 100644 --- a/package.json +++ b/package.json @@ -51,17 +51,13 @@ "ethers": "^5.1.0" }, "devDependencies": { - "ts-node": "^10.2.1", - "dotenv": "^10.0.0", - "@typechain/ethers-v5": "9.0.0", - "@types/yargs": "^17.0.9", - "typechain": "7.0.0", - "@arbitrum/nitro-contracts": "1.0.0-beta.5", - "arb-bridge-peripherals": "1.0.10", + "@arbitrum/nitro-contracts": "https://gitpkg.now.sh/OffchainLabs/nitro/contracts?expose-outbox-isspent", "@nomiclabs/hardhat-ethers": "^2.0.4", + "@typechain/ethers-v5": "9.0.0", "@types/chai": "^4.2.11", "@types/mocha": "^9.0.0", "@types/prompts": "^2.0.14", + "@types/yargs": "^17.0.9", "@typescript-eslint/eslint-plugin": "^5.14.0", "@typescript-eslint/eslint-plugin-tslint": "^5.27.1", "@typescript-eslint/parser": "^5.14.0", @@ -72,6 +68,7 @@ "axios": "^0.21.3", "chai": "^4.2.0", "chalk": "^4.1.0", + "dotenv": "^10.0.0", "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-mocha": "^9.0.0", @@ -82,7 +79,9 @@ "prettier": "^2.3.2", "prettier-plugin-solidity": "^1.0.0-beta.17", "prompts": "^2.4.2", + "ts-node": "^10.2.1", "tslint": "^6.1.3", + "typechain": "7.0.0", "typedoc": "^0.21.5", "typedoc-plugin-markdown": "^3.10.4", "typescript": "^4.2.2", diff --git a/yarn.lock b/yarn.lock index 7d5c70ebe3..88d3047749 100644 --- a/yarn.lock +++ b/yarn.lock @@ -19,6 +19,14 @@ "@openzeppelin/contracts-upgradeable" "4.5.2" hardhat "^2.6.6" +"@arbitrum/nitro-contracts@https://gitpkg.now.sh/OffchainLabs/nitro/contracts?expose-outbox-isspent": + version "1.0.0-beta.5" + resolved "https://gitpkg.now.sh/OffchainLabs/nitro/contracts?expose-outbox-isspent#47069a151c59a26efad04764c9c56e33af22bfe1" + dependencies: + "@openzeppelin/contracts" "4.5.0" + "@openzeppelin/contracts-upgradeable" "4.5.2" + hardhat "^2.6.6" + "@babel/code-frame@7.12.11": version "7.12.11" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" @@ -1014,12 +1022,6 @@ "@typescript-eslint/types" "5.21.0" "@typescript-eslint/visitor-keys" "5.21.0" -<<<<<<< HEAD -"@typescript-eslint/type-utils@5.21.0": - version "5.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.21.0.tgz#ff89668786ad596d904c21b215e5285da1b6262e" - integrity sha512-MxmLZj0tkGlkcZCSE17ORaHl8Th3JQwBzyXL/uvC6sNmu128LsgjTX0NIzy+wdH2J7Pd02GN8FaoudJntFvSOw== -======= "@typescript-eslint/scope-manager@5.27.1": version "5.27.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.27.1.tgz#4d1504392d01fe5f76f4a5825991ec78b7b7894d" @@ -1028,11 +1030,10 @@ "@typescript-eslint/types" "5.27.1" "@typescript-eslint/visitor-keys" "5.27.1" -"@typescript-eslint/type-utils@5.14.0": - version "5.14.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.14.0.tgz#711f08105860b12988454e91df433567205a8f0b" - integrity sha512-d4PTJxsqaUpv8iERTDSQBKUCV7Q5yyXjqXUl3XF7Sd9ogNLuKLkxz82qxokqQ4jXdTPZudWpmNtr/JjbbvUixw== ->>>>>>> master +"@typescript-eslint/type-utils@5.21.0": + version "5.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.21.0.tgz#ff89668786ad596d904c21b215e5285da1b6262e" + integrity sha512-MxmLZj0tkGlkcZCSE17ORaHl8Th3JQwBzyXL/uvC6sNmu128LsgjTX0NIzy+wdH2J7Pd02GN8FaoudJntFvSOw== dependencies: "@typescript-eslint/utils" "5.21.0" debug "^4.3.2" @@ -1043,22 +1044,15 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.21.0.tgz#8cdb9253c0dfce3f2ab655b9d36c03f72e684017" integrity sha512-XnOOo5Wc2cBlq8Lh5WNvAgHzpjnEzxn4CJBwGkcau7b/tZ556qrWXQz4DJyChYg8JZAD06kczrdgFPpEQZfDsA== -<<<<<<< HEAD -"@typescript-eslint/typescript-estree@5.21.0": - version "5.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.21.0.tgz#9f0c233e28be2540eaed3df050f0d54fb5aa52de" - integrity sha512-Y8Y2T2FNvm08qlcoSMoNchh9y2Uj3QmjtwNMdRQkcFG7Muz//wfJBGBxh8R7HAGQFpgYpdHqUpEoPQk+q9Kjfg== -======= "@typescript-eslint/types@5.27.1": version "5.27.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.27.1.tgz#34e3e629501349d38be6ae97841298c03a6ffbf1" integrity sha512-LgogNVkBhCTZU/m8XgEYIWICD6m4dmEDbKXESCbqOXfKZxRKeqpiJXQIErv66sdopRKZPo5l32ymNqibYEH/xg== -"@typescript-eslint/typescript-estree@5.14.0": - version "5.14.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.14.0.tgz#78b7f7385d5b6f2748aacea5c9b7f6ae62058314" - integrity sha512-QGnxvROrCVtLQ1724GLTHBTR0lZVu13izOp9njRvMkCBgWX26PKvmMP8k82nmXBRD3DQcFFq2oj3cKDwr0FaUA== ->>>>>>> master +"@typescript-eslint/typescript-estree@5.21.0": + version "5.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.21.0.tgz#9f0c233e28be2540eaed3df050f0d54fb5aa52de" + integrity sha512-Y8Y2T2FNvm08qlcoSMoNchh9y2Uj3QmjtwNMdRQkcFG7Muz//wfJBGBxh8R7HAGQFpgYpdHqUpEoPQk+q9Kjfg== dependencies: "@typescript-eslint/types" "5.21.0" "@typescript-eslint/visitor-keys" "5.21.0" @@ -1068,12 +1062,6 @@ semver "^7.3.5" tsutils "^3.21.0" -<<<<<<< HEAD -"@typescript-eslint/utils@5.21.0": - version "5.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.21.0.tgz#51d7886a6f0575e23706e5548c7e87bce42d7c18" - integrity sha512-q/emogbND9wry7zxy7VYri+7ydawo2HDZhRZ5k6yggIvXa7PvBbAAZ4PFH/oZLem72ezC4Pr63rJvDK/sTlL8Q== -======= "@typescript-eslint/typescript-estree@5.27.1": version "5.27.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.27.1.tgz#7621ee78607331821c16fffc21fc7a452d7bc808" @@ -1087,11 +1075,10 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/utils@5.14.0": - version "5.14.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.14.0.tgz#6c8bc4f384298cbbb32b3629ba7415f9f80dc8c4" - integrity sha512-EHwlII5mvUA0UsKYnVzySb/5EE/t03duUTweVy8Zqt3UQXBrpEVY144OTceFKaOe4xQXZJrkptCf7PjEBeGK4w== ->>>>>>> master +"@typescript-eslint/utils@5.21.0": + version "5.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.21.0.tgz#51d7886a6f0575e23706e5548c7e87bce42d7c18" + integrity sha512-q/emogbND9wry7zxy7VYri+7ydawo2HDZhRZ5k6yggIvXa7PvBbAAZ4PFH/oZLem72ezC4Pr63rJvDK/sTlL8Q== dependencies: "@types/json-schema" "^7.0.9" "@typescript-eslint/scope-manager" "5.21.0" @@ -1100,12 +1087,6 @@ eslint-scope "^5.1.1" eslint-utils "^3.0.0" -<<<<<<< HEAD -"@typescript-eslint/visitor-keys@5.21.0": - version "5.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.21.0.tgz#453fb3662409abaf2f8b1f65d515699c888dd8ae" - integrity sha512-SX8jNN+iHqAF0riZQMkm7e8+POXa/fXw5cxL+gjpyP+FI+JVNhii53EmQgDAfDcBpFekYSlO0fGytMQwRiMQCA== -======= "@typescript-eslint/utils@5.27.1": version "5.27.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.27.1.tgz#b4678b68a94bc3b85bf08f243812a6868ac5128f" @@ -1118,11 +1099,10 @@ eslint-scope "^5.1.1" eslint-utils "^3.0.0" -"@typescript-eslint/visitor-keys@5.14.0": - version "5.14.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.14.0.tgz#1927005b3434ccd0d3ae1b2ecf60e65943c36986" - integrity sha512-yL0XxfzR94UEkjBqyymMLgCBdojzEuy/eim7N9/RIcTNxpJudAcqsU8eRyfzBbcEzGoPWfdM3AGak3cN08WOIw== ->>>>>>> master +"@typescript-eslint/visitor-keys@5.21.0": + version "5.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.21.0.tgz#453fb3662409abaf2f8b1f65d515699c888dd8ae" + integrity sha512-SX8jNN+iHqAF0riZQMkm7e8+POXa/fXw5cxL+gjpyP+FI+JVNhii53EmQgDAfDcBpFekYSlO0fGytMQwRiMQCA== dependencies: "@typescript-eslint/types" "5.21.0" eslint-visitor-keys "^3.0.0" @@ -1316,7 +1296,7 @@ arb-bridge-peripherals@1.0.10: optionalDependencies: "@openzeppelin/upgrades-core" "^1.7.6" -arbos-precompiles@^1.0.2: +arbos-precompiles@1.0.2, arbos-precompiles@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/arbos-precompiles/-/arbos-precompiles-1.0.2.tgz#7bebd5963aef972cd259eb41f3116ea065013ea6" integrity sha512-1dOFYFJUN0kKoofh6buZJ8qCqTs+oLGSsGzHI0trA/Pka/TCERflCRsNVxez2lihOvK7MT/a2RA8AepKtBXdPQ== @@ -1821,7 +1801,7 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.3: +debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -1835,23 +1815,6 @@ debug@4.3.3: dependencies: ms "2.1.2" -<<<<<<< HEAD -======= -debug@^2.2.0: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@^4.3.4: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - ->>>>>>> master decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" @@ -4076,14 +4039,7 @@ semver@^6.0.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@^7.0.0, semver@^7.2.1, semver@^7.3.5: - version "7.3.7" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" - integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== - dependencies: - lru-cache "^6.0.0" - -semver@^7.3.7: +semver@^7.0.0, semver@^7.2.1, semver@^7.3.5, semver@^7.3.7: version "7.3.7" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== @@ -4343,16 +4299,12 @@ supports-color@^7.1.0: dependencies: has-flag "^4.0.0" -<<<<<<< HEAD -table-layout@^1.0.2: -======= supports-preserve-symlinks-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== -table-layout@^1.0.1: ->>>>>>> master +table-layout@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/table-layout/-/table-layout-1.0.2.tgz#c4038a1853b0136d63365a734b6931cf4fad4a04" integrity sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A== From 38ab2ab507c81f8434cbc22cc1b7b32d756db423 Mon Sep 17 00:00:00 2001 From: gzeon <95478735+gzeoneth@users.noreply.github.com> Date: Sat, 25 Jun 2022 00:26:23 +0800 Subject: [PATCH 7/7] fix: use Outbox.isSpent --- src/lib/message/L2ToL1Message.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/message/L2ToL1Message.ts b/src/lib/message/L2ToL1Message.ts index a6a80b9b9e..51b72ab768 100644 --- a/src/lib/message/L2ToL1Message.ts +++ b/src/lib/message/L2ToL1Message.ts @@ -204,7 +204,7 @@ export class L2ToL1MessageReader extends L2ToL1Message { this.l1Provider ) - return outbox.callStatic.spent(this.event.position) + return outbox.callStatic.isSpent(this.event.position) } /**