Saving deployment costs of smart contracts by eliminating gas-wasteful patterns