density
density copied to clipboard
Density is a library or collection of useful modifiers and methods for Solidity.
This simple encoder/decoder for https://github.com/jbenet/multihash/ works based on #1: ``` // Test vector: "0x11","0x14","0x0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33" function encode(uint hashtype, uint size, bytes digest) returns (bytes hash) { hash = new bytes(2 +...
Piece of code to copy chunks of `bytes`: ``` function copyBytes(bytes from, uint fromOffset, uint length, uint toOffset) returns (bytes) { bytes memory to = new bytes(toOffset + length); return...