status-im / hackathon

Status API Hackathon
http://hackathon.status.im
32 stars 48 forks source link

Split The Tab #25

Closed morpheism closed 7 years ago

morpheism commented 7 years ago

Status Hackathon Submission

Type: DApp Github Repo: https://github.com/jacintos/status-hackathon Short Demo Video: https://www.youtube.com/watch?v=SUp7s5xtZTk Description:

There are lots of problems around how to pay when you're out with friends. You find out the bar or restaurant is cash only. Bummer! Now you have to leave and find an ATM or convince your friends to move to another spot. Likewise, say a place takes credit, but they set a limit on the number of credit cards your party can pay with. Boo! Split the Tab solves these problems by 1) dividing up the bill and telling everyone how much they owe and 2) settling IOUs on the spot, immediately.

Challenges:

This dapp is based on Truffle Box React and the entire dapp was built during this hackathon. This was my first time working with React and ES6 along with Solidity and Status! I had heard good things about Redux, so I threw that in because, why not? Redux-Saga? Sounded cool.

I met the real challenge on the last day of the hackathon. Until this time I had spent all my time on UI. I started with Firebase as the backend, with the intention of switching it out for a Solidity contract, once the UI was in a good spot. Writing and debugging Solidity in Remix was easy. I spent a lot of time trying to understand how to transact and query with truffle-contract. I had no luck getting truffle-contract to work with Ropsten (though I did not have a fully-synced local RPC, to be fair). When it came time to integrate the dapp with my Solidity contract, I ran into issues running it within Status. Unfortunately, I did not have access to a Status build that allowed Remote Debugging webviews. Debugging with adb logcat was not getting me where I needed to go, so I left Firebase as the backend instead of a Solidity contract, for this submission.

The contract was deployed to Ropsten here: https://ropsten.etherscan.io/address/0x4a0a0853599c083ee0ffff0df938dd363f2a6d5a

Future Ideas and Work:

Sharing the short tab ID among friends is ok, but pointing the phone at a QR code is a better user experience. Status may consider conditionally allowing dapps access to the camera resource to make this possible. Powering the dapp with a Solidity contract is the ultimate goal. For the best user experience, e.g. to minimize transactions, there will need to be some UX workflow changes. Users would want to view a history of their past tabs. Geolocation could be tied in there, providing both user and business utility.

Team Members:

Preferred Name: Jacinto Shy Github Handle: @jacintos Slack Username: @jshy3 Twitter Handle: @morpheism

commiteth commented 7 years ago

Current balance: 0.00000000 Contract address: 0xd42fb59059369cc6af6052a4bfd55884c975533b QR Code Network: Mainnet To claim this bounty sign up at https://commiteth.com

morpheism commented 7 years ago

@jarradh commiteth has been showing "Deploying contract..." since I updated the description two days ago - should it be doing that?

benmorrow commented 7 years ago

There's nothing you need to do and it is working correctly. We'll use CommitETH to issue rewards at the end. I will send feedback that we can improve the user experience since it seems like the contract is stuck 👍 Added a GitHub issue for CommitETH