Skip to content
Discussion options

You must be logged in to vote

Addressing Your Question

Btw calling directly into primary_fungible_store::withdraw should not give this error. Can you double check/send some code snippets?

pfs::withdraw -> dfa::withdraw -> fa::withdraw_sanity_check

The sanity check will pass here, since we set abort_on_dispatch as false.

Separate Consideration (important) - Move VM

However... when you're creating the module that defines and initializes the fungible asset, an issue arises when the VM call stack looks like this:

your_module::transfer -> pfs::transfer -> pfs::withdraw -> dfa::withdraw (sanity check will pass) -> dfa::dispatchable_withdraw -> your_module::withdraw (notice your_module is already on the stack)

This breaks th…

Replies: 3 comments 7 replies

Comment options

You must be logged in to vote
3 replies
@kshitijc1506
Comment options

@0xbe1
Comment options

@kshitijc1506
Comment options

Comment options

You must be logged in to vote
4 replies
@LawsonGraham
Comment options

@LawsonGraham
Comment options

@davidiw
Comment options

@LawsonGraham
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by kshitijc1506
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants