Coder Social home page Coder Social logo

blockchain-capstone's Introduction

Platinum Token - Capston Project

The capstone will build upon the knowledge we have gained in the Udacity course in order to build a decentralized housing product.

Introduction

In this project we´ll be minting platinum tokens to represent titles to the properties. We´ll use zk-SNARKs to create a verification system which can prove you have title to the property without revealing that specific information on the property. Once the token are verified and minted we will place them in a blockchain market place (OpenSea) for others to purchase

Tests

  1. Start ganache-cli:

ganache-cli -m "candy maple cake sugar pudding cream honey rich smooth crumble sweet treat" -l 9999999 -e 500

Please note the tests were run using Ganache CLI v6.5.0 (ganache-core: 2.6.0)

Use any of the following options:

  1. TestERC721Mintable -> npm run test721
  2. TestSquareVerifier -> npm run testsqver
  3. TestSolnSquareVerifier -> npm run testsolnver
  4. All tests -> npm run testall

Note: Since truffle root dir is on repo root dir, the following parameters were added to truffle-config.js:

  contracts_directory: "./eth-contracts/contracts/",
  contracts_build_directory: "./eth-contracts/build/",
  migrations_directory: "./eth-contracts/migrations/",
  test_directory: "./eth-contracts/test/",

Deployment on Rinkeby

  • Verifier (0x8a13E530Bf3D26D5D64d7c5562a2D32CB769C39b), created on tx: 0xf20e11304c192d5af6032ca7a10c358010910a1f5966589d0f04d6eb4912db6c
  • PlatinumERC721Token (0xD0c75A4B8Ba44F75D715daA431A172AcD17A6cbc) created on tx: 0x203032d2109c6407aebd4d8db20dca0c95abd8b2820d75f8930fb04073600d42
  • SolnSquareVerifier (0xa686653F769E37576eA7993AB0778690D90FCc34) created on tx: 0x6ef362984b17fda36320c40aa2cd9985e2bb2e4d642a9dc59a9d39e731d122a2c Contract´s ABI can be found in documents

Minting

OpenSea market place

OpenSea is a decentralized marketplace that is used for selling for crypto assets such as CryptoKitties and other digital assets that are powered off Ethereum. On OpenSea, you can buy or sell any of these items through a smart contract, meaning that no central authority ever holds custody of your items. You can even check out the source code for this smart contract here.

Find Platinum Market in OpenSea for SolnSquareVerifier tokens.

  • 5 tokens were listed by 0x09C9D084De851c2f8B08FfF5CEe78c5Cb3acE338: 198410, 19849, 19848, 19847, 19846
  • 0x6b002BfD1506c022786A36B3deB0dAeF1fe1CfcA bought the aforementioned tokens. Check here the balance of this account.

Please notice only tokens from 1-5 have metadata available so far.

How to use mintjs by OpenSea

In this project, the script was only used for minting new tokens with the following steps:

  1. Clone the project from https://github.com/ProjectOpenSea/opensea-creatures
  2. Set environment variables used by the script.
npm install
export INFURA_KEY="your Infura project Id"
export MNEMONIC="contract´s owner account mnemonic"
export OWNER_ADDRESS="contract´s owner address"
export NFT_CONTRACT_ADDRESS="NFT contract address which will be used for minting"
export NETWORK="rinkeby"
  1. Open mint.js and add you contract´s abi under NFT_ABI constant.
  2. In mint.js main function, check your contract´s mint function name and parameters under the NFT_CONTRACT_ADDRESS clause.
  3. Set the NUM_CREATURES constant at the begining of the script with the number of tokens you want to mint.
  4. run node scripts/mint.js and enjoy.

Contract Classes

Project Resources

blockchain-capstone's People

Contributors

jgongil avatar

Watchers

James Cloos 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.