@nomicfoundation/edr 0.12.0-next.21 → 0.12.0-next.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -450,6 +450,8 @@ export interface InstrumentationMetadata {
450
450
  * code.
451
451
  */
452
452
  export declare function addStatementCoverageInstrumentation(sourceCode: string, sourceId: string, solidityVersion: string, coverageLibraryPath: string): InstrumentationResult
453
+ /** Retrieves the latest version of `Solidity` supported for instrumentation. */
454
+ export declare function latestSupportedSolidityVersion(): string
453
455
  /** Ethereum execution log. */
454
456
  export interface ExecutionLog {
455
457
  address: Uint8Array
package/index.js CHANGED
@@ -310,7 +310,7 @@ if (!nativeBinding) {
310
310
  throw new Error(`Failed to load native binding`)
311
311
  }
312
312
 
313
- 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, OSAKA, OpHardfork, opHardforkFromString, opHardforkToString, opLatestHardfork, OP_CHAIN_TYPE, opGenesisState, opProviderFactory, BEDROCK, REGOLITH, CANYON, ECOTONE, FJORD, GRANITE, HOLOCENE, ISTHMUS, MineOrdering, EdrContext, ContractDecoder, GasReportExecutionStatus, addStatementCoverageInstrumentation, Precompile, precompileP256Verify, ProviderFactory, Response, Provider, SuccessReason, ExceptionalHalt, CachedChains, CachedEndpoints, FsAccessPermission, CollectStackTraces, IncludeTraces, SolidityTestRunnerFactory, l1SolidityTestRunnerFactory, opSolidityTestRunnerFactory, SuiteResult, TestResult, TestStatus, CallKind, LogKind, 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
313
+ 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, OSAKA, OpHardfork, opHardforkFromString, opHardforkToString, opLatestHardfork, OP_CHAIN_TYPE, opGenesisState, opProviderFactory, BEDROCK, REGOLITH, CANYON, ECOTONE, FJORD, GRANITE, HOLOCENE, ISTHMUS, MineOrdering, EdrContext, ContractDecoder, GasReportExecutionStatus, addStatementCoverageInstrumentation, latestSupportedSolidityVersion, Precompile, precompileP256Verify, ProviderFactory, Response, Provider, SuccessReason, ExceptionalHalt, CachedChains, CachedEndpoints, FsAccessPermission, CollectStackTraces, IncludeTraces, SolidityTestRunnerFactory, l1SolidityTestRunnerFactory, opSolidityTestRunnerFactory, SuiteResult, TestResult, TestStatus, CallKind, LogKind, 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
314
314
 
315
315
  module.exports.GENERIC_CHAIN_TYPE = GENERIC_CHAIN_TYPE
316
316
  module.exports.genericChainProviderFactory = genericChainProviderFactory
@@ -361,6 +361,7 @@ module.exports.EdrContext = EdrContext
361
361
  module.exports.ContractDecoder = ContractDecoder
362
362
  module.exports.GasReportExecutionStatus = GasReportExecutionStatus
363
363
  module.exports.addStatementCoverageInstrumentation = addStatementCoverageInstrumentation
364
+ module.exports.latestSupportedSolidityVersion = latestSupportedSolidityVersion
364
365
  module.exports.Precompile = Precompile
365
366
  module.exports.precompileP256Verify = precompileP256Verify
366
367
  module.exports.ProviderFactory = ProviderFactory
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nomicfoundation/edr",
3
- "version": "0.12.0-next.21",
3
+ "version": "0.12.0-next.22",
4
4
  "devDependencies": {
5
5
  "@napi-rs/cli": "^2.18.4",
6
6
  "@nomicfoundation/ethereumjs-util": "^9.0.4",
@@ -58,13 +58,13 @@
58
58
  "repository": "NomicFoundation/edr.git",
59
59
  "types": "index.d.ts",
60
60
  "dependencies": {
61
- "@nomicfoundation/edr-darwin-arm64": "0.12.0-next.21",
62
- "@nomicfoundation/edr-darwin-x64": "0.12.0-next.21",
63
- "@nomicfoundation/edr-linux-arm64-gnu": "0.12.0-next.21",
64
- "@nomicfoundation/edr-linux-arm64-musl": "0.12.0-next.21",
65
- "@nomicfoundation/edr-linux-x64-gnu": "0.12.0-next.21",
66
- "@nomicfoundation/edr-linux-x64-musl": "0.12.0-next.21",
67
- "@nomicfoundation/edr-win32-x64-msvc": "0.12.0-next.21"
61
+ "@nomicfoundation/edr-darwin-arm64": "0.12.0-next.22",
62
+ "@nomicfoundation/edr-darwin-x64": "0.12.0-next.22",
63
+ "@nomicfoundation/edr-linux-arm64-gnu": "0.12.0-next.22",
64
+ "@nomicfoundation/edr-linux-arm64-musl": "0.12.0-next.22",
65
+ "@nomicfoundation/edr-linux-x64-gnu": "0.12.0-next.22",
66
+ "@nomicfoundation/edr-linux-x64-musl": "0.12.0-next.22",
67
+ "@nomicfoundation/edr-win32-x64-msvc": "0.12.0-next.22"
68
68
  },
69
69
  "scripts": {
70
70
  "artifacts": "napi artifacts",
package/src/instrument.rs CHANGED
@@ -107,3 +107,9 @@ pub fn add_statement_coverage_instrumentation(
107
107
  )
108
108
  })
109
109
  }
110
+
111
+ /// Retrieves the latest version of `Solidity` supported for instrumentation.
112
+ #[napi(catch_unwind)]
113
+ pub fn latest_supported_solidity_version() -> String {
114
+ edr_instrument::LATEST_SUPPORTED_SOLIDITY_VERSION.to_string()
115
+ }