If you want to build a single contract with eosio.cdt you would need to modify the code.
Just use the build-script build.sh (located in the eosio.contracts-directory) to compile all system-contracts at once, without the need to modify any of them.
Not sure if I understand your question but you are limiting the number of actions returned to 20 by
var resultaction = await r.GetActions(constants.LOCALCODEACCOUNT, 0, 20);
if you want more, just do
var resultaction = await r.GetActions(constants.LOCALCODEACCOUNT, 0, Int32.MaxValue);
or something similar.
You could also fetch the hole Block via the ...
First of all, there is no vice versa in string or hex -> checksum or hash its only one way.
You cannot have string or hex back from checksum or hash. It only insures data integrity, not data authenticity
Secondly, Mitch has this great medium article on how it is done.
Here is the article
Repo for code is Here