From ea5d54586ee754a06edb11dc05d00f41f92b71db Mon Sep 17 00:00:00 2001 From: KimlikDAO-bot Date: Fri, 17 May 2024 23:19:49 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9C=20`Learn2Earn`=20zkApp=20kontratla?= =?UTF-8?q?r=C4=B1n=C4=B1=20ekle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 38 +++++++++++++++++++ .gitignore | 2 +- Makefile | 1 - blog/dizin/Makefile | 4 +- blog/dizin/sayfa.js | 5 ++- blog/mina-berkeley/contracts/Learn2Earn.ts | 4 +- .../contracts/Learn2EarnWorker.ts | 2 +- blog/mina-berkeley/sayfa.html | 2 +- blog/mina-berkeley/sayfa.js | 3 +- blog/mina-berkeley/tsconfig.json | 3 ++ dapp | 2 +- package.json | 9 +++-- sdk | 2 +- 13 files changed, 62 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..409c1cd --- /dev/null +++ b/.github/workflows/test.yml @@ -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 diff --git a/.gitignore b/.gitignore index 7deb81e..d141e6c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ .DS_Store .gizli .vscode -*.lock* +*lock* *.vars blog/cache/ blog/out/ diff --git a/Makefile b/Makefile index 7be8fed..8027a37 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/blog/dizin/Makefile b/blog/dizin/Makefile index c8d7e81..c5b607a 100644 --- a/blog/dizin/Makefile +++ b/blog/dizin/Makefile @@ -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-$*)" \ diff --git a/blog/dizin/sayfa.js b/blog/dizin/sayfa.js index 4e529e7..b9c28de 100644 --- a/blog/dizin/sayfa.js +++ b/blog/dizin/sayfa.js @@ -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"; \ No newline at end of file +import "/birim/dil/birim"; +import dom from "/lib/util/dom"; + +console.log(dom.TR ? "SA" : "HI"); \ No newline at end of file diff --git a/blog/mina-berkeley/contracts/Learn2Earn.ts b/blog/mina-berkeley/contracts/Learn2Earn.ts index 7e59233..82938eb 100644 --- a/blog/mina-berkeley/contracts/Learn2Earn.ts +++ b/blog/mina-berkeley/contracts/Learn2Earn.ts @@ -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(); @@ -15,4 +17,4 @@ class Learn2Earn extends PerHumanIDv1Contract { } } -export { Learn2Earn }; +export { LEARN2EARN, Learn2Earn }; diff --git a/blog/mina-berkeley/contracts/Learn2EarnWorker.ts b/blog/mina-berkeley/contracts/Learn2EarnWorker.ts index 3c1f37c..536a4c3 100644 --- a/blog/mina-berkeley/contracts/Learn2EarnWorker.ts +++ b/blog/mina-berkeley/contracts/Learn2EarnWorker.ts @@ -7,4 +7,4 @@ Learn2Earn.compile(); */ const getWitness = (truncatedHumanIDv1: number) => { -} \ No newline at end of file +} diff --git a/blog/mina-berkeley/sayfa.html b/blog/mina-berkeley/sayfa.html index 584bfa4..45b2124 100644 --- a/blog/mina-berkeley/sayfa.html +++ b/blog/mina-berkeley/sayfa.html @@ -34,7 +34,7 @@

Mina Berkeley güncellemesi

  • Removal of Supercharged Rewards (MIP 1)
  • Installing the Auro wallet

    -

    Kpass'ini mintle

    +

    KPass'ini mintle

    Ödülünü al

    Ödülünü al ✨ diff --git a/blog/mina-berkeley/sayfa.js b/blog/mina-berkeley/sayfa.js index 6d88fd4..fb38b82 100644 --- a/blog/mina-berkeley/sayfa.js +++ b/blog/mina-berkeley/sayfa.js @@ -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 = () => { } \ No newline at end of file +ClaimButton.onclick = () => { } diff --git a/blog/mina-berkeley/tsconfig.json b/blog/mina-berkeley/tsconfig.json index 0773d42..ac7661d 100644 --- a/blog/mina-berkeley/tsconfig.json +++ b/blog/mina-berkeley/tsconfig.json @@ -26,4 +26,7 @@ "include": [ "./contracts", ], + "exclude": [ + "./build" + ] } \ No newline at end of file diff --git a/dapp b/dapp index e6746bb..b5caf04 160000 --- a/dapp +++ b/dapp @@ -1 +1 @@ -Subproject commit e6746bbbd499478fac33f5f096f2f7eff5a4dd39 +Subproject commit b5caf045c1b513a9499412007a1e30802f1c7419 diff --git a/package.json b/package.json index 394ec45..8757dda 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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" } } \ No newline at end of file diff --git a/sdk b/sdk index 470a8bf..3f9d7f1 160000 --- a/sdk +++ b/sdk @@ -1 +1 @@ -Subproject commit 470a8bf37695a5218edd29a5f9a2fdf18d210768 +Subproject commit 3f9d7f162a46eb229428558cc902274de7678e8b