All Projects → tooploox → ipfs-eth-database

tooploox / ipfs-eth-database

Licence: other
An example of usage IPFS in Ethereum Smart Contracts

Programming Languages

solidity
1140 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to ipfs-eth-database

typescript-eth-starter
🔌 Ethereum Dapp Basic Typescript Starter
Stars: ✭ 125 (+127.27%)
Mutual labels:  ipfs, smart-contracts
ethereum-dapp-ipfs-node.js-mongodb
以太坊开发DApp实战教程——用区块链、星际文件系统(IPFS)、Node.js和MongoDB来构建电商平台
Stars: ✭ 46 (-16.36%)
Mutual labels:  ipfs, ipfs-blockchain
Starlog
Starlog: Metadata Blockchain based on Substrate
Stars: ✭ 32 (-41.82%)
Mutual labels:  ipfs, ipfs-blockchain
nifty-game
🃏🎮A NFT(ERC721) card game build on Ethereum, Truffle, Ganache and hosting on IPFS.
Stars: ✭ 222 (+303.64%)
Mutual labels:  ipfs, smart-contracts
Go Matrix
First version of go-MATRIX, especially for TPS optimization and AI
Stars: ✭ 187 (+240%)
Mutual labels:  ipfs, smart-contracts
ehr-blockchain
Electronic Health Record (EHR) and Electronic Medical Record (EMR) systems. However, they still face some issues regarding the security of medical records, user ownership of data, data integrity etc. The solution to these issues could be the use of a novel technology, i.e., Blockchain. This technology offers to provide a secure, temper-proof pl…
Stars: ✭ 41 (-25.45%)
Mutual labels:  ipfs, ipfs-blockchain
kaizen-cli
🌐🛠 Kaizen is a powerful framework combine all the blockchain technologies to help you easily develop and deploy dapps
Stars: ✭ 33 (-40%)
Mutual labels:  ipfs, smart-contracts
Zentanetwork
Zentanetwork is a forkless Proof of Stake consensus for communication and data storage.
Stars: ✭ 15 (-72.73%)
Mutual labels:  smart-contracts, ipfs-blockchain
Supply Chain
Supply chain management on blockchain using Angular 4 + Truffle + IPFS + Ethereum
Stars: ✭ 76 (+38.18%)
Mutual labels:  ipfs, smart-contracts
Embark
Framework for serverless Decentralized Applications using Ethereum, IPFS and other platforms
Stars: ✭ 3,478 (+6223.64%)
Mutual labels:  ipfs, smart-contracts
Alpha
Follow the white rabbit 🐇
Stars: ✭ 304 (+452.73%)
Mutual labels:  ipfs, smart-contracts
IPFS-Ethereum-Image
【IPFS + 区块链 系列】 入门篇 - IPFS + Ethereum (下篇)-ipfs + Ethereum 大图片存储
Stars: ✭ 57 (+3.64%)
Mutual labels:  ipfs, ipfs-blockchain
prometheus-spec
Censorship-resistant trustless protocols for smart contract, generic & high-load computing & machine learning on top of Bitcoin
Stars: ✭ 24 (-56.36%)
Mutual labels:  ipfs, smart-contracts
edgevpn
⛵ The immutable, decentralized, statically built p2p VPN without any central server and automatic discovery! Create decentralized introspectable tunnels over p2p with shared tokens
Stars: ✭ 223 (+305.45%)
Mutual labels:  ipfs, ipfs-blockchain
estuary
A custom IPFS/Filecoin node that makes it easy to pin IPFS content and make Filecoin deals.
Stars: ✭ 195 (+254.55%)
Mutual labels:  ipfs
fcl-js
FCL (Flow Client Library) - The best tool for building JavaScript (browser & NodeJS) applications on Flow 🌊
Stars: ✭ 302 (+449.09%)
Mutual labels:  smart-contracts
ethereum-solidity-course-updated-code
Up-to-date Solidity/web3.js/React/Next.js code for the udemy.com course Ethereum and Solidity: The Complete Developer's Guide.
Stars: ✭ 161 (+192.73%)
Mutual labels:  smart-contracts
framework
Lightweight, open source and magic-free framework for testing solidity smart contracts.
Stars: ✭ 36 (-34.55%)
Mutual labels:  smart-contracts
demo-ipfs-todo
Simple ToDo app using window.ipfs
Stars: ✭ 16 (-70.91%)
Mutual labels:  ipfs
git-lfs-ipfs
Use IPFS as a git-lfs endpoint
Stars: ✭ 41 (-25.45%)
Mutual labels:  ipfs

IPFS in Ethereum Smart Contracts

This is a simple blog application that is a proof of concept of connecting Ethereum's smart contracts to JSON database stored on IPFS. The communication is based on Oraclize service.

How to run?

Prepare a blog contract

First you have to deploy a contract.

Here is an example how to deploy to Rinkeby testnet via infura node.

Set your mnemonic in wallet-config.json.

Run migrations:

 truffle migrate --network rinkeby-infura --reset

You should see the address of the contract:

Blog: 0x461192ab19b0a963a77fdc8dea5ee9ac4287ff31

We have to set this address in app/blog/config/blog.json file.

Install IPFS

You have to have your own IPFS node that will store the database. Installation process is described here.

After installation we can run the daemon:

ipfs daemon

Run the server

Install npm dependencies:

npm install

and run the server

./node_modules/.bin/parcel app/index.html

Prepare blogposts

Each blogpost is stored in JSON object that consists of two attributes: title and content.

Let's prepare two blogposts.

echo '{"title":"Title of the first post", "content": "This is the awesome content!"}' > post_1.json
echo '{"title":"Title of the second post", "content": "This is the most awesome content!"}' > post_2.json

And we have to add them to IPFS as follows:

ipfs add post_1.json; ipfs add post_2.json

You should see two hashes (addresses) of the files:

added QmU2yr8CQfrd26Yghjx2xGdg8ZdmRKRSwcD7eBgpvL91xf post_1.json
added QmRPdMo8HEoSWSPXg1NxvLPcDNdL7YocvhXdYHjGQaXmfC post_2.json

You should be able to read the files by ipfs cat command or by a public gateway:

ipfs cat QmU2yr8CQfrd26Yghjx2xGdg8ZdmRKRSwcD7eBgpvL91xf

{"title":"Title of the first post", "content": "This is the awesome content!"}
curl http://ipfs.io/ipfs/QmU2yr8CQfrd26Yghjx2xGdg8ZdmRKRSwcD7eBgpvL91xf

{"title":"Title of the first post", "content": "This is the awesome content!"}

Keep the hashes for the next step.

Now we can add our blogposts using following command:

node scripts/add-blog-post.js <FILE_ADDRESS>

In our case:

node scripts/add-blog-post.js QmU2yr8CQfrd26Yghjx2xGdg8ZdmRKRSwcD7eBgpvL91xf
node scripts/add-blog-post.js QmRPdMo8HEoSWSPXg1NxvLPcDNdL7YocvhXdYHjGQaXmfC

Then you should see the link to your blog

Your blog is available here:
http://localhost:1234/#/u/0x351944e0d307d536737de4c6f07382548437fb53

Now we can open the link above and check if our blog works properly.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].