-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: refactor with account contract class #193
feat: refactor with account contract class #193
Conversation
packages/starknet-snap/src/services/account-contract/contract.ts
Outdated
Show resolved
Hide resolved
packages/starknet-snap/src/services/account-contract/contracts/base.ts
Outdated
Show resolved
Hide resolved
packages/starknet-snap/src/services/account-contract/contracts/cairo0.ts
Outdated
Show resolved
Hide resolved
packages/starknet-snap/src/services/account-contract/contracts/cairo0.ts
Outdated
Show resolved
Hide resolved
packages/starknet-snap/src/services/account-contract/contracts/cairo1.ts
Outdated
Show resolved
Hide resolved
packages/starknet-snap/src/services/account-contract/contracts/cairo1.ts
Outdated
Show resolved
Hide resolved
|
||
import { Network } from '../../types/snapState'; | ||
|
||
export interface NodeProvider { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better to change the name of the interface because it's the same as the class here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i will keep this name until i found 1 better, and it is okay in JS for the interface has same name with class
Refactor with account contract class
AccountContractService
provide the functionality to get correctAccountContract
instance by version and deploy statusAccountContract
provide the isolation and diversity for different cairo version, such as upgrade, get version, get public key - which may different across different cairo version contractAccountKeyring
provide the interface for snap to generate new account and get account contract by addressapply those new class instance into recover account and upgrade account method for test run