Skip to main content
1 of 6
eth
  • 86.6k
  • 54
  • 289
  • 418

One way is to use the browser-based Solidity realtime compiler and runtime Solidity.

  1. Paste the code in Solidity Browser.
  2. Wrap the function inside a contract if needed. (Example: contract C { ... }.)
  3. Click Create to instantiate the contract.
  4. Enter the desired input next to the function.
  • For bytes (and bytes1 ... bytes32), use a quoted hex string, example: "0xabcdef" would work for bytes or bytes3.
  • For strings, make sure they are quoted.
  • For an array, use [], example: ["hello", 42, "0xabcd"]
  1. Click the function to get the Result. The Result is ABI encoded.

Here is an example screenshot:

enter image description here

eth
  • 86.6k
  • 54
  • 289
  • 418