-
Notifications
You must be signed in to change notification settings - Fork 80
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/versioning #188
Feat/versioning #188
Conversation
…k into feat/versioning
SmartAccount_v100__factory | ||
getEntryPointContractInstance, | ||
getFactoryContractInstance, | ||
getProxyContractInstance |
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.
Rename getProxyContractInstance to getSAProxyContract
We can remove Instance from all other names as well.
It should be getEntryPointContract
, getSAFactoryContract
, getSAProxyContract
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.
resolved
private address!: string | ||
private smartAccountInfo!: ISmartAccount | ||
private isInited!: boolean |
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.
Rename isInited
to isInitialized
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.
so there is already a function with same name that i am using to verify either init is called or not. for this reason, i kept is variable name as isInited
private isInitialized(): boolean{
if (!this.isInited)
throw new Error('BiconomySmartAccount is not initialized. Please call init() on BiconomySmartAccount before interacting with any other function')
return true
}
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.
can just keep boolean called initialized
userOp = await this.estimateUserOpGas(userOp, overrides) | ||
Logger.log('userOp after estimation ', userOp) |
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.
These Logger.log across all files should be called based on a debug flag in class constructor.... SDK should not print any logs on its own unless developer has enabled it using debug flag.
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.
so logger only logs if debug is enabled. this check is already there in log function
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.
From where is the Logger class getting the debug flag?
Is this versioning specific to entry point? |
we've got versioning all set up for the entrypoint, factory, and implementation. We're using this backend node API called getSmartAccountByOwner to grab all the info about a smart account. This includes the factory address, implementation address, and entry point address that are all linked to the smart account. Based on the addresses we get from that API call, we're going to decide which version of typechain to use. here is how we have managed versions locally ` ` |
This PR includes following changes