How to use the solc/abi.update function in solc

To help you get started, we’ve selected a few solc 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 ethereum / remix / remix-solidity / src / compiler / compiler.js View on Github external
txHelper.visitContracts(data.contracts, (contract) => {
      if (!contract.object.abi) contract.object.abi = []
      if (language === 'Yul' && contract.object.abi.length === 0) {
        // yul compiler does not return any abi,
        // we default to accept the fallback function (which expect raw data as argument).
        contract.object.abi.push({
          'payable': true,
          'stateMutability': 'payable',
          'type': 'fallback'
        })
      }
      data.contracts[contract.file][contract.name].abi = solcABI.update(truncateVersion(currentVersion), contract.object.abi)
    })
    return data
github ethereum / remix-ide / src / app / compiler / compiler.js View on Github external
txHelper.visitContracts(data.contracts, (contract) => {
      data.contracts[contract.file][contract.name].abi = solcABI.update(truncateVersion(currentVersion), contract.object.abi)
    })
    return data
github smartcontractkit / solc-api / routes / api.js View on Github external
router.post('/update_abi', function(req, res, next) {
  var result = {};

  var input_ABI = req.body.input_ABI;
  var ABI_version = req.body.ABI_version
  var output_ABI = abi.update(ABI_version, input_ABI)

  result.updated_ABI = output_ABI;

  res.json(result)
});