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

How to use "CallContractEx" in a Native contract? #1699

Closed
doubiliu opened this issue Jun 14, 2020 · 5 comments · Fixed by #1700
Closed

How to use "CallContractEx" in a Native contract? #1699

doubiliu opened this issue Jun 14, 2020 · 5 comments · Fixed by #1700
Labels
Question Used in questions

Comments

@doubiliu
Copy link
Contributor

Description:
I want to implement a new function of a native contract, and need to call an external contract in the native contract method.When I use "engine.CallContractEx", I find that the return value of the original method is pushed into the evaluation stack of the new context, occupying the position of the contract method, and the call fails.

@doubiliu doubiliu added the Question Used in questions label Jun 14, 2020
@shargon
Copy link
Member

shargon commented Jun 15, 2020

What it's the use case?

@shargon
Copy link
Member

shargon commented Jun 16, 2020

Ping @doubiliu

@doubiliu
Copy link
Contributor Author

We are trying to implement an asynchronous Oracle implementation.After the implementation is completed, the two programs need to be compared and evaluated.The implementation process is quite complicated, and there are many issues to consider. 😄

@shargon
Copy link
Member

shargon commented Jun 17, 2020

We are trying to implement an asynchronous Oracle implementation

I think that this still under discussion.

@erikzhang
Copy link
Member

Imagine a decentralized exchange with various assets in it. When users withdraw, the exchange contract needs to dynamically call the asset contract. If the exchange is a native contract, then this feature is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question Used in questions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants