I'm using a local Ethereum testnet and it seems to me that the price of uploading a smart contract is a bit too high.
This is the code for the smart contract:
contract Transfer {
address owner;
function Transfer () {
owner = msg.sender;
}
modifier isOwner ()
{
if (owner == msg.sender) {
_;
}
else
{
revert();
}
}
function sendEther (address dst) isOwner payable {
if(msg.value<=0) revert();
dst.transfer(msg.value);
}
function getBalance () constant isOwner returns (uint) {
return msg.sender.balance;
}
function () payable
{
if(msg.value<=0) revert();
owner.transfer(msg.value);
}
}
After deploying it with truffle, I've seen that the balance of the account from which that contract has been deployed, has been reduced by 0.045 Ether, which would be something around $15 at today's exchange rate.
I don't know if this is normal, but to me it seems way too expensive.
The gas price in my testnet is 20000000000 and current gas price (seen on https://ethstats.net/) is even higher (35500000000). So, if I'm not wrong, deploying it to the mainnet would be even more expensive!
So, in short, my question is: Is this price normal or am I missing something?
EDIT: Solidity browser says that for this very contract, "Creation: 20435 + 126600", which translates to less than $1... is truffle stealing my Ether somehow?!
Thanks a lot in advance! :)