I am able to generate the contract just fine, and able to create a wallet, but when I try to deploy the contract on testrpc, I always get an exception saying I dont have enough funds. How can you initialize a wallet using web3j that has initial funds in it?
I create the wallet using WalletUtils, and then use the following code to initialize that account I created with ether while launching testrpc
byte keys = Keys.serialize(wallet.getCredentials().getEcKeyPair()); String result = new String(Hex.encodeHex(keys)); String privateKey = result.substring(33, 65);
Then I try to deploy a contract using that wallet I created.
Sorry, edit to the original question, I cannot launch testrpc because I getting 'private key length is invalid'
My real question should be, how do I create a wallet using web3j, get the private key from it, and use that to initialize testrpc with that private key having funds?