Skip to content

Commit

Permalink
Merge pull request #1 from pycckuu/main
Browse files Browse the repository at this point in the history
ZKSync Patron hack
  • Loading branch information
uF4No authored Nov 1, 2022
2 parents d0bbaa2 + a46a282 commit d1eddfc
Show file tree
Hide file tree
Showing 61 changed files with 19,748 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
Binary file added submissions/.DS_Store
Binary file not shown.
Binary file added submissions/ZKSync Patron/.DS_Store
Binary file not shown.
8 changes: 8 additions & 0 deletions submissions/ZKSync Patron/About.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Team

1. Igor Markelov (telegram: @IgorMarkelovDev)
2. Roman Pavlovskyi (telegram: @rpavlovs)
3. Victoria Panchenko (telegram: @lev_vic)
4. Sergey Gerodes (telegram: @serge_not_found)
5. Pavel Kamyshov (telegram: @MindUkraine)
6. Waiwai (telegram: @Xpber)
29 changes: 29 additions & 0 deletions submissions/ZKSync Patron/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# ZKSync Patron dApp

## Overview
All Ethereum transactions use gas, and the sender of each transaction must have enough Ether to pay for the gas spent. Even though these gas costs are low for basic transactions, getting Ether is a challenging task. Here we present the service that allows you to pay for the transactions of your customers using different strategies in order to simplify the onboarding of new users to any platform.


__zkSync Patron let’s you pay transaction fees for your users.__


In your strategies, you can set, for example, a specific number of transaction for each new user, that would be free for them, or give free transaction coupones. Moreover, you can easiliy add or delete “pre-paid” smart contracts as many as you like.

## See our Demo

[Video](https://www.loom.com/share/a0be318076d644a6ab2bf12cb76ca074)

## Open questions
1. How to prevent DoS attacks that drain toped-up balance?
* Use Patron Coupons
* Use 3rd party KYC


2. How to craft and submit transactions for the specific service?
- Use our NPM package to make contract calls
- OR, use “zksync-web3” package with our config





6 changes: 6 additions & 0 deletions submissions/ZKSync Patron/code/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
INFURA_API_KEY=...
PRIVATE_KEY=0x
PRIVATE_KEY_2=0x
PAYMASTER_ADDRESS=0x
TOKEN_ADDRESS=0x
EMPTY_WALLET_PRIVATE_KEY=0x
4 changes: 4 additions & 0 deletions submissions/ZKSync Patron/code/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
artifacts
cache
coverage
node_modules
36 changes: 36 additions & 0 deletions submissions/ZKSync Patron/code/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
module.exports = {
env: {
browser: false,
es2021: true,
mocha: true,
node: true,
},
plugins: ["@typescript-eslint"],
extends: [
"standard",
"plugin:prettier/recommended",
"plugin:node/recommended",
],
parser: "@typescript-eslint/parser",
ignorePatterns: ['.eslintrc.js'],
parserOptions: {
ecmaVersion: 12,
project: './tsconfig.json'
},
rules: {
"node/no-unpublished-import": "off",
"node/no-unsupported-features/es-syntax": [
"error",
{ ignores: ["modules"] },
],
'@typescript-eslint/no-floating-promises': ['error'],
},
overrides: [
{
files: ["*.test.ts"],
rules: {
"no-unused-expressions": "off",
},
},
],
};
16 changes: 16 additions & 0 deletions submissions/ZKSync Patron/code/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.idea
.env
coverage
coverage.json
node_modules
typechain
typechain-types

#Hardhat files
artifacts
artifacts-zk
cache
cache-zk

.DS_Store

5 changes: 5 additions & 0 deletions submissions/ZKSync Patron/code/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
artifacts
cache
coverage*
gasReporterOutput.json
node_modules
6 changes: 6 additions & 0 deletions submissions/ZKSync Patron/code/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "es5",
"tabWidth": 2,
"semi": false,
"singleQuote": true
}
7 changes: 7 additions & 0 deletions submissions/ZKSync Patron/code/.solhint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "solhint:recommended",
"rules": {
"compiler-version": ["error", "^0.8.0"],
"func-visibility": ["warn", { "ignoreConstructors": true }]
}
}
1 change: 1 addition & 0 deletions submissions/ZKSync Patron/code/.solhintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
16 changes: 16 additions & 0 deletions submissions/ZKSync Patron/code/build/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"files": {
"main.css": "/zksync-patron-dapp/static/css/main.8b90a5cd.css",
"main.js": "/zksync-patron-dapp/static/js/main.75dd401c.js",
"static/js/787.03770da1.chunk.js": "/zksync-patron-dapp/static/js/787.03770da1.chunk.js",
"static/media/background.jpg": "/zksync-patron-dapp/static/media/background.7713da570b2765c39ae0.jpg",
"index.html": "/zksync-patron-dapp/index.html",
"main.8b90a5cd.css.map": "/zksync-patron-dapp/static/css/main.8b90a5cd.css.map",
"main.75dd401c.js.map": "/zksync-patron-dapp/static/js/main.75dd401c.js.map",
"787.03770da1.chunk.js.map": "/zksync-patron-dapp/static/js/787.03770da1.chunk.js.map"
},
"entrypoints": [
"static/css/main.8b90a5cd.css",
"static/js/main.75dd401c.js"
]
}
Binary file added submissions/ZKSync Patron/code/build/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions submissions/ZKSync Patron/code/build/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/zksync-patron-dapp/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/zksync-patron-dapp/logo192.png"/><link rel="manifest" href="/zksync-patron-dapp/manifest.json"/><title>React App</title><script defer="defer" src="/zksync-patron-dapp/static/js/main.75dd401c.js"></script><link href="/zksync-patron-dapp/static/css/main.8b90a5cd.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
25 changes: 25 additions & 0 deletions submissions/ZKSync Patron/code/build/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
3 changes: 3 additions & 0 deletions submissions/ZKSync Patron/code/build/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d1eddfc

Please sign in to comment.