You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use the offline transfer function,the code as follow:
`static void transferOffline() throws Exception{
// --- get the current state of blockchain
EosApi eosApi = EosApiFactory.create("http://192.168.1.75:8888");
SignArg arg = eosApi.getSignArg(120);
System.out.println(eosApi.getObjectMapper().writeValueAsString(arg));
// --- sign the transation of token tansfer
String privateKey = "5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3";//replace the real private key
String from1 = "acca";
String to1 = "accb";
String quantity = "100 SYS";
String memo = "sent by eos sdk";
LocalApi localApi = EosApiFactory.createLocalApi();
PushTransactionRequest req = localApi.transfer(arg, privateKey, from1, to1, quantity, memo);
System.out.println(localApi.getObjectMapper().writeValueAsString(req));
// --- push the signed-transaction to the blockchain
PushedTransaction pts = eosApi.pushTransaction(req);
System.out.println(localApi.getObjectMapper().writeValueAsString(pts));
}`
But it report error as follow: Exception in thread "main" io.jafka.jeos.exception.EosApiException: Internal Service Error: eosio_assert_message assertion failure at io.jafka.jeos.impl.EosApiServiceGenerator.executeSync(EosApiServiceGenerator.java:61) at io.jafka.jeos.impl.EosApiRestClientImpl.pushTransaction(EosApiRestClientImpl.java:131) at org.web3j.sample.TestEOS.transferOffline(TestEOS.java:129) at org.web3j.sample.TestEOS.main(TestEOS.java:50) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
I can use offline transfer function with another SDK eos4j-1.0.2.jar.I think there are something wrong with
this SDK.Please help!
The text was updated successfully, but these errors were encountered:
I use the offline transfer function,the code as follow:
`static void transferOffline() throws Exception{
// --- get the current state of blockchain
EosApi eosApi = EosApiFactory.create("http://192.168.1.75:8888");
SignArg arg = eosApi.getSignArg(120);
System.out.println(eosApi.getObjectMapper().writeValueAsString(arg));
But it report error as follow:
Exception in thread "main" io.jafka.jeos.exception.EosApiException: Internal Service Error: eosio_assert_message assertion failure at io.jafka.jeos.impl.EosApiServiceGenerator.executeSync(EosApiServiceGenerator.java:61) at io.jafka.jeos.impl.EosApiRestClientImpl.pushTransaction(EosApiRestClientImpl.java:131) at org.web3j.sample.TestEOS.transferOffline(TestEOS.java:129) at org.web3j.sample.TestEOS.main(TestEOS.java:50) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
I can use offline transfer function with another SDK eos4j-1.0.2.jar.I think there are something wrong with
this SDK.Please help!
The text was updated successfully, but these errors were encountered: