UNGAS and why was GAS made available to programming smart contracts?

Hardforks, such as Istanbul, have illustrated the best practice that smart contracts should not make any assumptions about gas. Gas costs have, can, and will change, for example: Is transfer() still safe after the Istanbul update? There are UNGAS proposals and discussions: Disable opcode GAS. For CALL, CALLCODE and DELEGATECALL, remove the gas parameter, and…

Compiling Old Version Contracts , gives ParserError: Expected pragma, import directive or contract/interface/library definition

Ihave to compile some old contracts (having solidity pragma is <0.5. For this purpose, I have just copy and paste this contract from Etehrscan and save with its name in contracts folder. Install old version of solc npm install solc@0.4.25. Then i read that filev(through my following code) and gives it to solc.compile(), which gives…

Is function like that prone to reentrancy?

function transfer() payable public returns(bool) { balances[msg.sender] = SafeMath.sub(balances[msg.sender], msg.value); if(msg.sender.call.gas(100000).value(msg.value)()) { return false; } balances[msg.sender] = SafeMath.add(balances[msg.sender], msg.value); return true; } Basically Safemath remove balances before sending + it will return and stop if balance is = 0 or less. But what if the call stops somewhere due to lack of gas, will this…