constructPaymasterAndData method

Uint8List constructPaymasterAndData(
  1. String paymasterAddress,
  2. String z,
  3. String signedPayMasterData
)

Implementation

Uint8List constructPaymasterAndData(
    String paymasterAddress, String z, String signedPayMasterData) {
  Uint8List paymasterAddressBuffer =
      Uint8List.fromList(hex.decode(paymasterAddress.substring(2)));
  Uint8List zBuffer = Uint8List.fromList(hex.decode(z.substring(2)));
  Uint8List signedPayMasterDataBuffer =
      Uint8List.fromList(hex.decode(signedPayMasterData.substring(2)));

  List<Uint8List> buffers = [
    paymasterAddressBuffer,
    zBuffer,
    signedPayMasterDataBuffer,
  ];

  return concatenateBuffers(buffers);
}