io.everitoken.sdk.java.abi.AbiToBin Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of chain-sdk Show documentation
Show all versions of chain-sdk Show documentation
Official Java SDK for everiToken public chain. https://www.everitoken.io
package io.everitoken.sdk.java.abi;
import org.jetbrains.annotations.NotNull;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
class AbiToBin {
private final String action;
private final T args;
AbiToBin(@NotNull String action, @NotNull T args) {
this.action = action;
this.args = args;
}
public static String pack(String name, JSONObject args) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("action", name);
jsonObject.put("args", args);
return jsonObject.toString();
}
public String getAction() {
return action;
}
@JSONField(ordinal = 1)
public T getArgs() {
return args;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy