Skip to content
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

Conversation

stanleyyconsensys
Copy link
Collaborator

Refactor with account contract class

  • a new class instance AccountContractService provide the functionality to get correct AccountContract instance by version and deploy status
  • a new class instance AccountContract provide the isolation and diversity for different cairo version, such as upgrade, get version, get public key - which may different across different cairo version contract
  • a new class instance AccountKeyring provide the interface for snap to generate new account and get account contract by address

apply those new class instance into recover account and upgrade account method for test run

packages/starknet-snap/src/services/account/snapState.ts Outdated Show resolved Hide resolved

import { Network } from '../../types/snapState';

export interface NodeProvider {
Copy link
Contributor

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

Copy link
Collaborator Author

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

@stanleyyconsensys stanleyyconsensys marked this pull request as ready for review February 5, 2024 09:48
@stanleyyconsensys stanleyyconsensys requested a review from a team as a code owner February 5, 2024 09:48
@stanleyyconsensys stanleyyconsensys requested review from Julink-eth and wantedsystem and removed request for a team February 5, 2024 09:48
Base automatically changed from feat/sf-539-ui-upgrade-account to releases/2.3.0 February 28, 2024 06:20
@stanleyyconsensys stanleyyconsensys deleted the feat/refactor-with-account-contract-class branch October 22, 2024 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants