update wrapper.js
This commit is contained in:
parent
e30678f558
commit
2fff71d49f
1 changed files with 2 additions and 5 deletions
|
@ -36,15 +36,12 @@ module.exports = (dep) => {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
compile: (source, options = {}) => {
|
compile: (source, options = {}) => {
|
||||||
const createConfig = (config) => ({
|
|
||||||
allow_unconstrained_variables: false,
|
|
||||||
...config
|
|
||||||
});
|
|
||||||
const { location = "main.zok", resolveCallback = () => null, config = {} } = options;
|
const { location = "main.zok", resolveCallback = () => null, config = {} } = options;
|
||||||
|
console.log(config);
|
||||||
const callback = (currentLocation, importLocation) => {
|
const callback = (currentLocation, importLocation) => {
|
||||||
return resolveFromStdlib(currentLocation, importLocation) || resolveCallback(currentLocation, importLocation);
|
return resolveFromStdlib(currentLocation, importLocation) || resolveCallback(currentLocation, importLocation);
|
||||||
};
|
};
|
||||||
const { program, abi } = zokrates.compile(source, location, callback, createConfig(config));
|
const { program, abi } = zokrates.compile(source, location, callback, config);
|
||||||
return {
|
return {
|
||||||
program: new Uint8Array(program),
|
program: new Uint8Array(program),
|
||||||
abi
|
abi
|
||||||
|
|
Loading…
Reference in a new issue