Use `require` to check for errors and instead of just printing result to Stdout,
t.Log to print errors.
Added functions to calculate start offset, check if contract
method has result and to get random int to put.
Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>