// SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.6.0;
import "../../../contracts/access/access_control/AccessControlStorage.sol";
contract $AccessControlStorage {
bytes32 public __hh_exposed_bytecode_marker = "hardhat-exposed";
constructor() {}
function $DEFAULT_ADMIN_ROLE() external pure returns (bytes32) {
return DEFAULT_ADMIN_ROLE;
}
function $STORAGE_SLOT() external pure returns (bytes32) {
return STORAGE_SLOT;
}
function $layout() external pure returns (AccessControlStorage.Layout memory) {
return AccessControlStorage.layout();
}
receive() external payable {}
}
The DEFAULT_ADMIN_ROLE and STORAGE_SLOT variables cannot be found because they must be accessed through the library explicitly (AccessControlStorage.DEFAULT_ADMIN_ROLE) rather than implicitly via inheritance. Compilation fails.
This example is taken from here - just install hardhat-exposed on the default branch and compile to reproduce.
Given this library:
The plugin generates this accessor contract:
The
DEFAULT_ADMIN_ROLE
andSTORAGE_SLOT
variables cannot be found because they must be accessed through the library explicitly (AccessControlStorage.DEFAULT_ADMIN_ROLE
) rather than implicitly via inheritance. Compilation fails.This example is taken from here - just install
hardhat-exposed
on the default branch and compile to reproduce.