Skip to content

Commit

Permalink
<fix>(sdkBean): fix gm bin usage. (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyonRay authored Nov 24, 2021
1 parent 3062cde commit 5f00be9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/main/java/org/example/demo/config/SdkBeanConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import org.fisco.bcos.sdk.client.Client;
import org.fisco.bcos.sdk.config.ConfigOption;
import org.fisco.bcos.sdk.config.model.ConfigProperty;
import org.fisco.bcos.sdk.model.CryptoType;
import org.fisco.bcos.sdk.model.TransactionReceipt;
import org.fisco.bcos.sdk.transaction.manager.AssembleTransactionProcessor;
import org.fisco.bcos.sdk.transaction.manager.TransactionProcessorFactory;
Expand Down Expand Up @@ -60,7 +61,10 @@ private String deploy(Client client) throws Exception {
TransactionProcessorFactory.createAssembleTransactionProcessor(
client, client.getCryptoSuite().getCryptoKeyPair());
String abi = ContractConstants.HelloWorldAbi;
String bin = ContractConstants.HelloWorldBinary;
String bin =
(client.getCryptoSuite().getCryptoTypeConfig() == CryptoType.ECDSA_TYPE)
? ContractConstants.HelloWorldBinary
: ContractConstants.HelloWorldGmBinary;
TransactionReceipt receipt =
txProcessor.deployAndGetResponse(abi, bin, Arrays.asList()).getTransactionReceipt();
if (receipt.isStatusOK()) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cryptoMaterial.useSMCrypto=false
network.peers[0]=127.0.0.1:20200

### System configuration
system.groupId=group
system.groupName=group

### Springboot configuration
server.port=8080
Expand Down

0 comments on commit 5f00be9

Please sign in to comment.