This is the stateful Hello World of Accord Project Templates. Executing the clause will simply echo back the text that occurs after the string `Hello` prepended to text that is passed in the request along with the number of times the clause has been called.
Hello World State
This is the stateful Hello World of Accord Project Templates. Executing the clause will simply echo back the text that occurs after the string Hello
prepended to text that is passed in the request along with the number of times the clause has been called.
Name of the person to greet: "Fred Blogs".
Thank you!
Name of the person to greet: "Fred Blogs".
Thank you!
Name of the person to greet: {{name}}.
Thank you!
{
"$class": "org.accordproject.helloworldstate.HelloWorldClause",
"name": "Fred Blogs",
"clauseId": "33f27805-77c4-4a97-95b5-d2ba0a23dc3e"
}
namespace org.accordproject.helloworldstate
import org.accordproject.cicero.contract.* from https://models.accordproject.org/cicero/contract.cto
import org.accordproject.cicero.runtime.* from https://models.accordproject.org/cicero/runtime.cto
transaction MyRequest extends Request {
o String input
}
transaction MyResponse extends Response {
o String output
}
asset HelloWorldState extends AccordContractState {
o Double counter
}
/**
* The template model
*/
asset HelloWorldClause extends AccordClause {
/**
* The name for the clause
*/
o String name
}