Deploying contracts
System information
Geth version: Geth
Version: 1.7.2-stable
Git Commit: d78cd97995f824239463717d3a0bbbb060e36643
Quorum Version: 2.0.2
Architecture: amd64
Network Id: 1
Go Version: go1.10.1
Operating System: linux
GOPATH=/home/ubuntu/go
GOROOT=/usr/local/go
OS & Version: Ubuntu 16.04
I have been trying to deploy my contracts to quorum chain via Truffle. Please look at Truffle Issue to see my logs.
Is there any other way to deploy contracts to Quorum? How can I debug this issue?
Any help is much appreciated.
Hi,
I am answering to below question. Is there any other way to deploy contracts to Quorum?
If you want you can try with the below solution ( Java implementation): CONVERT EQUIVALENT JAVA/ABI/BIN FROM CONTRACT SOLIDITY FILE (.sol): Put a ContractName.sol file with you source into d:\tmp> then in that directory executed the following from the command line:
d:\tmp>solc ContractName.sol --bin --abi --optimize -o . Which generated .abi and .sol files in that same directory. Then:
d:\tmp>web3j solidity generate Contract.bin Contract.abi -o . -p org.your.package.name Generated me a wrapper under the folloring directoty (according to the package structure provided in command line):
d:\tmp\org\your\package\name\Contract.java Everything seems fine, you should be able to create yours. I installed solc and web3j tools like described here: solc, web3j.
If you find any problem in deploying the contract using java then let me know I can guide you.
PF below code snippet for deploying the contract using java with Web3J: ClientTransactionManager transactionManager = new ClientTransactionManager(quorum, "0xed9d02e382b34818e88b88a309c7fe71e65f419d", Arrays.asList("ROAZBWtSacxXQrOe3FGAqJDyJjFePR5ce4TSIzmJ0Bc=", "UfNSeSGySeKg11DVNEnqrUtxYRVor4+CvluI8tVv62Y=", "R56gy4dn24YOjwyesTczYa8m5xhP6hF2uTMCju/1xkY=", "oNspPPgszVUFw0qmGFfWwh1uxVUXgvBxleXORHj07g8=", "1iTZde/ndBHvzhcl7V68x44Vx7pl8nwx9LqnM/AfJUg=", "QfeDAys9MPDs2XHExtc84jKGHxZg/aj52DTh0vtA3Xc="));
@SuppressWarnings("unchecked")
RemoteCall<ChequeChain> ft1 = ChequeChain.deploy(quorum, transactionManager, gasPrice, gasLimit);
String contractAddress = ft1.send().getContractAddress();
//"0xed9d02e382b34818e88b88a309c7fe71e65f419d" is the from address. //Arrays.asList is the privateFor argument that contains the public key of the nodes. You can specify //the specific keys as per your requirement.
Hi @anidhya latest truffle will fail on Quorum since we don't yet support latest solidity compiler. As you noticed, you can use Solidity up to v0.4.18 -- might need to downgrade truffle for that tho. Alternative that you point out also works, and finally, you may use Cakeshops built in IDE to do the same if you are okay running Quorum v1.0.