Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

readme.md

React Ethers.js


Example event listener

    const buyoutContract = new ethers.Contract(contractAddress, BuyoutFixedABI, provider);
    // "[EVENT_NAME]", ([PARAM], [PARAM], [EVENT_DATA])
    buyoutContract.on("Buyout", (buyer, amount, bonusAmount, cost, event) => {
        console.log("amount", amount);
    });

Notes:

  • Use useEffect() when you want to render something after a rerender when a [dep] is changed. E.g, I want to .map() my array, [dillys], when the dillys useState() is updated next render.

Links