Commit df7d5987 authored by Mark Tyneway's avatar Mark Tyneway Committed by GitHub

Merge pull request #1778 from ethereum-optimism/develop

release: merge develop into master
parents b9ee4fbb 426d0b76
---
'@eth-optimism/batch-submitter': patch
---
Throw an error when sequencer and proposer have the same address.
---
'@eth-optimism/integration-tests': patch
'@eth-optimism/batch-submitter': patch
'@eth-optimism/common-ts': patch
'@eth-optimism/contracts': patch
'@eth-optimism/core-utils': patch
'@eth-optimism/data-transport-layer': patch
'@eth-optimism/message-relayer': patch
'@eth-optimism/regenesis-surgery': patch
'@eth-optimism/replica-healthcheck': patch
---
Standardize package json file format
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
## TL;DR ## TL;DR
This is the primary place where [Optimism](https://optimism.io) works on stuff related to [Optimistic Ethereum](https://research.paradigm.xyz/optimism). This is the primary place where [Optimism](https://optimism.io) works on stuff related to [Optimistic Ethereum](https://optimistic.etherscan.io/).
## Documentation ## Documentation
...@@ -19,27 +19,29 @@ Extensive documentation is available [here](http://community.optimism.io/). ...@@ -19,27 +19,29 @@ Extensive documentation is available [here](http://community.optimism.io/).
## Community ## Community
* [Come hang on discord](https://discord.optimism.io) Come hang on our very active [discord](https://discord.optimism.io) 🔴✨
## Contributing ## Contributing
Read through [CONTRIBUTING.md](./CONTRIBUTING.md) for a general overview of our contribution process. Read through [CONTRIBUTING.md](./CONTRIBUTING.md) for a general overview of our contribution process.
Then check out our list of [good first issues](https://github.com/ethereum-optimism/optimism/contribute) to find something fun to work on!
## Directory Structure ## Directory Structure
* [`packages`](./packages): Contains all the typescript packages and contracts <pre>
* [`contracts`](./packages/contracts): Solidity smart contracts implementing the OVM root
* [`core-utils`](./packages/core-utils): Low-level utilities and encoding packages ├── <a href="./packages">packages</a>
* [`common-ts`](./packages/common-ts): Common tools for TypeScript code that runs in Node │ ├── <a href="./packages/contracts">contracts</a>: L1 and L2 smart contracts for Optimistic Ethereum
* [`data-transport-layer`](./packages/data-transport-layer): Event indexer, allowing the `l2geth` node to access L1 data │ └── <a href="./packages/core-utils">core-utils</a>: Low-level utilities that make building Optimistic Ethereum easier
* [`batch-submitter`](./packages/batch-submitter): Daemon for submitting L2 transaction and state root batches to L1 │ └── <a href="./packages/common-ts">common-ts</a>: Common tools for building apps in TypeScript
* [`message-relayer`](./packages/message-relayer): Service for relaying L2 messages to L1 │ └── <a href="./packages/data-transport-layer">data-transport-layer</a>: Service for indexing Optimistic Ethereum-related L1 data
* [`replica-healthcheck`](./packages/replica-healthcheck): Service to monitor the health of different replica deployments │ └── <a href="./packages/batch-submitter">batch-submitter</a>: Service for submitting batches of transactions and results to L1
* [`l2geth`](./l2geth): Fork of [go-ethereum v1.9.10](https://github.com/ethereum/go-ethereum/tree/v1.9.10) implementing the [OVM](https://research.paradigm.xyz/optimism#optimistic-geth). │ └── <a href="./packages/message-relayer">message-relayer</a>: Tool for automatically relaying L1<>L2 messages in development
* [`integration-tests`](./integration-tests): Integration tests between a L1 testnet, `l2geth`, │ └── <a href="./packages/replica-healthcheck">replica-healthcheck</a>: Service for monitoring the health of a replica node
* [`ops`](./ops): Contains Dockerfiles for containerizing each service involved in the protocol, ├── <a href="./l2geth">l2geth</a>: Optimistic Ethereum client software, a fork of <a href="https://github.com/ethereum/go-ethereum/tree/v1.9.10">geth v1.9.10</a>
as well as a docker-compose file for bringing up local testnets easily ├── <a href="./integration-tests">integration-tests</a>: Various integration tests for an Optimistic Ethereum network
└── <a href="./ops">ops</a>: Tools for running Optimistic Ethereum nodes and networks
</pre>
## Branching Model and Releases ## Branching Model and Releases
......
{ {
"private": true,
"name": "@eth-optimism/integration-tests", "name": "@eth-optimism/integration-tests",
"version": "0.3.0", "version": "0.3.0",
"description": "[Optimism] Integration Tests", "description": "[Optimism] Integration tests",
"private": true,
"author": "Optimism PBC",
"license": "MIT",
"scripts": { "scripts": {
"lint": "yarn lint:fix && yarn lint:check", "lint": "yarn lint:fix && yarn lint:check",
"lint:fix": "yarn lint:check --fix", "lint:fix": "yarn lint:check --fix",
...@@ -16,6 +14,19 @@ ...@@ -16,6 +14,19 @@
"clean": "rimraf cache artifacts", "clean": "rimraf cache artifacts",
"pre-commit": "lint-staged" "pre-commit": "lint-staged"
}, },
"keywords": [
"optimism",
"ethereum",
"integration",
"tests"
],
"homepage": "https://github.com/ethereum-optimism/optimism/tree/develop/packages/integration-tests#readme",
"license": "MIT",
"author": "Optimism PBC",
"repository": {
"type": "git",
"url": "https://github.com/ethereum-optimism/optimism.git"
},
"devDependencies": { "devDependencies": {
"@eth-optimism/contracts": "0.5.1", "@eth-optimism/contracts": "0.5.1",
"@eth-optimism/core-utils": "0.7.0", "@eth-optimism/core-utils": "0.7.0",
......
...@@ -17,9 +17,10 @@ services: ...@@ -17,9 +17,10 @@ services:
environment: environment:
FRAUD_PROOF_WINDOW_SECONDS: 0 FRAUD_PROOF_WINDOW_SECONDS: 0
L1_NODE_WEB3_URL: http://l1_chain:8545 L1_NODE_WEB3_URL: http://l1_chain:8545
# these keys are hardhat's first 2 accounts, DO NOT use in production # these keys are hardhat's first 3 accounts, DO NOT use in production
DEPLOYER_PRIVATE_KEY: "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" DEPLOYER_PRIVATE_KEY: "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"
SEQUENCER_PRIVATE_KEY: "0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d" SEQUENCER_PRIVATE_KEY: "0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d"
PROPOSER_PRIVATE_KEY: "0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a"
GAS_PRICE_ORACLE_OWNER: "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" GAS_PRICE_ORACLE_OWNER: "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"
# setting the whitelist owner to address(0) disables the whitelist # setting the whitelist owner to address(0) disables the whitelist
WHITELIST_OWNER: "0x0000000000000000000000000000000000000000" WHITELIST_OWNER: "0x0000000000000000000000000000000000000000"
...@@ -93,6 +94,7 @@ services: ...@@ -93,6 +94,7 @@ services:
L2_NODE_WEB3_URL: http://l2geth:8545 L2_NODE_WEB3_URL: http://l2geth:8545
URL: http://deployer:8081/addresses.json URL: http://deployer:8081/addresses.json
SEQUENCER_PRIVATE_KEY: "0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d" SEQUENCER_PRIVATE_KEY: "0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d"
PROPOSER_PRIVATE_KEY: "0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a"
verifier: verifier:
depends_on: depends_on:
......
...@@ -22,9 +22,10 @@ services: ...@@ -22,9 +22,10 @@ services:
environment: environment:
FRAUD_PROOF_WINDOW_SECONDS: 0 FRAUD_PROOF_WINDOW_SECONDS: 0
L1_NODE_WEB3_URL: http://l1_chain:8545 L1_NODE_WEB3_URL: http://l1_chain:8545
# these keys are hardhat's first 2 accounts, DO NOT use in production # these keys are hardhat's first 3 accounts, DO NOT use in production
DEPLOYER_PRIVATE_KEY: "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" DEPLOYER_PRIVATE_KEY: "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"
SEQUENCER_PRIVATE_KEY: "0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d" SEQUENCER_PRIVATE_KEY: "0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d"
PROPOSER_PRIVATE_KEY: "0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a"
GAS_PRICE_ORACLE_OWNER: "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" GAS_PRICE_ORACLE_OWNER: "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"
# setting the whitelist owner to address(0) disables the whitelist # setting the whitelist owner to address(0) disables the whitelist
WHITELIST_OWNER: "0x0000000000000000000000000000000000000000" WHITELIST_OWNER: "0x0000000000000000000000000000000000000000"
...@@ -133,6 +134,7 @@ services: ...@@ -133,6 +134,7 @@ services:
L2_NODE_WEB3_URL: http://l2geth:8545 L2_NODE_WEB3_URL: http://l2geth:8545
URL: http://deployer:8081/addresses.json URL: http://deployer:8081/addresses.json
SEQUENCER_PRIVATE_KEY: "0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d" SEQUENCER_PRIVATE_KEY: "0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d"
PROPOSER_PRIVATE_KEY: "0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a"
verifier: verifier:
depends_on: depends_on:
......
{ {
"private": true,
"name": "@eth-optimism/batch-submitter", "name": "@eth-optimism/batch-submitter",
"version": "0.4.1", "version": "0.4.1",
"private": true, "description": "[Optimism] Service for submitting transactions and transaction results",
"description": "[Optimism] Batch submission for sequencer & aggregators",
"main": "dist/index", "main": "dist/index",
"types": "dist/index", "types": "dist/index",
"files": [ "files": [
...@@ -25,12 +25,12 @@ ...@@ -25,12 +25,12 @@
"sequencer", "sequencer",
"aggregator" "aggregator"
], ],
"homepage": "https://github.com/ethereum-optimism/optimism-monorepo/tree/master/packages/batch-submitter#readme", "homepage": "https://github.com/ethereum-optimism/optimism/tree/develop/packages/batch-submitter#readme",
"license": "MIT", "license": "MIT",
"author": "Optimism PBC", "author": "Optimism PBC",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/ethereum-optimism/optimism-monorepo.git" "url": "https://github.com/ethereum-optimism/optimism.git"
}, },
"dependencies": { "dependencies": {
"@eth-optimism/common-ts": "0.2.0", "@eth-optimism/common-ts": "0.2.0",
......
...@@ -360,6 +360,9 @@ export const run = async () => { ...@@ -360,6 +360,9 @@ export const run = async () => {
// If the sequencer & proposer are the same, use a single wallet // If the sequencer & proposer are the same, use a single wallet
if (sequencerAddress === proposerAddress) { if (sequencerAddress === proposerAddress) {
proposerSigner = sequencerSigner proposerSigner = sequencerSigner
throw new Error(
'Sequencer and proposer have the same address, multiple transactions may be sent with the same nonce.'
)
} }
logger.info('Configured batch submitter addresses', { logger.info('Configured batch submitter addresses', {
......
{ {
"name": "@eth-optimism/common-ts", "name": "@eth-optimism/common-ts",
"version": "0.2.0", "version": "0.2.0",
"description": "[Optimism] Advanced typescript tooling used by various services",
"main": "dist/index", "main": "dist/index",
"types": "dist/index",
"files": [ "files": [
"dist/*" "dist/*"
], ],
"types": "dist/index",
"author": "Optimism PBC",
"license": "MIT",
"scripts": { "scripts": {
"all": "yarn clean && yarn build && yarn test && yarn lint:fix && yarn lint", "all": "yarn clean && yarn build && yarn test && yarn lint:fix && yarn lint",
"build": "tsc -p tsconfig.build.json", "build": "tsc -p tsconfig.build.json",
...@@ -18,6 +17,27 @@ ...@@ -18,6 +17,27 @@
"pre-commit": "lint-staged", "pre-commit": "lint-staged",
"test": "ts-mocha test/*.spec.ts" "test": "ts-mocha test/*.spec.ts"
}, },
"keywords": [
"optimism",
"ethereum",
"common",
"typescript"
],
"homepage": "https://github.com/ethereum-optimism/optimism/tree/develop/packages/common-ts#readme",
"license": "MIT",
"author": "Optimism PBC",
"repository": {
"type": "git",
"url": "https://github.com/ethereum-optimism/optimism.git"
},
"dependencies": {
"@sentry/node": "^6.3.1",
"express": "^4.17.1",
"pino": "^6.11.3",
"pino-multi-stream": "^5.3.0",
"pino-sentry": "^0.7.0",
"prom-client": "^13.1.0"
},
"devDependencies": { "devDependencies": {
"@types/chai": "^4.2.18", "@types/chai": "^4.2.18",
"@types/express": "^4.17.12", "@types/express": "^4.17.12",
...@@ -43,13 +63,5 @@ ...@@ -43,13 +63,5 @@
"supertest": "^6.1.4", "supertest": "^6.1.4",
"ts-mocha": "^8.0.0", "ts-mocha": "^8.0.0",
"typescript": "^4.3.5" "typescript": "^4.3.5"
},
"dependencies": {
"@sentry/node": "^6.3.1",
"express": "^4.17.1",
"pino": "^6.11.3",
"pino-multi-stream": "^5.3.0",
"pino-sentry": "^0.7.0",
"prom-client": "^13.1.0"
} }
} }
...@@ -21,6 +21,7 @@ process.env.CONTRACTS_RPC_URL = ...@@ -21,6 +21,7 @@ process.env.CONTRACTS_RPC_URL =
import hre from 'hardhat' import hre from 'hardhat'
const sequencer = new Wallet(process.env.SEQUENCER_PRIVATE_KEY) const sequencer = new Wallet(process.env.SEQUENCER_PRIVATE_KEY)
const proposer = new Wallet(process.env.PROPOSER_PRIVATE_KEY)
const deployer = new Wallet(process.env.DEPLOYER_PRIVATE_KEY) const deployer = new Wallet(process.env.DEPLOYER_PRIVATE_KEY)
const parseEnv = () => { const parseEnv = () => {
...@@ -63,7 +64,7 @@ const main = async () => { ...@@ -63,7 +64,7 @@ const main = async () => {
sccFraudProofWindow: config.sccFraudProofWindow, sccFraudProofWindow: config.sccFraudProofWindow,
sccSequencerPublishWindow: config.sccFraudProofWindow, sccSequencerPublishWindow: config.sccFraudProofWindow,
ovmSequencerAddress: sequencer.address, ovmSequencerAddress: sequencer.address,
ovmProposerAddress: sequencer.address, ovmProposerAddress: proposer.address,
ovmAddressManagerOwner: deployer.address, ovmAddressManagerOwner: deployer.address,
numDeployConfirmations: 0, numDeployConfirmations: 0,
noCompile: process.env.NO_COMPILE ? true : false, noCompile: process.env.NO_COMPILE ? true : false,
......
...@@ -33,7 +33,6 @@ import { ...@@ -33,7 +33,6 @@ import {
* from L2 onto L1. In the event that a message sent from L1 to L2 is rejected for exceeding the L2 * from L2 onto L1. In the event that a message sent from L1 to L2 is rejected for exceeding the L2
* epoch gas limit, it can be resubmitted via this contract's replay function. * epoch gas limit, it can be resubmitted via this contract's replay function.
* *
* Runtime target: EVM
*/ */
contract L1CrossDomainMessenger is contract L1CrossDomainMessenger is
IL1CrossDomainMessenger, IL1CrossDomainMessenger,
......
...@@ -19,7 +19,6 @@ import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.s ...@@ -19,7 +19,6 @@ import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.s
* tokens that are in use on L2. It synchronizes a corresponding L2 Bridge, informing it of deposits * tokens that are in use on L2. It synchronizes a corresponding L2 Bridge, informing it of deposits
* and listening to it for newly finalized withdrawals. * and listening to it for newly finalized withdrawals.
* *
* Runtime target: EVM
*/ */
contract L1StandardBridge is IL1StandardBridge, CrossDomainEnabled { contract L1StandardBridge is IL1StandardBridge, CrossDomainEnabled {
using SafeERC20 for IERC20; using SafeERC20 for IERC20;
......
...@@ -18,7 +18,6 @@ import { IChainStorageContainer } from "./IChainStorageContainer.sol"; ...@@ -18,7 +18,6 @@ import { IChainStorageContainer } from "./IChainStorageContainer.sol";
* The CTC also allows any account to 'enqueue' an L2 transaction, which will require that the * The CTC also allows any account to 'enqueue' an L2 transaction, which will require that the
* Sequencer will eventually append it to the rollup state. * Sequencer will eventually append it to the rollup state.
* *
* Runtime target: EVM
*/ */
contract CanonicalTransactionChain is ICanonicalTransactionChain, Lib_AddressResolver { contract CanonicalTransactionChain is ICanonicalTransactionChain, Lib_AddressResolver {
/************* /*************
......
...@@ -19,7 +19,6 @@ import { IChainStorageContainer } from "./IChainStorageContainer.sol"; ...@@ -19,7 +19,6 @@ import { IChainStorageContainer } from "./IChainStorageContainer.sol";
* 2. Stores queued transactions for the Canonical Transaction Chain * 2. Stores queued transactions for the Canonical Transaction Chain
* 3. Stores chain state batches for the State Commitment Chain * 3. Stores chain state batches for the State Commitment Chain
* *
* Runtime target: EVM
*/ */
contract ChainStorageContainer is IChainStorageContainer, Lib_AddressResolver { contract ChainStorageContainer is IChainStorageContainer, Lib_AddressResolver {
/************* /*************
......
...@@ -19,7 +19,6 @@ import { IChainStorageContainer } from "./IChainStorageContainer.sol"; ...@@ -19,7 +19,6 @@ import { IChainStorageContainer } from "./IChainStorageContainer.sol";
* Elements here have a 1:1 correspondence with transactions in the CTC, and should be the unique * Elements here have a 1:1 correspondence with transactions in the CTC, and should be the unique
* state root calculated off-chain by applying the canonical transactions one by one. * state root calculated off-chain by applying the canonical transactions one by one.
* *
* Runtime target: EVM
*/ */
contract StateCommitmentChain is IStateCommitmentChain, Lib_AddressResolver { contract StateCommitmentChain is IStateCommitmentChain, Lib_AddressResolver {
/************* /*************
......
...@@ -12,7 +12,6 @@ import { Lib_AddressResolver } from "../../libraries/resolver/Lib_AddressResolve ...@@ -12,7 +12,6 @@ import { Lib_AddressResolver } from "../../libraries/resolver/Lib_AddressResolve
* @dev This contract is, for now, a stub of the "real" BondManager that does nothing but * @dev This contract is, for now, a stub of the "real" BondManager that does nothing but
* allow the "OVM_Proposer" to submit state root batches. * allow the "OVM_Proposer" to submit state root batches.
* *
* Runtime target: EVM
*/ */
contract BondManager is IBondManager, Lib_AddressResolver { contract BondManager is IBondManager, Lib_AddressResolver {
/** /**
......
...@@ -9,7 +9,6 @@ import { ICrossDomainMessenger } from "./ICrossDomainMessenger.sol"; ...@@ -9,7 +9,6 @@ import { ICrossDomainMessenger } from "./ICrossDomainMessenger.sol";
* @dev Helper contract for contracts performing cross-domain communications * @dev Helper contract for contracts performing cross-domain communications
* *
* Compiler used: defined by inheriting contract * Compiler used: defined by inheriting contract
* Runtime target: defined by inheriting contract
*/ */
contract CrossDomainEnabled { contract CrossDomainEnabled {
/************* /*************
......
...@@ -26,9 +26,7 @@ import 'hardhat-gas-reporter' ...@@ -26,9 +26,7 @@ import 'hardhat-gas-reporter'
dotenv.config() dotenv.config()
const enableGasReport = !!process.env.ENABLE_GAS_REPORT const enableGasReport = !!process.env.ENABLE_GAS_REPORT
const privateKey = const privateKey = process.env.PRIVATE_KEY || '0x' + '11'.repeat(32) // this is to avoid hardhat error
process.env.PRIVATE_KEY ||
'0x0000000000000000000000000000000000000000000000000000000000000000' // this is to avoid hardhat error
const config: HardhatUserConfig = { const config: HardhatUserConfig = {
networks: { networks: {
......
{ {
"name": "@eth-optimism/contracts", "name": "@eth-optimism/contracts",
"version": "0.5.1", "version": "0.5.1",
"description": "[Optimism] L1 and L2 smart contracts for Optimistic Ethereum",
"main": "dist/index", "main": "dist/index",
"types": "dist/index",
"files": [ "files": [
"dist/**/*.js", "dist/**/*.js",
"dist/**/*.d.ts", "dist/**/*.d.ts",
...@@ -14,9 +16,6 @@ ...@@ -14,9 +16,6 @@
"libraries", "libraries",
"standards" "standards"
], ],
"types": "dist/index",
"author": "Optimism PBC",
"license": "MIT",
"scripts": { "scripts": {
"build": "yarn build:contracts && yarn autogen:artifacts && yarn build:typescript", "build": "yarn build:contracts && yarn autogen:artifacts && yarn build:typescript",
"build:typescript": "tsc -p ./tsconfig.build.json", "build:typescript": "tsc -p ./tsconfig.build.json",
...@@ -45,6 +44,19 @@ ...@@ -45,6 +44,19 @@
"postpack": "yarn postpublish", "postpack": "yarn postpublish",
"pre-commit": "lint-staged" "pre-commit": "lint-staged"
}, },
"keywords": [
"optimism",
"ethereum",
"contracts",
"solidity"
],
"homepage": "https://github.com/ethereum-optimism/optimism/tree/develop/packages/contracts#readme",
"license": "MIT",
"author": "Optimism PBC",
"repository": {
"type": "git",
"url": "https://github.com/ethereum-optimism/optimism.git"
},
"dependencies": { "dependencies": {
"@eth-optimism/core-utils": "0.7.0", "@eth-optimism/core-utils": "0.7.0",
"@ethersproject/abstract-provider": "^5.4.1", "@ethersproject/abstract-provider": "^5.4.1",
......
const ethers = require('ethers')
const yargs = require('yargs/yargs')
const { hideBin } = require('yargs/helpers')
const argv = yargs(hideBin(process.argv)).argv
;(async () => {
console.log(`Listing known addresses for: ${argv.network}`)
const provider = new ethers.providers.JsonRpcProvider(argv.rpcUrl)
// Get a reference to the address manager and throw if unable to do so.
let Lib_AddressManager
try {
const def__Lib_AddressManager = require(`../deployments/${argv.network}/Lib_AddressManager.json`)
Lib_AddressManager = new ethers.Contract(
def__Lib_AddressManager.address,
def__Lib_AddressManager.abi,
provider
)
} catch (err) {
throw new Error(`unable to get a reference to Lib_AddressManager`)
}
const events = await Lib_AddressManager.queryFilter(
Lib_AddressManager.filters.AddressSet()
)
const addresses = {}
for (const event of events) {
addresses[event.args._name] = event.args._newAddress
}
const table = []
for (const name of Object.keys(addresses)) {
if (addresses[name] !== ethers.constants.AddressZero) {
table.push({
name,
address: addresses[name],
})
}
}
console.table(table)
})()
// Helper script for checking if the local / remote bytecode/addresses matches for a deployment
const ethers = require('ethers')
const dirtree = require('directory-tree')
const yargs = require('yargs/yargs')
const { hideBin } = require('yargs/helpers')
const argv = yargs(hideBin(process.argv)).argv
const nicknames = {
mockBondManager: 'BondManager',
}
;(async () => {
console.log(`Checking deployment for network: ${argv.network}`)
const provider = new ethers.providers.JsonRpcProvider(argv.rpcUrl)
// Get a reference to the address manager and throw if unable to do so.
let Lib_AddressManager
try {
const def__Lib_AddressManager = require(`../deployments/${argv.network}/Lib_AddressManager.json`)
Lib_AddressManager = new ethers.Contract(
def__Lib_AddressManager.address,
def__Lib_AddressManager.abi,
provider
)
} catch (err) {
throw new Error(`unable to get a reference to Lib_AddressManager`)
}
const contracts = dirtree(`./deployments/${argv.network}`)
.children.filter((child) => {
return child.extension === '.json'
})
.map((child) => {
return child.name.replace('.json', '')
})
for (const contract of contracts) {
const deployment = require(`../deployments/${argv.network}/${contract}.json`)
if (contract !== 'Lib_AddressManager') {
const address = await Lib_AddressManager.getAddress(
nicknames[contract] || contract
)
if (address !== deployment.address) {
console.log(`✖ ${contract} (ADDRESS MISMATCH DETECTED)`)
continue
}
}
// First do some basic checks on the local bytecode and remote bytecode.
const local = deployment.deployedBytecode
const remote = await provider.getCode(deployment.address)
if (ethers.utils.keccak256(local) !== ethers.utils.keccak256(remote)) {
console.log(`✖ ${contract} (CODE MISMATCH DETECTED)`)
continue
}
console.log(`✓ ${contract}`)
}
})()
{ {
"name": "@eth-optimism/core-utils", "name": "@eth-optimism/core-utils",
"version": "0.7.0", "version": "0.7.0",
"description": "[Optimism] Core typescript utilities",
"main": "dist/index", "main": "dist/index",
"types": "dist/index",
"files": [ "files": [
"dist/*" "dist/index"
], ],
"types": "dist/index",
"repository": "git@github.com:ethereum-optimism/core-utils.git",
"author": "Optimism PBC",
"license": "MIT",
"scripts": { "scripts": {
"all": "yarn clean && yarn build && yarn test && yarn lint:fix && yarn lint", "all": "yarn clean && yarn build && yarn test && yarn lint:fix && yarn lint",
"build": "tsc -p tsconfig.build.json", "build": "tsc -p tsconfig.build.json",
...@@ -20,6 +18,28 @@ ...@@ -20,6 +18,28 @@
"test": "ts-mocha test/*.spec.ts", "test": "ts-mocha test/*.spec.ts",
"test:coverage": "nyc ts-mocha test/*.spec.ts && nyc merge .nyc_output coverage.json" "test:coverage": "nyc ts-mocha test/*.spec.ts && nyc merge .nyc_output coverage.json"
}, },
"keywords": [
"optimism",
"ethereum",
"core",
"utils"
],
"homepage": "https://github.com/ethereum-optimism/optimism/tree/develop/packages/core-utils#readme",
"license": "MIT",
"author": "Optimism PBC",
"repository": {
"type": "git",
"url": "https://github.com/ethereum-optimism/optimism.git"
},
"dependencies": {
"@ethersproject/abstract-provider": "^5.4.1",
"@ethersproject/bytes": "^5.5.0",
"@ethersproject/providers": "^5.4.5",
"@ethersproject/web": "^5.5.0",
"chai": "^4.3.4",
"ethers": "^5.4.5",
"lodash": "^4.17.21"
},
"devDependencies": { "devDependencies": {
"@types/chai": "^4.2.18", "@types/chai": "^4.2.18",
"@types/lodash": "^4.14.168", "@types/lodash": "^4.14.168",
...@@ -42,14 +62,5 @@ ...@@ -42,14 +62,5 @@
"prettier": "^2.3.1", "prettier": "^2.3.1",
"ts-mocha": "^8.0.0", "ts-mocha": "^8.0.0",
"typescript": "^4.3.5" "typescript": "^4.3.5"
},
"dependencies": {
"@ethersproject/abstract-provider": "^5.4.1",
"@ethersproject/bytes": "^5.5.0",
"@ethersproject/providers": "^5.4.5",
"@ethersproject/web": "^5.5.0",
"chai": "^4.3.4",
"ethers": "^5.4.5",
"lodash": "^4.17.21"
} }
} }
{ {
"private": true,
"name": "@eth-optimism/data-transport-layer", "name": "@eth-optimism/data-transport-layer",
"version": "0.5.1", "version": "0.5.1",
"private": true, "description": "[Optimism] Service for shuttling data from L1 into L2",
"main": "dist/index", "main": "dist/index",
"types": "dist/index",
"files": [ "files": [
"dist/index" "dist/index"
], ],
"types": "dist/index",
"author": "Optimism PBC",
"license": "MIT",
"scripts": { "scripts": {
"clean": "rimraf ./dist ./tsconfig.build.tsbuildinfo", "clean": "rimraf ./dist ./tsconfig.build.tsbuildinfo",
"clean:db": "rimraf ./db", "clean:db": "rimraf ./db",
...@@ -22,6 +21,20 @@ ...@@ -22,6 +21,20 @@
"build": "tsc -p tsconfig.build.json", "build": "tsc -p tsconfig.build.json",
"pre-commit": "lint-staged" "pre-commit": "lint-staged"
}, },
"keywords": [
"optimism",
"ethereum",
"data",
"transport",
"layer"
],
"homepage": "https://github.com/ethereum-optimism/optimism/tree/develop/packages/data-transport-layer#readme",
"license": "MIT",
"author": "Optimism PBC",
"repository": {
"type": "git",
"url": "https://github.com/ethereum-optimism/optimism.git"
},
"dependencies": { "dependencies": {
"@eth-optimism/common-ts": "0.2.0", "@eth-optimism/common-ts": "0.2.0",
"@eth-optimism/contracts": "0.5.1", "@eth-optimism/contracts": "0.5.1",
......
{ {
"name": "@eth-optimism/message-relayer", "name": "@eth-optimism/message-relayer",
"version": "0.2.1", "version": "0.2.1",
"description": "[Optimism] Cross Domain Message Relayer service", "description": "[Optimism] Service for automatically relaying L2 to L1 transactions",
"main": "dist/index", "main": "dist/index",
"types": "dist/index", "types": "dist/index",
"files": [ "files": [
"dist/*" "dist/index"
], ],
"bin": { "bin": {
"withdraw": "./src/exec/withdraw.ts" "withdraw": "./src/exec/withdraw.ts"
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
"ethereum", "ethereum",
"relayer" "relayer"
], ],
"homepage": "https://github.com/ethereum-optimism/optimism-monorepo/tree/master/packages/batch-submitter#readme", "homepage": "https://github.com/ethereum-optimism/optimism/tree/develop/packages/message-relayer#readme",
"license": "MIT", "license": "MIT",
"author": "Optimism PBC", "author": "Optimism PBC",
"repository": { "repository": {
......
{ {
"private": true,
"name": "@eth-optimism/regenesis-surgery", "name": "@eth-optimism/regenesis-surgery",
"version": "0.2.0", "version": "0.2.0",
"private": true, "description": "[Optimism] Tooling for managing the OVM 1.0 to OVM 2.0 upgrade",
"author": "Optimism PBC", "main": "dist/index",
"license": "MIT", "types": "dist/index",
"files": [
"dist/index"
],
"scripts": { "scripts": {
"clean": "rimraf ./dist ./tsconfig.build.tsbuildinfo", "clean": "rimraf ./dist ./tsconfig.build.tsbuildinfo",
"lint": "yarn run lint:fix && yarn run lint:check", "lint": "yarn run lint:fix && yarn run lint:check",
...@@ -13,6 +17,19 @@ ...@@ -13,6 +17,19 @@
"test:surgery": "ts-mocha --timeout 50000000 test/*", "test:surgery": "ts-mocha --timeout 50000000 test/*",
"start": "ts-node ./scripts/surgery.ts" "start": "ts-node ./scripts/surgery.ts"
}, },
"keywords": [
"optimism",
"ethereum",
"regenesis",
"surgery"
],
"homepage": "https://github.com/ethereum-optimism/optimism/tree/develop/packages/regenesis-surgery#readme",
"license": "MIT",
"author": "Optimism PBC",
"repository": {
"type": "git",
"url": "https://github.com/ethereum-optimism/optimism.git"
},
"devDependencies": { "devDependencies": {
"@discoveryjs/json-ext": "^0.5.3", "@discoveryjs/json-ext": "^0.5.3",
"@eth-optimism/core-utils": "0.7.0", "@eth-optimism/core-utils": "0.7.0",
......
{ {
"private": true,
"name": "@eth-optimism/replica-healthcheck", "name": "@eth-optimism/replica-healthcheck",
"version": "0.3.0", "version": "0.3.0",
"private": true, "description": "[Optimism] Service for monitoring the health of replica nodes",
"main": "dist/index", "main": "dist/index",
"types": "dist/index",
"files": [ "files": [
"dist/index" "dist/index"
], ],
"types": "dist/index",
"author": "Optimism PBC",
"license": "MIT",
"scripts": { "scripts": {
"clean": "rimraf ./dist ./tsconfig.build.tsbuildinfo", "clean": "rimraf ./dist ./tsconfig.build.tsbuildinfo",
"lint": "yarn run lint:fix && yarn run lint:check", "lint": "yarn run lint:fix && yarn run lint:check",
...@@ -19,6 +18,30 @@ ...@@ -19,6 +18,30 @@
"test": "ts-mocha test/*.spec.ts", "test": "ts-mocha test/*.spec.ts",
"start": "ts-node ./src/exec/run-healthcheck-server.ts" "start": "ts-node ./src/exec/run-healthcheck-server.ts"
}, },
"keywords": [
"optimism",
"ethereum",
"replica",
"healthcheck"
],
"homepage": "https://github.com/ethereum-optimism/optimism/tree/develop/packages/replica-healthcheck#readme",
"license": "MIT",
"author": "Optimism PBC",
"repository": {
"type": "git",
"url": "https://github.com/ethereum-optimism/optimism.git"
},
"dependencies": {
"@eth-optimism/common-ts": "0.2.0",
"@eth-optimism/core-utils": "0.7.0",
"dotenv": "^10.0.0",
"ethers": "^5.4.5",
"express": "^4.17.1",
"express-prom-bundle": "^6.3.6",
"lint-staged": "11.0.0",
"node-cron": "^3.0.0",
"prom-client": "^13.1.0"
},
"devDependencies": { "devDependencies": {
"@types/express": "^4.17.12", "@types/express": "^4.17.12",
"@types/node": "^15.12.2", "@types/node": "^15.12.2",
...@@ -38,16 +61,5 @@ ...@@ -38,16 +61,5 @@
"ts-mocha": "^8.0.0", "ts-mocha": "^8.0.0",
"ts-node": "^10.0.0", "ts-node": "^10.0.0",
"typescript": "^4.3.5" "typescript": "^4.3.5"
},
"dependencies": {
"@eth-optimism/common-ts": "0.2.0",
"@eth-optimism/core-utils": "0.7.0",
"dotenv": "^10.0.0",
"ethers": "^5.4.5",
"express": "^4.17.1",
"express-prom-bundle": "^6.3.6",
"lint-staged": "11.0.0",
"node-cron": "^3.0.0",
"prom-client": "^13.1.0"
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment