Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const expression =
metaData.userdoc &&
metaData.userdoc.methods &&
metaData.userdoc.methods[signature] &&
metaData.userdoc.methods[signature].notice
console.log(expression)
if (!expression) return null
const call = {
transaction: { data, to },
abi: metaData.abi
}
const result = await radspec.evaluate(expression, call, { eth: web3.eth })
console.log(result)
return result
}
const expression =
metaData.userdoc &&
metaData.userdoc.methods &&
metaData.userdoc.methods[signature] &&
metaData.userdoc.methods[signature].notice
if (!expression) return null
const call = {
transaction: { data, to },
abi: metaData.abi,
}
const web3 = new Web3(require('../main/provider'));
return await radspec.evaluate(expression, call, {eth: web3.eth})
}