Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion packages/assertion-monitor/blockchain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
type Block,
type Log,
} from 'viem'
import { ChildNetwork as ChainInfo, sleep } from '../utils'
import { ChildNetwork as ChainInfo, sleep } from 'utils'
import {
ASSERTION_CONFIRMED_EVENT,
ASSERTION_CREATED_EVENT,
Expand Down
2 changes: 1 addition & 1 deletion packages/assertion-monitor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
ChildNetwork as ChainInfo,
DEFAULT_CONFIG_PATH,
getConfig,
} from '../utils'
} from 'utils'
import {
createChildChainClient,
fetchChainState,
Expand Down
2 changes: 1 addition & 1 deletion packages/assertion-monitor/monitoring.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ChildNetwork as ChainInfo } from '../utils'
import { ChildNetwork as ChainInfo } from 'utils'
import {
BOLD_LOW_BASE_STAKE_ALERT,
CHAIN_ACTIVITY_WITHOUT_ASSERTIONS_ALERT,
Expand Down
4 changes: 2 additions & 2 deletions packages/assertion-monitor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
},
"scripts": {
"lint": "eslint .",
"build": "rm -rf ./dist && tsc",
"build": "yarn workspace utils build && rm -rf ./dist && tsc",
"format": "prettier './**/*.{js,json,md,yml,sol,ts}' --write && yarn run lint --fix",
"dev": "yarn build && node ./dist/assertion-monitor/main.js",
"dev": "yarn build && node ./dist/main.js",
"test": "vitest run __test__/*.test.ts",
"test:watch": "vitest watch __test__/*.test.ts"
}
Expand Down
6 changes: 4 additions & 2 deletions packages/batch-poster-monitor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {
DEFAULT_CONFIG_PATH,
getConfig,
getExplorerUrlPrefixes,
} from '../utils'
} from 'utils'
import {
shouldIgnoreFunctionSelector,
isIgnoredSelectorError,
Expand Down Expand Up @@ -464,7 +464,9 @@ const isAnyTrust = async (
})
} catch (e: any) {
console.warn(
`Warning: Failed to check AnyTrust status for chain [${childChainInformation.name}]: ${e?.message || e}`
`Warning: Failed to check AnyTrust status for chain [${
childChainInformation.name
}]: ${e?.message || e}`
)
return false
}
Expand Down
6 changes: 3 additions & 3 deletions packages/batch-poster-monitor/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "batch-poster-monitor",
"version": "1.0.0",
"main": "index.ts",
"main": "dist/index.js",
"scripts": {
"lint": "eslint .",
"build": "rm -rf ./dist && tsc",
"build": "yarn workspace utils build && rm -rf ./dist && tsc",
"format": "prettier './**/*.{js,json,md,yml,sol,ts}' --write && yarn run lint --fix",
"dev": "yarn build && node ./dist/batch-poster-monitor/index.js",
"dev": "yarn build && node ./dist/index.js",
"test": "vitest"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/retryable-monitor/core/redeemRetryable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
ParentTransactionReceipt,
ParentToChildMessageStatus,
} from '@arbitrum/sdk'
import { getConfig, DEFAULT_CONFIG_PATH } from '../../utils'
import { getConfig, DEFAULT_CONFIG_PATH } from 'utils'
import dotenv from 'dotenv'

dotenv.config()
Expand Down
2 changes: 1 addition & 1 deletion packages/retryable-monitor/core/retryableChecker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
ParentTransactionReceipt,
ParentToChildMessageStatus,
} from '@arbitrum/sdk'
import { ChildNetwork } from '../../utils'
import { ChildNetwork } from 'utils'
import {
getMessageDeliveredEventData,
getDepositInitiatedLogs,
Expand Down
2 changes: 1 addition & 1 deletion packages/retryable-monitor/core/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ChildNetwork } from '../../utils'
import { ChildNetwork } from 'utils'
import { providers } from 'ethers'

// Type for options passed to findRetryables function
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BigNumber, ethers, providers } from 'ethers'
import { getExplorerUrlPrefixes } from '../../utils'
import { getExplorerUrlPrefixes } from 'utils'
import { OnFailedRetryableFoundParams } from '../core/types'
import { reportFailedRetryables } from './reportFailedRetryables'
import { syncRetryableToNotion } from './notion/syncRetryableToNotion'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { notionClient, databaseId } from './createNotionClient'
import { postSlackMessage } from '../slack/postSlackMessage'
import { redeemRetryable } from '../../core/redeemRetryable'
import type { ChildNetwork } from '../../../utils'
import type { ChildNetwork } from 'utils'

const formatDate = (iso: string | undefined) => {
if (!iso) return '(unknown)'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ import {
ParentChainTicketReport,
TokenDepositData,
} from '../../core/types'
import { ChildNetwork, getExplorerUrlPrefixes } from '../../../utils'
import { parseAmount } from '../../../utils/amountUtils'
import { ChildNetwork, getExplorerUrlPrefixes, parseAmount } from 'utils'

/**
*
Expand Down
2 changes: 1 addition & 1 deletion packages/retryable-monitor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
registerCustomArbitrumNetwork,
} from '@arbitrum/sdk'
import { FindRetryablesOptions } from './core/types'
import { ChildNetwork, DEFAULT_CONFIG_PATH, getConfig } from '../utils'
import { ChildNetwork, DEFAULT_CONFIG_PATH, getConfig } from 'utils'
import {
checkRetryablesOneOff,
checkRetryablesContinuous,
Expand Down
4 changes: 2 additions & 2 deletions packages/retryable-monitor/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "retryable-monitor",
"version": "1.0.0",
"main": "index.ts",
"main": "dist/retryable-monitor/index.js",
"dependencies": {
"@arbitrum/nitro-contracts": "v1.1.0-beta.1",
"@arbitrum/sdk": "^4.0.0",
Expand All @@ -17,7 +17,7 @@
},
"scripts": {
"lint": "eslint .",
"build": "rm -rf ./dist && tsc",
"build": "yarn workspace utils build && rm -rf ./dist && tsc && find ./dist -name '*.js' -type f -exec sed -i '' \"s/require(['\\\"]\\.\\.\\/\\.\\.\\/utils['\\\"])/require('utils')/g\" {} \\;",
"format": "prettier './**/*.{js,json,md,yml,sol,ts}' --write && yarn run lint --fix",
"dev": "yarn build && node ./dist/retryable-monitor/index.js"
}
Expand Down
5 changes: 4 additions & 1 deletion packages/retryable-monitor/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "./dist"
"outDir": "./dist",
"paths": {
"utils": ["../utils"]
}
},
"include": ["./**/*.ts", "./**/*.d.ts", "packages/*.ts"],
"exclude": ["node_modules", "dist/"]
Expand Down
1 change: 1 addition & 0 deletions packages/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export * from './config'
export { getExplorerUrlPrefixes } from './getExplorerUrlPrefixes'
export { postSlackMessage } from './postSlackMessage'
export { createSlackPoster } from './createSlackPoster'
export { parseAmount } from './amountUtils'

export const sleep = (ms: number) =>
new Promise(resolve => setTimeout(resolve, ms))
7 changes: 4 additions & 3 deletions packages/utils/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"name": "utils",
"version": "1.0.0",
"main": "index.ts",
"main": "dist/index.js",
"dependencies": {
"@slack/web-api": "^7.0.4"
},
"scripts": {
"lint": "eslint ."
"lint": "eslint .",
"build": "rm -rf ./dist && tsc"
}
}
}
Loading