-
we declare a contract
-
we declare state variables
- whenever define a state variable you automatically get for free a getter function with the same name as variable.
-
make a constructor that initialize contract state variables
- a contract can have only one constructor and executed once when a contract is created.
- In case, no constructor is defined, a default constructor is present in the contract.
-
we get our new name via setName function
-
we return our greeting string via getGreeting function with combination of greetingPrefix state variable and our newName that we created in setName function with abi.encodePacked().
- this func have view means that can't be changed
-
Notifications
You must be signed in to change notification settings - Fork 0
AlizadeAlireza/Greeting_solidity
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
In this smart contract i code a simple Ethereum smart contract using Solidity, using the online Remix editor, and test it's methods using the Javascript VM virtual Blockchain.
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published