Skip to content

Commit a7686ff

Browse files
committed
more detailled changelog, specify OZ as peer dependency
1 parent 075a1c0 commit a7686ff

File tree

5 files changed

+44
-3
lines changed

5 files changed

+44
-3
lines changed

packages/automation-contracts/autowrap/hardhat.config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,22 @@ require("@nomiclabs/hardhat-etherscan");
44
require("hardhat-deploy");
55
require("hardhat/config");
66
require("./script/addStrategy");
7+
const {TASK_COMPILE_GET_REMAPPINGS} = require("hardhat/builtin-tasks/task-names");
78

89
// You need to export an object to set up your config
910
// Go to https://hardhat.org/config/ to learn more
1011

12+
// Remapping for OpenZeppelin contracts
13+
subtask(TASK_COMPILE_GET_REMAPPINGS).setAction(
14+
async (_, __, runSuper) => {
15+
const remappings = await runSuper();
16+
return {
17+
...remappings,
18+
"@openzeppelin/contracts/": "@openzeppelin-v5/contracts/",
19+
};
20+
}
21+
);
22+
1123
/**
1224
* @type import('hardhat/config').HardhatUserConfig
1325
*/

packages/automation-contracts/scheduler/hardhat.config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,22 @@ require("@nomiclabs/hardhat-ethers");
33
require("@nomiclabs/hardhat-etherscan");
44
require("hardhat-deploy");
55
require("hardhat/config");
6+
const {TASK_COMPILE_GET_REMAPPINGS} = require("hardhat/builtin-tasks/task-names");
67

78
// You need to export an object to set up your config
89
// Go to https://hardhat.org/config/ to learn more
910

11+
// Remapping for OpenZeppelin contracts
12+
subtask(TASK_COMPILE_GET_REMAPPINGS).setAction(
13+
async (_, __, runSuper) => {
14+
const remappings = await runSuper();
15+
return {
16+
...remappings,
17+
"@openzeppelin/contracts/": "@openzeppelin-v5/contracts/",
18+
};
19+
}
20+
);
21+
1022
/**
1123
* @type import('hardhat/config').HardhatUserConfig
1224
*/

packages/ethereum-contracts/CHANGELOG.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,24 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
2020
- `ISuperfluidPool`: `getClaimable` and `getClaimableNow` could previously return non-zero values for connected pools, which was inconsistent with what `claimAll` would actually do in this situation (claim nothing).
2121

2222
### Breaking
23-
- Updated OpenZeppelin library from v.4.9.6 to v5.4.0. The import path now includes the major version, making it easier for contracts integrating with this protocol to use a different major version of OpenZeppelin.
23+
- Updated OpenZeppelin library from v.4.9.6 to v5.4.0.
24+
The import path now includes the major version, making it easier for contracts integrating with this protocol to use a different major version of OpenZeppelin.
25+
Projects using Superfluid contracts as a dependency need to configure a mapping:
26+
- Foundry: add this to remappings: `'@openzeppelin-v5/=lib/openzeppelin-contracts/',`
27+
- Hardhat (>=v2.17.2): add `@openzeppelin/contracts` as a project dependency and a subtask in your hardhat config:
28+
```
29+
import { TASK_COMPILE_GET_REMAPPINGS } from "hardhat/builtin-tasks/task-names";
30+
31+
subtask(TASK_COMPILE_GET_REMAPPINGS).setAction(
32+
async (_, __, runSuper) => {
33+
const remappings = await runSuper();
34+
return {
35+
...remappings,
36+
"@openzeppelin-v5/contracts/": "@openzeppelin/contracts/",
37+
};
38+
}
39+
);
40+
```
2441
- PoolMemberNFT pruning: `IPoolMemberNFT` and `PoolMemberNFT` removed, `POOL_MEMBER_NFT()` removed from `ISuperToken`.
2542

2643
## [v1.13.0]

packages/ethereum-contracts/hardhat.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import "@nomiclabs/hardhat-ethers";
77
import {
88
TASK_COMPILE_SOLIDITY_GET_SOURCE_PATHS,
99
TASK_COMPILE_SOLIDITY_GET_SOLC_BUILD,
10-
TASK_COMPILE_GET_REMAPPINGS,
1110
} from "hardhat/builtin-tasks/task-names";
1211
import "solidity-coverage";
1312
import {config as dotenvConfig} from "dotenv";

packages/ethereum-contracts/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
"license": "AGPL-3.0-or-later OR MIT",
5050
"main": "./dev-scripts/index.js",
5151
"peerDependencies": {
52-
"ethers": "^5.7.2"
52+
"ethers": "^5.7.2",
53+
"@openzeppelin/contracts": "^5.0.0"
5354
},
5455
"repository": {
5556
"type": "git",

0 commit comments

Comments
 (0)