In the contracts repo, the override keyword from a function which overrides an unimplemented interface function. (ie. CTC.batches()).
Run yarn build, it should fail with the following unclear error message:
Compiling 72 files with OVM compiler 0.7.6
An unexpected error occurred:
TypeError: Cannot use 'in' operator to search for '@openzeppelin/contracts/math/SafeMath.sol' in undefined
at OverriddenTaskDefinition._action (/Users/maurelian/Projects/Optimism/contracts-v2/node_modules/@eth-optimism/plugins/src/hardhat/compiler/index.ts:149:19)
at Environment._runTaskDefinition (/Users/maurelian/Projects/Optimism/contracts-v2/node_modules/hardhat/src/internal/core/runtime-environment.ts:217:14)
at Environment.run (/Users/maurelian/Projects/Optimism/contracts-v2/node_modules/hardhat/src/internal/core/runtime-environment.ts:130:14)
at SimpleTaskDefinition.action (/Users/maurelian/Projects/Optimism/contracts-v2/node_modules/hardhat/src/builtin-tasks/compile.ts:671:18)
at Environment._runTaskDefinition (/Users/maurelian/Projects/Optimism/contracts-v2/node_modules/hardhat/src/internal/core/runtime-environment.ts:217:14)
at Environment.run (/Users/maurelian/Projects/Opt
Compiling 72 files with OVM compiler 0.7.6
An unexpected error occurred:
TypeError: Cannot use 'in' operator to search for '@openzeppelin/contracts/math/SafeMath.sol' in undefined
at OverriddenTaskDefinition._action (/Users/maurelian/Projects/Optimism/contracts-v2/node_modules/@eth-optimism/plugins/src/hardhat/compiler/index.ts:149:19)
at Environment._runTaskDefinition (/Users/maurelian/Projects/Optimism/contracts-v2/node_modules/hardhat/src/internal/core/runtime-environment.ts:217:14)
at Environment.run (/Users/maurelian/Projects/Optimism/contracts-v2/node_modules/hardhat/src/internal/core/runtime-environment.ts:130:14)
at SimpleTaskDefinition.action (/Users/maurelian/Projects/Optimism/contracts-v2/node_modules/hardhat/src/builtin-tasks/compile.ts:671:18)
at Environment._runTaskDefinition (/Users/maurelian/Projects/Optimism/contracts-v2/node_modules/hardhat/src/internal/core/runtime-environment.ts:217:14)
at Environment.run (/Users/maurelian/Projects/Optimism/contracts-v2/node_modules/hardhat/src/internal/core/runtime-environment.ts:130:14)
at Environment._runTaskDefinition (/Users/maurelian/Projects/Optimism/contracts-v2/node_modules/hardhat/src/internal/core/runtime-environment.ts:217:14)
at Environment.run (/Users/maurelian/Projects/Optimism/contracts-v2/node_modules/hardhat/src/internal/core/runtime-environment.ts:130:14)
at SimpleTaskDefinition.action (/Users/maurelian/Projects/Optimism/contracts-v2/node_modules/hardhat/src/builtin-tasks/compile.ts:964:37)
at Environment._runTaskDefinition (/Users/maurelian/Projects/Optimism/contracts-v2/node_modules/hardhat/src/internal/core/runtime-environment.ts:217:14)
at Environment.run (/Users/maurelian/Projects/Optimism/contracts-v2/node_modules/hardhat/src/internal/core/runtime-environment.ts:130:14)
at SimpleTaskDefinition.action (/Users/maurelian/Projects/Optimism/contracts-v2/node_modules/hardhat/src/builtin-tasks/compile.ts:395:45)
at Environment._runTaskDefinition (/Users/maurelian/Projects/Optimism/contracts-v2/node_modules/hardhat/src/internal/core/runtime-environment.ts:217:14)
at Environment.run (/Users/maurelian/Projects/Optimism/contracts-v2/node_modules/hardhat/src/internal/core/runtime-environment.ts:130:14)
at SimpleTaskDefinition.action (/Users/maurelian/Projects/Optimism/contracts-v2/node_modules/hardhat/src/builtin-tasks/compile.ts:1320:63)
at Environment._runTaskDefinition (/Users/maurelian/Projects/Optimism/contracts-v2/node_modules/hardhat/src/internal/core/runtime-environment.ts:217:14)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Description
Steps to Reproduce
override
keyword from a function which overrides an unimplemented interface function. (ie. CTC.batches()).yarn build
, it should fail with the following unclear error message: