Module: ABI
- Defined in:
- lib/abicoder.rb,
lib/abicoder/type.rb,
lib/abicoder/codec.rb,
lib/abicoder/utils.rb,
lib/abicoder/type_tuple.rb
Defined Under Namespace
Modules: Helpers, Utils Classes: Codec, Tuple, Type
Constant Summary collapse
- BYTE_EMPTY =
todo/check: use auto-freeze string literals magic comment - why? why not?
todo/fix: move BYTE_EMPTY, BYTE_ZERO, BYTE_ONE to upstream to bytes gem
and make "global" constants - why? why not? "".b.freeze
- BYTE_ZERO =
"\x00".b.freeze
- BYTE_ONE =
note: used for encoding bool for now
"\x01".b.freeze
- UINT_MAX =
2**256 - 1
- UINT_MIN =
0- INT_MAX =
2**255 - 1
- INT_MIN =
-2**255
- TT32 =
todo/check - what is TT the abbrevation for ???
2**32
- TT40 =
todo/check - used where and why???
2**40
- TT160 =
todo/check - used where and why???
2**160
- TT256 =
todo/check - used where and why???
2**256
- TT64M1 =
todo/check - used where and why???
2**64 - 1
Class Method Summary collapse
- .codec ⇒ Object
- .decode_abi(types, data, raise_errors = false) ⇒ Object (also: decode)
- .encode_abi(types, args) ⇒ Object (also: encode)
Class Method Details
.codec ⇒ Object
392 393 394 |
# File 'lib/abicoder/codec.rb', line 392 def self.codec @codec ||= Codec.new end |
.decode_abi(types, data, raise_errors = false) ⇒ Object Also known as: decode
400 401 402 |
# File 'lib/abicoder/codec.rb', line 400 def self.decode_abi( types, data, raise_errors = false ) codec.decode_abi( types, data, raise_errors ) end |
.encode_abi(types, args) ⇒ Object Also known as: encode
396 397 398 |
# File 'lib/abicoder/codec.rb', line 396 def self.encode_abi( types, args ) codec.encode_abi( types, args ) end |