Skip to content

[DON'T MERGE] Merge feat/multichain to release/optimism #844

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
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
5 changes: 5 additions & 0 deletions .changeset/rich-parents-shave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ignored/edr-optimism": patch
---

Fixed exception on termination of provider with interval mining enabled
7 changes: 5 additions & 2 deletions .github/workflows/edr-npm-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ permissions:
id-token: write
on:
push:
# pre-releases will be triggered in any of these branches
# production releases will only be triggered for `main`
branches:
- main
- prerelease
- release/optimism
tags-ignore:
- "**"
paths-ignore:
Expand Down Expand Up @@ -399,7 +402,7 @@ jobs:
run: |
if git log -1 --pretty=%B | grep "^edr-[0-9]\+\.[0-9]\+\.[0-9]\+-";
then
if [ "$GITHUB_REF" == "refs/heads/main" -o "$GITHUB_REF" == "refs/heads/prerelease" ]; then
if [ "${{ github.event_name }}" = "push" ]; then
echo "Publishing pre-release"
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
pnpm publish --no-git-checks --provenance --tag next --access public
Expand All @@ -420,4 +423,4 @@ jobs:
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NOMICFOUNDATION_ORG_NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.IGNORED_ORG_NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .syncpackrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const config = {
},
{
packages: ["**"],
dependencies: ["@nomicfoundation/edr"],
dependencies: ["@ignored/edr-optimism"],
dependencyTypes: ["local"],
},
],
Expand Down
37 changes: 37 additions & 0 deletions crates/edr_napi/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,43 @@ export const MERGE: string
export const SHANGHAI: string
export const CANCUN: string
export const PRAGUE: string
/** Enumeration of supported OP hardforks. */
export enum OpHardfork {
Bedrock = 100,
Regolith = 101,
Canyon = 102,
Ecotone = 103,
Fjord = 104,
Granite = 105,
Holocene = 106,
Isthmus = 107
}
/**
* Tries to parse the provided string to create an [`OpHardfork`]
* instance.
*
* Returns an error if the string does not match any known hardfork.
*/
export declare function opHardforkFromString(hardfork: string): OpHardfork
/** Returns the string representation of the provided OP hardfork. */
export declare function opHardforkToString(hardfork: OpHardfork): string
/**
* Returns the latest supported OP hardfork.
*
* The returned value will be updated after each network upgrade.
*/
export declare function opLatestHardfork(): OpHardfork
export const OP_CHAIN_TYPE: string
export declare function opGenesisState(hardfork: OpHardfork): Array<Account>
export declare function opProviderFactory(): ProviderFactory
export const BEDROCK: string
export const REGOLITH: string
export const CANYON: string
export const ECOTONE: string
export const FJORD: string
export const GRANITE: string
export const HOLOCENE: string
export const ISTHMUS: string
/** Configuration for a chain */
export interface ChainConfig {
/** The chain ID */
Expand Down
53 changes: 34 additions & 19 deletions crates/edr_napi/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ switch (platform) {
if (localFileExisted) {
nativeBinding = require('./edr.android-arm64.node')
} else {
nativeBinding = require('@nomicfoundation/edr-android-arm64')
nativeBinding = require('@ignored/edr-optimism-android-arm64')
}
} catch (e) {
loadError = e
Expand All @@ -49,7 +49,7 @@ switch (platform) {
if (localFileExisted) {
nativeBinding = require('./edr.android-arm-eabi.node')
} else {
nativeBinding = require('@nomicfoundation/edr-android-arm-eabi')
nativeBinding = require('@ignored/edr-optimism-android-arm-eabi')
}
} catch (e) {
loadError = e
Expand All @@ -69,7 +69,7 @@ switch (platform) {
if (localFileExisted) {
nativeBinding = require('./edr.win32-x64-msvc.node')
} else {
nativeBinding = require('@nomicfoundation/edr-win32-x64-msvc')
nativeBinding = require('@ignored/edr-optimism-win32-x64-msvc')
}
} catch (e) {
loadError = e
Expand All @@ -83,7 +83,7 @@ switch (platform) {
if (localFileExisted) {
nativeBinding = require('./edr.win32-ia32-msvc.node')
} else {
nativeBinding = require('@nomicfoundation/edr-win32-ia32-msvc')
nativeBinding = require('@ignored/edr-optimism-win32-ia32-msvc')
}
} catch (e) {
loadError = e
Expand All @@ -97,7 +97,7 @@ switch (platform) {
if (localFileExisted) {
nativeBinding = require('./edr.win32-arm64-msvc.node')
} else {
nativeBinding = require('@nomicfoundation/edr-win32-arm64-msvc')
nativeBinding = require('@ignored/edr-optimism-win32-arm64-msvc')
}
} catch (e) {
loadError = e
Expand All @@ -113,7 +113,7 @@ switch (platform) {
if (localFileExisted) {
nativeBinding = require('./edr.darwin-universal.node')
} else {
nativeBinding = require('@nomicfoundation/edr-darwin-universal')
nativeBinding = require('@ignored/edr-optimism-darwin-universal')
}
break
} catch {}
Expand All @@ -124,7 +124,7 @@ switch (platform) {
if (localFileExisted) {
nativeBinding = require('./edr.darwin-x64.node')
} else {
nativeBinding = require('@nomicfoundation/edr-darwin-x64')
nativeBinding = require('@ignored/edr-optimism-darwin-x64')
}
} catch (e) {
loadError = e
Expand All @@ -138,7 +138,7 @@ switch (platform) {
if (localFileExisted) {
nativeBinding = require('./edr.darwin-arm64.node')
} else {
nativeBinding = require('@nomicfoundation/edr-darwin-arm64')
nativeBinding = require('@ignored/edr-optimism-darwin-arm64')
}
} catch (e) {
loadError = e
Expand All @@ -157,7 +157,7 @@ switch (platform) {
if (localFileExisted) {
nativeBinding = require('./edr.freebsd-x64.node')
} else {
nativeBinding = require('@nomicfoundation/edr-freebsd-x64')
nativeBinding = require('@ignored/edr-optimism-freebsd-x64')
}
} catch (e) {
loadError = e
Expand All @@ -174,7 +174,7 @@ switch (platform) {
if (localFileExisted) {
nativeBinding = require('./edr.linux-x64-musl.node')
} else {
nativeBinding = require('@nomicfoundation/edr-linux-x64-musl')
nativeBinding = require('@ignored/edr-optimism-linux-x64-musl')
}
} catch (e) {
loadError = e
Expand All @@ -187,7 +187,7 @@ switch (platform) {
if (localFileExisted) {
nativeBinding = require('./edr.linux-x64-gnu.node')
} else {
nativeBinding = require('@nomicfoundation/edr-linux-x64-gnu')
nativeBinding = require('@ignored/edr-optimism-linux-x64-gnu')
}
} catch (e) {
loadError = e
Expand All @@ -203,7 +203,7 @@ switch (platform) {
if (localFileExisted) {
nativeBinding = require('./edr.linux-arm64-musl.node')
} else {
nativeBinding = require('@nomicfoundation/edr-linux-arm64-musl')
nativeBinding = require('@ignored/edr-optimism-linux-arm64-musl')
}
} catch (e) {
loadError = e
Expand All @@ -216,7 +216,7 @@ switch (platform) {
if (localFileExisted) {
nativeBinding = require('./edr.linux-arm64-gnu.node')
} else {
nativeBinding = require('@nomicfoundation/edr-linux-arm64-gnu')
nativeBinding = require('@ignored/edr-optimism-linux-arm64-gnu')
}
} catch (e) {
loadError = e
Expand All @@ -232,7 +232,7 @@ switch (platform) {
if (localFileExisted) {
nativeBinding = require('./edr.linux-arm-musleabihf.node')
} else {
nativeBinding = require('@nomicfoundation/edr-linux-arm-musleabihf')
nativeBinding = require('@ignored/edr-optimism-linux-arm-musleabihf')
}
} catch (e) {
loadError = e
Expand All @@ -245,7 +245,7 @@ switch (platform) {
if (localFileExisted) {
nativeBinding = require('./edr.linux-arm-gnueabihf.node')
} else {
nativeBinding = require('@nomicfoundation/edr-linux-arm-gnueabihf')
nativeBinding = require('@ignored/edr-optimism-linux-arm-gnueabihf')
}
} catch (e) {
loadError = e
Expand All @@ -261,7 +261,7 @@ switch (platform) {
if (localFileExisted) {
nativeBinding = require('./edr.linux-riscv64-musl.node')
} else {
nativeBinding = require('@nomicfoundation/edr-linux-riscv64-musl')
nativeBinding = require('@ignored/edr-optimism-linux-riscv64-musl')
}
} catch (e) {
loadError = e
Expand All @@ -274,7 +274,7 @@ switch (platform) {
if (localFileExisted) {
nativeBinding = require('./edr.linux-riscv64-gnu.node')
} else {
nativeBinding = require('@nomicfoundation/edr-linux-riscv64-gnu')
nativeBinding = require('@ignored/edr-optimism-linux-riscv64-gnu')
}
} catch (e) {
loadError = e
Expand All @@ -289,7 +289,7 @@ switch (platform) {
if (localFileExisted) {
nativeBinding = require('./edr.linux-s390x-gnu.node')
} else {
nativeBinding = require('@nomicfoundation/edr-linux-s390x-gnu')
nativeBinding = require('@ignored/edr-optimism-linux-s390x-gnu')
}
} catch (e) {
loadError = e
Expand All @@ -310,7 +310,7 @@ if (!nativeBinding) {
throw new Error(`Failed to load native binding`)
}

const { GENERIC_CHAIN_TYPE, genericChainProviderFactory, L1_CHAIN_TYPE, l1GenesisState, l1ProviderFactory, SpecId, l1HardforkFromString, l1HardforkToString, l1HardforkLatest, FRONTIER, FRONTIER_THAWING, HOMESTEAD, DAO_FORK, TANGERINE, SPURIOUS_DRAGON, BYZANTIUM, CONSTANTINOPLE, PETERSBURG, ISTANBUL, MUIR_GLACIER, BERLIN, LONDON, ARROW_GLACIER, GRAY_GLACIER, MERGE, SHANGHAI, CANCUN, PRAGUE, MineOrdering, EdrContext, ProviderFactory, Response, Provider, SuccessReason, ExceptionalHalt, linkHexStringBytecode, printStackTrace, Exit, ExitCode, BytecodeWrapper, ContractFunctionType, ReturnData, StackTraceEntryType, stackTraceEntryTypeToString, FALLBACK_FUNCTION_NAME, RECEIVE_FUNCTION_NAME, CONSTRUCTOR_FUNCTION_NAME, UNRECOGNIZED_FUNCTION_NAME, UNKNOWN_FUNCTION_NAME, PRECOMPILE_FUNCTION_NAME, UNRECOGNIZED_CONTRACT_NAME, RawTrace, getLatestSupportedSolcVersion } = nativeBinding
const { GENERIC_CHAIN_TYPE, genericChainProviderFactory, L1_CHAIN_TYPE, l1GenesisState, l1ProviderFactory, SpecId, l1HardforkFromString, l1HardforkToString, l1HardforkLatest, FRONTIER, FRONTIER_THAWING, HOMESTEAD, DAO_FORK, TANGERINE, SPURIOUS_DRAGON, BYZANTIUM, CONSTANTINOPLE, PETERSBURG, ISTANBUL, MUIR_GLACIER, BERLIN, LONDON, ARROW_GLACIER, GRAY_GLACIER, MERGE, SHANGHAI, CANCUN, PRAGUE, OpHardfork, opHardforkFromString, opHardforkToString, opLatestHardfork, OP_CHAIN_TYPE, opGenesisState, opProviderFactory, BEDROCK, REGOLITH, CANYON, ECOTONE, FJORD, GRANITE, HOLOCENE, ISTHMUS, MineOrdering, EdrContext, ProviderFactory, Response, Provider, SuccessReason, ExceptionalHalt, linkHexStringBytecode, printStackTrace, Exit, ExitCode, BytecodeWrapper, ContractFunctionType, ReturnData, StackTraceEntryType, stackTraceEntryTypeToString, FALLBACK_FUNCTION_NAME, RECEIVE_FUNCTION_NAME, CONSTRUCTOR_FUNCTION_NAME, UNRECOGNIZED_FUNCTION_NAME, UNKNOWN_FUNCTION_NAME, PRECOMPILE_FUNCTION_NAME, UNRECOGNIZED_CONTRACT_NAME, RawTrace, getLatestSupportedSolcVersion } = nativeBinding

module.exports.GENERIC_CHAIN_TYPE = GENERIC_CHAIN_TYPE
module.exports.genericChainProviderFactory = genericChainProviderFactory
Expand Down Expand Up @@ -340,6 +340,21 @@ module.exports.MERGE = MERGE
module.exports.SHANGHAI = SHANGHAI
module.exports.CANCUN = CANCUN
module.exports.PRAGUE = PRAGUE
module.exports.OpHardfork = OpHardfork
module.exports.opHardforkFromString = opHardforkFromString
module.exports.opHardforkToString = opHardforkToString
module.exports.opLatestHardfork = opLatestHardfork
module.exports.OP_CHAIN_TYPE = OP_CHAIN_TYPE
module.exports.opGenesisState = opGenesisState
module.exports.opProviderFactory = opProviderFactory
module.exports.BEDROCK = BEDROCK
module.exports.REGOLITH = REGOLITH
module.exports.CANYON = CANYON
module.exports.ECOTONE = ECOTONE
module.exports.FJORD = FJORD
module.exports.GRANITE = GRANITE
module.exports.HOLOCENE = HOLOCENE
module.exports.ISTHMUS = ISTHMUS
module.exports.MineOrdering = MineOrdering
module.exports.EdrContext = EdrContext
module.exports.ProviderFactory = ProviderFactory
Expand Down
4 changes: 2 additions & 2 deletions crates/edr_napi/npm/darwin-arm64/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# `@nomicfoundation/edr-darwin-arm64`
# `@ignored/edr-optimism-darwin-arm64`

This is the **aarch64-apple-darwin** binary for `@nomicfoundation/edr`
This is the **aarch64-apple-darwin** binary for `@ignored/edr-optimism`
2 changes: 1 addition & 1 deletion crates/edr_napi/npm/darwin-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@nomicfoundation/edr-darwin-arm64",
"name": "@ignored/edr-optimism-darwin-arm64",
"repository": {
"url": "https://github.com/NomicFoundation/edr.git",
"type": "git"
Expand Down
4 changes: 2 additions & 2 deletions crates/edr_napi/npm/darwin-x64/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# `@nomicfoundation/edr-darwin-x64`
# `@ignored/edr-optimism-darwin-x64`

This is the **x86_64-apple-darwin** binary for `@nomicfoundation/edr`
This is the **x86_64-apple-darwin** binary for `@ignored/edr-optimism`
2 changes: 1 addition & 1 deletion crates/edr_napi/npm/darwin-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@nomicfoundation/edr-darwin-x64",
"name": "@ignored/edr-optimism-darwin-x64",
"repository": {
"url": "https://github.com/NomicFoundation/edr.git",
"type": "git"
Expand Down
4 changes: 2 additions & 2 deletions crates/edr_napi/npm/linux-arm64-gnu/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# `@nomicfoundation/edr-linux-arm64-gnu`
# `@ignored/edr-optimism-linux-arm64-gnu`

This is the **aarch64-unknown-linux-gnu** binary for `@nomicfoundation/edr`
This is the **aarch64-unknown-linux-gnu** binary for `@ignored/edr-optimism`
2 changes: 1 addition & 1 deletion crates/edr_napi/npm/linux-arm64-gnu/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@nomicfoundation/edr-linux-arm64-gnu",
"name": "@ignored/edr-optimism-linux-arm64-gnu",
"repository": {
"url": "https://github.com/NomicFoundation/edr.git",
"type": "git"
Expand Down
4 changes: 2 additions & 2 deletions crates/edr_napi/npm/linux-arm64-musl/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# `@nomicfoundation/edr-linux-arm64-musl`
# `@ignored/edr-optimism-linux-arm64-musl`

This is the **aarch64-unknown-linux-musl** binary for `@nomicfoundation/edr`
This is the **aarch64-unknown-linux-musl** binary for `@ignored/edr-optimism`
2 changes: 1 addition & 1 deletion crates/edr_napi/npm/linux-arm64-musl/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@nomicfoundation/edr-linux-arm64-musl",
"name": "@ignored/edr-optimism-linux-arm64-musl",
"repository": {
"url": "https://github.com/NomicFoundation/edr.git",
"type": "git"
Expand Down
4 changes: 2 additions & 2 deletions crates/edr_napi/npm/linux-x64-gnu/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# `@nomicfoundation/edr-linux-x64-gnu`
# `@ignored/edr-optimism-linux-x64-gnu`

This is the **x86_64-unknown-linux-gnu** binary for `@nomicfoundation/edr`
This is the **x86_64-unknown-linux-gnu** binary for `@ignored/edr-optimism`
2 changes: 1 addition & 1 deletion crates/edr_napi/npm/linux-x64-gnu/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@nomicfoundation/edr-linux-x64-gnu",
"name": "@ignored/edr-optimism-linux-x64-gnu",
"repository": {
"url": "https://github.com/NomicFoundation/edr.git",
"type": "git"
Expand Down
4 changes: 2 additions & 2 deletions crates/edr_napi/npm/linux-x64-musl/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# `@nomicfoundation/edr-linux-x64-musl`
# `@ignored/edr-optimism-linux-x64-musl`

This is the **x86_64-unknown-linux-musl** binary for `@nomicfoundation/edr`
This is the **x86_64-unknown-linux-musl** binary for `@ignored/edr-optimism`
2 changes: 1 addition & 1 deletion crates/edr_napi/npm/linux-x64-musl/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@nomicfoundation/edr-linux-x64-musl",
"name": "@ignored/edr-optimism-linux-x64-musl",
"repository": {
"url": "https://github.com/NomicFoundation/edr.git",
"type": "git"
Expand Down
4 changes: 2 additions & 2 deletions crates/edr_napi/npm/win32-x64-msvc/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# `@nomicfoundation/edr-win32-x64-msvc`
# `@ignored/edr-optimism-win32-x64-msvc`

This is the **x86_64-pc-windows-msvc** binary for `@nomicfoundation/edr`
This is the **x86_64-pc-windows-msvc** binary for `@ignored/edr-optimism`
2 changes: 1 addition & 1 deletion crates/edr_napi/npm/win32-x64-msvc/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@nomicfoundation/edr-win32-x64-msvc",
"name": "@ignored/edr-optimism-win32-x64-msvc",
"repository": {
"url": "https://github.com/NomicFoundation/edr.git",
"type": "git"
Expand Down
Loading
Loading