Skip to content

[feature] define bounds in contract #26

@RiedleroD

Description

@RiedleroD

for example:

final random = contract('Random')
  .impl('number', returnType: PrimitiveType.DOUBLE, returnBounds: [0.0, 1.0])
    .param('seed', PrimitiveType.INT, bounds: [0, 2**32])
  .end()
  .hook('onReady')
    .param('user', PrimitiveType.STRING, minlength=2, maxlength=13)
  .end()
  .build();

the exact impl is not that important, but having an easy way to limit the values that go through the contract would be very neat indeed.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestruntimeThis issue is related to the runtime

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions