Skip to content

Commit

Permalink
fixup: Re-generate the index.d.ts file and bump @napi-rs/cli to 2.18.4 (
Browse files Browse the repository at this point in the history
#676)

* fixup: Re-generate the index.d.ts file

* chore: Bump @napi-rs/cli to 2.18.4

Closes #621
  • Loading branch information
Xanewok authored Sep 23, 2024
1 parent 49b7ebe commit 1f0ae25
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
32 changes: 16 additions & 16 deletions crates/edr_napi/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,8 @@ export interface SubscriptionEvent {
filterId: bigint
result: any
}
export function createModelsAndDecodeBytecodes(solcVersion: string, compilerInput: any, compilerOutput: any): Array<BytecodeWrapper>
export function linkHexStringBytecode(code: string, address: string, position: number): string
export declare function createModelsAndDecodeBytecodes(solcVersion: string, compilerInput: any, compilerOutput: any): Array<BytecodeWrapper>
export declare function linkHexStringBytecode(code: string, address: string, position: number): string
export const enum ContractFunctionType {
CONSTRUCTOR = 0,
FUNCTION = 1,
Expand All @@ -357,8 +357,8 @@ export const enum ContractFunctionType {
MODIFIER = 5,
FREE_FUNCTION = 6
}
export function printMessageTrace(trace: PrecompileMessageTrace | CallMessageTrace | CreateMessageTrace, depth?: number | undefined | null): void
export function printStackTrace(trace: SolidityStackTrace): void
export declare function printMessageTrace(trace: PrecompileMessageTrace | CallMessageTrace | CreateMessageTrace, depth?: number | undefined | null): void
export declare function printStackTrace(trace: SolidityStackTrace): void
/** Represents the exit code of the EVM. */
export const enum ExitCode {
/** Execution was successful. */
Expand Down Expand Up @@ -450,7 +450,7 @@ export const enum StackTraceEntryType {
INTERNAL_FUNCTION_CALLSTACK_ENTRY = 22,
CONTRACT_CALL_RUN_OUT_OF_GAS_ERROR = 23
}
export function stackTraceEntryTypeToString(val: StackTraceEntryType): string
export declare function stackTraceEntryTypeToString(val: StackTraceEntryType): string
export const FALLBACK_FUNCTION_NAME: string
export const RECEIVE_FUNCTION_NAME: string
export const CONSTRUCTOR_FUNCTION_NAME: string
Expand Down Expand Up @@ -582,7 +582,7 @@ export interface ContractAndFunctionName {
contractName: string
functionName: string | undefined
}
export function initializeVmTraceDecoder(vmTraceDecoder: VmTraceDecoder, tracingConfig: any): void
export declare function initializeVmTraceDecoder(vmTraceDecoder: VmTraceDecoder, tracingConfig: any): void
export interface TracingMessage {
/** Sender address */
readonly caller: Buffer
Expand Down Expand Up @@ -636,12 +636,12 @@ export interface Withdrawal {
/** The value contained in withdrawal */
amount: bigint
}
export class EdrContext {
export declare class EdrContext {
/**Creates a new [`EdrContext`] instance. Should only be called once! */
constructor()
}
/** A JSON-RPC provider for Ethereum. */
export class Provider {
export declare class Provider {
/**Constructs a new provider with the provided configuration. */
static withConfig(context: EdrContext, config: ProviderConfig, loggerConfig: LoggerConfig, subscriberCallback: (event: SubscriptionEvent) => void): Promise<Provider>
/**Handles a JSON-RPC request and returns a JSON-RPC response. */
Expand All @@ -655,7 +655,7 @@ export class Provider {
*/
setVerboseTracing(verboseTracing: boolean): void
}
export class Response {
export declare class Response {
/** Returns the response data as a JSON string or a JSON object. */
get data(): string | any
get solidityTrace(): RawTrace | null
Expand All @@ -665,13 +665,13 @@ export class Response {
* Opaque handle to the `Bytecode` struct.
* Only used on the JS side by the `VmTraceDecoder` class.
*/
export class BytecodeWrapper { }
export class Exit {
export declare class BytecodeWrapper { }
export declare class Exit {
get kind(): ExitCode
isError(): boolean
getReason(): string
}
export class ReturnData {
export declare class ReturnData {
readonly value: Uint8Array
constructor(value: Uint8Array)
isEmpty(): boolean
Expand All @@ -680,26 +680,26 @@ export class ReturnData {
decodeError(): string
decodePanic(): bigint
}
export class SolidityTracer {
export declare class SolidityTracer {

constructor()
getStackTrace(trace: PrecompileMessageTrace | CallMessageTrace | CreateMessageTrace): SolidityStackTrace
}
export class VmTraceDecoder {
export declare class VmTraceDecoder {
constructor()
addBytecode(bytecode: BytecodeWrapper): void
tryToDecodeMessageTrace(messageTrace: PrecompileMessageTrace | CallMessageTrace | CreateMessageTrace): PrecompileMessageTrace | CallMessageTrace | CreateMessageTrace
getContractAndFunctionNamesForCall(code: Uint8Array, calldata: Uint8Array | undefined): ContractAndFunctionName
}
export type VMTracer = VmTracer
/** N-API bindings for the Rust port of `VMTracer` from Hardhat. */
export class VmTracer {
export declare class VmTracer {
constructor()
/** Observes a trace, collecting information about the execution of the EVM. */
observe(trace: RawTrace): void
getLastTopLevelMessageTrace(): PrecompileMessageTrace | CallMessageTrace | CreateMessageTrace | undefined
getLastError(): Error | undefined
}
export class RawTrace {
export declare class RawTrace {
trace(): Array<TracingMessage | TracingStep | TracingMessageResult>
}
2 changes: 1 addition & 1 deletion crates/edr_napi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@nomicfoundation/edr",
"version": "0.6.1",
"devDependencies": {
"@napi-rs/cli": "^2.18.3",
"@napi-rs/cli": "^2.18.4",
"@types/chai": "^4.2.0",
"@types/chai-as-promised": "^7.1.8",
"@types/mocha": ">=9.1.0",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1f0ae25

Please sign in to comment.