OZ Create Error

I set up a simple storage contract; but get error with OZ create (I use instead of truffle since Im using GSN)

> Artifacts written to /build/contracts
> Compiled successfully using:
   - solc: 0.6.8+commit.0bbfe453.Emscripten.clang

Truffle output:
 - Fetching solc version list from solc-bin. Attempt #1
- Fetching solc version list from solc-bin. Attempt #1

? Pick a contract to instantiate SimpleStorage
? Pick a network develop
All contracts are up to date
✖ Creating instance for contract at 0xD833215cBcc3f914bD1C9ece3EE7BF8B14f841bb
Returned error: VM Exception while processing transaction: revert Cannot set a proxy implementation to a non-contract address

my package.json:

"dependencies": {
    "@openzeppelin/cli": "^2.8.2",
    "@openzeppelin/contracts": "^3.0.1",
    "@openzeppelin/gsn-helpers": "^0.2.3",
    "@openzeppelin/gsn-provider": "^0.1.10",
    "core-js": "^3.6.4",
    "vue": "^2.6.11",
    "web3": "^1.2.2"
1 Like

Hi @steeve,

In case you weren’t aware, there are two versions of the GSN:

  • GSNv1 : Use in production now (though you may want to run your own relayer on mainnet to ensure availability).
  • GSNv2 : In development at OpenGSN.org. See Doubling down on security for more details.

Assuming you are just getting started and depending on your development roadmap, you could look at the upcoming improvements in GSNv2. I suggest joining the OpenGSN telegram to get the latest news on GSNv2 development and timescales.

Please ask all the questions that you need. For questions on GSNv2 you can ask in the OpenGSN telegram.

You can use Truffle with the GSN.

With the OpenZeppelin CLI, oz create is deprecated and you should use oz deploy.

Are you able to share your contract?

BTW I’m still using GSN1

My contract:

pragma solidity ^0.6.0;

import "@openzeppelin/contracts/GSN/GSNRecipient.sol";
import "@openzeppelin/upgrades/contracts/Initializable.sol";

contract SimpleStorage is Initializable, GSNRecipient {
  event NewData(uint Update);

  uint storedData;
  address private _owner;

  function initialize(uint num) public initializer {
    _owner = _msgSender();

  function set(uint x) public {
   storedData = x;
   emit NewData(x);

  function get() public view returns (uint) {
    return storedData;

  function acceptRelayedCall(
   address relay,
   address from,
   bytes calldata encodedFunction,
   uint256 transactionFee,
   uint256 gasPrice,
   uint256 gasLimit,
   uint256 nonce,
   bytes calldata approvalData,
   uint256 maxPossibleCharge
   ) external view override returns (uint256, bytes memory){
   return _approveRelayedCall();

  function _preRelayedCall(bytes memory context) internal override returns (bytes32) {

  function _postRelayedCall(bytes memory context, bool, uint256 actualCharge, bytes32) internal override {


1 Like

OZ deploy doesn’t work with my OZ version 2.6.0 which I realize is the version I have installed globally for a while now…

EDIT : So I used npx oz deploy to use my local dev dependencies instead of the global OZ.

1 Like

Hi @Steeve,

Glad you were able to resolve.

I mostly use local installs these days as it is easy to forget to upgrade global installs.

It is worth running a check every once in a while to see what you have installed globally:

$ npm -g ls --depth=0
├── asciicast2gif@0.2.1
├── ganache-cli@6.9.1
├── npm@6.14.5
└── yarn@1.22.4