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

Remove external utilities from SDK API #92

Closed
austinabell opened this issue Jun 3, 2022 · 0 comments · Fixed by #93
Closed

Remove external utilities from SDK API #92

austinabell opened this issue Jun 3, 2022 · 0 comments · Fixed by #93

Comments

@austinabell
Copy link
Contributor

austinabell commented Jun 3, 2022

Low confidence suggestion:

near-sdk-js/src/utils.js

Lines 17 to 19 in f03eb1a

export function encodeCall(contract, method, args) {
return Buffer.concat([Buffer.from(contract), Buffer.from([0]), Buffer.from(method), Buffer.from([0]), Buffer.from(JSON.stringify(args))])
}

Probably shouldn't be exposed from the SDK API because it is just a utility used externally from the contract and can't even be used from within because Buffer is not available from the rollup generated code.

This might be a foot gun for developers if they see this within the SDK. Doesn't seem to be used anyway or exported though, so this might just be as simple as removing the code

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 a pull request may close this issue.

1 participant