I'm new to Ethereum so please excuse my ignorance. Ethereum seems to have an ABI serialization protocol called Solidity. The spec is here:
https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABII'm looking for a way to encode and decode contracts in C#. Specifically, I want to take an array of bytes (byte[]) and convert it in to a human readable Ethereum address as a starting point.
Here are a couple of libraries that I've cloned, but after sifting through the code, it's not immediately apparent how to achieve what I am trying to do:
https://github.com/Nethereum/Nethereumhttps://github.com/sense2k/Ethereum.NETCan someone point me to an example of how to convert a byte array to a human readable Ethereum string address?
This is an example in what appears to be Go, but I can't quite follow how it works.
https://ethereum.stackexchange.com/questions/8346/convert-address-to-stringfunction toString(address x) returns (string) {
bytes memory b = new bytes(20);
for (uint i = 0; i < 20; i++)
b
= byte(uint8(uint(x) / (2**(8*(19 - i)))));
return string(b);
}