All Projects → TaraTritt → eos-blog-dapp

TaraTritt / eos-blog-dapp

Licence: other
Simple Blog DApp built with React for the EOSIO Blockchain

Programming Languages

javascript
184084 projects - #8 most used programming language
C++
36643 projects - #6 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to eos-blog-dapp

Eosio Card Game Repo
The Elemental Battles Tutorial is divided into easy to follow lessons that take you through the process of creating your own fully-functional blockchain-based dApp.
Stars: ✭ 139 (+561.9%)
Mutual labels:  dapp, eosio
Eosio Project Boilerplate Simple
This repository demonstrates the eosio platform running a blockchain as a local single node test net with a simple DApp, NoteChain.
Stars: ✭ 134 (+538.1%)
Mutual labels:  dapp, eosio
EOSBank
EOS Bank (CPU rent contract)
Stars: ✭ 45 (+114.29%)
Mutual labels:  dapp, eosio
alcor-ui
Alcor Exchange | First self-listing onchain DEX for eosio tokens;
Stars: ✭ 103 (+390.48%)
Mutual labels:  dapp, eosio
contracts
Contracts for FundRequest (platform, token, crowdsale)
Stars: ✭ 56 (+166.67%)
Mutual labels:  dapp
EOSWallet
🔐EOS Wallet: Manage your EOS accounts with steroids :)
Stars: ✭ 36 (+71.43%)
Mutual labels:  eosio
guardian
A programming language for stack-based smart contract VMs.
Stars: ✭ 13 (-38.1%)
Mutual labels:  dapp
streamingfast
The dfuse Blockchain Data Platform
Stars: ✭ 41 (+95.24%)
Mutual labels:  eosio
open-api
api.openfuture.io
Stars: ✭ 41 (+95.24%)
Mutual labels:  dapp
workshop-todo-dapp
A workshop into adding realtime collaboration in a typical To-do app
Stars: ✭ 29 (+38.1%)
Mutual labels:  dapp
lens
The official network explorer for Wavelet.
Stars: ✭ 28 (+33.33%)
Mutual labels:  dapp
polkadot-apps
Fork of Polkadot.js Apps with Subsocial types.
Stars: ✭ 17 (-19.05%)
Mutual labels:  dapp
tasit-sdk
A JavaScript / TypeScript SDK for making native mobile Ethereum dapps using React Native
Stars: ✭ 93 (+342.86%)
Mutual labels:  dapp
awesome eos
General Catalog for EOS resources
Stars: ✭ 21 (+0%)
Mutual labels:  eosio
lsxc
Compile Livescript + Pug + React + SASS as a single component
Stars: ✭ 17 (-19.05%)
Mutual labels:  dapp
nft-app
How to create your own NFT and mint NFT token
Stars: ✭ 145 (+590.48%)
Mutual labels:  dapp
web3-webpacked
Drop-in web3 solution for single-page Ethereum dApps
Stars: ✭ 36 (+71.43%)
Mutual labels:  dapp
solidity-cli
Compile solidity-code faster, easier and more reliable
Stars: ✭ 49 (+133.33%)
Mutual labels:  dapp
oracles-contract
New version of POA Network consensus contracts is here: https://github.com/poanetwork/poa-network-consensus-contracts
Stars: ✭ 25 (+19.05%)
Mutual labels:  dapp
SmartDev-Scaffold
应用开发脚手架,可基于智能合约文件,一键生成区块链应用的代码
Stars: ✭ 22 (+4.76%)
Mutual labels:  dapp

eos-blog-dapp

Instructions and implementation written and tested for EOSIO v1.0.7

Prerequisites

You have completed the steps in Building EOSIO from the EOSIO Developer Portal with keosd & nodeos running.

Make sure to checkout the tag v1.0.7

git checkout tags/v1.0.7
git submodule update --init --recursive

Before creating an account to deploy the contract you have to create a default wallet for the eosio account and import the eosio private key.

Default wallet & eosio account

  1. Create the default wallet
    • Be sure to save this password somewhere safe. This password is used to unlock (decrypt) your wallet file.
    # cleos wallet create
    cleos wallet create 
  2. Import the eosio private key into the default wallet Find your key pair in config.ini, which can be found at:
    • Mac OS: ~/Library/Application Support/eosio/nodeos/config
    • Linux: ~/.local/share/eosio/nodeos/config
    # cleos wallet import <Private Key>
    cleos wallet import 

Getting Started

  • cleos, keosd, and nodeos executables can be found in the eos/build/programs folder after successfully building the project
  • eosiocpp executable can be found in the eos/build/tools folder
  • They should already be available in your path

When running cleos if you get an error that it is unable to connect to keosd, execute the following:

  1. Modify the wallet config.ini
    • ~/eosio-wallet/config.ini
  2. Change http-server-address = 127.0.0.1:8889
  3. Run keosd
    keosd
  4. Specify the wallet url when running cleos
    cleos --wallet-url="http://localhost:8889/"

Contract Deployment

  1. Create a wallet
    • Save the password. You will need it to unlock your wallet
    # cleos wallet create -n <Wallet Name>
    cleos wallet create -n blog.platform
  2. Create keys - owner and active keys
    • Save the private keys. You will need them to add the keys to the wallet
    cleos create key
    cleos create key
  3. Import keys into wallet
    # cleos wallet import <Private Key> -n <Wallet Name>
    cleos wallet import <Owner Private Key> -n blog.platform
    cleos wallet import <Active Private Key> -n blog.platform
  4. Create accounts for blog smart contract
    • Remember that accounts have no relation with keys in wallets, aside from when you sign transactions to make calls to your contract with keys
    # cleos create account eosio <Account> <Owner Public Key> <Active Public Key>
    cleos create account eosio blog <Owner Public Key> <Active Public Key>
  5. Compile contract to webassembly with eosiocpp
    • If you have trouble compiling, run sudo make install in the eos/build directory
    # eosiocpp -o <Target> <Smart Contract File>
    eosiocpp -o contract/blog.wast contract/blog.cpp
  6. Generate ABI file
    # eosiocpp -g <Target> <Smart Contract File>
    eosiocpp -g contract/blog.abi contract/blog.cpp
  7. Deploy contract
    # cleos set contract <Account> <Path to contract folder> <Path to .wast file> <Path to .abi file>
    cleos set contract blog ./contract ./contract/blog.wast ./contract/blog.abi
  8. Create a blog post
    # cleos push action <Account> <Action name> '<Data>' -p <Account>@active
    cleos push action blog createpost '["blog", "Sample Blog Title", "Sample blog content blah blah", "misc"]' -p blog@active
  9. Check that the blog post was added to the table
    # cleos get table <Contract> <Scope> <Table>
    cleos get table blog blog post

Frontend Config

  1. Update the frontend/src/lib/eos-client.js with your EOS node configuration
    const rpc = new eosjs.Rpc.JsonRpc('<HTTP Endpoint>');
    const signatureProvider = new eosjs.SignatureProvider(['<Active Private Key>']);
    • If you're connecting to your local running nodeos daemon:
    const rpc = new eosjs.Rpc.JsonRpc('http://localhost:8888');
    • You should have set the active key when you created the account in step 4 above
  2. Start the react app
    • If you get a CORS error when running the app, modify the nodeos config.ini
      • Mac OS: ~/Library/Application Support/eosio/nodeos/config
      • Linux: ~/.local/share/eosio/nodeos/config
    • Set access-control-allow-origin = *
    cd frontend
    npm start
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].