I've got an app that takes various kinds of input via an HTML form, but always ends up sending it to a contract as
bytes32. The expectation is that another contract that ultimately consumes the data will cast it into the type that it's expecting, which may be
For unsigned integers I'm taking a
BigNumber object, calling
toString(16) on it to get hex, then left-padding it to 64 digits, and appending
0x. But for signed integers, which may be negative, I presumably need to handle the two's complement system; What's the appropriate way to do this?