I have erc721 uups proxy contract with initializer as :
function initialize(address owner) public initializer {
__ERC721_init("demo", "demo");
__ERC721URIStorage_init();
__Pausable_init();
__AccessControl_init();
__ERC721Burnable_init();
__UUPSUpgradeable_init();
_grantRole(DEFAULT_ADMIN_ROLE, owner);
_grantRole(PAUSER_ROLE, owner);
_grantRole(MINTER_ROLE, owner);
_grantRole(UPGRADER_ROLE, owner);
}
Now I am writing a test case for this contract using hardhat toolbox typescript version in a hardhat project.
In my testcase I first have to deploy this contract. My code for that is
const Demo = await ethers.getContractFactory("demo");
const demo = await upgrades.deployProxy(Demo, [owner.address], {
kind: "uups",
initializer: "initialize",
});
await demo.deployed();
The error I get in running this code is at that deployment code as :
Error: types/values length mismatch (count={"types":1,"values":0}, value={"types":[{"name":"owner","type":"address","indexed":null,"components":null,"arrayLength":null,"arrayChildren":null,"baseType":"address","_isParamType":true}],"values":[]}, code=INVALID_ARGUMENT, version=abi/5.7.0)