Giter VIP home page Giter VIP logo

udacity-blockchain-capstone's Introduction

Udacity Blockchain Capstone

Blockchain capstone project consisting of building a decentralized housing product for Udacity's Blockchain course.

Real Estate NFT Collection and Transactions

The collection of the real estate NFT's on OpenSea:

The transactions for the NFT's being minted:

NFTS were purchased with this account:

The transactions for the NFT's being purchased:

Libraries

# dotenv
Used to load environment variables from a .env file

# truffle-assertions
Helper library to assist with checking for events

# truffle-hdwallet-provider
HD Wallet-enabled Web3 provider. Use it to sign transactions for addresses

Versions

# Truffle version
v5.3.12

# Node version
v12.22.1

# web3 version
v1.2.1

Contract Details

  • All contract ABI's are available under eth-contract/build/contracts

  • Contract deployment details are as follows:

Deploying 'Verifier'
--------------------
> transaction hash:    0x2d51d9b804b75c445b53b9dda1dee58d1da061c447e15feeb6e199b7728a5073
> contract address:    0xcC4B6a2611512cD53a9E66bB8139BB66D874D153
> account:             0x85C2A38b0251fbe7E5bDBb43f34212c0E32e9D3B

Deploying 'SolnSquareVerifier'
------------------------------
> transaction hash:    0xcc6c0138721d4cae8459a196737109bb6cf744487463a0184fa8c5fc9424b377
> contract address:    0xf6FC7Dd935F5c03a2D82c846Df112B6705E7AA50
> account:             0x85C2A38b0251fbe7E5bDBb43f34212c0E32e9D3B

Setup

Smart Contracts

# Configure a .env file with the following:
INFURA_ID=<Infura-Id>
BLOCKCHAIN_PRIVATE_KEY=<Private key of the metamask wallet address>

# Compile and build the smart contracts
truffle migrate --reset

Prerequisites

  • Ganache is setup with at least 10 accounts
ganache-cli --deterministic 100000000 --accounts 10 --networkId 5777 --defaultBalanceEther 1000 --allowUnlimitedContractSize

Tests

  • Run the tests for the smart contract
cd eth-contracts
truffle test
  • Test results
Contract: TestERC721Mintable
  match erc721 spec
    ✓ should return total supply
    ✓ should get token balance (41ms)
    ✓ should return token uri
    ✓ should transfer token from one owner to another (86ms)
  have ownership properties
    ✓ should fail when minting when address is not contract owner (230ms)
    ✓ should return contract owner (49ms)

Contract: SolnSquareVerifier
  ✓ Test if a new solution can be added for contract (44ms)
  ✓ Test if an ERC721 token can be minted for contract (638ms)

Contract: SquareVerifier
  ✓ Test verification with correct proof (519ms)
  ✓ Test verification with incorrect proof (548ms)


10 passing (5s)

Project Resources

udacity-blockchain-capstone's People

Contributors

ton3s avatar

Watchers

 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.