Skip to content

Curly-creator/Blockchain_Marriage_Notary

Repository files navigation

Smart Contract Notary

Description

Marriage Notary using Smart Contract on Ethereum Blockchain. - A STUDENT PROJECT -

Installation

To run the notary we highly recomment to use a test enviroment. Below you'll find a list of Tools we used for our development.

!!! Don't use real Ether, there is no guarantee to get it back !!!

Solidity: Ethereum Solidity Language for Visual Studio Code

Python: Python Language

Ganache: virtual Blockchain

Ganache-Cli: Commandline integration for Ganache

Yarn: Client Server

Brownie: Smart Contract Development Platform

MetaMask: Cryptho Wallet and Gateway to Blockchain-Apps. Used to handle Accounts and Transactions.

Setup

To run the Marriage Notary in the test enviroment you have to install Ganache, Ganache-Cli, Brownie and MetaMask.

Make sure every component is installed correctly.

1. Connect your local Ganache with Brownie by typing the following command into your commandline.

brownie networks add Ethereum ganache-local host="RPC-SERVER" chainid="CHAIN_ID"

RPC-SERVER: RPC-Server of your local Ganache. Default should be http://127.0.0.1:8545

CHAIN_ID: Network Id of your local Ganache. Default should be 1337

2. Connect your Ganache to MetaMask and import an account.

To do so, follow this Guide. Make sure to import account[0]. Currently this is the only account that can interact with the Smart Contract. Alternatively use this Guide

3. Install npx and Yarn by typing the following command into your commandline.

npm install -g npx

npm install --global yarn

4. Deploy the Smart Contract to your local Ganache-Blockchain. Therefore type the following command into the commandline.

brownie run sripts/deploy.py --network ganache-local

5. Start the WebApp by typing the following command into your commandline.

yarn start

!! You might need to restart the Terminal before it works !!

Usage

1. Creating a new Marriage Contract

Enter Marriage-Deatails into the Input-fields and press the Submit. On the right side a list of all created Marriages will be displayed.

Wallet Address of the couple has to be a Wallet-Address from your local Ganache

Marriage Date hast to be in the following format: DDMMYYYY

2.Get Marriage Details

Enter the Adress of a couple you want to get the Details from into Adress of the couple and press Get Details. All the available Details will be displayed below.

3.Ring the Bells

By rining the bells you can send Ether to the Marriage Contract. Enter the Address you want to send Ether to into Wallet Address of the couple and the amount of Ether into Number of Wei's.

Note: 1 Ether = 1e18 Wei

4.Withdraw

To withdraw ether from the Smart Contract enter your Wallet-Address into Wallet Address of the couple and press Withdraw Ethers.

Note: Only the married couple can withdraw their ether. Currently you can only withdraw with account[0]. So make sure to use the right address.

To do

  • At the moment you can interact only with one account (account[0]) from local ganache) with the notary. Hardcoded in App.js in ringBell- and withdraw-function.

  • Copybutton in Marriage List is currently not working

Links to important Files

Smart Contract Solidity Code for the Marriage Notary contract

GUI React Code for our User Interface

Deploy Script Python Code for deployment of the Smart Contract

Authors

Anna von Blohn, Tanvi Sharma, Jonas Burger

License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages