Closed denbite closed 3 months ago
Latest commit: 24a01dcc50672f75efb109d06f462f767ccb9b04
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Looks very good, only one comment and I belive the biggest change I request is with the changeset, as there are quire a few breaking changes. Please adjust the changeset file accordingly(should be a major version increment most probably). If you're not sure about how semantic versioning works, you can check the rules out here
These changes were made to be backward compatible, so releasing them to users shouldn't cause any issues (and it's not a breaking change from that perspective of view)
Pre-flight checklist
pnpm changeset
to create achangeset
JSON document appropriate for this change.Motivation
Many developers complained about the confusing implementation of the Contract class, which requires an Account parameter in the constructor even for view function calls
This PullRequest solves the issue by extending the interface of the first parameter in the constructor and additionally enables full backward compatibility with older versions
Old implementation
New implementation
Test Plan
Related issues/PRs
https://github.com/near/near-api-js/pull/1066 https://github.com/near/near-api-js/discussions/1064