Module: TEALrb::TxnFields

Included in:
GroupTxn, ThisTxn
Defined in:
lib/tealrb/txn_fields.rb

Instance Method Summary collapse

Instance Method Details

#accounts(*args) ⇒ []byte

Returns Accounts listed in the ApplicationCall transaction (v2).

Returns:

  • ([]byte)

    Accounts listed in the ApplicationCall transaction (v2)



152
153
154
# File 'lib/tealrb/txn_fields.rb', line 152

def accounts(*args)
  txnfield_opcode('Accounts', *args)
end

#amount(*args) ⇒ uint64

Returns microalgos (v1).

Returns:

  • (uint64)

    microalgos (v1)



50
51
52
# File 'lib/tealrb/txn_fields.rb', line 50

def amount(*args)
  txnfield_opcode('Amount', *args)
end

#application_args(*args) ⇒ []byte

Returns Arguments passed to the application in the ApplicationCall transaction (v2).

Returns:

  • ([]byte)

    Arguments passed to the application in the ApplicationCall transaction (v2)



142
143
144
# File 'lib/tealrb/txn_fields.rb', line 142

def application_args(*args)
  txnfield_opcode('ApplicationArgs', *args)
end

#application_id(*args) ⇒ uint64

Returns ApplicationID from ApplicationCall transaction (v2).

Returns:

  • (uint64)

    ApplicationID from ApplicationCall transaction (v2)



132
133
134
# File 'lib/tealrb/txn_fields.rb', line 132

def application_id(*args)
  @contract.app txnfield_opcode('ApplicationID', *args)
end

#applications(*args) ⇒ uint64

Returns Foreign Apps listed in the ApplicationCall transaction (v3).

Returns:

  • (uint64)

    Foreign Apps listed in the ApplicationCall transaction (v3)



262
263
264
# File 'lib/tealrb/txn_fields.rb', line 262

def applications(*args)
  txnfield_opcode('Applications', *args)
end

#approval_program(*args) ⇒ []byte

Returns Approval program (v2).

Returns:

  • ([]byte)

    Approval program (v2)



162
163
164
# File 'lib/tealrb/txn_fields.rb', line 162

def approval_program(*args)
  txnfield_opcode('ApprovalProgram', *args)
end

#asset_amount(*args) ⇒ uint64

Returns value in Asset’s units (v1).

Returns:

  • (uint64)

    value in Asset’s units (v1)



100
101
102
# File 'lib/tealrb/txn_fields.rb', line 100

def asset_amount(*args)
  txnfield_opcode('AssetAmount', *args)
end

#asset_close_to(*args) ⇒ []byte

Returns 32 byte address (v1).

Returns:

  • ([]byte)

    32 byte address (v1)



116
117
118
# File 'lib/tealrb/txn_fields.rb', line 116

def asset_close_to(*args)
  @contract. txnfield_opcode('AssetCloseTo', *args)
end

#asset_receiver(*args) ⇒ []byte

Returns 32 byte address (v1).

Returns:

  • ([]byte)

    32 byte address (v1)



111
112
113
# File 'lib/tealrb/txn_fields.rb', line 111

def asset_receiver(*args)
  @contract. txnfield_opcode('AssetReceiver', *args)
end

#asset_sender(*args) ⇒ []byte

Returns 32 byte address. Causes clawback of all value of asset from AssetSender if Sender is the Clawback address of the asset. (v1).

Returns:

  • ([]byte)

    32 byte address. Causes clawback of all value of asset from AssetSender if Sender is the Clawback address of the asset. (v1)



106
107
108
# File 'lib/tealrb/txn_fields.rb', line 106

def asset_sender(*args)
  @contract. txnfield_opcode('AssetSender', *args)
end

#assets(*args) ⇒ uint64

Returns Foreign Assets listed in the ApplicationCall transaction (v3).

Returns:

  • (uint64)

    Foreign Assets listed in the ApplicationCall transaction (v3)



252
253
254
# File 'lib/tealrb/txn_fields.rb', line 252

def assets(*args)
  txnfield_opcode('Assets', *args)
end

#clear_state_program(*args) ⇒ []byte

Returns Clear state program (v2).

Returns:

  • ([]byte)

    Clear state program (v2)



167
168
169
# File 'lib/tealrb/txn_fields.rb', line 167

def clear_state_program(*args)
  txnfield_opcode('ClearStateProgram', *args)
end

#close_remainder_to(*args) ⇒ []byte

Returns 32 byte address (v1).

Returns:

  • ([]byte)

    32 byte address (v1)



55
56
57
# File 'lib/tealrb/txn_fields.rb', line 55

def close_remainder_to(*args)
  @contract. txnfield_opcode('CloseRemainderTo', *args)
end

#config_asset(*args) ⇒ uint64

Returns Asset ID in asset config transaction (v2).

Returns:

  • (uint64)

    Asset ID in asset config transaction (v2)



177
178
179
# File 'lib/tealrb/txn_fields.rb', line 177

def config_asset(*args)
  @contract.asset txnfield_opcode('ConfigAsset', *args)
end

#config_asset_clawback(*args) ⇒ []byte

Returns 32 byte address (v2).

Returns:

  • ([]byte)

    32 byte address (v2)



232
233
234
# File 'lib/tealrb/txn_fields.rb', line 232

def config_asset_clawback(*args)
  @contract. txnfield_opcode('ConfigAssetClawback', *args)
end

#config_asset_decimals(*args) ⇒ uint64

Returns Number of digits to display after the decimal place when displaying the asset (v2).

Returns:

  • (uint64)

    Number of digits to display after the decimal place when displaying the asset (v2)



187
188
189
# File 'lib/tealrb/txn_fields.rb', line 187

def config_asset_decimals(*args)
  txnfield_opcode('ConfigAssetDecimals', *args)
end

#config_asset_default_frozen(*args) ⇒ uint64

Returns Whether the asset’s slots are frozen by default or not, 0 or 1 (v2).

Returns:

  • (uint64)

    Whether the asset’s slots are frozen by default or not, 0 or 1 (v2)



192
193
194
# File 'lib/tealrb/txn_fields.rb', line 192

def config_asset_default_frozen(*args)
  txnfield_opcode('ConfigAssetDefaultFrozen', *args)
end

#config_asset_freeze(*args) ⇒ []byte

Returns 32 byte address (v2).

Returns:

  • ([]byte)

    32 byte address (v2)



227
228
229
# File 'lib/tealrb/txn_fields.rb', line 227

def config_asset_freeze(*args)
  @contract. txnfield_opcode('ConfigAssetFreeze', *args)
end

#config_asset_manager(*args) ⇒ []byte

Returns 32 byte address (v2).

Returns:

  • ([]byte)

    32 byte address (v2)



217
218
219
# File 'lib/tealrb/txn_fields.rb', line 217

def config_asset_manager(*args)
  @contract. txnfield_opcode('ConfigAssetManager', *args)
end

#config_asset_metadata_hash(*args) ⇒ []byte

Returns 32 byte commitment to some unspecified asset metadata (v2).

Returns:

  • ([]byte)

    32 byte commitment to some unspecified asset metadata (v2)



212
213
214
# File 'lib/tealrb/txn_fields.rb', line 212

def (*args)
  txnfield_opcode('ConfigAssetMetadataHash', *args)
end

#config_asset_name(*args) ⇒ []byte

Returns The asset name (v2).

Returns:

  • ([]byte)

    The asset name (v2)



202
203
204
# File 'lib/tealrb/txn_fields.rb', line 202

def config_asset_name(*args)
  txnfield_opcode('ConfigAssetName', *args)
end

#config_asset_reserve(*args) ⇒ []byte

Returns 32 byte address (v2).

Returns:

  • ([]byte)

    32 byte address (v2)



222
223
224
# File 'lib/tealrb/txn_fields.rb', line 222

def config_asset_reserve(*args)
  @contract. txnfield_opcode('ConfigAssetReserve', *args)
end

#config_asset_total(*args) ⇒ uint64

Returns Total number of units of this asset created (v2).

Returns:

  • (uint64)

    Total number of units of this asset created (v2)



182
183
184
# File 'lib/tealrb/txn_fields.rb', line 182

def config_asset_total(*args)
  txnfield_opcode('ConfigAssetTotal', *args)
end

#config_asset_unit_name(*args) ⇒ []byte

Returns Unit name of the asset (v2).

Returns:

  • ([]byte)

    Unit name of the asset (v2)



197
198
199
# File 'lib/tealrb/txn_fields.rb', line 197

def config_asset_unit_name(*args)
  txnfield_opcode('ConfigAssetUnitName', *args)
end

#config_asset_url(*args) ⇒ []byte

Returns URL (v2).

Returns:

  • ([]byte)

    URL (v2)



207
208
209
# File 'lib/tealrb/txn_fields.rb', line 207

def config_asset_url(*args)
  txnfield_opcode('ConfigAssetURL', *args)
end

#created_application_id(*args) ⇒ uint64

Returns ApplicationID allocated by the creation of an application (only with itxn in v5). Application mode only (v5).

Returns:

  • (uint64)

    ApplicationID allocated by the creation of an application (only with itxn in v5). Application mode only (v5)



319
320
321
# File 'lib/tealrb/txn_fields.rb', line 319

def created_application_id(*args)
  @contract.app txnfield_opcode('CreatedApplicationID', *args)
end

#created_asset_id(*args) ⇒ uint64

Returns Asset ID allocated by the creation of an ASA (only with itxn in v5). Application mode only (v5).

Returns:

  • (uint64)

    Asset ID allocated by the creation of an ASA (only with itxn in v5). Application mode only (v5)



313
314
315
# File 'lib/tealrb/txn_fields.rb', line 313

def created_asset_id(*args)
  @contract.asset txnfield_opcode('CreatedAssetID', *args)
end

#extra_program_pages(*args) ⇒ uint64

Returns Number of additional pages for each of the application’s approval and clear state programs. An ExtraProgramPages of 1 means 2048 more total bytes, or 1024 for each program. (v4).

Returns:

  • (uint64)

    Number of additional pages for each of the application’s approval and clear state programs. An ExtraProgramPages of 1 means 2048 more total bytes, or 1024 for each program. (v4)



293
294
295
# File 'lib/tealrb/txn_fields.rb', line 293

def extra_program_pages(*args)
  txnfield_opcode('ExtraProgramPages', *args)
end

#fee(*args) ⇒ uint64

Returns microalgos (v1).

Returns:

  • (uint64)

    microalgos (v1)



15
16
17
# File 'lib/tealrb/txn_fields.rb', line 15

def fee(*args)
  txnfield_opcode('Fee', *args)
end

#first_valid(*args) ⇒ uint64

Returns round number (v1).

Returns:

  • (uint64)

    round number (v1)



20
21
22
# File 'lib/tealrb/txn_fields.rb', line 20

def first_valid(*args)
  txnfield_opcode('FirstValid', *args)
end

#first_valid_time(*args) ⇒ uint64

Returns Causes program to fail; reserved for future use (v1).

Returns:

  • (uint64)

    Causes program to fail; reserved for future use (v1)



25
26
27
# File 'lib/tealrb/txn_fields.rb', line 25

def first_valid_time(*args)
  txnfield_opcode('FirstValidTime', *args)
end

#freeze_asset(*args) ⇒ uint64

Returns Asset ID being frozen or un-frozen (v2).

Returns:

  • (uint64)

    Asset ID being frozen or un-frozen (v2)



237
238
239
# File 'lib/tealrb/txn_fields.rb', line 237

def freeze_asset(*args)
  @contract.asset txnfield_opcode('FreezeAsset', *args)
end

#freeze_asset_account(*args) ⇒ []byte

Returns 32 byte address of the account whose asset slot is being frozen or un-frozen (v2).

Returns:

  • ([]byte)

    32 byte address of the account whose asset slot is being frozen or un-frozen (v2)



242
243
244
# File 'lib/tealrb/txn_fields.rb', line 242

def (*args)
  @contract. txnfield_opcode('FreezeAssetAccount', *args)
end

#freeze_asset_frozen(*args) ⇒ uint64

Returns The new frozen value, 0 or 1 (v2).

Returns:

  • (uint64)

    The new frozen value, 0 or 1 (v2)



247
248
249
# File 'lib/tealrb/txn_fields.rb', line 247

def freeze_asset_frozen(*args)
  txnfield_opcode('FreezeAssetFrozen', *args)
end

#global_num_byte_slice(*args) ⇒ uint64

Returns Number of global state byteslices in ApplicationCall (v3).

Returns:

  • (uint64)

    Number of global state byteslices in ApplicationCall (v3)



277
278
279
# File 'lib/tealrb/txn_fields.rb', line 277

def global_num_byte_slice(*args)
  txnfield_opcode('GlobalNumByteSlice', *args)
end

#global_num_uint(*args) ⇒ uint64

Returns Number of global state integers in ApplicationCall (v3).

Returns:

  • (uint64)

    Number of global state integers in ApplicationCall (v3)



272
273
274
# File 'lib/tealrb/txn_fields.rb', line 272

def global_num_uint(*args)
  txnfield_opcode('GlobalNumUint', *args)
end

#group_index(*args) ⇒ uint64

Returns Position of this transaction within an atomic transaction group. A stand-alone transaction is implicitly element 0 in a group of 1 (v1).

Returns:

  • (uint64)

    Position of this transaction within an atomic transaction group. A stand-alone transaction is implicitly element 0 in a group of 1 (v1)



122
123
124
# File 'lib/tealrb/txn_fields.rb', line 122

def group_index(*args)
  txnfield_opcode('GroupIndex', *args)
end

#last_log(*args) ⇒ []byte

Returns The last message emitted. Empty bytes if none were emitted. Application mode only (v6).

Returns:

  • ([]byte)

    The last message emitted. Empty bytes if none were emitted. Application mode only (v6)



324
325
326
# File 'lib/tealrb/txn_fields.rb', line 324

def last_log(*args)
  txnfield_opcode('LastLog', *args)
end

#last_valid(*args) ⇒ uint64

Returns round number (v1).

Returns:

  • (uint64)

    round number (v1)



30
31
32
# File 'lib/tealrb/txn_fields.rb', line 30

def last_valid(*args)
  txnfield_opcode('LastValid', *args)
end

#lease(*args) ⇒ []byte

Returns 32 byte lease value (v1).

Returns:

  • ([]byte)

    32 byte lease value (v1)



40
41
42
# File 'lib/tealrb/txn_fields.rb', line 40

def lease(*args)
  txnfield_opcode('Lease', *args)
end

#local_num_byte_slice(*args) ⇒ uint64

Returns Number of local state byteslices in ApplicationCall (v3).

Returns:

  • (uint64)

    Number of local state byteslices in ApplicationCall (v3)



287
288
289
# File 'lib/tealrb/txn_fields.rb', line 287

def local_num_byte_slice(*args)
  txnfield_opcode('LocalNumByteSlice', *args)
end

#local_num_uint(*args) ⇒ uint64

Returns Number of local state integers in ApplicationCall (v3).

Returns:

  • (uint64)

    Number of local state integers in ApplicationCall (v3)



282
283
284
# File 'lib/tealrb/txn_fields.rb', line 282

def local_num_uint(*args)
  txnfield_opcode('LocalNumUint', *args)
end

#logs(*args) ⇒ []byte

Returns Log messages emitted by an application call (only with itxn in v5). Application mode only (v5).

Returns:

  • ([]byte)

    Log messages emitted by an application call (only with itxn in v5). Application mode only (v5)



303
304
305
# File 'lib/tealrb/txn_fields.rb', line 303

def logs(*args)
  txnfield_opcode('Logs', *args)
end

#nonparticipation(*args) ⇒ uint64

Returns Marks an account nonparticipating for rewards (v5).

Returns:

  • (uint64)

    Marks an account nonparticipating for rewards (v5)



298
299
300
# File 'lib/tealrb/txn_fields.rb', line 298

def nonparticipation(*args)
  txnfield_opcode('Nonparticipation', *args)
end

#note(*args) ⇒ []byte

Returns Any data up to 1024 bytes (v1).

Returns:

  • ([]byte)

    Any data up to 1024 bytes (v1)



35
36
37
# File 'lib/tealrb/txn_fields.rb', line 35

def note(*args)
  txnfield_opcode('Note', *args)
end

#num_accounts(*args) ⇒ uint64

Returns Number of Accounts (v2).

Returns:

  • (uint64)

    Number of Accounts (v2)



157
158
159
# File 'lib/tealrb/txn_fields.rb', line 157

def num_accounts(*args)
  txnfield_opcode('NumAccounts', *args)
end

#num_app_args(*args) ⇒ uint64

Returns Number of ApplicationArgs (v2).

Returns:

  • (uint64)

    Number of ApplicationArgs (v2)



147
148
149
# File 'lib/tealrb/txn_fields.rb', line 147

def num_app_args(*args)
  txnfield_opcode('NumAppArgs', *args)
end

#num_applications(*args) ⇒ uint64

Returns Number of Applications (v3).

Returns:

  • (uint64)

    Number of Applications (v3)



267
268
269
# File 'lib/tealrb/txn_fields.rb', line 267

def num_applications(*args)
  txnfield_opcode('NumApplications', *args)
end

#num_assets(*args) ⇒ uint64

Returns Number of Assets (v3).

Returns:

  • (uint64)

    Number of Assets (v3)



257
258
259
# File 'lib/tealrb/txn_fields.rb', line 257

def num_assets(*args)
  txnfield_opcode('NumAssets', *args)
end

#num_logs(*args) ⇒ uint64

Returns Number of Logs (only with itxn in v5). Application mode only (v5).

Returns:

  • (uint64)

    Number of Logs (only with itxn in v5). Application mode only (v5)



308
309
310
# File 'lib/tealrb/txn_fields.rb', line 308

def num_logs(*args)
  txnfield_opcode('NumLogs', *args)
end

#on_completion(*args) ⇒ uint64

Returns ApplicationCall transaction on completion action (v2).

Returns:

  • (uint64)

    ApplicationCall transaction on completion action (v2)



137
138
139
# File 'lib/tealrb/txn_fields.rb', line 137

def on_completion(*args)
  txnfield_opcode('OnCompletion', *args)
end

#receiver(*args) ⇒ []byte

Returns 32 byte address (v1).

Returns:

  • ([]byte)

    32 byte address (v1)



45
46
47
# File 'lib/tealrb/txn_fields.rb', line 45

def receiver(*args)
  @contract. txnfield_opcode('Receiver', *args)
end

#rekey_to(*args) ⇒ []byte

Returns 32 byte Sender’s new AuthAddr (v2).

Returns:

  • ([]byte)

    32 byte Sender’s new AuthAddr (v2)



172
173
174
# File 'lib/tealrb/txn_fields.rb', line 172

def rekey_to(*args)
  @contract. txnfield_opcode('RekeyTo', *args)
end

#selection_pk(*args) ⇒ []byte

Returns 32 byte address (v1).

Returns:

  • ([]byte)

    32 byte address (v1)



65
66
67
# File 'lib/tealrb/txn_fields.rb', line 65

def selection_pk(*args)
  txnfield_opcode('SelectionPK', *args)
end

#sender(*args) ⇒ []byte

Returns 32 byte address (v1).

Returns:

  • ([]byte)

    32 byte address (v1)



10
11
12
# File 'lib/tealrb/txn_fields.rb', line 10

def sender(*args)
  @contract. txnfield_opcode('Sender', *args)
end

#state_proof_pk(*args) ⇒ []byte

Returns 64 byte state proof public key commitment (v6).

Returns:

  • ([]byte)

    64 byte state proof public key commitment (v6)



329
330
331
# File 'lib/tealrb/txn_fields.rb', line 329

def state_proof_pk(*args)
  txnfield_opcode('StateProofPK', *args)
end

#tx_id(*args) ⇒ []byte

Returns The computed ID for this transaction. 32 bytes. (v1).

Returns:

  • ([]byte)

    The computed ID for this transaction. 32 bytes. (v1)



127
128
129
# File 'lib/tealrb/txn_fields.rb', line 127

def tx_id(*args)
  txnfield_opcode('TxID', *args)
end

#txnfield_opcode(*args) ⇒ Object

Raises:

  • (NotImplementedError)


5
6
7
# File 'lib/tealrb/txn_fields.rb', line 5

def txnfield_opcode(*args)
  raise NotImplementedError
end

#type(*args) ⇒ []byte

Returns Transaction type as bytes (v1).

Returns:

  • ([]byte)

    Transaction type as bytes (v1)



85
86
87
# File 'lib/tealrb/txn_fields.rb', line 85

def type(*args)
  txnfield_opcode('Type', *args)
end

#type_enum(*args) ⇒ uint64

Returns See table below (v1).

Returns:

  • (uint64)

    See table below (v1)



90
91
92
# File 'lib/tealrb/txn_fields.rb', line 90

def type_enum(*args)
  txnfield_opcode('TypeEnum', *args)
end

#vote_first(*args) ⇒ uint64

Returns The first round that the participation key is valid. (v1).

Returns:

  • (uint64)

    The first round that the participation key is valid. (v1)



70
71
72
# File 'lib/tealrb/txn_fields.rb', line 70

def vote_first(*args)
  txnfield_opcode('VoteFirst', *args)
end

#vote_key_dilution(*args) ⇒ uint64

Returns Dilution for the 2-level participation key (v1).

Returns:

  • (uint64)

    Dilution for the 2-level participation key (v1)



80
81
82
# File 'lib/tealrb/txn_fields.rb', line 80

def vote_key_dilution(*args)
  txnfield_opcode('VoteKeyDilution', *args)
end

#vote_last(*args) ⇒ uint64

Returns The last round that the participation key is valid. (v1).

Returns:

  • (uint64)

    The last round that the participation key is valid. (v1)



75
76
77
# File 'lib/tealrb/txn_fields.rb', line 75

def vote_last(*args)
  txnfield_opcode('VoteLast', *args)
end

#vote_pk(*args) ⇒ []byte

Returns 32 byte address (v1).

Returns:

  • ([]byte)

    32 byte address (v1)



60
61
62
# File 'lib/tealrb/txn_fields.rb', line 60

def vote_pk(*args)
  txnfield_opcode('VotePK', *args)
end

#xfer_asset(*args) ⇒ uint64

Returns Asset ID (v1).

Returns:

  • (uint64)

    Asset ID (v1)



95
96
97
# File 'lib/tealrb/txn_fields.rb', line 95

def xfer_asset(*args)
  @contract.asset txnfield_opcode('XferAsset', *args)
end