Class: Solace::SquadsSmartAccounts::ProgramConfig
- Inherits:
-
Data
- Object
- Data
- Solace::SquadsSmartAccounts::ProgramConfig
- Defined in:
- lib/solace/squads_smart_accounts/types/program_config.rb
Overview
Immutable value object representing the deserialized global ProgramConfig account for the Squads Smart Account program. Fetching from the chain is the Program layer’s responsibility — see Solace::Programs::SquadsSmartAccount#get_program_config.
Instance Attribute Summary collapse
-
#authority ⇒ Object
readonly
Returns the value of attribute authority.
-
#smart_account_creation_fee ⇒ Object
readonly
Returns the value of attribute smart_account_creation_fee.
-
#smart_account_index ⇒ Object
readonly
Returns the value of attribute smart_account_index.
-
#treasury ⇒ Object
readonly
Returns the value of attribute treasury.
Class Method Summary collapse
-
.deserialize(io) ⇒ ProgramConfig
Deserializes a ProgramConfig from a stream of Borsh-encoded account data.
Instance Attribute Details
#authority ⇒ Object (readonly)
Returns the value of attribute authority
14 15 16 |
# File 'lib/solace/squads_smart_accounts/types/program_config.rb', line 14 def @authority end |
#smart_account_creation_fee ⇒ Object (readonly)
Returns the value of attribute smart_account_creation_fee
14 15 16 |
# File 'lib/solace/squads_smart_accounts/types/program_config.rb', line 14 def smart_account_creation_fee @smart_account_creation_fee end |
#smart_account_index ⇒ Object (readonly)
Returns the value of attribute smart_account_index
14 15 16 |
# File 'lib/solace/squads_smart_accounts/types/program_config.rb', line 14 def smart_account_index @smart_account_index end |
#treasury ⇒ Object (readonly)
Returns the value of attribute treasury
14 15 16 |
# File 'lib/solace/squads_smart_accounts/types/program_config.rb', line 14 def treasury @treasury end |
Class Method Details
.deserialize(io) ⇒ ProgramConfig
Deserializes a ProgramConfig from a stream of Borsh-encoded account data.
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/solace/squads_smart_accounts/types/program_config.rb', line 24 def self.deserialize(io) io.read(8) # skip 8-byte Anchor discriminator new( smart_account_index: Solace::Utils::Codecs.decode_le_u128(io), authority: Solace::Utils::Codecs.decode_pubkey(io), smart_account_creation_fee: Solace::Utils::Codecs.decode_le_u64(io), treasury: Solace::Utils::Codecs.decode_pubkey(io) ) end |