Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
thelostone-mc committed Dec 6, 2023
1 parent 388c973 commit b66e954
Show file tree
Hide file tree
Showing 4 changed files with 461 additions and 41 deletions.
5 changes: 2 additions & 3 deletions src/Allo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ The Allo class provides a set of functions for interacting with the Allo contrac
To create a new Allo instance, you need to provide the chain information. In this example, we're using the 5 chain information.

```typescript
import { Allo } from "../Allo/Allo";

import { Allo } from "@allo-team/allo-v2-sdk/";
const allo = new Allo({ chain: 5 });
```

Expand Down Expand Up @@ -170,7 +169,7 @@ To create a new pool with a custom strategy:

```typescript
import { CreatePoolArgs } from "../Allo/types";
import { TransactionData } from "../Common/types";
import { TransactionData } from "@allo-team/allo-v2-sdk/dist/Common/types";

const createPoolArgs: CreatePoolArgs = {
profileId: "your_profileId_here", // sender must be a profile member
Expand Down
30 changes: 15 additions & 15 deletions src/Registry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Before using the functions provided by the Registry module, you need to create a
To create a new Registry instance, you need to provide the chain information. In this example, we're using the 5 chain information.

```javascript
import { Registry } from "../Registry/Registry";
import { Registry } from "@allo-team/allo-v2-sdk/";

const registry = new Registry({ chain: 5 });
```
Expand Down Expand Up @@ -95,7 +95,7 @@ console.log(profileId);
To fetch a Profile using an Anchor:

```javascript
import { Profile } from "../Registry/types";
import { Profile } from "@allo-team/allo-v2-sdk/dist/Registry/types";

const anchor = "your_anchor_value_here";
const profile: Profile = await registry.getProfileByAnchor(anchor);
Expand All @@ -107,7 +107,7 @@ console.log(profile);
To retrieve a Profile using its ID:

```javascript
import { Profile } from "../Registry/types";
import { Profile } from "@allo-team/allo-v2-sdk/dist/Registry/types";

const profileId = "your_profile_id_here";
const profile: Profile = await registry.getProfileById(profileId);
Expand All @@ -129,7 +129,7 @@ console.log(admin);
To check if an account has a specific role:

```javascript
import { HasRoleArgs } from "../Registry/types";
import { HasRoleArgs } from "@allo-team/allo-v2-sdk/dist/Registry/types";

const hasRoleArgs: HasRoleArgs = {
role: "your_role_here",
Expand All @@ -144,7 +144,7 @@ console.log(hasRole);
To check if an account is a member of a profile:

```javascript
import { ProfileAndAddressArgs } from "../Registry/types";
import { ProfileAndAddressArgs } from "@allo-team/allo-v2-sdk/dist/Registry/types";

const profileAndAddressArgs: ProfileAndAddressArgs = {
profileId: "your_profile_id_here",
Expand All @@ -161,7 +161,7 @@ console.log(isMember);
To check if an account is the owner of a profile:

```javascript
import { ProfileAndAddressArgs } from "../Registry/types";
import { ProfileAndAddressArgs } from "@allo-team/allo-v2-sdk/dist/Registry/types";

const profileAndAddressArgs: ProfileAndAddressArgs = {
profileId: "your_profile_id_here",
Expand All @@ -176,7 +176,7 @@ console.log(isOwner);
To check if an account is either the owner or a member of a profile:

```javascript
import { ProfileAndAddressArgs } from "../Registry/types";
import { ProfileAndAddressArgs } from "@allo-team/allo-v2-sdk/dist/Registry/types";

const profileAndAddressArgs: ProfileAndAddressArgs = {
profileId: "your_profile_id_here",
Expand Down Expand Up @@ -205,7 +205,7 @@ console.log(pendingOwner);
To get profile details by ID:

```javascript
import { Profile } from "../Registry/types";
import { Profile } from "@allo-team/allo-v2-sdk/dist/Registry/types";

const profileId = "your_profile_id_here";
const profile: Profile = await registry.getProfilesById(profileId);
Expand All @@ -221,8 +221,8 @@ console.log(profile);
To create a new profile using the `createProfile` function:

```javascript
import { CreateProfileArgs } from "../Registry/types";
import { TransactionData } from "../types";
import { CreateProfileArgs } from "@allo-team/allo-v2-sdk/dist/Registry/types";
import { TransactionData } from "@allo-team/allo-v2-sdk/dist/Common/types";

const createProfileArgs: CreateProfileArgs = {
nonce: 3,
Expand Down Expand Up @@ -275,7 +275,7 @@ console.log(`Transaction hash: ${hash}`);
To add members to a profile using the `addMembers` function:

```javascript
import { MemberArgs } from "../Registry/types";
import { MemberArgs } from "@allo-team/allo-v2-sdk/dist/Registry/types";

const memberArgs: MemberArgs = {
profileId: "your_profile_id_here",
Expand Down Expand Up @@ -304,7 +304,7 @@ console.log(`Transaction hash: ${hash}`);
To remove members from a profile using the `removeMembers` function:

```javascript
import { MemberArgs } from "../Registry/types";
import { MemberArgs } from "@allo-team/allo-v2-sdk/dist/Registry/types";

const memberArgs: MemberArgs = {
profileId: "your_profile_id_here",
Expand Down Expand Up @@ -333,7 +333,7 @@ console.log(`Transaction hash: ${hash}`);
To update profile metadata using the `updateProfileMetadata` function:

```javascript
import { ProfileMetadataArgs } from "../Registry/types";
import { ProfileMetadataArgs } from "@allo-team/allo-v2-sdk/dist/Registry/types";

const profileMetadataArgs: ProfileMetadataArgs = {
profileId: "your_profile_id_here",
Expand Down Expand Up @@ -362,7 +362,7 @@ console.log(`Transaction hash: ${hash}`);
To update profile name using the `updateProfileName` function:

```javascript
import { ProfileNameArgs } from "../Registry/types";
import { ProfileNameArgs } from "@allo-team/allo-v2-sdk/dist/Registry/types";

const profileNameArgs: ProfileNameArgs = {
profileId: "your_profile_id_here",
Expand All @@ -387,7 +387,7 @@ console.log(`Transaction hash: ${hash}`);
To update the pending owner of a profile using the `updateProfilePendingOwner` function:

```javascript
import { ProfileAndAddressArgs } from "../Registry/types";
import { ProfileAndAddressArgs } from "@allo-team/allo-v2-sdk/dist/Registry/types";

const profilePendingOwnerArgs: ProfileAndAddressArgs = {
profileId: "your_profile_id_here",
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/utils/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { keccak256, toHex } from "viem";
// import { Profile } from "../../Registry/types";
// import { Profile } from "../@allo-team/allo-v2-sdk/dist/Registry/types";

export const makeAddress = (input: string): string => {
return keccak256(toHex(input)).slice(0, 42);
Expand Down
Loading

0 comments on commit b66e954

Please sign in to comment.