I'm have an expensive view function which calculates rewards over time and investment.

When it comes to withdrawing rewards I would need to run this, which could overrun gas for the block.

Is there a secure way I can sign the results of the view and verify in a transaction call so that I do not need to run the view function in the transaction. So essentially verify the results of the view being passed into a transaction?

  • Welcome! I've got a couple of suggestions for this question which should make it a bit easier to answer: 1) please provide a code snippet of the function(s) that you're discussing 2) I had to read the last paragraph a couple of times to get it - essentially, you want to separate the estimation and withdrawal functions - try to make your 'ask' (the question you want answered) clear. This should be a bit easier if the code is there. Good luck! Apr 5 at 11:55

Your Answer

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

Browse other questions tagged or ask your own question.