Class: EthereumContractABI::ContractInterface::AbiTypes::Address

Inherits:
Uint
  • Object
show all
Defined in:
lib/ethereum-contract-abi/contract/abi_types/address.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Uint

#valid_value?

Methods inherited from Int

#decode_value, #encode_value, #valid_value?

Methods inherited from BaseType

#bytesize, #decode_value, #encode_value, #is_type_equal

Constructor Details

#initializeAddress

Returns a new instance of Address.



11
12
13
# File 'lib/ethereum-contract-abi/contract/abi_types/address.rb', line 11

def initialize
  super(160)
end

Class Method Details

.from_string(string_type) ⇒ Object



23
24
25
# File 'lib/ethereum-contract-abi/contract/abi_types/address.rb', line 23

def self.from_string(string_type)
  string_type === 'address' ? self.new : nil
end

Instance Method Details

#is_dynamicObject



15
16
17
# File 'lib/ethereum-contract-abi/contract/abi_types/address.rb', line 15

def is_dynamic
  false
end

#to_sObject



19
20
21
# File 'lib/ethereum-contract-abi/contract/abi_types/address.rb', line 19

def to_s
  "address"
end