Truffle 設定新的 network
Geth 開啟 test net
Deploy!
In geth console
```
personal.unlockAccount(eth.accounts[0])
```
```sh
truffle migrate --network ropsten
```
```
module.exports = {
networks: {
development: {
host: "localhost",
port: 8545,
network_id: "*" // Match any network id
},
ropsten: {
network_id: 3,
host: "localhost",
port: 8545,
gas: 2900000
}
},
rpc: {
host: 'localhost',
post:8080
}
};
```https://medium.com/@guccimanepunk/how-to-deploy-a-truffle-contract-to-ropsten-e2fb817870c1
沒有留言:
張貼留言