All Projects → JackBekket → escrow-eth

JackBekket / escrow-eth

Licence: other
Escrow contract

Programming Languages

javascript
184084 projects - #8 most used programming language
Less
1899 projects
HTML
75241 projects
solidity
1140 projects

Projects that are alternatives of or similar to escrow-eth

atomic-markets
Generalized atomic swap marketplaces for ERC-777(advanced token standard) and ERC-721 (non-fungible tokens)
Stars: ✭ 30 (-26.83%)
Mutual labels:  dapp, truffle
the-great-venus
🗿 The Great Venus (2018) - Turn-based web RPG based on Ethereum platform
Stars: ✭ 19 (-53.66%)
Mutual labels:  dapp, truffle
svelte-box
A truffle box for svelte
Stars: ✭ 60 (+46.34%)
Mutual labels:  dapp, truffle
Eth Vue
Featured in Awesome Vue [https://github.com/vuejs/awesome-vue], a curated list maintained by vuejs of awesome things related to the Vue.js framework, and Awesome List [https://awesomelists.net/150-Vue.js/3863-Open+Source/18749-DOkwufulueze-eth-vue], this Truffle Box provides everything you need to quickly build Ethereum dApps that have authentication features with vue, including configuration for easy deployment to the Ropsten Network. It's also Gravatar-enabled. Connecting to a running Ganache blockchain network from Truffle is also possible -- for fast development and testing purposes. Built on Truffle 5 and Vue 3, eth-vue uses vuex for state management, vuex-persist for local storage of app state, and vue-router for routing. Authentication functionalities are handled by Smart Contracts running on the Ethereum blockchain.
Stars: ✭ 171 (+317.07%)
Mutual labels:  dapp, truffle
React-Ethereum-Movie-Rating-Dapp
React-Ethereum Decentralized App Starter
Stars: ✭ 16 (-60.98%)
Mutual labels:  dapp, truffle
Angular Truffle Starter Dapp
Angular CLI + Truffle Starter Dapp; write, compile & deploy smart contracts on Ethereum blockchains
Stars: ✭ 174 (+324.39%)
Mutual labels:  dapp, truffle
eth-plot
r/place inspired Dapp
Stars: ✭ 36 (-12.2%)
Mutual labels:  dapp, truffle
Disperse
React/Redux dApp (decentralized app) boilerplate using Ethereum's blockchain
Stars: ✭ 36 (-12.2%)
Mutual labels:  dapp, truffle
truffle-react-redux
Template for your next dapp with React and Redux
Stars: ✭ 20 (-51.22%)
Mutual labels:  dapp, truffle
starter-kit-gsn
An OpenZeppelin starter kit focused on GSN.
Stars: ✭ 39 (-4.88%)
Mutual labels:  dapp, truffle
Web3 Vs Ethers
A basic cheatsheet of Web3.js vs Ethers (along w/ example apps!)
Stars: ✭ 103 (+151.22%)
Mutual labels:  dapp, truffle
peerai-api
Peerism's Peer.ai API built with Truffle, Node.js, Express.js, Solidity, and Ethereum TestRPC
Stars: ✭ 18 (-56.1%)
Mutual labels:  dapp, truffle
Starter Kit
An OpenZeppelin starter kit containing React, OpenZeppelin SDK & OpenZeppelin Contracts.
Stars: ✭ 101 (+146.34%)
Mutual labels:  dapp, truffle
Erc20 Generator
Create an ERC20 Token for FREE in less than a minute with the most used Smart Contract Generator for ERC20 Token. No login. No setup. No coding required.
Stars: ✭ 202 (+392.68%)
Mutual labels:  dapp, truffle
Trace
Supply chain transparency platform proof-of-concept based on the Ethereum blockchain ✍️
Stars: ✭ 52 (+26.83%)
Mutual labels:  dapp, truffle
Blockchain
Recently started working on Blockchain technologies. This repo contains material related to Blockchain technologies. My current focus on dAPP development using Hyperledger.
Stars: ✭ 21 (-48.78%)
Mutual labels:  dapp, truffle
Angular Truffle Dapp
Angular + Truffle = Beautiful Material Dapp that can be scaled
Stars: ✭ 12 (-70.73%)
Mutual labels:  dapp, truffle
Dapp
TypeScript React Redux Ethereum IPFS Starter Kit
Stars: ✭ 33 (-19.51%)
Mutual labels:  dapp, truffle
create-truffle-dapp
Create and deploy Truffle projects with no configuration.
Stars: ✭ 17 (-58.54%)
Mutual labels:  dapp, truffle
Motoro
Smart contracts for decentralized rentals of vehicles.
Stars: ✭ 96 (+134.15%)
Mutual labels:  dapp, truffle

escrow-eth

Contract of escrow-eth

EscrowSimple - simple contract of eth esrow without state values. (https://github.com/JackBekket/escrow-eth/blob/master/contracts/EscrowSimple.sol)

EscrowAdvansed (https://github.com/JackBekket/escrow-eth/blob/master/contracts/EscrowAdvansed.sol)

default seller is accounts[0] (msg.sender), default arbiter is accounts[1], default buyer is accounts[2] -- in demo.

#Install and deploy

  1. clone this repo
git clone https://github.com/JackBekket/escrow-eth.git
  1. npm install and make sure that you have truffle installed globally.
  2. truffle migrate --reset will deploy contract with some demodata defined in migration sript. migration script can be found here: (https://github.com/JackBekket/escrow-eth/blob/master/migrations/2_deploy_contracts.js)
  3. npm run build will build your dapp frontend with webpack builder. Make sure that you have your contract deployed.
  4. You can interact with your dapp by simply open index.html from build directory after previous command.

Contract Interaction

var contr = EscrowAdvansed.deployed();

Truffle 2.x or standart web3 Javascript-console

if you are using standart web3 Javascript-console or truffle ver 2.x you should type:

contr.somefunction(args);

like:

contr.start(0,'bla',1,{from: web3.eth.accounts[1], value:100});

or you can call variable like:

contr.totalEscrows.call();

Truffle 3.x

Cause of new break-changes in new version of truffle (http://truffleframework.com/tutorials/upgrading-from-truffle-2-to-3#contract-abstractions-deployed-is-now-thennable)

you should use the next sintax instead of above one.:

contr.then(function(res){return res.somefunction(args)});

like:

contr.then(function(res){return res.start(0,'bla',1,{from: web3.eth.accounts[1], value:100})});

and call variable like this:

contr.then(function(res){return res.totalEscrows.call()});

#NodeJS controller All functions could be found in source file (here:https://github.com/JackBekket/escrow-eth/blob/master/app/javascripts/app.js)

#Frontend Example source file may be found here - (https://github.com/JackBekket/escrow-eth/blob/master/app/javascripts/app.js) build file you can open in your browser and check how it works.

Frontend is a simple dapp which can be used for interaction with contract functions, but, however it is not a complete whole dapp which can be used as standalone application.

#Features

  1. All functions was tested and implemented
  2. In this app accounts[0] is seller, accounts[1] is arbiter and accounts[2] is buyer. For live version just replace all of it to account.
  3. lockId is global variable defined on window level of application and can be cheked and define from blockchain by any user, which allow to use it application as fully decentralized serverless application. However, if it would use in server application - this variable should store there.
  4. For now all interaction with every user and group users are connected through solidity events, which, of course, not realy good method of communication, especially because you are get all events from this contract ever been fired. For fixing this I suggest using special handler, which will store info about 'present' deal status. This handler must be in server side or in smart contract of hier level (like registry).
  5. There might be some bugs with web3, webpack, or something else. for now working version of web3 is ^0.18.3. version lower than will get you error with webpack build process.
  6. For collect buyers data about deals with different sellers you must use some server-side script or higher level contract.
  7. For collect arbiters data about deals with different sellers you must use some server-side script or higher level contracts.
  8. In some actions it could be pitfall with transfering 'address' value, cause JS itself is not strong-typable language and could converse address into useless and odd number. Be careful. Probably it could be fix with flow.js plugin for babel and webpack.
  9. Application contain all sections for sellers, buyers and arbiters in one for best testing suite. In live version there are probably might be 3 different applications for sellers,buyers and arbiters, or, in serverfull solutions three diferent entities. All depends on what engine and how you want to use it.

#How to build yourown frontend with custom UI? You can use this file to create markdown: (https://github.com/JackBekket/escrow-eth/blob/master/app/index.html) Add your css main code here: (https://github.com/JackBekket/escrow-eth/blob/master/app/stylesheets/app.css) or import it from main js file here: (https://github.com/JackBekket/escrow-eth/blob/master/app/javascripts/app.js) #Custom UI pipeline Also you can use any other UI modules for frontend, which can be build with webpack. WARN - if you will use some other builders - make sure that you understand what you are doing and that web3.js is imported properly way.

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].