-
Notifications
You must be signed in to change notification settings - Fork 90
/
transaction_application.go
67 lines (56 loc) · 2.98 KB
/
transaction_application.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
package models
// TransactionApplication fields for application transactions.
// Definition:
// data/transactions/application.go : ApplicationCallTxnFields
type TransactionApplication struct {
// Accounts (apat) List of accounts in addition to the sender that may be accessed
// from the application's approval-program and clear-state-program.
Accounts []string `json:"accounts,omitempty"`
// ApplicationArgs (apaa) transaction specific arguments accessed from the
// application's approval-program and clear-state-program.
ApplicationArgs [][]byte `json:"application-args,omitempty"`
// ApplicationId (apid) ID of the application being configured or empty if
// creating.
ApplicationId uint64 `json:"application-id"`
// ApprovalProgram (apap) Logic executed for every application transaction, except
// when on-completion is set to "clear". It can read and write global state for the
// application, as well as account-specific local state. Approval programs may
// reject the transaction.
ApprovalProgram []byte `json:"approval-program,omitempty"`
// ClearStateProgram (apsu) Logic executed for application transactions with
// on-completion set to "clear". It can read and write global state for the
// application, as well as account-specific local state. Clear state programs
// cannot reject the transaction.
ClearStateProgram []byte `json:"clear-state-program,omitempty"`
// ExtraProgramPages (epp) specifies the additional app program len requested in
// pages.
ExtraProgramPages uint64 `json:"extra-program-pages,omitempty"`
// ForeignApps (apfa) Lists the applications in addition to the application-id
// whose global states may be accessed by this application's approval-program and
// clear-state-program. The access is read-only.
ForeignApps []uint64 `json:"foreign-apps,omitempty"`
// ForeignAssets (apas) lists the assets whose parameters may be accessed by this
// application's ApprovalProgram and ClearStateProgram. The access is read-only.
ForeignAssets []uint64 `json:"foreign-assets,omitempty"`
// GlobalStateSchema represents a (apls) local-state or (apgs) global-state schema.
// These schemas determine how much storage may be used in a local-state or
// global-state for an application. The more space used, the larger minimum balance
// must be maintained in the account holding the data.
GlobalStateSchema StateSchema `json:"global-state-schema,omitempty"`
// LocalStateSchema represents a (apls) local-state or (apgs) global-state schema.
// These schemas determine how much storage may be used in a local-state or
// global-state for an application. The more space used, the larger minimum balance
// must be maintained in the account holding the data.
LocalStateSchema StateSchema `json:"local-state-schema,omitempty"`
// OnCompletion (apan) defines the what additional actions occur with the
// transaction.
// Valid types:
// * noop
// * optin
// * closeout
// * clear
// * update
// * update
// * delete
OnCompletion string `json:"on-completion,omitempty"`
}