Search code examples
blockchainethereumsmartcontractscryptocurrency

If i deploy a todolist smartcontract on the ethereum blockchain , will i have to pay ether / gas price for adding a task or marking a task completed?


To explain it a bit more in detail, let us say I have deployed a smart contract on the Ethereum blockchain which is capable of acting like a to-do list app, you can add tasks to it and mark them done once u finish them. My question is every time I perform such activities do I have to pay ether/gas price a.k.a real money for it as it adds a block to the Ethereum blockchain?


Solution

  • Yes definitely as marking tasks or creating a new task changes the state of the blockchain. So whenever the blockchain state changes it costs some gas fee. You can try that by creating a todolist smartcontract and deploy it on the testnet like rinkeby. You will see that every time you call a function (that can change the state of the blockchain) metamask will popup