Sort:  

It depends. Gas price is set for each instruction in the EVM, and you can see exactly which instructions will be run in a smart contract. In this sense, you can absolutely know how much gas a function in a contract will cost. The tricky part is that there can be loops/jumps that will change how many times a function runs, and that can't be known sometimes.

Coin Marketplace

STEEM 0.29
TRX 0.12
JST 0.033
BTC 62559.43
ETH 3092.10
USDT 1.00
SBD 3.86