Code Monkey home page Code Monkey logo

marriage_ethereum's Introduction

Marriage_Ethereum

A Marriage contract on Ethereum

1-πŸ’ Propose marriage to someone: Marriage contracts can only be generated by the MarriageRegistry contract, so, if you want to propose to someone, all you have to do to initiate the process is calling the proposeMarriage() function on MarriageRegistry and specify the address of the person you are proposing to.

2- 🌹 Have your significant other accept or reject the proposal: The person being proposed marriage now has the option to either reject or accept the proposal. If they reject the proposal by calling rejectProposal() on the newly created Marriage contract, the marriage is off and the contract is destroyed. On the other hand, if they call acceptProposal() then it’s official, you are married!Β 

When you called proposeMarriage() it generated a new Marriage contract tying both you and the recipient of the proposal. You have to share the address of that contract with the other person for them to act upon it. You can either find it on Etherscan.com or call getMarriageContract() on MarriageRegistry by passing either address as parameter.

3- πŸ“™ Get your marriage certificate: You (or anyone) can query the MarriageRegistry to get the marriage certificate stating the address of both spouses as well as the marriage date. To get the marriage certificate just call getMarriageCertificate() and pass the marriage contract address as parameter.

4-πŸ’” Getting divorced: Sometimes married life is not as we thought it would be and the couple feels it is best to get divorced. For situations like this, we have the requestDivorce() function. As with the marriage proposal, both spouses have to agree on this in order for the divorce to be performed. Once both parties call this function, the contract will be destroyed and they will be free to marry someone else. (Or to stay single 🎊)

The MarriageRegistry contract has been deployed in Ropsten testnet and verified through Etherscan at address: 0x57f38682c5E802f78cCC71B2D2932230b1C41c47

For more info, read my article on Medium.

marriage_ethereum's People

Contributors

pabloruiz55 avatar

Watchers

James Cloos avatar Bass Jobsen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.