OpenZeppelin / openzeppelin-sdk

OpenZeppelin SDK repository for CLI and upgrades.js. No longer actively developed.
MIT License
431 stars 201 forks source link

`oz verify` fails for abstract contracts #1499

Open abcoathup opened 4 years ago

abcoathup commented 4 years ago

oz verify fails for Solidity 0.6 abstract contracts

Verify

$ npx oz verify
? Pick a network rinkeby
? Was your contract compiled with optimizations enabled? No
? Choose a remote endpoint etherscan
? Enter your Etherscan API key (get one at https://etherscan.io/myapikey) ZZZMYAPIKEYZZZ
? Pick a contract to verify B
✖ Verifying and publishing contract source code of B on etherscan (this usually takes under 30 seconds)
Could not parse A.sol for extracting its imports: ParserError: extraneous input 'abstract' expecting {<EOF>, 'pragma', 'import', 'contract', 'interface', 'library'} (3:0)

A .sol

pragma solidity ^0.6.0;

abstract contract A {
    function doStuff() public virtual;
} 

B.sol

pragma solidity ^0.6.0;

import "./A.sol";

contract B is A {
    function doStuff() public override {
        // do stuff
    }
}