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

NNS wrapper extensions #397

Merged
merged 2 commits into from
May 6, 2024
Merged

NNS wrapper extensions #397

merged 2 commits into from
May 6, 2024

Conversation

roman-khimov
Copy link
Member

They can be convenient for non-standard names (netmap.neofs vs contract.smth).

Signed-off-by: Roman Khimov <[email protected]>
Copy link
Contributor

@cthulhu-rider cthulhu-rider left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice except some naming

}

// NewFS creates an instance of [Contract] using hash obtained via [InferHash].
func NewFS(sg ContractStateGetter, actor Actor) (*Contract, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

confusing name to me, i suggest

Suggested change
func NewFS(sg ContractStateGetter, actor Actor) (*Contract, error) {
func NewInferred(sg ContractStateGetter, actor Actor) (*Contract, error) {

or

Suggested change
func NewFS(sg ContractStateGetter, actor Actor) (*Contract, error) {
func NewWithInferredHash(sg ContractStateGetter, actor Actor) (*Contract, error) {

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I had some doubts about it as well, but decided to try with a shorter one. @carpawell, what'd be your preference?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, i would die if i did not know what and why FS is here. NewInferred and NewWithInferredHash are not perfect to me either but better

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

If just need a ContractReader this simplifies things somewhat.

Signed-off-by: Roman Khimov <[email protected]>
@roman-khimov roman-khimov merged commit e78d64e into master May 6, 2024
10 checks passed
@roman-khimov roman-khimov deleted the nns-extensions branch May 6, 2024 20:26
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.

3 participants