@lfdecentralizedtrust/zeto-contracts 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/config/eip170.ts +30 -0
- package/contracts/lib/interfaces/IZetoLockHooks.sol +42 -0
- package/contracts/lib/zeto_fungible.sol +9 -17
- package/contracts/lib/zeto_lockable.sol +85 -479
- package/contracts/lib/zeto_lockable_lib.sol +460 -0
- package/contracts/lib/zeto_lockable_storage.sol +43 -0
- package/contracts/lib/zeto_non_fungible.sol +8 -16
- package/hardhat.config.ts +11 -2
- package/ignition/modules/lib/deps.ts +5 -0
- package/ignition/modules/test/tendecimals.ts +7 -1
- package/ignition/modules/zeto_anon.ts +3 -0
- package/ignition/modules/zeto_anon_burnable.ts +3 -0
- package/ignition/modules/zeto_anon_enc.ts +3 -0
- package/ignition/modules/zeto_anon_enc_nullifier.ts +3 -0
- package/ignition/modules/zeto_anon_enc_nullifier_kyc.ts +3 -0
- package/ignition/modules/zeto_anon_enc_nullifier_non_repudiation.ts +3 -0
- package/ignition/modules/zeto_anon_nullifier.ts +3 -0
- package/ignition/modules/zeto_anon_nullifier_burnable.ts +3 -0
- package/ignition/modules/zeto_anon_nullifier_kyc.ts +3 -0
- package/ignition/modules/zeto_anon_nullifier_qurrency.ts +3 -0
- package/ignition/modules/zeto_nf_anon.ts +3 -1
- package/ignition/modules/zeto_nf_anon_nullifier.ts +3 -2
- package/package.json +4 -2
- package/scripts/lib/zeto_libraries.ts +47 -0
- package/scripts/tokens/Zeto_Anon.ts +3 -0
- package/scripts/tokens/Zeto_AnonBurnable.ts +3 -0
- package/scripts/tokens/Zeto_AnonEnc.ts +3 -0
- package/scripts/tokens/Zeto_AnonEncNullifier.ts +6 -5
- package/scripts/tokens/Zeto_AnonEncNullifierKyc.ts +6 -5
- package/scripts/tokens/Zeto_AnonEncNullifierNonRepudiation.ts +6 -5
- package/scripts/tokens/Zeto_AnonNullifier.ts +6 -5
- package/scripts/tokens/Zeto_AnonNullifierBurnable.ts +6 -5
- package/scripts/tokens/Zeto_AnonNullifierKyc.ts +6 -5
- package/scripts/tokens/Zeto_AnonNullifierQurrency.ts +6 -7
- package/scripts/tokens/Zeto_NfAnon.ts +3 -1
- package/scripts/tokens/Zeto_NfAnonNullifier.ts +6 -6
- package/test/factory.ts +10 -1
- package/test/lib/deploy.ts +2 -0
- package/test/lib/eip170.ts +23 -0
- package/test/usdc-shielding.ts +0 -1
- package/test/zeto_anon_enc.ts +0 -1
- package/test/zeto_anon_enc_nullifier.ts +3 -1
- package/test/zeto_anon_enc_nullifier_kyc.ts +3 -1
- package/test/zeto_anon_enc_nullifier_non_repudiation.ts +3 -1
- package/test/zeto_anon_nullifier.ts +0 -1
- package/test/zeto_anon_nullifier_kyc.ts +3 -1
- package/test/zeto_anon_nullifier_qurrency.ts +3 -1
- package/test/zeto_nf_anon.ts +0 -1
- package/test/zeto_nf_anon_nullifier.ts +0 -1
package/test/usdc-shielding.ts
CHANGED
|
@@ -44,7 +44,6 @@ import {
|
|
|
44
44
|
} from "./utils";
|
|
45
45
|
import { Zeto_AnonNullifier } from "../typechain-types";
|
|
46
46
|
import { deployZeto } from "./lib/deploy";
|
|
47
|
-
|
|
48
47
|
const USDC_SEPOLIA_ADDRESS = "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238";
|
|
49
48
|
const TRANSFER_AMOUNT = 1000; // 0.001000 UDSC
|
|
50
49
|
|
package/test/zeto_anon_enc.ts
CHANGED
|
@@ -66,7 +66,9 @@ import {
|
|
|
66
66
|
import { deployZeto } from "./lib/deploy";
|
|
67
67
|
const poseidonHash = Poseidon.poseidon4;
|
|
68
68
|
|
|
69
|
-
describe(
|
|
69
|
+
describe(
|
|
70
|
+
"Zeto based fungible token with anonymity using nullifiers and encryption",
|
|
71
|
+
function () {
|
|
70
72
|
let deployer: Signer;
|
|
71
73
|
let Alice: User;
|
|
72
74
|
let Bob: User;
|
|
@@ -59,7 +59,9 @@ import {
|
|
|
59
59
|
import { deployZeto } from "./lib/deploy";
|
|
60
60
|
const poseidonHash = Poseidon.poseidon4;
|
|
61
61
|
|
|
62
|
-
describe(
|
|
62
|
+
describe(
|
|
63
|
+
"Zeto based fungible token with anonymity using nullifiers and encryption with KYC",
|
|
64
|
+
function () {
|
|
63
65
|
let deployer: Signer;
|
|
64
66
|
let Alice: User;
|
|
65
67
|
let Bob: User;
|
|
@@ -57,7 +57,9 @@ import {
|
|
|
57
57
|
import { deployZeto } from "./lib/deploy";
|
|
58
58
|
const poseidonHash = Poseidon.poseidon4;
|
|
59
59
|
|
|
60
|
-
describe(
|
|
60
|
+
describe(
|
|
61
|
+
"Zeto based fungible token with anonymity using nullifiers and encryption for non-repudiation",
|
|
62
|
+
function () {
|
|
61
63
|
let deployer: Signer;
|
|
62
64
|
let Alice: User;
|
|
63
65
|
let Bob: User;
|
|
@@ -83,7 +83,6 @@ describe("Zeto based fungible token with anonymity using nullifiers without encr
|
|
|
83
83
|
// accommodate for longer block times on public networks
|
|
84
84
|
this.timeout(120000);
|
|
85
85
|
}
|
|
86
|
-
|
|
87
86
|
let [d, a, b, c, e] = await ethers.getSigners();
|
|
88
87
|
deployer = d;
|
|
89
88
|
Alice = await newUser(a);
|
|
@@ -118,7 +118,9 @@ function encodeLockedProof(proof: any) {
|
|
|
118
118
|
);
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
describe(
|
|
121
|
+
describe(
|
|
122
|
+
"Zeto based fungible token with anonymity, KYC, using nullifiers without encryption",
|
|
123
|
+
function () {
|
|
122
124
|
let deployer: Signer;
|
|
123
125
|
let Alice: User;
|
|
124
126
|
let Bob: User;
|
|
@@ -56,7 +56,9 @@ import {
|
|
|
56
56
|
} from "./utils";
|
|
57
57
|
import { deployZeto } from "./lib/deploy";
|
|
58
58
|
|
|
59
|
-
describe(
|
|
59
|
+
describe(
|
|
60
|
+
"Zeto based fungible token with anonymity using nullifiers with Kyber encryption for auditability",
|
|
61
|
+
function () {
|
|
60
62
|
let deployer: Signer;
|
|
61
63
|
let Alice: User;
|
|
62
64
|
let Bob: User;
|
package/test/zeto_nf_anon.ts
CHANGED