Hi Thanks,
I changed to use the execute function hook, I’m sending you all the parameters as data.
With this hook, I always get null as the returned data value. Will appreciate your help,
const { data, error, isFetching, isLoading} = useWeb3ExecuteFunction({
chain:chainId,
abi:[
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "categoryId",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "string",
"name": "category",
"type": "string"
}
],
"name": "CategoryCreated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "contentId",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "string",
"name": "contentUri",
"type": "string"
}
],
"name": "ContentAdded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "postId",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "postOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "parentId",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "contentId",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "categoryId",
"type": "bytes32"
}
],
"name": "PostCreated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "postId",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "postOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "voter",
"type": "address"
},
{
"indexed": false,
"internalType": "uint80",
"name": "reputationPostOwner",
"type": "uint80"
},
{
"indexed": false,
"internalType": "uint80",
"name": "reputationVoter",
"type": "uint80"
},
{
"indexed": false,
"internalType": "int40",
"name": "postVotes",
"type": "int40"
},
{
"indexed": false,
"internalType": "bool",
"name": "up",
"type": "bool"
},
{
"indexed": false,
"internalType": "uint8",
"name": "reputationAmount",
"type": "uint8"
}
],
"name": "Voted",
"type": "event"
},
{
"inputs": [
{
"internalType": "string",
"name": "_category",
"type": "string"
}
],
"name": "addCategory",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_parentId",
"type": "bytes32"
},
{
"internalType": "string",
"name": "_contentUri",
"type": "string"
},
{
"internalType": "bytes32",
"name": "_categoryId",
"type": "bytes32"
}
],
"name": "createPost",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_categoryId",
"type": "bytes32"
}
],
"name": "getCategory",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_contentId",
"type": "bytes32"
}
],
"name": "getContent",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_postId",
"type": "bytes32"
}
],
"name": "getPost",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
},
{
"internalType": "int72",
"name": "",
"type": "int72"
},
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_address",
"type": "address"
},
{
"internalType": "bytes32",
"name": "_categoryID",
"type": "bytes32"
}
],
"name": "getReputation",
"outputs": [
{
"internalType": "uint80",
"name": "",
"type": "uint80"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_postId",
"type": "bytes32"
},
{
"internalType": "uint8",
"name": "_reputationTaken",
"type": "uint8"
}
],
"name": "voteDown",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_postId",
"type": "bytes32"
},
{
"internalType": "uint8",
"name": "_reputationAdded",
"type": "uint8"
}
],
"name": "voteUp",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
address:'0x6c6Ae1d2eADa359c8fC8308707DeBa552f35F5C2',
functionName: "getReputation",
params: {
_address:"0xbA6AADA3F43521296f92cdD6730108E13b927c1c",
_categoryID: "0x91f9b2a50ec6433a1cb3014d0ac426a62822c084a87e5aade80c7a9f5ce3f4e5"
}
});