0
 <script type="text/javascript">
        async function loadWeb3() {
    if (window.ethereum) {
        window.web3 = new Web3(window.ethereum);
        window.ethereum.enable();
    }
}
 async function loadContract() {
        return await new window.web3.eth.Contract(ABI,address);
    //I'm using actual abi and address here
    }
    async function load() {
        await loadWeb3();
         window.contract = await loadContract();
    }
load();
    </script>

This error message appears when i run my index.html file in the browser. What is the error with my code?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.