campaigns
view
Use this function in your app
const response = await fetch('https://api.thirdweb.com/v1/contracts/read', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-secret-key': '<YOUR_SECRET_KEY>'
},
body: JSON.stringify({
calls: [
{
contractAddress: "0xB1A0885DEd8f845feDce477955b428c16c9b85a5",
method: "function campaigns(uint256) view returns (address owner, string title, string description, uint256 targetAmount, uint256 deadline, uint256 amountCollected, string image)",
params: []
}
],
chainId: 11155111
})
});
const data = await response.json();