简体   繁体   English

带有 Ethers.js 的 Solidity 后备 function

[英]Solidity fallback function with Ethers.js

What is the recommended way to call the Solidity fallback() function with Ethers.js?使用 Ethers.js 调用 Solidity fallback() function 的推荐方法是什么? https://docs.soliditylang.org/en/v0.8.0/contracts.html#fallback-function https://docs.soliditylang.org/en/v0.8.0/contracts.html#fallback-function

You can send an empty transaction您可以发送空交易

let tx = {
    to: contractAddress
};

await signer.sendTransaction(tx);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM