Skip to content

Commit

Permalink
v1.3.4-beta.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rpiszczatowski committed Mar 29, 2023
1 parent a69e2fc commit 68a329a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "warp-contracts",
"version": "1.3.3",
"version": "1.3.4-beta.0",
"description": "An implementation of the SmartWeave smart contract protocol.",
"types": "./lib/types/index.d.ts",
"main": "./lib/cjs/index.js",
Expand Down
27 changes: 14 additions & 13 deletions src/core/modules/impl/wasm/rust-wasm-imports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,16 +200,16 @@ export const rustWasmImports = (
const encodeString =
typeof cachedTextEncoder.encodeInto === 'function'
? function (arg, view) {
return cachedTextEncoder.encodeInto(arg, view);
}
return cachedTextEncoder.encodeInto(arg, view);
}
: function (arg, view) {
const buf = cachedTextEncoder.encode(arg);
view.set(buf);
return {
read: arg.length,
written: buf.length
const buf = cachedTextEncoder.encode(arg);
view.set(buf);
return {
read: arg.length,
written: buf.length
};
};
};

function passStringToWasm0(arg, malloc, realloc) {
if (typeof arg !== 'string') throw new Error('expected a string argument');
Expand Down Expand Up @@ -497,7 +497,9 @@ export const rustWasmImports = (
}

function notDefined(what) {
return () => { throw new Error(`${what} is not defined`); };
return () => {
throw new Error(`${what} is not defined`);
};
}

// mapping from base function names (without mangled suffixes)
Expand Down Expand Up @@ -1245,16 +1247,16 @@ export const rustWasmImports = (
wasm: () => wasmInstance.exports,
WASM_VECTOR_LEN: () => WASM_VECTOR_LEN,
__wbg_adapter_4: __wbg_adapter_42,
__wbg_adapter_3: __wbg_adapter_52,
__wbg_adapter_3: __wbg_adapter_52
};

function wrapPluginMethod(f: (_: Object) => Object) {
return function () {
return logError(function (arg0) {
const ret = f(takeObject(arg0));
return addHeapObject(ret);
}, arguments)
}
}, arguments);
};
}

function extensionsDefinedImports(swGlobal, helpers) {
Expand All @@ -1272,7 +1274,6 @@ export const rustWasmImports = (
return res;
}


const allBaseImports = { ...baseImports, ...extensionsDefinedImports(swGlobal, helpers) };
const baseImportsKeys = Object.keys(allBaseImports);
// assigning functions to "real" import names from the currently
Expand Down

0 comments on commit 68a329a

Please sign in to comment.