Yes i am not out of my mind and it is completely possible with the help of blockchain technology.Of course Blockchian will protect us from intervention of third parties.What we will be building is a digital asset (ERC721 token) on blockchain with the help of solidity(by writing smart contracts).We will then use IPFS to deploy our Dapp.
We need to get hold of truffle,get it via npm install -g truffle
.You need to have Node.js v6+ LTS and npm (comes with Node) and Git too.This tutorial is best suited for unix environment.We would also be needing ganache or testrpc for local deployment.
mkdir tajmahal
and navigate into folder cd tajmahal
truffle init
.
// Allows us to use ES6 in our migrations and tests.
// require('babel-register')
// require('babel-polyfill')
module.exports = {
networks: {
development: {
host: '127.0.0.1',
port: 7545,
network_id: '*', // Match any network id
}
},
};
truffle compile
2_deploy_contracts.js
and add the following code in it.linkvar Tajmahal = artifacts.require("Tajmahal");
module.exports = function(deployer) {
deployer.deploy(Tajmahal);
}
truffle migrate
(make sure ganache is running in background).Logicaly speaking there are tons of way to deploy smart contract on tons of network(ropsten,rinkbey,mainnet,private).We coulduse truffle also to deploy our network.In this i will be discussing deployment of smart contracts on ropsten network.
Since we have made and deployed our smart contracts,we need to put a pretty face to it so that normal user can interact with it.
<script src="https://cdn.jsdelivr.net/gh/ethereum/web3.js/dist/web3.min.js"></script>
code imports web3js in html file.<script>
if (typeof web3 !== 'undefined') {
web3 = new Web3(web3.currentProvider);
} else {
// set the provider you want from Web3.providers
web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
}
</script>
<script>
// Previous if/else statement removed for brevity
web3.eth.defaultAccount = web3.eth.accounts[0];
//paste your abi function here
var TajmahalContract = web3.eth.contract(YOUR ABI);
//paste your contract address here.
var Tajmahal = TajmahalContract.at('PASTE CONTRACT ADDRESS HERE');
console.log(Tajmahal);
</script>
ipfs daemon
ipfs add -r frontend/
added QmeYxwj4CwCeGVhwi3xLrmBZUUFQdftshSiGLrTdTnWEVV frontend
https://gateway.ipfs.io/ipfs/<your hash here>.
So the example site is at https://gateway.ipfs.io/ipfs/QmWrrQHELjXW41tkM2RUCGGyyHqKzauCZMSvcxa3271GP6/
ipfs name publish <your site hash>
ipfs name resolve <peerId>
or by viewing https://gateway.ipfs.io/ipns/<peerID>
(notice the directory is ipns not ipfs).Creating your own ERC721 Token on MOAC blockchain Before you read this page, you should: Understand the following general concepts: blockchain, smart contracts, ERC721 tokens; Be able to write a basic
Governance for Digital Autonomous Organizations. Features Built for Ethereum using Web3. Implements Graph Protocol to read blockchain. Explore MolochDAO compatible contracts. Deployable on IPFS. Suppo
Apollo tutorial This is the fullstack app for the Apollo tutorial. �� File structure The app is split out into two folders: start: Starting point for the tutorial final: Final version From within the
ipfs-image-dapp Overview IPFS and the Blockchain are a perfect match. Why? You can address large amounts of data with IPFS and place the immutable, permanent IPFS links into a blockchain transaction.
Fullstack GraphQL Simple Demo Application API built with Node + Express + GraphQL + Sequelize (supports MySQL, Postgres, Sqlite and MSSQL). WebApp built with React + Redux. Written in ES6 using Babel
A complete, serverless, full-stack application built on AWS Lambda, AWS HTTP API, Express.js, React and DynamoDB. Live Demo: https://www.serverless-fullstack-app.com Quick Start Install the latest ver