How to use the @truffle/contract-schema.validate function in @truffle/contract-schema

To help you get started, we’ve selected a few @truffle/contract-schema examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github trufflesuite / truffle / packages / external-compile / index.js View on Github external
async function processTargets(targets, cwd, logger) {
  const contracts = {};
  for (let target of targets) {
    let targetContracts = await processTarget(target, cwd, logger);
    for (let [name, contract] of Object.entries(targetContracts)) {
      contracts[name] = Schema.validate(contract);
    }
  }

  return contracts;
}

@truffle/contract-schema

JSON schema for contract artifacts

MIT
Latest version published 1 year ago

Package Health Score

61 / 100
Full package analysis