Skip to content

Commit 88cfc98

Browse files
committed
🧼 Cleanup & minor refactor
1 parent cb69e9b commit 88cfc98

8 files changed

+15
-17
lines changed

‎lib

‎mina/HumanIDv1.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const requireConsistent = (humanIDv1: Field, truncatedHumanIDv1: Field) =>
5252
"HumanID does not match the witness"
5353
);
5454

55-
class PerHumanIDv1 extends SmartContract {
55+
class PerHumanIDv1Contract extends SmartContract {
5656
events = {
5757
"KimlikDAO-init": Field, // Emits the tree height along with init event
5858
"KimlikDAO-add-HumanIDv1": Field, // Emits the added HumanIDv1.id
@@ -92,7 +92,7 @@ export {
9292
HumanIDv1,
9393
HumanIDv1Witness,
9494
KPassSigners,
95-
PerHumanIDv1,
95+
PerHumanIDv1Contract,
9696
authenticate,
9797
requireConsistent
9898
};

‎mina/examples/Airdrop.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe("Example Airdrop zkApp", () => {
3838
};
3939

4040
it("should deploy the app", () =>
41-
console.log("Deployed HumanIDs contract at", app.address));
41+
console.log("Deployed HumanIDs contract at", app.address.toBase58()));
4242

4343
it("should let people claimReward()", () =>
4444
Mina.transaction(sender, () =>

‎mina/examples/Airdrop.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { method } from "o1js";
2-
import { HumanIDv1, HumanIDv1Witness, PerHumanIDv1 } from "../HumanIDv1";
2+
import { HumanIDv1, HumanIDv1Witness, PerHumanIDv1Contract } from "../HumanIDv1";
33

44
const MINA = 1e9;
55

66
/**
77
* Example airdrop zkApp, which gives 10 MINA rewards to each unique human.
88
*/
9-
class Airdrop extends PerHumanIDv1 {
9+
class Airdrop extends PerHumanIDv1Contract {
1010
@method async claimReward(humanIDv1: HumanIDv1, witness: HumanIDv1Witness) {
1111
const sender = this.sender.getUnconstrained();
1212
this.acceptHumanIDv1(sender, humanIDv1, witness);

‎mina/jest.config.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,9 @@ export default {
33
verbose: true,
44
preset: 'ts-jest/presets/default-esm',
55
testEnvironment: 'node',
6-
globals: {
7-
'ts-jest': {
8-
useESM: true,
9-
},
10-
},
116
testTimeout: 1_000_000,
127
transform: {
13-
'^.+\\.(t)s$': 'ts-jest',
8+
'^.+\\.(t)s$': ['ts-jest', { useESM: true }],
149
'^.+\\.(j)s$': 'babel-jest',
1510
},
1611
transformIgnorePatterns: [

‎mina/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
},
66
"dependencies": {
77
"@types/jest": "^29.5.12",
8-
"o1js": "^1.1.0",
8+
"jest": "^29.7.0",
9+
"o1js": "^1.2.0",
910
"ts-jest": "^29.1.2",
1011
"typescript": "^5.4.5"
1112
},

‎mina/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"compilerOptions": {
3-
"target": "es2020",
4-
"module": "es2022",
3+
"target": "esnext",
4+
"module": "esnext",
55
"lib": [
66
"dom",
77
"esnext"

‎package.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
{
2+
"name": "@kimlikdao/sdk",
3+
"version": "0.0.0",
24
"license": "MIT",
35
"type": "module",
46
"devDependencies": {
57
"express": "^4.18.2",
6-
"google-closure-compiler": "^20230802.0.0",
8+
"google-closure-compiler": "^20240317.0.0",
79
"uglify-js": "^3.17.4",
810
"vite": "^5.0.6"
911
}
10-
}
12+
}

0 commit comments

Comments
 (0)