libethc icon indicating copy to clipboard operation
libethc copied to clipboard

cpp: add cpp wrappers

Open mhw0 opened this issue 11 months ago • 0 comments

I think it would be cool if we had cpp wrappers for our C functions. Let's say we want to encode some ABI elements:

#include <ethc/ethcxx.h> // maybe just ethc.hh?

int main(void) {
  eth::ABIEncoder abi;

  abi.encodeUint16(0xffac); // or abi.decodeUint16 on decode? and it returns the decoded element?

  std::cout << abi << std::endl; // ABIEncoder supports streams?

  return 0;
}

mhw0 avatar Sep 13 '23 15:09 mhw0