0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

TruffleでDeployするときの Contract Ownerについて

Posted at

####Contract Ownerを変えようとしてちょっと調べました、
Ethereumのgeth nodeを経由して truffle migrate --network xxxx として ContractをDeployする際、truffleはデフォルトで eth.accounts[0]をそのContractのownerにします。

別のaccountをownerにしたい場合は、truffle.js に from: を設定します。

truffle.js
module.exports = {
networks: {
       development: {
       host: "127.0.0.1",
       port: 8545,
       network_id: "*", 
       gas:  3000000,
       gasPrice: 4500000000,
       from: "0x25aa5a1b94dfef4af501b10e988f6f4d4a912000"
      }
   }
};

参考ページ
https://truffleframework.com/docs/truffle/reference/configuration

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?