Im am relatively new to using ChainLinks ORACLE contract in solidity. I have recently managed to successfully integrate their VRFConsumerBase.sol in my consumer contract to generate random numbers. However, when i want to integrate and use their Client to make simple Get request to my API, it throws this error upon compiling
CompileError: TypeError: Member "add" not found or not visible after argument-dependent lookup in struct Chainlink.Request memory
I am currently using Truffle v5.1.65 & Sol 0.8.0. I am importing my ChainLink files as shown below :
import "@chainlink/contracts/src/v0.8/dev/ChainlinkClient.sol";
Here's My function :
function uploadTokenDataToServer(NFT memory nft) public{
require(LINK.balanceOf(address(this)) >= linkFee, "Not enough LINK - fill contract with faucet");
Chainlink.Request memory request = buildChainlinkRequest(jobId, address(this), this.confirmUpload.selector);
string memory finalURL = append(nft.ID,nft.creator,nft.desc) ;
request.add("get", finalURL);
return sendChainlinkRequestTo(oracle, request, linkFee);
}
It seems that the add
function is not being detected when compiling. Any help would be greatly appreciated.