{"id":20394637,"url":"https://github.com/jackbekket/escrow-eth","last_synced_at":"2025-09-02T08:37:27.353Z","repository":{"id":173356766,"uuid":"81322785","full_name":"JackBekket/escrow-eth","owner":"JackBekket","description":"Escrow contract","archived":false,"fork":false,"pushed_at":"2022-04-05T18:51:19.000Z","size":5153,"stargazers_count":52,"open_issues_count":2,"forks_count":17,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-12T12:13:01.652Z","etag":null,"topics":["dapp","escrow","escrow-contract","ethereum","truffle"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JackBekket.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":["https://metamask.app.link/send/pay-0xdAC17F958D2ee523a2206206994597C13D831ec7/transfer?address=0xf9AE3E50B994Fa6914757958D65Ad1B3547fBe82\u0026uint256=5e19","https://metamask.app.link/send/pay-0xf9AE3E50B994Fa6914757958D65Ad1B3547fBe82?value=1e18"]}},"created_at":"2017-02-08T11:27:10.000Z","updated_at":"2024-12-22T01:39:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"a0cbdb57-789a-40df-bf0a-da72a0a2bc13","html_url":"https://github.com/JackBekket/escrow-eth","commit_stats":null,"previous_names":["jackbekket/escrow-eth"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JackBekket/escrow-eth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackBekket%2Fescrow-eth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackBekket%2Fescrow-eth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackBekket%2Fescrow-eth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackBekket%2Fescrow-eth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JackBekket","download_url":"https://codeload.github.com/JackBekket/escrow-eth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackBekket%2Fescrow-eth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273257154,"owners_count":25073529,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-02T02:00:09.530Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dapp","escrow","escrow-contract","ethereum","truffle"],"created_at":"2024-11-15T03:53:48.723Z","updated_at":"2025-09-02T08:37:26.583Z","avatar_url":"https://github.com/JackBekket.png","language":"JavaScript","funding_links":["https://metamask.app.link/send/pay-0xdAC17F958D2ee523a2206206994597C13D831ec7/transfer?address=0xf9AE3E50B994Fa6914757958D65Ad1B3547fBe82\u0026uint256=5e19","https://metamask.app.link/send/pay-0xf9AE3E50B994Fa6914757958D65Ad1B3547fBe82?value=1e18"],"categories":[],"sub_categories":[],"readme":"# escrow-eth\n\nContract of escrow-eth\n\n\nEscrowSimple - simple contract of eth esrow without state values.\n(https://github.com/JackBekket/escrow-eth/blob/master/contracts/EscrowSimple.sol)\n\nEscrowAdvansed\n(https://github.com/JackBekket/escrow-eth/blob/master/contracts/EscrowAdvansed.sol)\n\n\ndefault seller is accounts[0] (msg.sender), default arbiter is accounts[1], default buyer is accounts[2]\n-- in demo.\n\n#Install and deploy\n\n1. clone this repo\n```\ngit clone https://github.com/JackBekket/escrow-eth.git\n```\n2. ```npm install``` and make sure that you have truffle installed globally.\n3. ```truffle migrate --reset ``` will deploy contract with some demodata defined in migration sript.\nmigration script can be found here:\n(https://github.com/JackBekket/escrow-eth/blob/master/migrations/2_deploy_contracts.js)\n4. ```npm run build ``` will build your dapp frontend with webpack builder. Make sure that you have your contract deployed.\n5. You can interact with your dapp by simply open ```index.html``` from ```build``` directory after previous command.\n\n\n# Contract Interaction\n\n```\nvar contr = EscrowAdvansed.deployed();\n```\n\n# Truffle 2.x or standart web3 Javascript-console\n\n  if you are using standart web3 Javascript-console or ``` truffle ver 2.x ``` you should type:\n\n```\ncontr.somefunction(args);\n```\nlike:\n\n```\ncontr.start(0,'bla',1,{from: web3.eth.accounts[1], value:100});\n\n```\nor you can call variable like:\n\n```\ncontr.totalEscrows.call();\n\n```\n\n# Truffle 3.x\n\nCause 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)\n\nyou should use the next sintax instead of above one.:\n\n```\ncontr.then(function(res){return res.somefunction(args)});\n\n```\n  like:\n\n  ```\ncontr.then(function(res){return res.start(0,'bla',1,{from: web3.eth.accounts[1], value:100})});\n```\nand call variable like this:\n\n```\ncontr.then(function(res){return res.totalEscrows.call()});\n```\n\n\n#NodeJS controller\nAll functions could be found in source file (here:https://github.com/JackBekket/escrow-eth/blob/master/app/javascripts/app.js)\n\n\n#Frontend Example\nsource  file may be found here - (https://github.com/JackBekket/escrow-eth/blob/master/app/javascripts/app.js)\nbuild file you can open in your browser and check how it works.\n\nFrontend is a simple dapp which can be used for interaction with contract functions, but, however it is **not**\na complete whole dapp which can be used as standalone application.\n\n\n\n#Features\n1. All functions was tested and implemented\n2. In this app ```accounts[0]``` is seller, ```accounts[1]``` is arbiter and ```accounts[2]``` is buyer.\nFor live version just replace all of it to ```account```.\n3. 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.\nHowever, if it would use in server application - this variable should store there.\n4. For now all interaction with every user and group users are connected through solidity ```events```,\nwhich, of course, not realy good method of communication, especially because you are get all events from this contract ever been fired.\nFor fixing this I suggest using special handler, which will store info about 'present' deal status.\nThis handler must be in server side or in smart contract of hier level (like registry).\n5. There might be some bugs with web3, webpack, or something else. for now working version of web3 is ^0.18.3.\nversion lower than will get you error with webpack build process.\n6. For collect buyers data about deals with different sellers you **must** use some server-side script or higher level contract.\n7. For collect arbiters data about deals with different sellers you **must** use some server-side script or higher level contracts.\n8. 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.\n9. 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.\n\n#How to build yourown frontend with custom UI?\nYou can use this file to create markdown:\n(https://github.com/JackBekket/escrow-eth/blob/master/app/index.html)\nAdd your css main code here:\n(https://github.com/JackBekket/escrow-eth/blob/master/app/stylesheets/app.css)\nor import it from main js file here:\n(https://github.com/JackBekket/escrow-eth/blob/master/app/javascripts/app.js)\n#Custom UI pipeline\nAlso you can use any  other UI modules for frontend, which can be build with webpack.\nWARN - if you will use some other builders - make sure that you understand what you are doing and that web3.js is imported properly way.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackbekket%2Fescrow-eth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjackbekket%2Fescrow-eth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackbekket%2Fescrow-eth/lists"}