Skip to content

solc compilateion may result in error that is not accounted for #2

@noisekit

Description

@noisekit

return solResult.contracts[`${contractName}.sol`][contractName];

solResult may come with error and we are not catching it

solResult {
  errors: [
    {
      component: 'general',
      formattedMessage: 'Invalid EVM version requested.',
      message: 'Invalid EVM version requested.',
      severity: 'error',
      type: 'JSONError'
    }
  ]
}

Instead it fails with

An unexpected error occurred:

TypeError: Cannot read properties of undefined (reading 'AccountRouter.sol')
    at compileContract (/node_modules/@synthetixio/router/src/compile.ts:22:1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions