An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

Mapping in Solidity


An example of mapping in Solidity world


Table of Contents



  1. About The Project


  2. Usage

  3. Contributing

  4. License

  5. Contact

## 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)