I am working on interacting my smart contract from java application, I am using testrpc.
To interact with the smart contract we need : 1- connect to the local host 2- have an account to send transactions (credentials). 3- deploy the contract and get the address (deployed to testrpc network using truffle and already have the address)
1- Web3j web3 = Web3j.build(new HttpService()); // defaults to http://localhost:8545/
2- Credentials credentials = WalletUtils.loadCredentials("password", "/path/to/walletfile");
3- YourSmartContract contract = YourSmartContract.deploy(
<web3j>, <credentials>,
GAS_PRICE, GAS_LIMIT,
<initialEtherValue>,
<param1>, ..., <paramN>).get(); // constructor params
My questions are: how I can use testrpc accounts for "credentials"??!!
How I can use the address of the smart contract which already deployed by truffle??