allow
The allow decorators are used to specify when specific OnComplete operations are allowed after logic evaluation.
The OnComplete can be allowed on applicaiton creation via @allow.create or on non-create calls via @allow.call
By defualt, all methods are allowed to be called with the NoOp OnComplete (@allow.call('NoOp')). Once a single @allow decorator is used, @allow.call(NoOp) must be explicitly set if it is desired.
Example
\@allow.create('OptIn') // Allow the creator to use this method to create the application and opt in at the same time\@allow.call('OptIn') // Also allow anyone to call this method to opt infoo() {Constructors
new allow()
new allow():
allow
Returns
Methods
bareCall()
staticbareCall(onComplete):decorator
When no the contract is called without an ABI method selector, allow this method logic to be evaluated for the given OnComplete
Parameters
• onComplete: "NoOp" | "OptIn" | "CloseOut" | "ClearState" | "UpdateApplication" | "DeleteApplication"
Returns
Source
bareCreate()
staticbareCreate(onComplete):decorator
When the contract is created without an ABI method selector, allow this method logic to be evaluated for the given OnComplete
Parameters
• onComplete: "NoOp" | "OptIn" | "CloseOut" | "ClearState" | "UpdateApplication" | "DeleteApplication"= 'NoOp'
Returns
Source
call()
staticcall(onComplete):decorator
Specify an allowed OnComplete when the method is called
Parameters
• onComplete: "NoOp" | "OptIn" | "CloseOut" | "ClearState" | "UpdateApplication" | "DeleteApplication"
Returns
Source
create()
staticcreate(onComplete):decorator
Specify an allowed OnComplete when the method is used for contract creation
Parameters
• onComplete: "NoOp" | "OptIn" | "CloseOut" | "ClearState" | "UpdateApplication" | "DeleteApplication"= 'NoOp'