Environment
WIN10 WSL ubuntu
VS Code
Solidity plugin
Details
The function in ERC20.sol can auto-complete. but the function (_setupRole) in AccessControl.sol cannot auto-complete.
Environment
WIN10 WSL ubuntu
VS Code
Solidity plugin
Details
The function in ERC20.sol can auto-complete. but the function (_setupRole) in AccessControl.sol cannot auto-complete.
Hi @Serenity,
Welcome to the community forum
Thanks for posting here.
I didn’t realize that there was auto-complete in VSCode using OpenZeppelin Contracts. That is very cool. Great job by @juanfranblanco as always I assume.
It looks like the issue is that AccessControl is an abstract contract.
I created an issue for this: https://github.com/juanfranblanco/vscode-solidity/issues/181
I tried this out with the following to confirm that we don’t get autocomplete for imported abstract contracts:
// contracts/A.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
contract A {
function doA() internal {}
}
// contracts/B.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
abstract contract B {
function doB() internal {}
}
// contracts/MyContract.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
import "./A.sol";
import "./B.sol";
contract MyContract is A, B {
function doStuff() public {
d...
}
}