Skip to content

Commit 4cb9e5f

Browse files
committed
feat: add frontend & rename directory from profile.io to profile.io-social-cipher
1 parent 1cbcd6b commit 4cb9e5f

24 files changed

Lines changed: 7233 additions & 0 deletions

.gitignore

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# dependencies
2+
/node_modules
3+
4+
5+
# testing
6+
/coverage
7+
8+
# next.js
9+
/.next/
10+
/out/
11+
12+
# production
13+
/build
14+
15+
# misc
16+
.DS_Store
17+
*.pem
18+
19+
20+
# debug
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*
24+
25+
# local env files
26+
.env*.local
27+
.env
28+
29+
# vercel
30+
.vercel
31+
32+
# typescript
33+
*.tsbuildinfo
34+
next-env.d.ts
35+
36+
*storybook.log
37+
storybook-static/*
38+
.next*
39+
40+
profile.io/frontend/.next/*
41+
.vscode/settings.json
File renamed without changes.
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
2+
/* Autogenerated file, do not edit! */
3+
4+
/* eslint-disable */
5+
import {
6+
type AbiType,
7+
AztecAddress,
8+
type AztecAddressLike,
9+
CompleteAddress,
10+
Contract,
11+
type ContractArtifact,
12+
ContractBase,
13+
ContractFunctionInteraction,
14+
type ContractInstanceWithAddress,
15+
type ContractMethod,
16+
type ContractStorageLayout,
17+
type ContractNotes,
18+
decodeFromAbi,
19+
DeployMethod,
20+
EthAddress,
21+
type EthAddressLike,
22+
EventSelector,
23+
type FieldLike,
24+
Fr,
25+
type FunctionSelectorLike,
26+
L1EventPayload,
27+
loadContractArtifact,
28+
type NoirCompiledContract,
29+
NoteSelector,
30+
Point,
31+
type PublicKey,
32+
type UnencryptedL2Log,
33+
type Wallet,
34+
type WrappedFieldLike,
35+
} from '@aztec/aztec.js';
36+
import ProfileContractArtifactJson from '../../target/zkpTestContract-Profile.json' assert { type: 'json' };
37+
export const ProfileContractArtifact = loadContractArtifact(ProfileContractArtifactJson as NoirCompiledContract);
38+
39+
40+
41+
/**
42+
* Type-safe interface for contract Profile;
43+
*/
44+
export class ProfileContract extends ContractBase {
45+
46+
private constructor(
47+
instance: ContractInstanceWithAddress,
48+
wallet: Wallet,
49+
) {
50+
super(instance, ProfileContractArtifact, wallet);
51+
}
52+
53+
54+
55+
/**
56+
* Creates a contract instance.
57+
* @param address - The deployed contract's address.
58+
* @param wallet - The wallet to use when interacting with the contract.
59+
* @returns A promise that resolves to a new Contract instance.
60+
*/
61+
public static async at(
62+
address: AztecAddress,
63+
wallet: Wallet,
64+
) {
65+
return Contract.at(address, ProfileContract.artifact, wallet) as Promise<ProfileContract>;
66+
}
67+
68+
69+
/**
70+
* Creates a tx to deploy a new instance of this contract.
71+
*/
72+
public static deploy(wallet: Wallet, initial_supply: (bigint | number), owner: AztecAddressLike, outgoing_viewer: AztecAddressLike) {
73+
return new DeployMethod<ProfileContract>(Fr.ZERO, wallet, ProfileContractArtifact, ProfileContract.at, Array.from(arguments).slice(1));
74+
}
75+
76+
/**
77+
* Creates a tx to deploy a new instance of this contract using the specified public keys hash to derive the address.
78+
*/
79+
public static deployWithPublicKeysHash(publicKeysHash: Fr, wallet: Wallet, initial_supply: (bigint | number), owner: AztecAddressLike, outgoing_viewer: AztecAddressLike) {
80+
return new DeployMethod<ProfileContract>(publicKeysHash, wallet, ProfileContractArtifact, ProfileContract.at, Array.from(arguments).slice(2));
81+
}
82+
83+
/**
84+
* Creates a tx to deploy a new instance of this contract using the specified constructor method.
85+
*/
86+
public static deployWithOpts<M extends keyof ProfileContract['methods']>(
87+
opts: { publicKeysHash?: Fr; method?: M; wallet: Wallet },
88+
...args: Parameters<ProfileContract['methods'][M]>
89+
) {
90+
return new DeployMethod<ProfileContract>(
91+
opts.publicKeysHash ?? Fr.ZERO,
92+
opts.wallet,
93+
ProfileContractArtifact,
94+
ProfileContract.at,
95+
Array.from(arguments).slice(1),
96+
opts.method ?? 'constructor',
97+
);
98+
}
99+
100+
101+
102+
/**
103+
* Returns this contract's artifact.
104+
*/
105+
public static get artifact(): ContractArtifact {
106+
return ProfileContractArtifact;
107+
}
108+
109+
110+
public static get storage(): ContractStorageLayout<'balances' | 'is_adult' | 'profile_nfts'> {
111+
return {
112+
balances: {
113+
slot: new Fr(1n),
114+
},
115+
is_adult: {
116+
slot: new Fr(2n),
117+
},
118+
profile_nfts: {
119+
slot: new Fr(3n),
120+
}
121+
} as ContractStorageLayout<'balances' | 'is_adult' | 'profile_nfts'>;
122+
}
123+
124+
125+
public static get notes(): ContractNotes<'ProfileNFT' | 'ValueNote'> {
126+
return {
127+
ProfileNFT: {
128+
id: new NoteSelector(4239572523),
129+
},
130+
ValueNote: {
131+
id: new NoteSelector(1038582377),
132+
}
133+
} as ContractNotes<'ProfileNFT' | 'ValueNote'>;
134+
}
135+
136+
137+
/** Type-safe wrappers for the public methods exposed by the contract. */
138+
public declare methods: {
139+
140+
/** compute_note_hash_and_optionally_a_nullifier(contract_address: struct, nonce: field, storage_slot: field, note_type_id: field, compute_nullifier: boolean, serialized_note: array) */
141+
compute_note_hash_and_optionally_a_nullifier: ((contract_address: AztecAddressLike, nonce: FieldLike, storage_slot: FieldLike, note_type_id: FieldLike, compute_nullifier: boolean, serialized_note: FieldLike[]) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
142+
143+
/** constructor(initial_supply: integer, owner: struct, outgoing_viewer: struct) */
144+
constructor: ((initial_supply: (bigint | number), owner: AztecAddressLike, outgoing_viewer: AztecAddressLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
145+
146+
/** get_profile_nfts(owner: struct, page_index: integer) */
147+
get_profile_nfts: ((owner: AztecAddressLike, page_index: (bigint | number)) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
148+
149+
/** mint(amount: integer, owner: struct, outgoing_viewer: struct) */
150+
mint: ((amount: (bigint | number), owner: AztecAddressLike, outgoing_viewer: AztecAddressLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
151+
152+
/** mintNFT(to: struct, token_id: field, is_adult: boolean) */
153+
mintNFT: ((to: AztecAddressLike, token_id: FieldLike, is_adult: boolean) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
154+
155+
/** update_is_adult(amount: integer, owner: struct, recipient: struct) */
156+
update_is_adult: ((amount: (bigint | number), owner: AztecAddressLike, recipient: AztecAddressLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
157+
};
158+
159+
160+
}
File renamed without changes.

profile.io-social-cipher/aztec/target/zkpTestContract-Profile.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

profile.io-social-cipher/aztec/target/zkpTestContract-Profile.json.bak

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "next/core-web-vitals"
3+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
.yarn/install-state.gz
8+
9+
# testing
10+
/coverage
11+
12+
# next.js
13+
/.next/
14+
/out/
15+
16+
# production
17+
/build
18+
19+
# misc
20+
.DS_Store
21+
*.pem
22+
23+
# debug
24+
npm-debug.log*
25+
yarn-debug.log*
26+
yarn-error.log*
27+
28+
# local env files
29+
.env*.local
30+
31+
# vercel
32+
.vercel
33+
34+
# typescript
35+
*.tsbuildinfo
36+
next-env.d.ts
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
2+
3+
## Getting Started
4+
5+
First, run the development server:
6+
7+
```bash
8+
npm run dev
9+
# or
10+
yarn dev
11+
# or
12+
pnpm dev
13+
# or
14+
bun dev
15+
```
16+
17+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
18+
19+
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
20+
21+
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
22+
23+
## Learn More
24+
25+
To learn more about Next.js, take a look at the following resources:
26+
27+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
29+
30+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
31+
32+
## Deploy on Vercel
33+
34+
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
35+
36+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.

0 commit comments

Comments
 (0)