Search code examples
solidityethers.js

Solidity fallback function with Ethers.js


What is the recommended way to call the Solidity fallback() function with Ethers.js ? https://docs.soliditylang.org/en/v0.8.0/contracts.html#fallback-function


Solution

  • You can send an empty transaction

    let tx = {
        to: contractAddress
    };
    
    await signer.sendTransaction(tx);