@openzeppelin/hardhat-upgrades
Version:
[](https://docs.openzeppelin.com/upgrades-plugins/hardhat-upgrades) [](https://www.npmjs.org/package/@openzeppelin/h
21 lines (20 loc) • 958 B
text/typescript
/**
* Returns an array of OpenZeppelin contract file paths that are used in tests.
*
* These contracts are essential proxy and beacon implementations used for testing
* upgrade patterns. If you want to test with these contracts in your Solidity code,
* you must add them to the `npmFilesToBuild` configuration in your `hardhat.config.ts`.
*
* @see {@link https://hardhat.org/docs/cookbook/npm-artifacts} for more information on npm artifacts configuration
*
* @returns {string[]} An array of file paths to OpenZeppelin proxy and beacon contracts
*/
export function proxyFilesToBuild(): string[] {
return [
'/contracts/proxy/transparent/TransparentUpgradeableProxy.sol',
'/contracts/proxy/transparent/ProxyAdmin.sol',
'/contracts/proxy/ERC1967/ERC1967Proxy.sol',
'/contracts/proxy/beacon/UpgradeableBeacon.sol',
'/contracts/proxy/beacon/BeaconProxy.sol',
];
}