https://github.com/leoandersoon/mapping-example
Created an example of mapping in Solidity world. <3 it mate
https://github.com/leoandersoon/mapping-example
Last synced: 2 days ago
JSON representation
Created an example of mapping in Solidity world. <3 it mate
- Host: GitHub
- URL: https://github.com/leoandersoon/mapping-example
- Owner: leoandersoon
- License: mit
- Created: 2022-03-18T18:40:55.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-03-19T05:24:35.000Z (over 4 years ago)
- Last Synced: 2026-06-23T03:39:29.064Z (2 days ago)
- Language: Solidity
- Size: 11.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
Mapping in Solidity
An example of mapping in Solidity world
Table of Contents
## About The Project
In many programming languages, map is the name of a higher-order function that applies a given function to each element of a collection, e.g. a list or set, returning the results in a collection of the same type. It is often called apply-to-all when considered in functional form.
So what about Smart Contract Development?
Here're a few properties of mapping in Solidity:
* Mappings are not iterable
* Mapping always returns a value
* If the value was never set, it will return the default value
* You can get values from a nested mapping even when it is not initialized
This repo is not a tutorial, well it's just an example as I mentioned at the heading. We're going to see how to create a map in Solidity smart contract development.
### Built With
This project is built with Solidity. Basically, you don't have to donwload anything to work on Solidity so there are a few online IDE's to do it. Such as;
* [Remix - Ethereum IDE](https://remix.ethereum.org/)
* [Solidity by Example](https://solidity-by-example.org/)
## Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.
1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request
## License
Distributed under the MIT License. See `LICENSE` for more information.
## Contact
Leo Anderson - [@leoandersoon](https://twitter.com/leoandersoon) - leoanderson633@protonmail.ch
Project Link: [https://github.com/leoandersoon/mapping-example](https://github.com/leoandersoon/mapping-example)