fix v8 assertion failure on tx sending.
add rescan blockchain.
add function templates.