-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add ipAccountRegistryABI * ipAccount scaffold * add ipAccount to client * add abis * add initial fns * add accessControl initial scaffold * add unit test scaffold for ipAccount and ipAccountReadOnly * add tests * Lint * Add account to simulate function * Update ci environment * Update CI * Skip test for now --------- Co-authored-by: Allen Chuang <[email protected]>
- Loading branch information
1 parent
9ef1930
commit 30001a3
Showing
29 changed files
with
1,246 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { formatAbi } from "abitype"; | ||
import { getAddress } from "viem"; | ||
|
||
import AccessControllerABI from "./json/AccessController.abi"; | ||
|
||
export const AccessControllerRaw = AccessControllerABI; | ||
export const AccessControllerReadable = formatAbi(AccessControllerRaw); | ||
|
||
export const AccessControllerConfig = { | ||
abi: AccessControllerRaw, | ||
address: getAddress( | ||
process.env.ACCESS_CONTROLLER || process.env.NEXT_PUBLIC_ACCESS_CONTROLLER || "", | ||
), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { formatAbi } from "abitype"; | ||
import { getAddress } from "viem"; | ||
import * as dotenv from "dotenv"; | ||
|
||
import IPAccountRegistryABI from "./json/IIPAccountRegistry.abi"; | ||
|
||
if (typeof process !== "undefined") { | ||
dotenv.config(); | ||
} | ||
|
||
export const IPAccountRegistryRaw = IPAccountRegistryABI; | ||
export const IPAccountRegistryReadable = formatAbi(IPAccountRegistryRaw); | ||
|
||
export const IPAccountRegistryConfig = { | ||
abi: IPAccountRegistryRaw, | ||
address: getAddress( | ||
process.env.IP_ACCOUNT_REGISTRY || process.env.NEXT_PUBLIC_IP_ACCOUNT_REGISTRY || "", | ||
), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
export default [ | ||
{ | ||
anonymous: false, | ||
inputs: [ | ||
{ | ||
indexed: true, | ||
internalType: "address", | ||
name: "account", | ||
type: "address", | ||
}, | ||
{ | ||
indexed: true, | ||
internalType: "address", | ||
name: "implementation", | ||
type: "address", | ||
}, | ||
{ | ||
indexed: true, | ||
internalType: "uint256", | ||
name: "chainId", | ||
type: "uint256", | ||
}, | ||
{ | ||
indexed: false, | ||
internalType: "address", | ||
name: "tokenContract", | ||
type: "address", | ||
}, | ||
{ | ||
indexed: false, | ||
internalType: "uint256", | ||
name: "tokenId", | ||
type: "uint256", | ||
}, | ||
], | ||
name: "IPAccountRegistered", | ||
type: "event", | ||
}, | ||
{ | ||
inputs: [ | ||
{ | ||
internalType: "uint256", | ||
name: "chainId_", | ||
type: "uint256", | ||
}, | ||
{ | ||
internalType: "address", | ||
name: "tokenContract_", | ||
type: "address", | ||
}, | ||
{ | ||
internalType: "uint256", | ||
name: "tokenId_", | ||
type: "uint256", | ||
}, | ||
], | ||
name: "ipAccount", | ||
outputs: [ | ||
{ | ||
internalType: "address", | ||
name: "", | ||
type: "address", | ||
}, | ||
], | ||
stateMutability: "view", | ||
type: "function", | ||
}, | ||
] as const; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { formatAbi } from "abitype"; | ||
import { getAddress } from "viem"; | ||
|
||
import LicenseRegistryABI from "./json/LicenseRegistry.abi"; | ||
|
||
export const LicenseRegistryRaw = LicenseRegistryABI; | ||
export const LicenseRegistryReadable = formatAbi(LicenseRegistryRaw); | ||
|
||
export const LicenseRegistryConfig = { | ||
abi: LicenseRegistryRaw, | ||
address: getAddress( | ||
process.env.LICENSE_REGISTRY || process.env.NEXT_PUBLIC_LICENSE_REGISTRY || "", | ||
), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { formatAbi } from "abitype"; | ||
import { getAddress } from "viem"; | ||
|
||
import ModuleRegistryABI from "./json/ModuleRegistry.abi"; | ||
|
||
export const ModuleRegistryRaw = ModuleRegistryABI; | ||
export const ModuleRegistryReadable = formatAbi(ModuleRegistryRaw); | ||
|
||
export const ModuleRegistryConfig = { | ||
abi: ModuleRegistryRaw, | ||
address: getAddress(process.env.MODULE_REGISTRY || process.env.NEXT_PUBLIC_MODULE_REGISTRY || ""), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { getAddress } from "viem"; | ||
|
||
import RegistrationModuleABI from "./json/RegistrationModule.abi"; | ||
import errorsJson from "./json/Errors.json"; | ||
|
||
export const ErrorsAbi = errorsJson; | ||
|
||
const storyProtocolMerged = [...RegistrationModuleABI, ...ErrorsAbi]; | ||
|
||
export const RegistrationModuleConfig = { | ||
abi: storyProtocolMerged, | ||
address: getAddress( | ||
process.env.REGISTRATION_MODULE || process.env.NEXT_PUBLIC_REGISTRATION_MODULE || "", | ||
), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { formatAbi } from "abitype"; | ||
import { getAddress } from "viem"; | ||
|
||
import TaggingModuleABI from "./json/TaggingModule.abi"; | ||
|
||
export const TaggingModuleRaw = TaggingModuleABI; | ||
export const TaggingModuleReadable = formatAbi(TaggingModuleRaw); | ||
|
||
export const TaggingModuleConfig = { | ||
abi: TaggingModuleRaw, | ||
address: getAddress(process.env.TAGGING_MODULE || process.env.NEXT_PUBLIC_TAGGING_MODULE || ""), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.