Skip to content

Instantly share code, notes, and snippets.

@ShoaibKakal
Created September 25, 2022 07:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ShoaibKakal/897b0c55bb924538e93fb8644018d746 to your computer and use it in GitHub Desktop.
Save ShoaibKakal/897b0c55bb924538e93fb8644018d746 to your computer and use it in GitHub Desktop.
package com.example.quizdapp.data;
import org.web3j.abi.datatypes.Bool;
import org.web3j.abi.datatypes.DynamicStruct;
import org.web3j.abi.datatypes.Utf8String;
public class Question extends DynamicStruct {
private String question;
private Boolean isTrue;
public Question(String question, Boolean isTrue) {
super(new Utf8String(question), new Bool(isTrue));
this.question = question;
this.isTrue = isTrue;
}
public Question(Utf8String question, Bool isTrue) {
super(question, isTrue);
this.question = question.getValue();
this.isTrue = isTrue.getValue();
}
public String getQuestion() {
return question;
}
public void setQuestion(String question) {
this.question = question;
}
public Boolean getTrue() {
return isTrue;
}
public void setTrue(Boolean aTrue) {
isTrue = aTrue;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment