I have a simple abi.encoded string data
that has a series of raw types. In solidity I would decode data
by using the abi.decode
function.
(uint256 total, uint256 id) = abi.decode(data, (uint256, uint256))
Is there a way to do the same in golang. I can do it if I have a contract abi but don't understand how to do it with the primitive types.
I was looking at the code for abi.NewType
but I think that may be a redherring
The same functionality in ethers is https://docs.ethers.io/v5/api/utils/abi/coder/