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

Impossible to get the value of another contract, this breaks established standards #901

Closed
vporton opened this issue Oct 30, 2020 · 2 comments

Comments

@vporton
Copy link

vporton commented Oct 30, 2020

How to get the value of a field of another contract?

It seems impossible... there is no way to get a balance of another ZRC-2 - too bad!

Need to add getting field values (and preferably also messages of a transition) of another contract. Does it require changes in the bytecode interpreter?

@jjcnn
Copy link
Contributor

jjcnn commented Nov 23, 2020

How to get the value of a field of another contract?

It seems impossible... there is no way to get a balance of another ZRC-2 - too bad!

At the moment the only option is to send a message invoking an appropriate getter transition on the other contract, and provide a transition that can receive the message that the getter sends back.

We are working on a way to read field values directly.

Does it require changes in the bytecode interpreter?

Yes, among other things. (BTW, the interpreter is not a bytecode interpreter - it interprets Scilla code directly).

(and preferably also messages of a transition)

I don't understand what this means. When invoked, transitions may create and send messages, but messages are not part of the contract's state, so there are no message to read.

@anton-trunov
Copy link
Contributor

This has been implemented in #967 and is available since Scilla v0.10.0

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

No branches or pull requests

3 participants