Class: CcipDirectoryAndConfigurationRestApiV1::ChainType
- Inherits:
-
Object
- Object
- CcipDirectoryAndConfigurationRestApiV1::ChainType
- Defined in:
- lib/ccip_directory_and_configuration_rest_api_v1/models/chain_type.rb
Overview
Type of blockchain
Constant Summary collapse
- CHAIN_TYPE =
[ # TODO: Write general description for EVM EVM = 'evm'.freeze, # TODO: Write general description for SOLANA SOLANA = 'solana'.freeze, # TODO: Write general description for APTOS APTOS = 'aptos'.freeze, # TODO: Write general description for SUI SUI = 'sui'.freeze, # TODO: Write general description for CANTON CANTON = 'canton'.freeze, # TODO: Write general description for TON TON = 'ton'.freeze, # TODO: Write general description for TRON TRON = 'tron'.freeze, # TODO: Write general description for STELLAR STELLAR = 'stellar'.freeze, # TODO: Write general description for STARKNET STARKNET = 'starknet'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = EVM) ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/ccip_directory_and_configuration_rest_api_v1/models/chain_type.rb', line 44 def self.from_value(value, default_value = EVM) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'evm' then EVM when 'solana' then SOLANA when 'aptos' then APTOS when 'sui' then SUI when 'canton' then CANTON when 'ton' then TON when 'tron' then TRON when 'stellar' then STELLAR when 'starknet' then STARKNET else default_value end end |
.validate(value) ⇒ Object
38 39 40 41 42 |
# File 'lib/ccip_directory_and_configuration_rest_api_v1/models/chain_type.rb', line 38 def self.validate(value) return false if value.nil? CHAIN_TYPE.include?(value) end |