[英]Specifying the custom account for transaction execution in truffle
I am wandering how to set the custom account to execute transaction? 我在徘徊如何设置自定义帐户以执行交易? For example in truffle console i have something like
例如在松露控制台中,我有类似
Hello.deployed().then(function(){h = instance})
Hello.deployed()。then(function(){h = instance})
, and then , 接着
h.exetuceTransaction()
h.exetuceTransaction()
will burn gas from the accounts[0] by default. 默认情况下会从帐户[0]燃烧气体。 How can I specify the account from which I want to send this transaction (for example accouts[1])?
如何指定要从中发送该交易的帐户(例如accouts [1])?
你只需要指定from
打电话时参数executeTransaction({"from" : "0x..." })
检查的文档
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.