Class: TEALrb::App

Inherits:
OpcodeType show all
Defined in:
lib/tealrb/app.rb

Instance Method Summary collapse

Methods inherited from OpcodeType

#[]

Constructor Details

#initialize(contract) ⇒ App

Returns a new instance of App.



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

def initialize(contract)
  @field = 'Applications'
  super
end

Instance Method Details

#address(*_args) ⇒ []byte

Returns Address for which this application has authority.

Returns:

  • ([]byte)

    Address for which this application has authority



51
52
53
# File 'lib/tealrb/app.rb', line 51

def address(*_args)
  @contract.app_param_value 'AppAddress'
end

#address?(*_args) ⇒ []byte

Returns Address for which this application has authority.

Returns:

  • ([]byte)

    Address for which this application has authority



96
97
98
# File 'lib/tealrb/app.rb', line 96

def address?(*_args)
  @contract.app_param_exists? 'AppAddress'
end

#approval_program(*_args) ⇒ []byte

Returns Bytecode of Approval Program.

Returns:

  • ([]byte)

    Bytecode of Approval Program



11
12
13
# File 'lib/tealrb/app.rb', line 11

def approval_program(*_args)
  @contract.app_param_value 'AppApprovalProgram'
end

#approval_program?(*_args) ⇒ []byte

Returns Bytecode of Approval Program.

Returns:

  • ([]byte)

    Bytecode of Approval Program



56
57
58
# File 'lib/tealrb/app.rb', line 56

def approval_program?(*_args)
  @contract.app_param_exists? 'AppApprovalProgram'
end

#clear_state_program(*_args) ⇒ []byte

Returns Bytecode of Clear State Program.

Returns:

  • ([]byte)

    Bytecode of Clear State Program



16
17
18
# File 'lib/tealrb/app.rb', line 16

def clear_state_program(*_args)
  @contract.app_param_value 'AppClearStateProgram'
end

#clear_state_program?(*_args) ⇒ []byte

Returns Bytecode of Clear State Program.

Returns:

  • ([]byte)

    Bytecode of Clear State Program



61
62
63
# File 'lib/tealrb/app.rb', line 61

def clear_state_program?(*_args)
  @contract.app_param_exists? 'AppClearStateProgram'
end

#creator(*_args) ⇒ []byte

Returns Creator address.

Returns:

  • ([]byte)

    Creator address



46
47
48
# File 'lib/tealrb/app.rb', line 46

def creator(*_args)
  @contract.app_param_value 'AppCreator'
end

#creator?(*_args) ⇒ []byte

Returns Creator address.

Returns:

  • ([]byte)

    Creator address



91
92
93
# File 'lib/tealrb/app.rb', line 91

def creator?(*_args)
  @contract.app_param_exists? 'AppCreator'
end

#extra_program_pages(*_args) ⇒ uint64

Returns Number of Extra Program Pages of code space.

Returns:

  • (uint64)

    Number of Extra Program Pages of code space



41
42
43
# File 'lib/tealrb/app.rb', line 41

def extra_program_pages(*_args)
  @contract.app_param_value 'AppExtraProgramPages'
end

#extra_program_pages?(*_args) ⇒ uint64

Returns Number of Extra Program Pages of code space.

Returns:

  • (uint64)

    Number of Extra Program Pages of code space



86
87
88
# File 'lib/tealrb/app.rb', line 86

def extra_program_pages?(*_args)
  @contract.app_param_exists? 'AppExtraProgramPages'
end

#global_exists?(_key) ⇒ Boolean

Returns:

  • (Boolean)


120
121
122
# File 'lib/tealrb/app.rb', line 120

def global_exists?(_key)
  @contract.app_global_ex_exists?
end

#global_num_byte_slice(*_args) ⇒ uint64

Returns Number of byte array values allowed in Global State.

Returns:

  • (uint64)

    Number of byte array values allowed in Global State



26
27
28
# File 'lib/tealrb/app.rb', line 26

def global_num_byte_slice(*_args)
  @contract.app_param_value 'AppGlobalNumByteSlice'
end

#global_num_byte_slice?(*_args) ⇒ uint64

Returns Number of byte array values allowed in Global State.

Returns:

  • (uint64)

    Number of byte array values allowed in Global State



71
72
73
# File 'lib/tealrb/app.rb', line 71

def global_num_byte_slice?(*_args)
  @contract.app_param_exists? 'AppGlobalNumByteSlice'
end

#global_num_uint(*_args) ⇒ uint64

Returns Number of uint64 values allowed in Global State.

Returns:

  • (uint64)

    Number of uint64 values allowed in Global State



21
22
23
# File 'lib/tealrb/app.rb', line 21

def global_num_uint(*_args)
  @contract.app_param_value 'AppGlobalNumUint'
end

#global_num_uint?(*_args) ⇒ uint64

Returns Number of uint64 values allowed in Global State.

Returns:

  • (uint64)

    Number of uint64 values allowed in Global State



66
67
68
# File 'lib/tealrb/app.rb', line 66

def global_num_uint?(*_args)
  @contract.app_param_exists? 'AppGlobalNumUint'
end

#global_value(_key) ⇒ Object



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

def global_value(_key)
  @contract.app_global_ex_value
end

#local_exists?(_account, _key) ⇒ Boolean

Returns:

  • (Boolean)


128
129
130
# File 'lib/tealrb/app.rb', line 128

def local_exists?(, _key)
  @contract.app_local_ex_exists?
end

#local_num_byte_slice(*_args) ⇒ uint64

Returns Number of byte array values allowed in Local State.

Returns:

  • (uint64)

    Number of byte array values allowed in Local State



36
37
38
# File 'lib/tealrb/app.rb', line 36

def local_num_byte_slice(*_args)
  @contract.app_param_value 'AppLocalNumByteSlice'
end

#local_num_byte_slice?(*_args) ⇒ uint64

Returns Number of byte array values allowed in Local State.

Returns:

  • (uint64)

    Number of byte array values allowed in Local State



81
82
83
# File 'lib/tealrb/app.rb', line 81

def local_num_byte_slice?(*_args)
  @contract.app_param_exists? 'AppLocalNumByteSlice'
end

#local_num_uint(*_args) ⇒ uint64

Returns Number of uint64 values allowed in Local State.

Returns:

  • (uint64)

    Number of uint64 values allowed in Local State



31
32
33
# File 'lib/tealrb/app.rb', line 31

def local_num_uint(*_args)
  @contract.app_param_value 'AppLocalNumUint'
end

#local_num_uint?(*_args) ⇒ uint64

Returns Number of uint64 values allowed in Local State.

Returns:

  • (uint64)

    Number of uint64 values allowed in Local State



76
77
78
# File 'lib/tealrb/app.rb', line 76

def local_num_uint?(*_args)
  @contract.app_param_exists? 'AppLocalNumUint'
end

#local_value(_account, _key) ⇒ Object



124
125
126
# File 'lib/tealrb/app.rb', line 124

def local_value(, _key)
  @contract.app_local_ex_value
end

#num_approval_pagesObject



104
105
106
# File 'lib/tealrb/app.rb', line 104

def num_approval_pages
  @contract.app_param_value 'NumApprovalProgramPages'
end

#num_approval_pages?Boolean

Returns:

  • (Boolean)


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

def num_approval_pages?
  @contract.app_param_exists? 'NumApprovalProgramPages'
end

#num_clear_pagesObject



112
113
114
# File 'lib/tealrb/app.rb', line 112

def num_clear_pages
  @contract.app_param_value 'NumClearProgramPages'
end

#num_clear_pages?Boolean

Returns:

  • (Boolean)


108
109
110
# File 'lib/tealrb/app.rb', line 108

def num_clear_pages?
  @contract.app_param_exists? 'NumClearProgramPages'
end