Skip to content

Contracts

UrsZeidler edited this page Mar 19, 2016 · 12 revisions

Contracts

The basic profile for solidity dapps.

Library

Defines class a a library.

extends ===> :Class

Contract

A class tagged with this stereotype will be generated as a contract.

extends ===> :Class

name type doc
ConstructorCode String Code for the contructor.
ConstructorArgs String The arguments of the constructor.

Struct

A class tagged with this stereotype will be generated as a struct. So normally it is models as an inner class.

extends ===> :Class

Function

An operation will be rendered as function with the functionCode value as code.

extends ===> :Operation

name type doc
functionCode String you could add the code also here
returnType FunctionType the return type of the function
modifier Constraint Applies the constrain an a modifier to the method.

Delegate

Let the generator produce delegate operations defined in the type of the property.

extends ===> :Property

Event

An operation tagged as Event will define an Event in the Contract.

extends ===> :Operation

Mapping

Defines the mapping type. The value is defined by the 'value' property.

extends ===> :Property

name type doc
value Classifier Define the value of the map.

GetterSetter

Creates a getter and/or setter for an tagged property.

extends ===> :Property

name type doc
getter Boolean Set to true will generate a getter method.
setter Boolean Set to true generates a setter method for the property.

StandardizedContractAPI

An interface tagged by this stereotype define an SCA. A contract implementing such an interface will take only the defines methods and not explicitly inherited this interface.

extends ===> :Interface

Const

Defines a return parameter as constant.

extends ===> :Property

Import

Defines an import for this model. It links the package to import.

extends ===> :Import

name type doc
importFilter String A filter for the imports.

Clone this wiki locally