// Contract ABI copied directly from Remix
let abi = [
{
inputs: [],
name: "consecutiveWins",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
]
let coinFlipContractAddress = "0xa0714D4539ADcfD7855B811382c49D7185D32977"
// Connect to the Contract
let coinFlipContract = new ethers.Contract(
coinFlipContractAddress,
abi,
rinkebyHttpProvider
)
// Check current consecutiveWins value
let consecutiveWins = await coinFlipContract.consecutiveWins()