Hi, I'm using Governor template to create my DAO, i could make my propose and votes successfully, but when I'm trying to execute the calldata, I got this error : "Governor: call reverted without message ".
Previously, I transfer ownership of related contract calldata to Governor , and I override the execute Governor smart contract function like this:
function execute(
address[] memory targets,
uint256[] memory values,
bytes[] memory calldatas,
bytes32 descriptionHash
) public payable virtual override (Governor) onlyOwner returns (uint256) {
return super.execute(targets, values, calldatas, descriptionHash);
}
I did it to restrinct only owner to execute this. Also I check parameters of function, but it's okay. And i dont know what kind of error could be. Any idea of this?. Thanks for your attention and help.
Code
const encodeDescription = ethers.utils.keccak256(ethers.utils.toUtf8Bytes(description));
const executeResult = await this.AgrosGovern.execute(['0x4E72770760c011647D4873f60A3CF6cDeA896CD8'],[0], [encodeCalldata],encodeDescription, {
gasLimit: 1000000,
gasPrice: 0
});
Environment
Using Truffle ^5.5.4, Node 14, @openzeppelin/contracts ^4.5.0, Ethers ^5.6.0 and Ganache-CLI.