diff --git a/src/core/modules/impl/HandlerExecutorFactory.ts b/src/core/modules/impl/HandlerExecutorFactory.ts index f884601c..443e4218 100644 --- a/src/core/modules/impl/HandlerExecutorFactory.ts +++ b/src/core/modules/impl/HandlerExecutorFactory.ts @@ -212,10 +212,7 @@ export class HandlerExecutorFactory implements ExecutorFactory>('quickjs'); return await quickJsPlugin.process({ - contractSource: contractDefinition.src, - evaluationOptions, - swGlobal: swGlobal, - contractDefinition + contractSource: contractDefinition.src }); } else { const contractFunction = new Function(normalizedSource); @@ -361,10 +358,7 @@ export interface VM2PluginInput { export interface QuickJsPluginInput { contractSource: string; - evaluationOptions: EvaluationOptions; - swGlobal: SmartWeaveGlobal; - contractDefinition: ContractDefinition; - wasmMemory?: WebAssembly.Memory; + wasmMemory?: Buffer; } export interface QuickJsOptions { @@ -373,3 +367,22 @@ export interface QuickJsOptions { interruptCycles?: number; timeout?: number; } + +export interface QuickJsPluginMessage { + cron: boolean; + data: string | Buffer; + epoch: number; + from: string; + id: string | undefined; + nonce: number; + owner: string; + signature: string | undefined; + tags: { + [key: string]: string | undefined; + }; + target: string; + timestamp: string; + ['Block-Height']: string; + ['Forwarded-By']: string; + ['Hash-Chain']: string; +}