Skip to content

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