verichains / revela

Decompiler for Move smart contracts
https://revela.verichains.io
Other
48 stars 13 forks source link

[Bug] friend declaration is missing in the decompiled code #5

Open rahxephon89 opened 7 months ago

rahxephon89 commented 7 months ago

When trying to compile the token module decompiled from the bytecode, the following error is raised:

Compiling, may take a little while to download git dependencies...
UPDATING GIT DEPENDENCY https://github.com/aptos-labs/aptos-core.git
INCLUDING DEPENDENCY AptosFramework
INCLUDING DEPENDENCY AptosStdlib
INCLUDING DEPENDENCY MoveStdlib
BUILDING src
error[E04001]: restricted visibility
    ┌─ /.../sources/token.move:743:9
    │
743 │         0x3::token_event_store::emit_collection_description_mutate_event(arg0, arg1, v1.description, arg2);
    │         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Invalid call to '0x3::token_event_store::emit_collection_description_mutate_event'
    │

The reason is that the friend declaration is missing from the code.