Git Product home page Git Product logo

solidity-domain-name-service's Introduction

Solidity-Domain-Name-Service

What does this project do?

This project runs a smart contract made in Solidity which allows users to:

  • claim Domain Names
  • Set a Domain Name's corresponding IP address
  • Read a Domain Name's corresponding IP address
  • Retrieve a list of user's owned Domain Names
  • Transfer ownership of Domain Names to other users for free
  • Offer ownership of Domain Names for specified price
    • Publicly (transfer ownership to any address in exchange for funds)
    • Privately (transfer ownership to specific address in exchange for funds)
  • Accept offers of Domain Names (Payable)
    • Public
    • Private

A web page front end allows users to interact with the smart contract (Currently a work in progress)

How to set it up

Install Truffle

npm install -g truffle

Install Ganache-cli

Using npm:

npm install -g ganache-cli

or, if you are using Yarn:

yarn global add ganache-cli

Run Ganache-cli

ganache-cli

This will start a private development blockchain on your machine. It is set up to be connected to through 127.0.0.1:8545

Compile and migrate project smart contracts

Open a new command line in this project's file directory and run

truffle compile

and

truffle migrate

This will have compiled and moved our smart contracts to our local development blockchain.

Save the address of your deployed DNS contract as you will need it later.

Run front end application

To start the front end application, go to the app/ folder

cd app/

install all project dependancies. (only needs to be done once)

npm i

Give index.html (located in app/) our deployed contract's address by opening it and replacing the address on line 51 with the address of our newly deployed DNS contract given to us earlier by ganache-cli

Now manually open index.html and the project's front end application will load into your default browser

For assistance with program evaluation, please read the notice below.

Notice

  • Front end application for this project does not yet allow users to use all available smart contract functions.
  • Problem: front end successfuly calls contract funtions but claimNewName() currently fails due to web3's default gasLimit.
  • Workaround: it is possible to deploy the contract's to the local ganache blockchain through remix, and call claimNewNames() using Remix. This will put claimedNames in the contract. One can then call the other functions of this project's front end (index.html) (remember to link contract address) to verify that they successfuly interact with the contract.
  • Here is a video going through the instructions above.
  • Any Contract functions not yet exposed by this project's front end can be readily tested using the environment found at https://remix.ethereum.org

solidity-domain-name-service's People

Contributors

sloganking 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.