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

Does not work in browser #17

Closed
tinybike opened this issue May 24, 2016 · 4 comments
Closed

Does not work in browser #17

tinybike opened this issue May 24, 2016 · 4 comments

Comments

@tinybike
Copy link
Member

> EthAbi.rawEncode(["int"], [10])
ethereumjs-abi.js:527 Uncaught Error: Assertion failed(…)assert @ ethereumjs-abi.js:527toBuffer @ ethereumjs-abi.js:1033encodeSingle @ ethereumjs-abi.js:188ABI.rawEncode @ ethereumjs-abi.js:289(anonymous function) @ VM1505:1InjectedScript._evaluateOn @ (program):145InjectedScript._evaluateAndWrap @ (program):137InjectedScript.evaluate @ (program):118

> EthAbi.rawEncode(["string"], ["hi there"])
ethereumjs-abi.js:527 Uncaught Error: Assertion failed(…)assert @ ethereumjs-abi.js:527toBuffer @ ethereumjs-abi.js:1033encodeSingle @ ethereumjs-abi.js:176encodeSingle @ ethereumjs-abi.js:157encodeSingle @ ethereumjs-abi.js:119ABI.rawEncode @ ethereumjs-abi.js:289(anonymous function) @ VM1506:1InjectedScript._evaluateOn @ (program):145InjectedScript._evaluateAndWrap @ (program):137InjectedScript.evaluate @ (program):118
@tinybike tinybike added the bug label May 24, 2016
@tinybike
Copy link
Member Author

This is fixed by PR #16 (although the fix is a bit of a hack -- am I missing something / is there a better solution to this?)

@axic
Copy link
Member

axic commented May 24, 2016

It should have been mentioned, there are two prerequisites for the browser:

(Some of this is mentioned on https://github.com/ethereumjs/browser-builds and I'm using it in https://github.com/ethereum/browser-solidity, however there it is not an issue as it is not minified.)

The current workaround is to include bn.js with that exact version string ("bn.js": "4.10.5") in your package.json in the repo which to browserify/minify.

@axic
Copy link
Member

axic commented Jun 1, 2016

I think this should be fixed with commit c4dff10

@tinybike
Copy link
Member Author

tinybike commented Jun 4, 2016

Fixed, thanks @axic!

@tinybike tinybike closed this as completed Jun 4, 2016
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

No branches or pull requests

2 participants