Skip to content

Commit

Permalink
Upgrade OpenZeppelin to v5.0.0-rc.0, rename tests to be coherent with…
Browse files Browse the repository at this point in the history
… Solidity files, update doc
  • Loading branch information
rya-sge committed Sep 21, 2023
1 parent 0cb5a11 commit 9b3ddb2
Show file tree
Hide file tree
Showing 29 changed files with 24,018 additions and 18,470 deletions.
2 changes: 0 additions & 2 deletions contracts/modules/wrapper/core/EnforcementModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

pragma solidity ^0.8.20;

import "../../../../openzeppelin-contracts-upgradeable/contracts/security/PausableUpgradeable.sol";
import "../../../../openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol";
import "../../security/AuthorizationModule.sol";
import "../../internal/EnforcementModuleInternal.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/modules/wrapper/core/PauseModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pragma solidity ^0.8.20;

import "../../../../openzeppelin-contracts-upgradeable/contracts/security/PausableUpgradeable.sol";
import "../../../../openzeppelin-contracts-upgradeable/contracts/utils/PausableUpgradeable.sol";
import "../../../../openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol";
import "../../security/AuthorizationModule.sol";

Expand Down
46 changes: 38 additions & 8 deletions doc/TOOLCHAIN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

[TOC]



## Node.JS package

This part describe the list of libraries present in the file `package.json`.
Expand All @@ -28,20 +26,42 @@ A development environment, testing framework and asset pipeline for blockchains
**[Truffle Flattener](https://www.npmjs.com/package/truffle-flattener)**
Concats solidity files from Truffle projects with all of their dependencies.

**[truffle-contract-size](https://www.npmjs.com/package/truffle-contract-size)**

This [Truffle](https://www.trufflesuite.com/docs/truffle/overview) plugin displays the contract size of all or a selection of your smart contracts in kilobytes.

#### Nomiclabs - Hardhat

[hardhat-truffle5](https://hardhat.org/hardhat-runner/plugins/nomiclabs-hardhat-truffle5)
**[hardhat-truffle5](https://hardhat.org/hardhat-runner/plugins/nomiclabs-hardhat-truffle5)**

[Hardhat](https://hardhat.org/) plugin for integration with TruffleContract from Truffle 5. This allows tests and scripts written for Truffle to work with Hardhat.

[hardhat-web3](https://hardhat.org/hardhat-runner/plugins/nomiclabs-hardhat-web3)
**[hardhat-web3](https://hardhat.org/hardhat-runner/plugins/nomiclabs-hardhat-web3)**

This plugin integrates [Web3.js](https://github.com/ethereum/web3.js) `1.x` into [Hardhat](https://hardhat.org/).

[hardhat-ethers](https://www.npmjs.com/package/@nomicfoundation/hardhat-ethers)
**[hardhat-ethers](https://www.npmjs.com/package/@nomicfoundation/hardhat-ethers)**

[Hardhat](https://hardhat.org/) plugin for integration with [ethers.js](https://github.com/ethers-io/ethers.js/)

**[hardhat-contract-sizer](https://www.npmjs.com/package/hardhat-contract-sizer)**

Output Solidity contract sizes with Hardhat.

**[hardhat-gas-reporter](https://www.npmjs.com/package/hardhat-gas-reporter)**

[eth-gas-reporter](https://github.com/cgewecke/eth-gas-reporter) plugin for [hardhat](http://gethardhat.com/).

#### OpenZeppelin

**[openzeppelin/hardhat-upgrades](openzeppelin/hardhat-upgrades)**

This package adds functions to your Hardhat scripts so you can deploy and upgrade proxies for your contracts

**[openzeppelin/test-helpers](openzeppelin/test-helpers)**

Assertion library for Ethereum smart contract testing

#### Linter

**[eslint](https://eslint.org/)**
Expand Down Expand Up @@ -73,13 +93,23 @@ signature, etc.).
Encode and decode method and event from the smart contract ABI. Warning:
marked as experimental package on 22.08.2022.

**[eth-gas-reporter](https://www.npmjs.com/package/eth-gas-reporter)**

A Mocha reporter for Ethereum test suites (Truffle)

**[Eth-Sig-Util](https://www.npmjs.com/package/ethereumjs-wallet)**
A collection of Ethereum signing functions.

Warning :
* Deprecated in favor of : [@metamask/eth-sig-util](https://github.com/MetaMask/eth-sig-util)
* It was not possible to use the new version of the library because the test "MetaTxModule.test.js" doesn't work with this one. The check of the signature fails.

[keccak256](https://www.npmjs.com/package/keccak256)

A wrapper for the [`keccak`](https://www.npmjs.com/package/keccak) library to compute 256 bit keccak hash in JavaScript.

Use by `openzeppelin-contracts-upgradeable/test/helpers/eip712`imported in `MetaTxModuleCommon.js

**[solc](https://github.com/ethereum/solc-js)**
JavaScript bindings for the Solidity compiler.

Expand Down Expand Up @@ -144,7 +174,7 @@ npm run-script uml

Warning:

From the version 2.3, this command is not working and generates the following error
From the version v2.3.0, this command is not working and generates the following error

> Failed to convert dot to SVG. Error: lost 31 26 edge
Expand All @@ -155,8 +185,8 @@ From the version 2.3, this command is not working and generates the following er
| Generate UML for all modules | `npm run-script uml-all` |
| Generate UML for the interfaces EIP1404 | `npm run-script uml-i-eip1404` |
| Generate UML for the contracts CMTAT_STANDALONE, CMTAT_PROXY && CMTAT_BASE | `npm run-script uml-partial` |
| Generate UML for mandatory modules | `npm run-script uml-modules-mandatory` |
| Generate UML for optional modules | `npm run-script uml-modules-optional` |
| Generate UML for core modules | `npm run-script uml-modules-mandatory` |
| Generate UML for extensions modules | `npm run-script uml-modules-optional` |
| Generate UML for security modules | `npm run-script uml-modules-security` |
| Generate UML for mocks | `npm run-script uml-mocks` |

Expand Down
4 changes: 2 additions & 2 deletions doc/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ are the latest ones that we tested:
- Solidity 0.8.17 (via solc-js)
- Node 16.17.0
- Web3.js 1.9.0
- OpenZeppelin Contracts Upgradeable (submodule) 5.0.0
- OpenZeppelin Contracts Upgradeable (submodule) [v5.0.0-rc.0](https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/releases/tag/v5.0.0-rc.0)

## Installation

Expand Down Expand Up @@ -54,7 +54,7 @@ See Hardhat's official [documentation](https://hardhat.org) for more information

### Truffle [partially depreciated]

> Truffle can still be used to compile the contracts but you can no longer be used to run the tests.
> Truffle can still be used to compile the contracts but you can no longer use it to run the tests.
To use Truffle, the recommended way is to use the version installed as
part of the node modules, via the `npx` command:
Expand Down
Binary file modified doc/general/test/test.odt
Binary file not shown.
2 changes: 1 addition & 1 deletion openzeppelin-contracts-upgradeable
Loading

0 comments on commit 9b3ddb2

Please sign in to comment.