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 {
    private static final Logger LOGGER = LogManager.getLogger(Hello.class);

    public static void main(String[] args) {
        LOGGER.info("abc");
    }

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