Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adityaapraveen/ava-mod-1
Project-1 of Ava module
https://github.com/adityaapraveen/ava-mod-1
Last synced: about 13 hours ago
JSON representation
Project-1 of Ava module
- Host: GitHub
- URL: https://github.com/adityaapraveen/ava-mod-1
- Owner: adityaapraveen
- Created: 2023-09-24T09:06:10.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-24T09:37:05.000Z (about 1 year ago)
- Last Synced: 2023-09-24T17:36:30.563Z (about 1 year ago)
- Language: Solidity
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Functions and Errors
The provided Solidity project is a simple "bank" contract with three functions. It allows deposits with a minimum amount requirement, performs secure addition with assertion checks, and demonstrates explicit transaction reversal with custom error messages.
## Description
Deposit Function: Users can deposit funds, but the deposit amount must be greater than 100 Wei, enforced using the require statement.
Addition Function: This function calculates the sum of two numbers and uses an assert statement to ensure the result falls within a specific range, offering an example of internal consistency checks.
Reverting Function: The third function demonstrates the use of the revert statement to instantly revert transactions with a custom error message, showcasing transaction control within a smart contract.
This project provides a simple illustration of transaction processing, validation, and error handling in Ethereum smart contracts.
## Getting Started
### Installing
* You can write the code on your own
* You can modify the code however you want### Executing program
* You can run this code on Remix IDE
* Compile the code and Deploy the code.
* Step-by-step bullets## Authors
Aditya Praveen @[email protected]
## License
This project is licensed under the MIT License