Skip to content

Commit

Permalink
📜 Learn2Earn zkApp kontratlarını ekle
Browse files Browse the repository at this point in the history
  • Loading branch information
KimlikDAO-bot committed May 18, 2024
1 parent df01fff commit ea5d545
Show file tree
Hide file tree
Showing 13 changed files with 62 additions and 15 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: All tests

on:
push:
branches: ["ana", "prod"]
pull_request:
branches: ["ana", "prod"]

jobs:
build-blog:
name: Build KimlikDAO blog
strategy:
fail-fast: true

runs-on: macos-latest
steps:
- name: Clone the repo
uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 2

- name: Install bun
uses: oven-sh/setup-bun@v1

- name: Install build tools
run: |
bun i
brew install pngcrush brotli zopfli woff2 webp
pip install fonttools
- name: Build blog index
run: |
make blog/dizin.sayfa
- name: Build prod worker
run: |
make build/blog/sunucu/prod.js
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.DS_Store
.gizli
.vscode
*.lock*
*lock*
*.vars
blog/cache/
blog/out/
Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ MAKEFLAGS := -j 8
include lib/birimler/Makefile
include birim/Makefile
include blog/Makefile
include bot/Makefile
include bulten/Makefile
include demo-mapping/Makefile
include discord/Makefile
Expand Down
4 changes: 2 additions & 2 deletions blog/dizin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ build/blog/dizin/sayfa-%.js: blog/dizin/sayfa.js \
lib/api/jsonrpc.d.js lib/api/jsonrpc.js \
lib/crosschain/*.js \
lib/did/*.d.js \
lib/ethereum/*.d.js lib/ethereum/TCKTLite.js \
lib/ethereum/*.d.js lib/ethereum/KPassLite.js \
lib/ethereum/provider.js \
lib/mina/*.d.js \
lib/node/*.d.js lib/node/ipfs.js \
lib/util/dom.js lib/util/çevir.js
lib/util/dom.js lib/util/çevir.js lib/util/base58.js
mkdir -p $(dir $@)
bun google-closure-compiler -W VERBOSE -O ADVANCED --charset UTF-8 \
--define "TR\$$\$$module\$$lib\$$util\$$dom=$(Lang-$*)" \
Expand Down
5 changes: 4 additions & 1 deletion blog/dizin/sayfa.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@ import "/birim/blog/mina-berkeley/birim";
import "/birim/blog/eliptik-egriler/birim";
import "/birim/blog/eliptik-imza/birim";
import "/birim/cüzdan/birim";
import "/birim/dil/birim";
import "/birim/dil/birim";
import dom from "/lib/util/dom";

console.log(dom.TR ? "SA" : "HI");
4 changes: 3 additions & 1 deletion blog/mina-berkeley/contracts/Learn2Earn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import { method } from "o1js";

const MINA = 1e9;

const LEARN2EARN = "B62qrzBYPHRZ6FsQpZCw5FbgvRbFh2jFHY2DT35pWjJc9K5Mbq2zppH";

class Learn2Earn extends PerHumanIDv1Contract {
@method async claimReward(humanIDv1: HumanIDv1, witness: HumanIDv1Witness) {
const sender = this.sender.getUnconstrained();
Expand All @@ -15,4 +17,4 @@ class Learn2Earn extends PerHumanIDv1Contract {
}
}

export { Learn2Earn };
export { LEARN2EARN, Learn2Earn };
2 changes: 1 addition & 1 deletion blog/mina-berkeley/contracts/Learn2EarnWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ Learn2Earn.compile();
*/
const getWitness = (truncatedHumanIDv1: number) => {

}
}
2 changes: 1 addition & 1 deletion blog/mina-berkeley/sayfa.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ <h1 id=blh1 data-en="Mina Berkeley Upgrade">Mina Berkeley güncellemesi</h1>
<li>Removal of Supercharged Rewards (MIP 1)</li>
</ul>
<h2>Installing the Auro wallet</h2>
<h2 data-en="Minting your KPass">Kpass'ini mintle</h2>
<h2 data-en="Minting your KPass">KPass'ini mintle</h2>
<h2 data-en="Claim your reward">Ödülünü al</h2>
<a id=mbcl href="javascript:" class="act btn" data-en="Claim ✨">Ödülünü al ✨</a>
</div>
Expand Down
3 changes: 1 addition & 2 deletions blog/mina-berkeley/sayfa.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import dom from "/lib/util/dom";
/** @const {!Element} */
const ClaimButton = dom.adla("mbcl");


const Learn2EarnWorker = new Worker("/blog/mina-berkeley/contracts/Learn2EarnWorker.ts", { type: "module" });

ClaimButton.onclick = () => { }
ClaimButton.onclick = () => { }
3 changes: 3 additions & 0 deletions blog/mina-berkeley/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,7 @@
"include": [
"./contracts",
],
"exclude": [
"./build"
]
}
2 changes: 1 addition & 1 deletion dapp
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
"test": "vitest"
},
"devDependencies": {
"@swc/cli": "^0.3.12",
"@swc/core": "^1.5.7",
"@swc/helpers": "^0.5.11",
"csso-cli": "^4.0.2",
"express": "^4.19.2",
"google-closure-compiler": "^20240317.0.0",
Expand All @@ -19,12 +22,12 @@
"svgexport": "^0.4.2",
"svgo": "^3.3.2",
"toml": "^3.0.0",
"typescript": "^5.4.5",
"uglify-js": "^3.16.2",
"vite": "^5.2.11",
"wrangler": "^3.56.0"
"wrangler": "^3.57.0"
},
"dependencies": {
"o1js": "^1.2.0",
"typescript": "^5.4.5"
"o1js": "^1.2.0"
}
}
2 changes: 1 addition & 1 deletion sdk
Submodule sdk updated 2 files
+1 −1 lib
+2 −3 mina/HumanIDv1.ts

0 comments on commit ea5d545

Please sign in to comment.