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.
for example:
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.