Error while validating contract UserStorage: Error: No AST nodes with id 154 found One or more contracts have validation errors

I am trying to deploy a contract instance on Polygon. I added a single function and then used the cli tool to upgrade the contracts. This is the steps that I took

oz compile
*selected Polygon network
*selected contract instance
*picked the instance to upgrade

Then I get this error message:

No AST nodes of type ContractDefinition with id 419 found.

Running dependencies

{
  "dependencies": {
    "@openzeppelin/network": "^0.4.3",
    "@truffle/hdwallet-provider": "^2.1.13",
    "truffle-assertions": "^0.9.2"
  },
  "devDependencies": {
    "@openzeppelin/cli": "^2.8.2",
    "@openzeppelin/contracts-ethereum-package": "^3.0.0",
    "@openzeppelin/gsn-helpers": "^0.2.4",
    "@openzeppelin/upgrades": "^2.8.0",
    "ganache-cli": "^6.12.2"
  }
}

Hi @iamanuragsaini,

Please follow the instructions in the Upgrades Plugins documentation. Currently, you're using packages that we don't actively maintain, such as @openzeppelin/network, @openzeppelin/cli, @openzeppelin/contracts-ethereum-package and @openzeppelin/upgrades.

The issue seems to be probably coming from an incompatibility between versions of some libraries you've installed.

After using upgrades plugin

Exiting: Review successful transactions manually by checking the transaction hashes above on Etherscan.

Error: The requested contract was not found. Make sure the source code is available for compilation

Thanks, for your response.

I want to make gaseless contract. If these library not actively maintain. Then, How can I make that contract.
Any other library?

I can't trace back the errors you're providing because I don't have the source code. Including it would be helpful.

I want to make gaseless contract. If these library not actively maintain. Then, How can I make that contract.

Any contract consumes gas. I'd infer you're trying to create a contract able to process gasless transactions. You can refer to this Youtube guide on how to send meta transactions using OpenZeppelin Defender.

You'll need a forwarder contract (see OpenZeppelin ERC2771Forwarder), a funded relayer address to pay for the gas (see Defender Relay) and an ERC2771-capable contract (any OZ contract can inherit from ERC2771Context). The OpenZeppelin Contracts library is maintained and we're preparing a major release for the following weeks with the forwarder I linked.

1 Like