Hello World
This is the 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.
This is the 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.
This is the 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.
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.helloworld.HelloWorldClause",
"clauseId": "a8bd5284-345e-4b49-ac64-4445463c8f3f",
"name": "Fred Blogs"
}
namespace org.accordproject.helloworld
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
}
/**
* The template model
*/
asset HelloWorldClause extends AccordClause {
/**
* The name for the clause
*/
o String name
}
// this is a change!
Find the full logic for this template on on GitHub.
Type | Sample JSON |
---|---|
org.accordproject.cicero.contract.AccordContractState |
|
Type | Sample JSON |
---|---|
org.accordproject.helloworld.MyRequest |
|
Type | Sample JSON |
---|---|
org.accordproject.helloworld.MyResponse |
|
Type | Sample JSON |
---|---|
org.accordproject.base.Event |
|
Please refer to the Cicero documentation for details and examples of how to integrate a call to a Cicero template into your application.
View the Latest code for this template on GitHub.