Skip to content

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 in
foo() {

Constructors

new allow()

new allow(): allow

Returns

allow

Methods

bareCall()

static bareCall(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

decorator

Source

types/global.d.ts:1337


bareCreate()

static bareCreate(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

decorator

Source

types/global.d.ts:1342


call()

static call(onComplete): decorator

Specify an allowed OnComplete when the method is called

Parameters

onComplete: "NoOp" | "OptIn" | "CloseOut" | "ClearState" | "UpdateApplication" | "DeleteApplication"

Returns

decorator

Source

types/global.d.ts:1327


create()

static create(onComplete): decorator

Specify an allowed OnComplete when the method is used for contract creation

Parameters

onComplete: "NoOp" | "OptIn" | "CloseOut" | "ClearState" | "UpdateApplication" | "DeleteApplication"= 'NoOp'

Returns

decorator

Source

types/global.d.ts:1332