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

feat: allow to pass custom readContract function #88

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

balthazar
Copy link

Permits us to have more control over the kind of potentially heavy asynchronous work done during contract state computation.

Also minor comment change on something that seems to have been forgotten.

@balthazar balthazar changed the title Allow to pass custom readContract function feat: allow to pass custom readContract function Jul 1, 2021
) {
const returningSrc = normalizeContractSource(contractSrc);
const swGlobal = new SmartWeaveGlobal(arweave, { id: contractId, owner: contractOwner });
const swGlobal = new SmartWeaveGlobal(arweave, { id: contractId, owner: contractOwner, customReadContract });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from my understanding - after this change different "readContract" functions might be used inside SWC code and from the SDK itself (SDK always uses built-in readContract version). Not sure if that's a good solution - shouldn't this be consistent - ie. both SDK and version exposed within SWC must the same?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Copy link
Author

@balthazar balthazar Jul 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have our own custom readContract (we do not use the SDK one), we have to use that one during contract execution.

@balthazar
Copy link
Author

@cedriking

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

Successfully merging this pull request may close these issues.

2 participants