v1.4.36-ao.10
Some checks failed
CI / build (push) Has been cancelled

This commit is contained in:
ppedziwiatr
2024-03-18 12:54:59 +01:00
parent 1ddc180b61
commit eae965365a
2 changed files with 7 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "warp-contracts",
"version": "1.4.36-ao.0",
"version": "1.4.36-ao.10",
"description": "An implementation of the SmartWeave smart contract protocol.",
"types": "./lib/types/index.d.ts",
"main": "./lib/cjs/index.js",

View File

@@ -211,11 +211,12 @@ export class HandlerExecutorFactory implements ExecutorFactory<HandlerApi<unknow
});
} else if (warp.hasPlugin('quickjs')) {
const quickJsPlugin = warp.loadPlugin<QuickJsPluginInput, HandlerApi<State>>('quickjs');
return await quickJsPlugin.process({
return quickJsPlugin.process({
contractSource: contractDefinition.src,
evaluationOptions,
swGlobal: swGlobal,
contractDefinition
contractDefinition,
binaryType: 'release_sync'
});
} else {
const contractFunction = new Function(normalizedSource);
@@ -359,12 +360,14 @@ export interface VM2PluginInput {
contractDefinition: ContractDefinition<unknown>;
}
export type BinaryType = 'release_sync' | 'release_async' | 'debug_sync' | 'debug_async';
export interface QuickJsPluginInput {
contractSource: string;
evaluationOptions: EvaluationOptions;
swGlobal: SmartWeaveGlobal;
contractDefinition: ContractDefinition<unknown>;
wasmMemory?: Buffer;
binaryType: BinaryType;
}
export interface QuickJsOptions {