Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在为我编写的 Solidity 合约编写安全帽测试。合约包含一个receive() external payable { ... }函数。我怎么能从一个有以太量的测试中调用它?
receive() external payable { ... }
const params = [{ from: sender, to: contractAddress, value: ethers.utils.parseEther("1") // 1 ether }]; const transactionHash = await provider.send('eth_sendTransaction', params)