oasisprotocol / sapphire-paratime

Oasis Sapphire - the confidential EVM-compatible ParaTime for the Oasis Network
https://oasisprotocol.org/sapphire
Apache License 2.0
37 stars 27 forks source link

OpenZeppelin 5.x not compatible with OPL #249

Closed CedarMist closed 7 months ago

CedarMist commented 10 months ago

In 5.x & 4.9.5 they introduced a function in Context called _contextSuffixLength

OpenZeppelin introduced a breaking interface change in a minor release *slowclap*, 4.9.3 works fine though, but not 4.9.5 or 5.x

Our contracts don't override/implement it, so it errors out.

 --> @oasisprotocol/sapphire-contracts/contracts/opl/Enclave.sol:13:1:
   |
13 | contract Enclave is Endpoint, ERC2771Context {
   | ^ (Relevant source part starts here and spans across multiple lines).
Note: Definition in "ERC2771Context": 
  --> @openzeppelin/contracts/metatx/ERC2771Context.sol:83:5:
   |
83 |     function _contextSuffixLength() internal view virtual override returns (uint256) {
   |     ^ (Relevant source part starts here and spans across multiple lines).
Note: Definition in "Context": 
  --> @openzeppelin/contracts/utils/Context.sol:25:5:
   |
25 |     function _contextSuffixLength() internal view virtual returns (uint256) {
   |     ^ (Relevant source part starts here and spans across multiple lines).
aefhm commented 7 months ago

We believe this is no longer true post removal of ERC2771Context.

CedarMist commented 7 months ago

Yup this can be closed, removal of ERC2771Context has fixed the issue