Sha256: b94369667499fcede1da12e77418f99d6b694cae2ee1a95f71592fb26af0563d
Contents?: true
Size: 492 Bytes
Versions: 10
Compression:
Stored size: 492 Bytes
Contents
module AbiCoderRb def decode_fixed_array(type, data) l = type.dim subtype = type.subtype if subtype.dynamic? start_positions = (0...l).map { |i| decode_uint256(data[32 * i, 32]) } start_positions.push(data.size) outputs = (0...l).map { |i| data[start_positions[i]...start_positions[i + 1]] } outputs.map { |out| decode_type(subtype, out) } else (0...l).map { |i| decode_type(subtype, data[subtype.size * i, subtype.size]) } end end end
Version data entries
10 entries across 10 versions & 1 rubygems