I have this function in my contract:
function removeRes(address _res) public onlyOwner {
.
.
.
}
I'm encoding ABI like:
const contractAddress = "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266";
const selector = contract.interface.encodeFunctionData(
"removeRes(address)",
[contractAddress],
);
I'm getting this error
Error: incorrect data length (argument=null, value="0x69a5b950000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266", code=INVALID_ARGUMENT, version=abi/5.7.0)
I used an online tool (https://abi.hashex.org) and it gave the same value ("0x69a5b950000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266")