Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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

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