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.
如何使用附加在 web3.js 中的以太创建和部署合约?在solidity中,我知道它可以这样写:
D newD = (new D).value(amount)(arg);
但是如何在 web3.js 中编写它来测试合约。衷心感谢
只需在创建合约时附加“value:amount”属性:.new( { from: web3.eth.accounts[0], value: 5 wei }