Class: TEALrb::Account

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

Instance Method Summary collapse

Methods inherited from OpcodeType

#[]

Constructor Details

#initialize(contract) ⇒ Account

Returns a new instance of Account.



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

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

Instance Method Details

#apps_createdObject



54
55
56
# File 'lib/tealrb/account.rb', line 54

def apps_created
  @contract.acct_param_value 'AcctTotalAppsCreated'
end

#apps_opted_inObject



58
59
60
# File 'lib/tealrb/account.rb', line 58

def apps_opted_in
  @contract.acct_param_value 'AcctTotalAppsOptedIn'
end

#asset_balance(_asa_id = nil) ⇒ Object



14
15
16
# File 'lib/tealrb/account.rb', line 14

def asset_balance(_asa_id = nil)
  @contract.asset_holding_value 'AssetBalance'
end

#asset_balance?(_asa_id = nil) ⇒ Boolean

Returns:

  • (Boolean)


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

def asset_balance?(_asa_id = nil)
  @contract.asset_holding_exists? 'AssetBalance'
end

#asset_frozen?(_asa_id = nil) ⇒ Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/tealrb/account.rb', line 18

def asset_frozen?(_asa_id = nil)
  @contract.asset_frozen_exists? 'AssetFrozen'
end

#asset_frozen_value(_asa_id = nil) ⇒ Object



22
23
24
# File 'lib/tealrb/account.rb', line 22

def asset_frozen_value(_asa_id = nil)
  @contract.asset_frozen_value 'AssetFrozen'
end

#assetsObject



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

def assets
  @contract.acct_param_value 'AcctTotalAssets'
end

#assets_createdObject



62
63
64
# File 'lib/tealrb/account.rb', line 62

def assets_created
  @contract.acct_param_value 'AcctTotalAssetsCreated'
end

#auth_addrObject



34
35
36
# File 'lib/tealrb/account.rb', line 34

def auth_addr
  @contract.acct_param_value 'AcctAuthAddr'
end

#balanceObject



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

def balance
  @contract.acct_param_value 'AcctBalance'
end

#balance?Boolean

Returns:

  • (Boolean)


38
39
40
# File 'lib/tealrb/account.rb', line 38

def balance?
  @contract.acct_has_balance?
end

#box_bytesObject



74
75
76
# File 'lib/tealrb/account.rb', line 74

def box_bytes
  @contract.acct_param_value 'AcctTotalBoxBytes'
end

#boxesObject



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

def boxes
  @contract.acct_param_value 'AcctTotalBoxes'
end

#bytesObject



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

def bytes
  @contract.acct_param_value 'AcctTotalNumByteSlice'
end

#extra_pagesObject



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

def extra_pages
  @contract.acct_param_value 'AcctTotalExtraAppPages'
end

#min_balanceObject



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

def min_balance
  @contract.acct_param_value 'AcctMinBalance'
end

#uintsObject



42
43
44
# File 'lib/tealrb/account.rb', line 42

def uints
  @contract.acct_param_value 'AcctTotalNumUint'
end