Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
package com.helloBlock.states;
import com.helloBlock.contracts.helloBlockContract;
import net.corda.core.contracts.BelongsToContract;
import net.corda.core.contracts.ContractState;
import net.corda.core.identity.AbstractParty;
import net.corda.core.serialization.ConstructorForDeserialization;
import net.corda.core.serialization.CordaSerializable;
import java.util.List;
public class helloBlockState implements ContractState {
public AbstractParty origin;
public AbstractParty target;
public String helloBlock;
public AbstractParty getOrigin() {
return origin;
public AbstractParty getTarget() {
return target;
public String getHelloBlock() { return helloBlock; }
public helloBlockState(AbstractParty origin, AbstractParty target, String helloBlock){
this.origin = origin; = target;
this.helloBlock = helloBlock;
public helloBlockState(AbstractParty origin, AbstractParty target){
this(origin,target,"Hello, Block!");
public String toString(){
return origin.nameOrNull() + "helloBlock";
public List<AbstractParty> getParticipants() {
return ImmutableList.of(target);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment