Ethereum DApp for Property Claim by mint tokens on a Real Estate Marketplace – 以太坊DApp在房地产市场上通过造币代币进行财产索赔区块链毕设代写

区块链毕设代写本文提供国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,Ethereum DApp for Property Claim by mint tokens on a Real Estate Marketplace – 以太坊DApp在房地产市场上通过造币代币进行财产索赔区块链毕设代写 是一篇很好的国外资料

Ethereum DApp for Property Claim by mint tokens on a Real Estate Marketplace

Introduction

This project consists in a decentralized application (DApp) for property claim by mint tokens on a real estate marketplace.

Important: The project was made with the versions below, since Truffle v5 comes with Solidity v0.5 with many changes concerning mutability and visibility.

  • Truffle v5.4.7 (core: 5.4.7)
  • Solidity v0.5.16 (solc-js)
  • Ganache CLI v6.12.2 (ganache-core: 2.13.2)
  • Node v13.14.0
  • Web3.js v1.5.2

Important: The project didn’t use any external libraries worth mentioning and also didn’t use IPFS to host the frontend part decentralized as well.

Getting Started

  1. Clone this repository.
  2. Install the dependencies with NodeJS and NPM, and also install Docker to manage containers (needed for ZoKrates).
  3. Test the application making calls to the contract on the Rinkeby Test Network.
  4. Take a look at the transactions happening on the Rinkeby Test Network at Etherscan explorer.

Dependencies

  1. Create an Ethereum account. Ethereum is a decentralized platform that runs smart contracts.
  2. Create an account and install the Metamask extension on your web browser.
  3. Create an Infura account to publish the contracts into the Rinkeby Test Network.
  4. Install Truffle CLI. Truffle is the most popular development framework for Ethereum.
  5. Use this passphrase with Ganache command as a suggestion “candy maple cake sugar pudding cream honey rich smooth crumble sweet treat”. Ganache is part of the Truffle suite that you can use to run a personal Ethereum blockchain.
  6. Verify the contract with ZoKrates. ZoKrates is a toolbox for zkSNARKs on Ethereum that helps you by generating verifiable computation proofs in Solidity from your DApp.
  7. Mint tokens using MyEtherWallet and verify the tokens on OpenSea marketplace.

Important: You will need your personal passphrase from your Ethereum account to publish into the Rinkeby Test Network, hence the .secret file in the truffle-config.js, even tough being a test network.

Instructions

  1. Install the dependencies:
  npm i   npm i -g ganache-cli   npm i -g truffle
  1. Turn on the Ganache suite so that you will have pre-defined accounts to test the contracts:
  ganache-cli -m "candy maple cake sugar pudding cream honey rich smooth crumble sweet treat"

Ethereum DApp for Property Claim by mint tokens on a Real Estate Marketplace - <a href=以太坊ethDApp在房地产市场上通过造币代币进行财产索赔”>

  1. Compile, migrate and test the contracts with truffle (on a separate console). It will use the previously up and running ganache locally blockchain. Remember that the contracts are inside ./eth-contracts. You can either test with a specific test file or just test all of them.

Important: I would suggest re-running ganache-cli if you are having trouble to migrate the contracts, so that ganache reset the network, all the gas used, and else, because it does help sometimes.

  truffle compile   truffle migrate   truffle test ./test/TestERC721Mintable.js   truffle test
  1. Implement Zokrates to verify proof. By running the command below Docker wil install ZoKrates 0.3.0 version and open it’s shell to generate the proof flow:
  docker run -v [project folder]:/home/zokrates/code -ti zokrates/zokrates:0.3.0 /bin/bash

Inside ZoKrates shell run the commands below. Get on the square.code folder, compile and work on the flow untill you export the verifier.

  cd code/zokrates/code/square   ~/zokrates compile -i square.code   ~/zokrates setup   ~/zokrates compute-witness -a 3 9   ~/zokrates generate-proof   ~/zokrates export-verifier

Ethereum DApp for Property Claim by mint tokens on a Real Estate Marketplace - <a href=以太坊ethDApp在房地产市场上通过造币代币进行财产索赔”>

Ethereum DApp for Property Claim by mint tokens on a Real Estate Marketplace - <a href=以太坊ethDApp在房地产市场上通过造币代币进行财产索赔”>

You can then test both TestSquareVerifier.js and TestSolnSquareVerifier.js files to prove ZoKrates verifiable computation.

  truffle test ./test/TestSquareVerifier.js   truffle test ./test/TestSolnSquareVerifier.js   truffle test

Ethereum DApp for Property Claim by mint tokens on a Real Estate Marketplace - <a href=以太坊ethDApp在房地产市场上通过造币代币进行财产索赔”>

  1. Publish the contracts into the Rinkeby Test Network with your Infura key:
  truffle migrate --reset --network rinkeby

Output

Here is an example of the smart contract in the blockchain and the transactions on Rinkeby. You can see the contract ABI on ./abi.json.

Etherscan info:

  • Transaction: 0x4aa191ef9227cf254006b23e66a5c058f0418e8fcfc83e3feecea238c40b9cf6

Ethereum DApp for Property Claim by mint tokens on a Real Estate Marketplace - <a href=以太坊ethDApp在房地产市场上通过造币代币进行财产索赔”>

  • Token: 0xd17eb6e75a6a67b0d00d2572bd3b0045cf71bafa

Ethereum DApp for Property Claim by mint tokens on a Real Estate Marketplace - <a href=以太坊ethDApp在房地产市场上通过造币代币进行财产索赔”>

  • Token at OpenSea: 0xd17eb6e75a6a67b0d00d2572bd3b0045cf71bafa

Ethereum DApp for Property Claim by mint tokens on a Real Estate Marketplace - <a href=以太坊ethDApp在房地产市场上通过造币代币进行财产索赔”>

Ethereum DApp for Property Claim by mint tokens on a Real Estate Marketplace - <a href=以太坊ethDApp在房地产市场上通过造币代币进行财产索赔”>

  • Selling process:

Ethereum DApp for Property Claim by mint tokens on a Real Estate Marketplace - <a href=以太坊ethDApp在房地产市场上通过造币代币进行财产索赔”>

Ethereum DApp for Property Claim by mint tokens on a Real Estate Marketplace - <a href=以太坊ethDApp在房地产市场上通过造币代币进行财产索赔”>

Ethereum DApp for Property Claim by mint tokens on a Real Estate Marketplace - <a href=以太坊ethDApp在房地产市场上通过造币代币进行财产索赔”>

Ethereum DApp for Property Claim by mint tokens on a Real Estate Marketplace - <a href=以太坊ethDApp在房地产市场上通过造币代币进行财产索赔”>

Ethereum DApp for Property Claim by mint tokens on a Real Estate Marketplace - <a href=以太坊ethDApp在房地产市场上通过造币代币进行财产索赔”>

Ethereum DApp for Property Claim by mint tokens on a Real Estate Marketplace - <a href=以太坊ethDApp在房地产市场上通过造币代币进行财产索赔”>

  • Contract: 0xd17eb6e75a6A67B0D00d2572bd3b0045CF71bafa

Ethereum DApp for Property Claim by mint tokens on a Real Estate Marketplace - <a href=以太坊ethDApp在房地产市场上通过造币代币进行财产索赔”>


Ethereum DApp for Property Claim by mint tokens on a Real Estate Marketplace

Introduction

This project consists in a decentralized application (DApp) for property claim by mint tokens on a real estate marketplace.

Important: The project was made with the versions below, since Truffle v5 comes with Solidity v0.5 with many changes concerning mutability and visibility.

  • Truffle v5.4.7 (core: 5.4.7)
  • Solidity v0.5.16 (solc-js)
  • Ganache CLI v6.12.2 (ganache-core: 2.13.2)
  • Node v13.14.0
  • Web3.js v1.5.2

Important: The project didn’t use any external libraries worth mentioning and also didn’t use IPFS to host the frontend part decentralized as well.

Getting Started

  1. Clone this repository.
  2. Install the dependencies with NodeJS and NPM, and also install Docker to manage containers (needed for ZoKrates).
  3. Test the application making calls to the contract on the Rinkeby Test Network.
  4. Take a look at the transactions happening on the Rinkeby Test Network at Etherscan explorer.

Dependencies

  1. Create an Ethereum account. Ethereum is a decentralized platform that runs smart contracts.
  2. Create an account and install the Metamask extension on your web browser.
  3. Create an Infura account to publish the contracts into the Rinkeby Test Network.
  4. Install Truffle CLI. Truffle is the most popular development framework for Ethereum.
  5. Use this passphrase with Ganache command as a suggestion “candy maple cake sugar pudding cream honey rich smooth crumble sweet treat”. Ganache is part of the Truffle suite that you can use to run a personal Ethereum blockchain.
  6. Verify the contract with ZoKrates. ZoKrates is a toolbox for zkSNARKs on Ethereum that helps you by generating verifiable computation proofs in Solidity from your DApp.
  7. Mint tokens using MyEtherWallet and verify the tokens on OpenSea marketplace.

Important: You will need your personal passphrase from your Ethereum account to publish into the Rinkeby Test Network, hence the .secret file in the truffle-config.js, even tough being a test network.

Instructions

  1. Install the dependencies:
  npm i   npm i -g ganache-cli   npm i -g truffle
  1. Turn on the Ganache suite so that you will have pre-defined accounts to test the contracts:
  ganache-cli -m "candy maple cake sugar pudding cream honey rich smooth crumble sweet treat"

Ethereum DApp for Property Claim by mint tokens on a Real Estate Marketplace - <a href=以太坊ethDApp在房地产市场上通过造币代币进行财产索赔”>

  1. Compile, migrate and test the contracts with truffle (on a separate console). It will use the previously up and running ganache locally blockchain. Remember that the contracts are inside ./eth-contracts. You can either test with a specific test file or just test all of them.

Important: I would suggest re-running ganache-cli if you are having trouble to migrate the contracts, so that ganache reset the network, all the gas used, and else, because it does help sometimes.

  truffle compile   truffle migrate   truffle test ./test/TestERC721Mintable.js   truffle test
  1. Implement Zokrates to verify proof. By running the command below Docker wil install ZoKrates 0.3.0 version and open it’s shell to generate the proof flow:
  docker run -v [project folder]:/home/zokrates/code -ti zokrates/zokrates:0.3.0 /bin/bash

Inside ZoKrates shell run the commands below. Get on the square.code folder, compile and work on the flow untill you export the verifier.

  cd code/zokrates/code/square   ~/zokrates compile -i square.code   ~/zokrates setup   ~/zokrates compute-witness -a 3 9   ~/zokrates generate-proof   ~/zokrates export-verifier

Ethereum DApp for Property Claim by mint tokens on a Real Estate Marketplace - <a href=以太坊ethDApp在房地产市场上通过造币代币进行财产索赔”>

Ethereum DApp for Property Claim by mint tokens on a Real Estate Marketplace - <a href=以太坊ethDApp在房地产市场上通过造币代币进行财产索赔”>

You can then test both TestSquareVerifier.js and TestSolnSquareVerifier.js files to prove ZoKrates verifiable computation.

  truffle test ./test/TestSquareVerifier.js   truffle test ./test/TestSolnSquareVerifier.js   truffle test

Ethereum DApp for Property Claim by mint tokens on a Real Estate Marketplace - <a href=以太坊ethDApp在房地产市场上通过造币代币进行财产索赔”>

  1. Publish the contracts into the Rinkeby Test Network with your Infura key:
  truffle migrate --reset --network rinkeby

Output

Here is an example of the smart contract in the blockchain and the transactions on Rinkeby. You can see the contract ABI on ./abi.json.

Etherscan info:

  • Transaction: 0x4aa191ef9227cf254006b23e66a5c058f0418e8fcfc83e3feecea238c40b9cf6

Ethereum DApp for Property Claim by mint tokens on a Real Estate Marketplace - <a href=以太坊ethDApp在房地产市场上通过造币代币进行财产索赔”>

  • Token: 0xd17eb6e75a6a67b0d00d2572bd3b0045cf71bafa

Ethereum DApp for Property Claim by mint tokens on a Real Estate Marketplace - <a href=以太坊ethDApp在房地产市场上通过造币代币进行财产索赔”>

  • Token at OpenSea: 0xd17eb6e75a6a67b0d00d2572bd3b0045cf71bafa

Ethereum DApp for Property Claim by mint tokens on a Real Estate Marketplace - <a href=以太坊ethDApp在房地产市场上通过造币代币进行财产索赔”>

Ethereum DApp for Property Claim by mint tokens on a Real Estate Marketplace - <a href=以太坊ethDApp在房地产市场上通过造币代币进行财产索赔”>

  • Selling process:

Ethereum DApp for Property Claim by mint tokens on a Real Estate Marketplace - <a href=以太坊ethDApp在房地产市场上通过造币代币进行财产索赔”>

Ethereum DApp for Property Claim by mint tokens on a Real Estate Marketplace - <a href=以太坊ethDApp在房地产市场上通过造币代币进行财产索赔”>

Ethereum DApp for Property Claim by mint tokens on a Real Estate Marketplace - <a href=以太坊ethDApp在房地产市场上通过造币代币进行财产索赔”>

Ethereum DApp for Property Claim by mint tokens on a Real Estate Marketplace - <a href=以太坊ethDApp在房地产市场上通过造币代币进行财产索赔”>

Ethereum DApp for Property Claim by mint tokens on a Real Estate Marketplace - <a href=以太坊ethDApp在房地产市场上通过造币代币进行财产索赔”>

Ethereum DApp for Property Claim by mint tokens on a Real Estate Marketplace - <a href=以太坊ethDApp在房地产市场上通过造币代币进行财产索赔”>

  • Contract: 0xd17eb6e75a6A67B0D00d2572bd3b0045CF71bafa

Ethereum DApp for Property Claim by mint tokens on a Real Estate Marketplace - <a href=以太坊ethDApp在房地产市场上通过造币代币进行财产索赔”>

部分转自网络,侵权联系删除区块链源码网

www.interchains.cc

https://www.interchains.cc/24064.html

区块链毕设网(www.interchains.cc)全网最靠谱的原创区块链毕设代做网站 部分资料来自网络,侵权联系删除! 最全最大的区块链源码站 ! QQ3039046426
区块链知识分享网, 以太坊dapp资源网, 区块链教程, fabric教程下载, 区块链书籍下载, 区块链资料下载, 区块链视频教程下载, 区块链基础教程, 区块链入门教程, 区块链资源 » Ethereum DApp for Property Claim by mint tokens on a Real Estate Marketplace – 以太坊DApp在房地产市场上通过造币代币进行财产索赔区块链毕设代写

提供最优质的资源集合

立即查看 了解详情