Comments (13)
I also encountered this problem.
from eosjs.
Since the console.log is outputting "Assembling WASM..." the trace appears to be from structs.js
if(/^\s*\(module/.test(code)) {
console.log('Assembling WASM...')
const wasm = Buffer.from(binaryen.parseText(code).emitBinary())
result.code = wasm
} else {
result.code = object.code
So this seems to be prior to hitting the blockchain. I also don't see the eos.setcode unit test in src/index.test.js which has all the passing unit tests. Perhaps @jcalfee has some suggestions for a workaround?
from eosjs.
I'll add a unit test..
from eosjs.
Thanks James! Appreciate any help here...
from eosjs.
So far the unit test is able to deploy the currency contract using eosjs with binaryen.
There are some complications making the unit test but unrelated. a) exchange contract deploy exceeds the maximum network usage, b) re-deploying the same wast rejected..
Since your wast files starts with "(module" it should be valid web assembly text format. The error is really between your wast file and binaryen. The wast file is not the format you write by hand but rather the 1st compilation of your program. The binaryen is a second pass on the wast file. I believe eosio has a program that converts c++ to this wast file. Is that what your using?
from eosjs.
I tested using [email protected] ..
from eosjs.
There was an unrelated error in the ABI structs fixed in the comment above (the eosjs-json upgrade) .. I'll push a release later today.
from eosjs.
Published: [email protected] .. Let us know more about how you created your wast file..
from eosjs.
Thanks for getting on this so fast.
I'm going to investigate this more later and provide more color with the new release. I was creating both the abi and the wast files using eosiocpp. So the files were output using 'eosiocpp -o hello.wast hello.cpp' and 'eosiocpp -g hello.abi hello.cpp'. These files generate with a few warnings, however. Once these files are created, I'm able to successfully deploy the contract via cleos using these files. The trouble comes when using these same files with the setcode command and fs/binaryen.
If you are able to deploy with the new version,, that's good news. I'll take a look at the new release and report back on this thread. Let me know if you need more details to reproduce anything.
from eosjs.
More to do. Just a quick update. The error is gone when using the previous version of binaryen (v37). The latest version with standard npm install binaryen (v46) seemed to cause the error. Will continue investigating...
from eosjs.
This sounds related to EOSIO/eos#2187
from eosjs.
Solved. It works with binaryen v37. You are the best.
from eosjs.
It works with binaryen v37. Failed to use v46 before.
from eosjs.
Related Issues (20)
- How to generate eos address from xpub HOT 1
- How to set the blockBehind when sending transaction HOT 4
- about the return value of get_currency_balance
- reversible_guard_exception: Reversible block log usage is at unsafe levels reversible free: 2097120, guard size: 2097152 HOT 3
- Can i use eosjs on Google App Scripts platform? HOT 2
- How "data" should look in NFT transaction? HOT 1
- How to get a list of my assets (NFTs)? HOT 3
- When i run the yarn build-web not working? HOT 2
- I am having issues while playing the FW game as the account type is changed from Active to Owner HOT 1
- TypeError in eosjs-jsonrpc.js HOT 1
- claim_signature
- Can't find variable: Buffer
- A RpcError when trying to add a new permission to an existing account
- JsSignatureProvider error when create new JsSignatureProvider
- Please help with errors - Modul type for ES and cannot use import statement outside a module
- Check for irreversibality once the transaction has been sent through api.transact? HOT 1
- Unrecognized signature format for WebAuthn signature HOT 1
- Integration Test failing due to new field in `get_info` (first_block_num)
- Getting error : -Missing ATOMIC_ATTRIBUTE in pair_string_ATOMIC_ATTRIBUTE when using basic-usage/00_browser.md HOT 1
- Circular dependency issues HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eosjs.