0

Most of the examples that I see on smart contract, involves ether being transferred to someone as part of the transaction. My question is, if my smart contract is just doing X++, where X is some counter, then

  1. What would be the transaction that will be sent out to miners to be included in the block as there is no transfer of ethers.
  2. The gas fee to execute the transaction by the user of the smart contract, is it allocated to the miner who mined the transaction?
  3. IF all the rest of the nodes, that verify the block also have to run the smart contracts, wouldnt they be wasting their resource but doing equal amount of work as the miner did? (minus the proof of stake).
0

A transaction includes among other fields an optional data field. This field is used to indicate which function from the contract should be executed and parameters required.

Transaction's fees are allocated to the Block's miner.

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.