Fixed issue with contract deploying for first time and having no gasLimit specified.
Optimised/refactored looping of compiled contracts.
Added body parameter type checking for `/embark-api/contract/deploy` endpoint
Handle use cases:
1) handle case when temp.sol doesn’t exist - due to the new saga updates, the response from retreiving a temp fiddle from the filesystem (even if it doesn’t exist) is forward to the compilation endpoint, which returns an ENOENT, and this is handled in the selector.
2) delete all code - shouldn’t return last fiddle and should compile an empty string.
3) Switch to different tab (ie contracts) then back to fiddle - previous fiddle should remain.
Also fixed an issue (most likely due to latest rebase) when deploying fiddle contracts. The gasLimit was not being specified.
Handled issue where entities stored in the state were not being put in the correct order, so a timestamp was sent with the requests and then sorted when the response was returned.
Always deploy the contract regardless if already deployed
when 'track' field in the contract configuration is specified
and set to false.
In line with #938 requirements:
* If a contract has the track field set to false, that contract
will always deploy.
* If the track field is set to true, then the existing deployment
tracking mechanism will be active for that contract.
* If the field is not set, it should be assumed to true by default
Refs: https://github.com/embark-framework/embark/issues/938