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

functions without cost #14

Closed
laudney opened this issue Dec 18, 2017 · 2 comments
Closed

functions without cost #14

laudney opened this issue Dec 18, 2017 · 2 comments

Comments

@laudney
Copy link

laudney commented Dec 18, 2017

I have a silly question. It seems that your code is calling certain functions in the Core contract without a wallet or sending ethers, e.g. getKitty and getStatus.

Is this the case? And how can this be?

Thanks.

@ricmoo
Copy link
Owner

ricmoo commented Dec 18, 2017

Those are read-only (i.e. constant) functions and require no ether to call. you only require ether for transaction which change the state (update values, remove values or add values).

This is why ethers.js makes a distinction between a signer (like a Wallet) and a mere provider.

@laudney
Copy link
Author

laudney commented Dec 18, 2017

Ahh. Thank you!

@laudney laudney closed this as completed Dec 18, 2017
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

2 participants