Assignment 7

Published by Mario Oettler on

Last Updated on 23. March 2023 by Martin Schuster

Follow the following steps:

  1. Write a smart contract that declares a contract variable of type string named greeter. Assign a value to it (e. g. “Hello World!”).
  2. Write a function that has a state mutability of view that returns the value of the variable greeter.
  3. Write another function that is not declared view that returns this value.
  4. Write a function that takes the parameters uint256 _a and uint256 _b and returns the sum of both. What would be the correct state mutability declaration?
  5. Write a function like above without the proper state mutability declaration.
  6. Try your functions out.
Categories:

https://blockchain-academy.hs-mittweida.de/wp-content/uploads/2021/04/logo_bcam_rgb_gross.png

Welcome

Blockchain Academy

Continue with credential

No account yet?

Powered by Hidy

Register with Hidy


Register
Sign in

We need the following credential to register:

please select:

To create a new account, we need the following data from you:

We would appreciate the following additional information from you for the creation of your account:

Welcome

Blockchain Academy

Continue with credential

Already have an account?

Powered by Hidy

Sign in with Hidy


Register
Sign in

We need the following credential to log in:

please select:
Do you need assistance?
Click here to open chat.

Privacy Notice: This chat sends your questions to an external AI server.
How can we help you?
  • Please note: All questions, chat history, and feedback are sent to an external AI server for processing. Do not share sensitive personal information.

    All responses are generated by AI. Independently verify and fact-check all information before use.
  • No Chat History yet, start talking...