async function createGovernance() {
console.log(name);
let options = {
contractAddress: "0xbf7fccda9a43c5e2a24db53f22056d387895d5f4",
functionName: "createGovernor",
abi: [
{
inputs: [
{
internalType: "string",
name: "_governorName",
type: "string",
},
{
internalType: "uint256",
name: "_timelockDelay",
type: "uint256",
},
{
internalType: "uint256",
name: "_votingDelay",
type: "uint256",
},
{
internalType: "uint256",
name: "_votingPeriod",
type: "uint256",
},
{
internalType: "uint256",
name: "_proposalThreshold",
type: "uint256",
},
{
internalType: "uint256",
name: "_votingThreshold",
type: "uint256",
},
],
name: "createGovernor",
outputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
stateMutability: "payable",
type: "function",
},
],
Params: {
_governorName: name,
_timelockDelay: lockDelayInSec,
_votingDelay: voteDelayInSec,
_votingPeriod: votePeriodInSec,
_proposalThreshold: proposalThresholdInSec,
_votingThreshold: voteThresholdInSec,
},
//msgValue: Moralis.Units.ETH(0.1),
};
await contractProcessor.fetch({
params: options,
onSuccess: () => {
setLoading(false);
console.log("succes");
},
onError: (err) => {
setLoading(false);
console.log(err);
},
});
}
I have the above code and all field provided but i keep getting the error
0: "_governorName is required"
1: "_timelockDelay is required"
2: "_votingDelay is required"
3: "_votingPeriod is required"
4: "_proposalThreshold is required"
5: "_votingThreshold is required"
but all fields are provided