com.casper.sdk.model.entity.contract.ByteCode Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of casper-java-sdk Show documentation
Show all versions of casper-java-sdk Show documentation
SDK to streamline the 3rd party Java client integration processes. Such 3rd parties include exchanges & app developers.
The newest version!
package com.casper.sdk.model.entity.contract;
import com.casper.sdk.model.key.Tag;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.*;
/**
* A container for contract's Wasm bytes
*
* @author [email protected]
*/
@Getter
@Setter
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class ByteCode {
/** The type of Byte code */
@JsonProperty("kind")
private ByteCodes kind;
/** Byte code */
@JsonProperty("bytes")
private String bytes;
public enum ByteCodes implements Tag {
/** Empty byte code */
Empty(0),
/** Byte code to be executed with the version 1 Casper execution engine */
V1CasperWasm(1);
private final byte tag;
ByteCodes(final int tag) {
this.tag = (byte) tag;
}
@Override
public byte getByteTag() {
return tag;
}
}
}