All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.casper.sdk.model.entity.contract.ByteCode Maven / Gradle / Ivy

Go to download

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

    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy