Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.

Simply including the Upgradeable version errors. #100

Open
PixelHeroMedia opened this issue Mar 5, 2023 · 2 comments
Open

Simply including the Upgradeable version errors. #100

PixelHeroMedia opened this issue Mar 5, 2023 · 2 comments

Comments

@PixelHeroMedia
Copy link

PixelHeroMedia commented Mar 5, 2023

I have a fully working smart contract, ERC1155 Upgradeable.

It has been deployed and fully tested on goerli.

I went to add the Operator Filter to it, and even when I simply add the import line, my Truffle deploy breaks.

Line being added:
import "operator-filter-registry/src/upgradeable/DefaultOperatorFiltererUpgradeable.sol";

Error:
Error: The requested contract was not found. Make sure the source code is available for compilation at getContractNameAndRunValidation (/home/richard/solidity/d8a/node_modules/@openzeppelin/upgrades-core/src/validate/query.ts:48:11) at getStorageLayout (/home/richard/solidity/d8a/node_modules/@openzeppelin/upgrades-core/src/validate/query.ts:56:41) at deployImpl (/home/richard/solidity/d8a/node_modules/@openzeppelin/truffle-upgrades/src/utils/deploy-impl.ts:34:34) at processTicksAndRejections (node:internal/process/task_queues:95:5) at deployProxy (/home/richard/solidity/d8a/node_modules/@openzeppelin/truffle-upgrades/src/deploy-proxy.ts:35:26) at module.exports (/home/richard/solidity/d8a/migrations/2_deploy_main.js:6:3) at Migration._deploy (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:75:1) at Migration._load (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:56:1) at Migration.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:217:1) at Object.runMigrations (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:150:1) at Object.runFrom (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:110:1) at Object.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:87:1) at runMigrations (/usr/local/lib/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:258:1) at Object.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:223:1) at Command.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/core/lib/command.js:183:1) Truffle v5.4.21 (core: 5.4.21) Node v18.13.0

It seems to be somewhere in the imported file that is causing this error. Happens with both 1.4.1 and 1.4.0

Any known reason for this?

@PixelHeroMedia
Copy link
Author

Tested on 1.3.1 and it works fine.

Error seems to be introduced in 1.4.0 using Proxy deploys of ERC1155Upgradeable

@PixelHeroMedia
Copy link
Author

Seems in the DefaultOperatorFiltererUpgradeable contract, including the ../lib/Constants.sol file in any way causes this error.

I removed:
import {CANONICAL_CORI_SUBSCRIPTION} from "../lib/Constants.sol";

And added in the old method of assigning the address
address constant CANONICAL_CORI_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6);

and this worked fine.

Not sure why, will leave that to you :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant