I'm trying to figure out how to interact with the current version of the Casper contract from Solidity. The vote-function in the casper contract takes an array of bytes, which represents the RLP-encoded vote message. Is there a straightforward way of encoding messages using RLP in Solidity?
I don't know if there is any native library available in Solidity, but there are node-js libraries available will help you do that. I also found this solidity code when doing a search on RLP, have a look at the code snippet below:
https://github.com/Giveth/milestonetracker/blob/master/contracts/RLP.sol
Libraries:
https://www.npmjs.com/package/rlp
articles:
http://wanderer.github.io/ethereum/nodejs/code/2014/05/21/using-ethereums-tries-with-node/
Here is a thread on RLP Encoding:
Hope this helps.
https://www.npmjs.com/package/solidity-rlp
Here is a package I am maintaining to decode rlp bytes in solidity. you can checkout the code and usage instructions here: https://github.com/hamdiallam/solidity-rlp