solidityPack static method

Uint8List solidityPack(
  1. List<String> types,
  2. dynamic values
)

Implementation

static Uint8List solidityPack(List<String> types, values) {
  if (types.length != values.length) {
    throw new ArgumentError('Number of types are not matching the values');
  }
  var ret = BytesBuffer();
  for (var i = 0; i < types.length; i++) {
    var type = elementaryName(types[i]);
    var value = values[i];
    ret.add(solidityHexValue(type, value, null));
  }
  return ret.toBytes();
}