I am using testrpc and truffle to test my contract.
When I type truffle migrate
, this will deploy my contract to the testrpc network.
My question is , which account (from testrpc accounts) has been used to deploy the contract.
In other word, whose the contract owner?
Thank you in advance
By default the owner is accounts[0]
so the first account on the list but you can set the owner by adding "from" in the truffle.js config file
module.exports = {
networks: {
development: {
host: "localhost",
port: 8545,
network_id: "*",
from: "0xda9b1a939350dc7198165ff84c43ce77a723ef73"
}
}
};
for more information about migration see this https://github.com/trufflesuite/truffle/issues/138
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.