Contract
Constructors
new Contract()
new Contract():
Contract
Returns
Properties
app
app:
AppID
Source
itxn
itxn:
ItxnParams
Source
lastInnerGroup
lastInnerGroup:
Txn
[]
Provides access to the transactions in the most recent inner transaction group send via pendingGroup
Source
pendingGroup
pendingGroup:
PendingGroup
Source
programVersion
programVersion:
number
=9
The program version to use in the generated TEAL. This is the number used in the “#pragma version” directive
Source
txn
txn:
ThisTxnParams
Source
txnGroup
txnGroup:
Txn
[]
Source
approvalProgram
static
approvalProgram: () =>Brand
<string
,"bytes"
>
Returns
Brand
<string
, "bytes"
>
Source
clearProgram
static
clearProgram: () =>Brand
<string
,"bytes"
>
Returns
Brand
<string
, "bytes"
>
Source
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
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
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
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
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
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
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
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