|
|
@@ -42,7 +42,7 @@ public class ContractSample extends SampleBase { |
|
|
|
BlockchainKeypair contractAccount = BlockchainKeyGenerator.getInstance().generate(); |
|
|
|
System.out.println("合约地址:" + contractAccount.getAddress()); |
|
|
|
// 部署合约 |
|
|
|
txTemp.contracts().deploy(contractAccount.getIdentity(), FileUtils.readBytes("src/main/resources/contract-samples-1.5.0.RELEASE.car")); |
|
|
|
txTemp.contracts().deploy(contractAccount.getIdentity(), FileUtils.readBytes("src/main/resources/contract-samples-1.6.0.RELEASE.car")); |
|
|
|
// 准备交易 |
|
|
|
PreparedTransaction ptx = txTemp.prepare(); |
|
|
|
// 提交交易 |
|
|
@@ -63,7 +63,7 @@ public class ContractSample extends SampleBase { |
|
|
|
BlockchainIdentity contractIdentity = new BlockchainIdentityData(KeyGenUtils.decodePubKey("7VeRCfSaoBW3uRuvTqVb26PYTNwvQ1iZ5HBY92YKpEVN7Qht")); |
|
|
|
System.out.println("合约地址:" + contractIdentity.getAddress()); |
|
|
|
// 部署合约 |
|
|
|
txTemp.contracts().deploy(contractIdentity, FileUtils.readBytes("src/main/resources/contract-samples-1.5.0.RELEASE.car")); |
|
|
|
txTemp.contracts().deploy(contractIdentity, FileUtils.readBytes("src/main/resources/contract-samples-1.6.0.RELEASE.car")); |
|
|
|
// 准备交易 |
|
|
|
PreparedTransaction ptx = txTemp.prepare(); |
|
|
|
// 提交交易 |
|
|
|