4

I was trying to deploy my smart contract to the local testnet and got this error.

Error 3070003: Serialization Error Processing WASM

I was using a command cleos set contract testing . hello.wast hello.abi -p testing

Nodeos output:

  Produced block 000009736bfdf868... #2419 @ 2018-08-15T10:10:19.500 signed by eosio [trxs: 0, lib: 2418, confirmed: 0]
2018-08-15T10:10:19.780 thread-0   http_plugin.cpp:472           handle_exception     ] FC Exception encountered while processing chain.push_transaction
2018-08-15T10:10:19.780 thread-0   http_plugin.cpp:473           handle_exception     ] Exception Details: 3070003 wasm_serialization_error: Serialization Error Processing WASM
magic number: loaded 1685024040 but was expecting 1836278016
    {}
    thread-0  wasm_interface.cpp:40 validate
pending console output:
    {"console":""}
    thread-0  apply_context.cpp:61 exec_one
10
  • This is a very general error. Maybe you can provide some more code and explanation.
    – tmm
    Commented Aug 15, 2018 at 11:31
  • I just used eosiocpp -o hello.wast hello.abi and eosiocpp -g hello.abi hello.cpp and just tried to deploy it by using cleos set contract.
    – JustinZ
    Commented Aug 15, 2018 at 11:37
  • Ok. Did you try to change the folder path cleos set contract testing ./ hello.wast hello.abi -p testing? I don't know if . is a valid path.
    – tmm
    Commented Aug 15, 2018 at 11:40
  • Yes, I have even tried to show the full path like Users/user/documents/eos/contracts/hello
    – JustinZ
    Commented Aug 15, 2018 at 11:49
  • Are you using Docker or a local version? And did you change anything in the contract?
    – tmm
    Commented Aug 15, 2018 at 11:55

1 Answer 1

5

I solved it. The problem was that I was using .wast and you can no longer use .wast you have to use .wasm

2
  • Cheers! Glad you solved it and answered your own question so others know how to deal with it as well.
    – tmm
    Commented Aug 21, 2018 at 21:22
  • 1
    yeah I found it useful too(brofist)
    – NaN
    Commented Sep 21, 2018 at 10:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.