mirror of
https://gitee.com/BDWare/contract-java-example.git
synced 2026-01-29 08:49:30 +00:00
add readme
This commit is contained in:
@@ -1,12 +1,26 @@
|
||||
package org.bdware.sc.contractexample;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.bdware.sc.ContractProcess;
|
||||
import org.bdware.sc.boundry.JavaScriptEntry;
|
||||
|
||||
public class Hello{
|
||||
public class Hello {
|
||||
private static final Logger LOGGER = LogManager.getLogger(Hello.class);
|
||||
|
||||
public static void main(String[]args){
|
||||
public static void main(String[] args) {
|
||||
LOGGER.info("abc");
|
||||
}
|
||||
public static String call(){return "hello..dafdskf";}
|
||||
|
||||
public static String call() {
|
||||
return "hello..dafdskf";
|
||||
}
|
||||
|
||||
public static String callYJSInSameCP() {
|
||||
return ContractProcess.instance.executeContract("{\"action\":\"getOwner\"\",\"arg\":\"\"}");
|
||||
}
|
||||
|
||||
public static Object callYJSInOtherCP() {
|
||||
return JavaScriptEntry.executeContract("cid", "action", "arg");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user