is https://www.myetherwallet.com/ the only way?
how to deploy the contract with hd-wallet signed tx?
If you're using web3js, https://github.com/trufflesuite/truffle-hdwallet-provider provides the ability to sign messages using your mnemonic/password.
You can also load your mnemonic/password into MetaMask and then create your deploy transaction with Remix
@Shrugs i don't really understand. u mean the hd wallet such as ledger nano s or trezor , they serve a rpc server on 8545 on your computer automatically when connected to USB ?
HD means hierarchical deterministic; in our case it means any wallet that supports a mnemonic and password for managing accounts.
By HD did you mean hardware?
@Shrugs yes ...i mean hardware wallet.
we do this in our company, no big surprise:
connect hardware wallet to usb, enter pin, Select the Ethereum icon on the Nano S screen and changed the following settings:
Contract interactions or deploys need to enable Contract data from the Ethereum app Settings.
Browser support needs to be turned off from the Ethereum app Settings (different protocol).
Start geth on the target network, for ropsten
geth --testnet^
--datadir="./ropsten"^
--rpcapi 'admin,debug,eth,miner,net,personal,rpc,txpool,web3'^
--rpc --rpcaddr 127.0.0.1 --rpcport 8545^
--rpccorsdomain '*'^
--ipcdisable
it will take some time to synchronize,
with that in truffle-config.js
ropsten: {
host: 'localhost',
port: 8545,
network_id: 3,
gasPrice: 10000000000,
gas: 4700036
},
go to truffle console and run
truffle migrate --reset --network ropsten
it will ask on the nanoledger to confirm transaction, smart contract owner being the nanoledger private key
@cedricwalter thx for you msg. u mean the hardware wallet can be used in testnet? how about private chain with fake initial balance? still can "truffle migrate" and do some test?
btw does trezor have the same behaivor as ledger nano s?
actually i haven't got my hardware wallet yet. just ask for the feasibility and how to... :(
yes i was deploying and conducting test on ropsten, like on mainnet. You have to mine first a bit of ETH on your hardware wallet ropsten public key.
i do own a nanoledger and digital bitbox. As long as Geth /Mist support it....should work
@cedricwalter so different network just like different name space. the same public address(private key or keystore) can hold 3 different balances of eth on mainnet, ropsten testnet and your private chain at the same time. coz they have no relationship with each other, only sharing the storage of your hardware wallet. right?
Correct. A private key has the ability to sign any message, and each network operates individually.
closing since it sounds like we've solved this for the moment
I have developed a simple Truffle Web3 provider truffle-ledger-provider for deploying smart contracts with Ledger Wallet. Compared to @cedricwalter solution, it does not require to synchronization with Ethereum blockchain - you can use Infura API instead.
Usage as follows:
var LedgerWalletProvider = require("truffle-ledger-provider");
var infura_apikey = "..."; // set your Infura API key
var ledgerOptions = {
networkId: 3, // ropsten testnet
accountsOffset: 0 // we use the first address
};
module.exports = {
networks: {
ropsten: {
provider: new LedgerWalletProvider(ledgerOptions, "https://ropsten.infura.io/" + infura_apikey),
network_id: 3
}
}
};
Most helpful comment
I have developed a simple Truffle Web3 provider truffle-ledger-provider for deploying smart contracts with Ledger Wallet. Compared to @cedricwalter solution, it does not require to synchronization with Ethereum blockchain - you can use Infura API instead.
Usage as follows: