Skip to content

Contract

Constructors

new Contract()

new Contract(): Contract

Returns

Contract

Properties

app

app: AppID

Source

src/lib/contract.ts:80


itxn

itxn: ItxnParams

Source

src/lib/contract.ts:71


lastInnerGroup

lastInnerGroup: Txn[]

Provides access to the transactions in the most recent inner transaction group send via pendingGroup

Source

src/lib/contract.ts:78


pendingGroup

pendingGroup: PendingGroup

Source

src/lib/contract.ts:82


programVersion

programVersion: number = 9

The program version to use in the generated TEAL. This is the number used in the “#pragma version” directive

Source

src/lib/contract.ts:69


txn

txn: ThisTxnParams

Source

src/lib/contract.ts:73


txnGroup

txnGroup: Txn[]

Source

src/lib/contract.ts:75


approvalProgram

static approvalProgram: () => Brand<string, "bytes">

Returns

Brand<string, "bytes">

Source

src/lib/contract.ts:53


clearProgram

static clearProgram: () => Brand<string, "bytes">

Returns

Brand<string, "bytes">

Source

src/lib/contract.ts:55


extend

static extend: <T>(…types) => Polytype.ClusteredConstructor<T>

Create a contract class that inherits from the given contracts. Inheritance is in order of arguments.

Type parameters

T extends NonEmptyArray<SuperConstructor>

Parameters

• …types: T

Returns

Polytype.ClusteredConstructor<T>

Source

src/lib/contract.ts:51


schema

static schema: Object

schema.global

global: Object

schema.global.numByteSlice

numByteSlice: number

schema.global.numUint

numUint: number

schema.local

local: Object

schema.local.numByteSlice

numByteSlice: number

schema.local.numUint

numUint: number

Source

src/lib/contract.ts:57

Methods

clearState()

clearState(): void

The method called when an account clears their local state. The default ClearState method does nothing. ClearState will always allow a user to delete their local state, reagrdless of logic.

Returns

void

Source

src/lib/contract.ts:132


closeOutOfApplication()

closeOutOfApplication(…args): void

The method called when an account closes out their local state. The default close-out method will always throw an error

Parameters

• …args: any[]

Returns

void

Source

src/lib/contract.ts:123


createApplication()

createApplication(…args): void

The method called when creating the application. The default create method will allow the contract to be created via a bare NoOp appcall and throw an error if called with any arguments.

Parameters

• …args: any[]

Returns

void

Source

src/lib/contract.ts:89


deleteApplication()

deleteApplication(…args): void

The method called when attempting to delete the application. The default delete method will always throw an error

Parameters

• …args: any[]

Returns

void

Source

src/lib/contract.ts:107


optInToApplication()

optInToApplication(…args): void

The method called when an account opts-in to the application. The default opt-in method will always throw an error

Parameters

• …args: any[]

Returns

void

Source

src/lib/contract.ts:115


updateApplication()

updateApplication(…args): void

The method called when attempting to update the application. The default update method will always throw an error

Parameters

• …args: any[]

Returns

void

Source

src/lib/contract.ts:99