Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TuBoleto - Using Crypto to pay public transit IRL #43

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions TuBoleto/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# default .gitignore for macos and windows environments
# please see https://github.com/github/gitignore for a more exhaustive
# list of templates


# macOS

# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# Windows

# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk

# Jekyll development

_site
.sass-cache
.jekyll-metadata
vendor
_config.gh-pages.yml
Gemfile.lock
24 changes: 24 additions & 0 deletions TuBoleto/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.

In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to <http://unlicense.org>
45 changes: 45 additions & 0 deletions TuBoleto/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@

# TuBoleto - Using Crypto to pay public transit IRL 📲🚍

#### Team name
TuBoleto

#### Hackathon Track

1. Infraestructure and Web3 Track
2. DeFi Track
3. Cash In Cash Out Track
4. Green Track

Region Latam:
1. Region Latam - Cripto en la vida real
2. Region Latam - Movilidad y migración
3. Region Latam - DeFi en Latam


#### Region location
Lima, Peru, LatAm

#### Team Members
- Josue Julcarima, Full-Stack / Blockchain Developer ([LinkedIn](https://www.linkedin.com/in/josu%C3%A9-andr%C3%A9s-julcarima-calle-128b0973/?locale=en_US)) ([GitHub](https://github.com/j05u3))
- Kefrin Huaman, Full-Stack Developer ([LinkedIn](https://pe.linkedin.com/in/kefrin)) ([GitHub](https://github.com/kmediv))
- Isaac Malca, Product Manager / Designer ([LinkedIn](https://pe.linkedin.com/in/isaac-malca-ruiz-8b5140a3))

#### Project Description
80% of Latin American commuters use public transit on a daily basis, making it an important place to widen crypto use. The minimal fees are key for micropayments. We have spoken with hundreds of our public transit users and we know how taxing can be spending 4 hours a day on public transit. We believe Web3 offers the opportunity to change this citizens lives. For us making crypto an accepted form of payment is just the first step, we aim to empower the blue collar worker. The value of our approach is connecting the web3 new economy to the traditional IRL economy to really displace fiat.

#### Summary
This is our first step, allowing the use of crypto as a means of payment for public transit. To do so people can connect their Valora wallets to send cUDS into TuBoleto. All of this inside TuBoleto. This ways users use their crypto to pay public transit by scanning a QR. Fares charged are defined by the distance traveled.
The next features can be seen in next steps, generally speaking its about rewarding users and define our tokenomics.

#### URLs
- [How to use TuBoleto?](https://docs.google.com/document/d/1axPAF13k2WvW_edsg5a6OS5uzDWePHvRtXrNC7ULqLg/edit)

#### Presentation
- [TuBoleto video](https://www.youtube.com/watch?v=eQ9Kcunc1d0)

#### Next Steps
This is already a working solution, 500 buses already use our system and accept payments but now with this hackathon we are adding Celo. Our next steps with regards to the use of this means of payment are basically defining whether or not we would use cUSD or generate another token in which case we have to define the tokenomics, specially ways to earn the token (like rewarding good user behavior, that is users who keep their sensors on and so provide useful information to the community) and promote its usage.

#### License
This repository includes an [unlicensed](http://unlicense.org/) statement though you may want to [choose a different license](https://choosealicense.com/).
Binary file added TuBoleto/TuBoleto321.apk
Binary file not shown.
2 changes: 2 additions & 0 deletions TuBoleto/assets/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Images
Add you logo, other visuals and presentation here.
2 changes: 2 additions & 0 deletions TuBoleto/codebase/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
codebase directory
Use this directory to showcase ALL of the code for the hackathon project.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
favicon.ico,1637902534000,0b54c3d14e761d2110dca9dd06fca6755cf0f329baac1d5c130ec8077dd3feac
logo192.png,1637902534000,0e54a5fdf726d31a137f4fbb087c674056955e14d07cad0c1aa23ccf0f229e42
logo512.png,1637902534000,a723aa10a22f4954e056bac22838470ed369862bc25d097ab083125c3b6c4e98
manifest.json,1637864245634,926ba42e67b97f80e038f67b592978adb82a2b13b69ca8742e710401b57e9da2
robots.txt,1637853583735,b2090cf9761ef60aa06e4fab97679bd43dfa5e5df073701ead5879d7c68f1ec5
asset-manifest.json,1637897399605,2786c79e4b67c77ee84a6f99d076969b7b25a734975b791547460354b2b99d76
index.html,1637897399605,9eb36371e18c416264c733b5c76f9524bd16e54319859a3fdebc04f48a3b23ae
static/css/main.d43252c5.chunk.css,1637897399607,d5721eeced95e8ff2c53dcc08c7b61a55327c3ddcdf0088a355bca315c318551
static/css/main.d43252c5.chunk.css.map,1637897399647,9e38d6f0f94866cced20a4671de9059f24a37b14b5eb2d631b42170ca62b67cf
static/js/2.8b7b04d0.chunk.js.LICENSE.txt,1637897399647,1928e1a220ff6a2805f7540d975b204724e4a8ac2ecfbd3b4886acb276e5746f
static/js/main.be5a06c9.chunk.js,1637897399615,463ecf6e139bf376a64cdf7767c2405cf0073868849350e9536e41c36739a893
static/js/runtime-main.b1cee3a0.js,1637897399647,5d3ef9145daad6b586e0d4d25f0dc09179d9e708aadc41bca0f8d51e5b45eb8b
static/js/main.be5a06c9.chunk.js.map,1637897399647,95b3f381bb744f00523fb3e497f1b756905cad28bda35024fdb3af6a1ff3b251
static/js/runtime-main.b1cee3a0.js.map,1637897399648,64fbebdde2e084cee5e054cb69ad3d44c3e6e85a77853a4cea92200c4c984f4e
static/js/2.8b7b04d0.chunk.js,1637897399650,e1dfe934768ef44e5935347ee327a4bef4f3b838c5ed52d7db643f6fe290d799
static/js/2.8b7b04d0.chunk.js.map,1637897399653,7a914992901d318a99a3d9310455c62162d7de3d29f9858ac17583926845a156
5 changes: 5 additions & 0 deletions TuBoleto/codebase/tuboleto-celo-connection/.firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "tumicro-1203"
}
}
2 changes: 2 additions & 0 deletions TuBoleto/codebase/tuboleto-celo-connection/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
99 changes: 99 additions & 0 deletions TuBoleto/codebase/tuboleto-celo-connection/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless

# FuseBox cache
.fusebox/
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
21 changes: 21 additions & 0 deletions TuBoleto/codebase/tuboleto-celo-connection/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 Josh Crites

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
55 changes: 55 additions & 0 deletions TuBoleto/codebase/tuboleto-celo-connection/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# TuBoleto + Valora

This website is the one running inside a TuBoleto Webview. It handles the WalletConnect connection and transaction and triggers a callback to the TuBoleto app.



The rest of the docs are from the example:

# Valora + Wallet Connect v1

This is an example repo to show how to connect a React app to Valora using Wallet Connect version 1.

The relevant code is in `./src/App.js`.

The additional packages required are:

- [Wallet connect web3 provider](https://docs.walletconnect.com/1.0/quick-start/dapps/web3-provider)
- [Web3](https://www.npmjs.com/package/web3)
- [Contractkit](https://www.npmjs.com/package/@celo/contractkit)

[Install Valora here.](https://valoraapp.com/)

## Run it

Install dependencies with

```shell
yarn
```

Run the demo application with

```shell
yarn start
```

The app should show a "Connect" button when there is not a wallet connected. A wallet connect modal will appear that you should scan with Valora.

Once the app is connected, it should show a "Send cUSD" button. Click the button and Valora will ask you to approve the transaction. The recipient and amount of the transaction are hardcoded, but feel free to edit and test. The transaction receipt will be logged in the browser console.

## Additional Info

You can [read more about using Wallet Connect v1 here](https://docs.walletconnect.com/1.0/).

This example was started with [Create React App](https://reactjs.org/docs/create-a-new-react-app.html). Unnecessary files were deleted.


Other commands:

yarn add firebase
firebase init hosting

Deploy:

yarn build && firebase deploy --only hosting && time /t
17 changes: 17 additions & 0 deletions TuBoleto/codebase/tuboleto-celo-connection/firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"hosting": {
"site": "tuboleto-celo-topup",
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
Loading