Skip to content

Commit 8e603cd

Browse files
committed
chore(contracts): oz v5 dependecy
1 parent e0361dc commit 8e603cd

File tree

4 files changed

+21
-27
lines changed

4 files changed

+21
-27
lines changed

contracts/hardhat.config.ts

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,13 @@ dotenv.config();
2121

2222
const config: HardhatUserConfig = {
2323
solidity: {
24-
compilers: [
25-
{
26-
version: "0.8.18",
27-
settings: {
28-
optimizer: {
29-
enabled: true,
30-
runs: 100,
31-
},
32-
},
33-
},
34-
{
35-
version: "0.8.24",
36-
settings: {
37-
optimizer: {
38-
enabled: true,
39-
runs: 100,
40-
},
41-
},
24+
version: "0.8.24",
25+
settings: {
26+
optimizer: {
27+
enabled: true,
28+
runs: 100,
4229
},
43-
],
30+
},
4431
},
4532
paths: {
4633
sources: "./src",

contracts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
"@nomicfoundation/hardhat-chai-matchers": "^1.0.6",
6565
"@nomiclabs/hardhat-ethers": "^2.2.3",
6666
"@nomiclabs/hardhat-solhint": "^3.0.1",
67-
"@openzeppelin/contracts": "^4.9.5",
67+
"@openzeppelin/contracts": "^5.0.2",
6868
"@typechain/ethers-v5": "^11.1.2",
6969
"@typechain/hardhat": "^7.0.0",
7070
"@types/chai": "^4.3.11",

contracts/src/token/PinakionV2.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import "../libraries/SafeERC20.sol";
1111
contract PinakionV2 is ERC20, ERC20Burnable, Ownable {
1212
using SafeERC20 for IERC20;
1313

14-
constructor() ERC20("PinakionV2", "PNK") {
14+
constructor() ERC20("PinakionV2", "PNK") Ownable(msg.sender) {
1515
_mint(msg.sender, 1000000000 * 10 ** decimals());
1616
}
1717

contracts/src/token/TestERC721.sol

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,19 @@ contract TestERC721 is ERC721, ERC721Enumerable {
5959
// * Internal * //
6060
// ************************************* //
6161

62-
function _beforeTokenTransfer(
63-
address from,
62+
function _increaseBalance(address account, uint128 value) internal virtual override(ERC721, ERC721Enumerable) {
63+
super._increaseBalance(account, value);
64+
}
65+
66+
// ************************************* //
67+
// * Internal * //
68+
// ************************************* //
69+
70+
function _update(
6471
address to,
65-
uint256 firstTokenId,
66-
uint256 batchSize
67-
) internal virtual override(ERC721, ERC721Enumerable) {
68-
super._beforeTokenTransfer(from, to, firstTokenId, batchSize);
72+
uint256 tokenId,
73+
address auth
74+
) internal virtual override(ERC721, ERC721Enumerable) returns (address) {
75+
super._update(to, tokenId, auth);
6976
}
7077
}

0 commit comments

Comments
 (0)