I am wondering if it is possible to call a function of a smart contract every time a block is mined, perhaps as part of the coinbase transaction? The result of the call would be to send a percentage of the block reward to a storage contract.

bumped to the homepage by Community 9 hours ago

This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


If you're a miner, you can include whatever (valid) transactions you want in the blocks you mine. So yes, you could include a transaction that transfers ether to a contract.

  • But if the destination addresses of the receiving parties was constantly changing based on some business logic for example, it would be easier to include this logic at the application layer (smart contract). How would you include this in the protocol - to necessitate a contract call? – lulbaiking Jan 22 '18 at 3:24
  • I think I'm confused about what you're trying to do. Miners can include any valid transaction they want, because they're the ones putting together the block. They can decide right before assembling the block what transaction they want to include, or they can always include a transaction that sends ether to a contract (that then distributes it). Does that help? – smarx Jan 22 '18 at 4:07

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.