0

I wonder if there is any way to store data in smart contract which does not charge fees or can we use any external EASY data from smart contract. In my contract I have to update lots of fields on each transaction and I think it will increase fee a lot.

0

No, all data storage in the blockchain costs gas. Furthermore, the contract can't use external data directly.

You can access external data through oracles, but in that case you most likely have to also pay the data costs. So, basically, whatever data you want to input in the blockchain, you have to pay for it. Of course if you find the required data already existing in some other contract, you can possibly utilize that.

8
  • Well, will it charge again when I update any existing value like I update how much I have paid to user and it increases day by day.
    – Ravikant
    Sep 8 at 14:16
  • Yes, you have to pay for each update. Here you can see the more exact gas costs per operation: github.com/ethereum/go-ethereum/blob/master/params/… Sep 8 at 14:18
  • Ohh! Actually when I got a single transaction I have to update at least 100,000 entries which will increase in future and it will cost me a lot. Does addition, subtraction, division like operations also needs fees?
    – Ravikant
    Sep 8 at 14:20
  • Every update and every operation (such as addition) requires gas. Sep 8 at 14:23
  • Alright Lauri Peltonen. Thank you
    – Ravikant
    Sep 8 at 14:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.