Skip to content

Commit c9c359b

Browse files
committed
feat(devnet): bump openzeppelin
1 parent 6535401 commit c9c359b

6 files changed

Lines changed: 78 additions & 33 deletions

File tree

.changeset/wicked-phones-sing.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@cartesi/devnet": patch
3+
---
4+
5+
bump openzeppelin

packages/devnet/foundry.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[profile.default]
22
libs = ["dependencies"]
3-
solc_version = "0.8.23"
3+
solc_version = "0.8.30"
44
optimizer = true
55

66
[dependencies]
7-
"@openzeppelin-contracts" = "5.2.0"
7+
"@openzeppelin-contracts" = "5.5.0"

packages/devnet/soldeer.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[[dependencies]]
22
name = "@openzeppelin-contracts"
3-
version = "5.2.0"
4-
url = "https://soldeer-revisions.s3.amazonaws.com/@openzeppelin-contracts/5_2_0_11-01-2025_09:30:20_contracts.zip"
5-
checksum = "6dbd0440446b2ed16ca25e9f1af08fc0c5c1e73e71fee86ae8a00daa774e3817"
6-
integrity = "4cb7f3777f67fdf4b7d0e2f94d2f93f198b2e5dce718b7062ac7c2c83e1183bd"
3+
version = "5.5.0"
4+
url = "https://soldeer-revisions.s3.amazonaws.com/@openzeppelin-contracts/5_5_0_01-11-2025_09:56:40_contracts.zip"
5+
checksum = "2ee78837130cf06b456d9ef7ab70753685d9c1c9c2c5b70f24bd4c16695d0337"
6+
integrity = "da8336cf949f0e0667ae8360af849681e3a3e76d7e61e7a86b1a3414a158aeea"
Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// SPDX-License-Identifier: Apache-2.0
2-
// Compatible with OpenZeppelin Contracts ^5.0.0
3-
pragma solidity ^0.8.20;
2+
// Compatible with OpenZeppelin Contracts ^5.0
3+
pragma solidity ^0.8;
44

5-
import "@openzeppelin-contracts-5.2.0/token/ERC1155/ERC1155.sol";
6-
import "@openzeppelin-contracts-5.2.0/access/Ownable.sol";
5+
import {ERC1155} from "@openzeppelin-contracts-5.5.0/token/ERC1155/ERC1155.sol";
6+
import {Ownable} from "@openzeppelin-contracts-5.5.0/access/Ownable.sol";
77

88
contract TestMultiToken is ERC1155, Ownable {
99
constructor(address initialOwner) ERC1155("") Ownable(initialOwner) {}
@@ -12,14 +12,21 @@ contract TestMultiToken is ERC1155, Ownable {
1212
_setURI(newuri);
1313
}
1414

15-
function mint(address account, uint256 id, uint256 amount, bytes memory data) public onlyOwner {
15+
function mint(
16+
address account,
17+
uint256 id,
18+
uint256 amount,
19+
bytes memory data
20+
) public onlyOwner {
1621
_mint(account, id, amount, data);
1722
}
1823

19-
function mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data)
20-
public
21-
onlyOwner
22-
{
24+
function mintBatch(
25+
address to,
26+
uint256[] memory ids,
27+
uint256[] memory amounts,
28+
bytes memory data
29+
) public onlyOwner {
2330
_mintBatch(to, ids, amounts, data);
2431
}
2532
}

packages/devnet/src/TestNFT.sol

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,38 @@
11
// SPDX-License-Identifier: Apache-2.0
2-
// Compatible with OpenZeppelin Contracts ^5.0.0
3-
pragma solidity ^0.8.20;
2+
// Compatible with OpenZeppelin Contracts ^5.0
3+
pragma solidity ^0.8;
44

5-
import "@openzeppelin-contracts-5.2.0/token/ERC721/ERC721.sol";
6-
import "@openzeppelin-contracts-5.2.0/token/ERC721/extensions/ERC721URIStorage.sol";
7-
import "@openzeppelin-contracts-5.2.0/access/Ownable.sol";
5+
import {ERC721} from "@openzeppelin-contracts-5.5.0/token/ERC721/ERC721.sol";
6+
import {
7+
ERC721URIStorage
8+
} from "@openzeppelin-contracts-5.5.0/token/ERC721/extensions/ERC721URIStorage.sol";
9+
import {Ownable} from "@openzeppelin-contracts-5.5.0/access/Ownable.sol";
810

911
contract TestNFT is ERC721, ERC721URIStorage, Ownable {
10-
constructor(address initialOwner) ERC721("TestNFT", "SUNN") Ownable(initialOwner) {}
12+
constructor(
13+
address initialOwner
14+
) ERC721("TestNFT", "SUNN") Ownable(initialOwner) {}
1115

12-
function safeMint(address to, uint256 tokenId, string memory uri) public onlyOwner {
16+
function safeMint(
17+
address to,
18+
uint256 tokenId,
19+
string memory uri
20+
) public onlyOwner {
1321
_safeMint(to, tokenId);
1422
_setTokenURI(tokenId, uri);
1523
}
1624

1725
// The following functions are overrides required by Solidity.
1826

19-
function tokenURI(uint256 tokenId) public view override(ERC721, ERC721URIStorage) returns (string memory) {
27+
function tokenURI(
28+
uint256 tokenId
29+
) public view override(ERC721, ERC721URIStorage) returns (string memory) {
2030
return super.tokenURI(tokenId);
2131
}
2232

23-
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721URIStorage) returns (bool) {
33+
function supportsInterface(
34+
bytes4 interfaceId
35+
) public view override(ERC721, ERC721URIStorage) returns (bool) {
2436
return super.supportsInterface(interfaceId);
2537
}
2638
}

packages/devnet/src/TestToken.sol

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,31 @@
11
// SPDX-License-Identifier: Apache-2.0
2-
pragma solidity ^0.8.20;
2+
// Compatible with OpenZeppelin Contracts ^5.0
3+
pragma solidity ^0.8;
34

4-
import "@openzeppelin-contracts-5.2.0/token/ERC20/ERC20.sol";
5-
import "@openzeppelin-contracts-5.2.0/token/ERC20/extensions/ERC20Burnable.sol";
6-
import "@openzeppelin-contracts-5.2.0/token/ERC20/extensions/ERC20Pausable.sol";
7-
import "@openzeppelin-contracts-5.2.0/access/manager/AccessManaged.sol";
8-
import "@openzeppelin-contracts-5.2.0/token/ERC20/extensions/ERC20Permit.sol";
5+
import {ERC20} from "@openzeppelin-contracts-5.5.0/token/ERC20/ERC20.sol";
6+
import {
7+
ERC20Burnable
8+
} from "@openzeppelin-contracts-5.5.0/token/ERC20/extensions/ERC20Burnable.sol";
9+
import {
10+
ERC20Pausable
11+
} from "@openzeppelin-contracts-5.5.0/token/ERC20/extensions/ERC20Pausable.sol";
12+
import {
13+
AccessManaged
14+
} from "@openzeppelin-contracts-5.5.0/access/manager/AccessManaged.sol";
15+
import {
16+
ERC20Permit
17+
} from "@openzeppelin-contracts-5.5.0/token/ERC20/extensions/ERC20Permit.sol";
918

10-
contract TestToken is ERC20, ERC20Burnable, ERC20Pausable, AccessManaged, ERC20Permit {
11-
constructor(address initialAuthority)
19+
contract TestToken is
20+
ERC20,
21+
ERC20Burnable,
22+
ERC20Pausable,
23+
AccessManaged,
24+
ERC20Permit
25+
{
26+
constructor(
27+
address initialAuthority
28+
)
1229
ERC20("TestToken", "TEST")
1330
AccessManaged(initialAuthority)
1431
ERC20Permit("TestToken")
@@ -26,7 +43,11 @@ contract TestToken is ERC20, ERC20Burnable, ERC20Pausable, AccessManaged, ERC20P
2643

2744
// The following functions are overrides required by Solidity.
2845

29-
function _update(address from, address to, uint256 value) internal override(ERC20, ERC20Pausable) {
46+
function _update(
47+
address from,
48+
address to,
49+
uint256 value
50+
) internal override(ERC20, ERC20Pausable) {
3051
super._update(from, to, value);
3152
}
3253
}

0 commit comments

Comments
 (0)