Write a smart contract, with three functions. Function calculate should take two parameters a and b of
Fantastic news! We've Found the answer you've been seeking!
Question:
Function “calculate” should take two parameters a and b of type uint256. It should return the result of a + b.
A user must pay a small fee to be allowed to use the function calculate.
During deployment, the user can specify the fee. The user that deployed the contract should be able to withdraw the fees. It should be possible to specify the amount to be withdrawn. Code this into a function named “withdraw”.
For convenience, add a function that returns the balance of the contract. Call this function “getBalance”.
Add screenshots of your working code and output in form of a PDF document.
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date: