One way is to use the browser-based Solidity realtime compiler and runtime Solidity.
- Paste the code in Solidity Browser.
- Wrap the function inside a
contractif needed. (Example:contract C { ... }.) - Click
Createto instantiate the contract. - Enter the desired input next to the function.
- For
bytes(andbytes1...bytes32), use a quoted hex string, example:"0xabcdef" would work forbytesorbytes3. - For
strings, make sure they are quoted. - For an array, use
[], example:["hello", 42, "0xabcd"]
- Click the function to get the Result. The Result is ABI encoded.
Here is an example screenshot:
