1

This is directly related to my previous issue, although now I have more specifics and therefore I'm writing a new question!

I was handed a project, and I've installed all the dependencies with npm ci, which should coincide exactly with what the package-lock.json says.

Although, I get compiling errors with an OpenZeppelin contract and a GSN contract.

When looking at the deployed contract, I can see that the code indeed is different and coincides with what the compiler is complaining about;

OpenZeppelin/Context.sol (Deployed)

abstract contract Context {
    function _msgSender() internal view virtual returns (address payable) {
        return payable(msg.sender);
    }
...

OpenZeppelin/Context.sol (local)

abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }
...

Difference> payable(msg.sender), which is what my compiler is complaining about in two places (once in GSN contract BaseRelayRecipient too).

So... as the versions for both OpenZeppelin and GSN are correct according to my node_modules and the package.json;

    "@opengsn/contracts": "^2.2.2",
    "@openzeppelin/contracts": "^4.1.0",

Is it the compiler which is supposed to... fix the payable part...? Or... what am I missing, assuming my local code is indeed what was deployed (which I'm 99% of).

Cookie
  • 364
  • 1
  • 2
  • 12

0 Answers0