Hi,
I’m trying to create a upgradeable contract, using the @openzeppelin/truffle-upgrades libray.
For that I’ve create a migration, but when I try to execute, truffle gives me this error:
TypeError: Found non-callable @@iterator
at getInitializerData (@openzeppelin/truffle-upgrades/src/deploy-proxy.ts:61:46)
at deployProxy (/truffle-upgrades/src/deploy-proxy.ts:43:16)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
Environment
Truffle v5.1.43 (core: 5.1.43)
Node v12.18.3
solidity 0.6.6
“@openzeppelin/truffle-upgrades”: “^1.1.0”,
Code to reproduce
The migration that I create is the next:
const { deployProxy } = require('@openzeppelin/truffle-upgrades');
const Traceability = artifacts.require("Traceability");
module.exports = async function (deployer) {
const instance = await deployProxy(Traceability, { deployer }, { unsafeAllowCustomTypes: true });
console.log('Deployed', instance.address);
};