4

I am using truffle to develop new contracts and I have successfully deployed contracts to the Rinkeby Testnet directly with truffle. However, this process, like the one using the MainNet, requires geth started with an unlocked account:

geth --rinkeby --rpc --rpcapi db,eth,net,web3,personal --syncmode "fast" --unlock="0x000-deployer-address-here"

Now truffle migrate will deploy the Migrations contract and my other contracts with 0x000-deployer-address-here address as the owner.

My question is if this deployment can be done with a Ledger Nano S address as the owner.

2

You can use truffle-ledger-provider for deploying smart contracts with Ledger Wallet.

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
        }
    }
};

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.