add readme

This commit is contained in:
CaiHQ
2021-12-07 17:00:03 +08:00
parent e28d52aba0
commit a536e8e11f
4 changed files with 37 additions and 16 deletions

View File

@@ -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");
}
}