Skip to content

Commit

Permalink
Merge pull request #25 from tronprotocol/develop
Browse files Browse the repository at this point in the history
update main to 0.2.1
  • Loading branch information
Starsakary authored Aug 13, 2021
2 parents 06fd05f + 921fc70 commit 487eb63
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion trident-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ext {
}

allprojects {
version '0.2.0'
version '0.2.1'
group = 'org.tron.trident'

repositories {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1431,15 +1431,13 @@ private TransactionExtention callWithoutBroadcast(String ownerAddr, Contract cnt
* @param contractAddr smart contract address.
* @param function contract function.
* @return TransactionExtention.
* @throws RuntimeException if function cannot be found in the contract.
*/
public TransactionExtention constantCall(String ownerAddr, String contractAddr, Function function) {
Contract cntr = getContract(contractAddr);
if (isFuncInContract(cntr, function)) {
return callWithoutBroadcast(ownerAddr, cntr, function);
} else {
throw new RuntimeException("Function not found in the contract");
}

TransactionExtention txnExt = callWithoutBroadcast(ownerAddr, cntr, function);

return txnExt;
}

/**
Expand All @@ -1448,16 +1446,13 @@ public TransactionExtention constantCall(String ownerAddr, String contractAddr,
* @param contractAddr smart contract address
* @param function contract function
* @return transaction builder. Users may set other fields, e.g. feeLimit
* @throws RuntimeException if function cannot be found in the contract
*/
public TransactionBuilder triggerCall(String ownerAddr, String contractAddr, Function function) {
Contract cntr = getContract(contractAddr);
if (isFuncInContract(cntr, function)) {
TransactionExtention txnExt = callWithoutBroadcast(ownerAddr, cntr, function);
return new TransactionBuilder(txnExt.getTransaction());
} else {
throw new RuntimeException("Function not found in the contract");
}

TransactionExtention txnExt = callWithoutBroadcast(ownerAddr, cntr, function);

return new TransactionBuilder(txnExt.getTransaction());
}

}

0 comments on commit 487eb63

Please sign in to comment.