简体   繁体   English

指定松露中执行交易的自定义帐户

[英]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.

相关问题 松露错误:错误:处理事务时VM异常:恢复 - Truffle error: Error: VM Exception while processing transaction: revert 测试松露中的智能合约要求:如果功能不无效,则交易将被还原 - Testing Smart contract requires in Truffle: transaction reverted if function isnt void 如何使用松露创建以太坊账户(不在控制台模式下) - How to create an ethereum account using truffle ( not in the console mode ) 使用truffle-hd-wallet部署Ropsten的默认帐户 - Default account for Ropsten deployment using truffle-hd-wallet 在松露控制台中使用OpenZeppelin ERC721 Mint时,“处理事务时发生VM异常:还原” - “VM Exception while processing transaction: revert” when using OpenZeppelin ERC721 mint in truffle console Solidity - Truffle:错误:处理事务时出现 VM 异常:无效的操作码不是因为恢复 - Solidity - Truffle: Error: VM Exception while processing transaction: invalid opcode NOT because of revert 松露测试给出“错误:尝试运行调用合同功能的交易,但收件人地址___不是合同地址” - Truffle test gives “Error: Attempting to run transaction which calls a contract function, but recipient address ___ is not a contract address” 尝试在专用网络上进行交易时,帐户余额为零 - Account balance zero when trying to make an transaction on private network 在 Polygon Mumbai Tes.net 上恢复 Balancer 闪贷交易执行 - Balancer flashloan transaction execution reverting on Polygon Mumbai Testnet 是否可以从以太坊的另一个账户支付交易费用? - Is it possible to pay transaction fee from another account in ethereum?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM