Skip to content

Commit 706e6be

Browse files
Merge pull request tronprotocol#2303 from tronprotocol/feature/add_TVMNewCommand_stest_back
Feature/add tvm new command stest back
2 parents 24575f0 + 5744c38 commit 706e6be

File tree

140 files changed

+33332
-40
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+33332
-40
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- checkout
1515
- run:
1616
name: multi_os_result
17-
command: curl http://60.205.215.34/Daily_Build_Task_Report
17+
command: echo "curl http://60.205.215.34/multi_os_result"
1818
#
1919
# - run:
2020
# name: Daily Build Report

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ nodeId.properties
5454
Wallet
5555

5656
# vm_trace
57-
/vm_trace/
57+
/vm_trace/

src/test/java/stest/tron/wallet/common/client/utils/HttpMethed.java

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import java.nio.charset.Charset;
99
import java.util.HashMap;
1010
import java.util.Map;
11-
1211
import lombok.extern.slf4j.Slf4j;
1312
import org.apache.http.HttpResponse;
1413
import org.apache.http.client.HttpClient;
@@ -2338,4 +2337,56 @@ public static String str2hex(String str) {
23382337
}
23392338
return sb.toString().trim();
23402339
}
2340+
2341+
2342+
/**
2343+
* constructor.
2344+
*/
2345+
public static HttpResponse triggerConstantContract(String httpNode, byte[] ownerAddress,
2346+
String contractAddress, String functionSelector, String parameter) {
2347+
try {
2348+
final String requestUrl = "http://" + httpNode + "/wallet/triggerconstantcontract";
2349+
JsonObject userBaseObj2 = new JsonObject();
2350+
userBaseObj2.addProperty("owner_address", ByteArray.toHexString(ownerAddress));
2351+
userBaseObj2.addProperty("contract_address", contractAddress);
2352+
userBaseObj2.addProperty("function_selector", functionSelector);
2353+
userBaseObj2.addProperty("parameter", parameter);
2354+
response = createConnect(requestUrl, userBaseObj2);
2355+
return response;
2356+
} catch (Exception e) {
2357+
e.printStackTrace();
2358+
httppost.releaseConnection();
2359+
return null;
2360+
}
2361+
}
2362+
2363+
2364+
/**
2365+
* constructor.
2366+
*/
2367+
public static HttpResponse clearABiGetTxid(String httpNode, byte[] ownerAddress,
2368+
String contractAddress, String fromKey) {
2369+
try {
2370+
final String requestUrl = "http://" + httpNode + "/wallet/clearabi";
2371+
JsonObject userBaseObj2 = new JsonObject();
2372+
userBaseObj2.addProperty("owner_address", ByteArray.toHexString(ownerAddress));
2373+
userBaseObj2.addProperty("contract_address", contractAddress);
2374+
response = createConnect(requestUrl, userBaseObj2);
2375+
transactionString = EntityUtils.toString(response.getEntity());
2376+
logger.info(transactionString);
2377+
2378+
transactionSignString = gettransactionsign(httpNode, transactionString, fromKey);
2379+
2380+
logger.info(transactionSignString);
2381+
response = broadcastTransaction(httpNode, transactionSignString);
2382+
2383+
2384+
} catch (Exception e) {
2385+
e.printStackTrace();
2386+
httppost.releaseConnection();
2387+
return null;
2388+
}
2389+
return response;
2390+
}
2391+
23412392
}

0 commit comments

Comments
 (0)