Skip to content

Fix 575 - #590

Closed
Kingsuite wants to merge 5 commits into
Scaffold-Stark:developfrom
Kingsuite:fix-575
Closed

Fix 575#590
Kingsuite wants to merge 5 commits into
Scaffold-Stark:developfrom
Kingsuite:fix-575

Conversation

@Kingsuite

Copy link
Copy Markdown
Contributor

Implement use Scaffold multiread hook

Fixes #575

Types of change

  • Feature
  • Bug
  • Enhancement

Comments (optional)

@metalboyrick metalboyrick left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

GM Thanks for the PR! Comments down below

On the PR:

  • Please rebase your branch to the latest develop
  • please put the appropriate title (e.g. feat: implement...)
  • Please re-read the issue and try to understand the intention behind the task, feel free to consult us if you have any questions

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't think you need to implement a contract

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't think you need to implement a contract

Comment on lines +99 to +108
const multicallResult = useReadContract({
functionName: "call_contracts",
address: multicallContract?.address,
abi: multicallContract?.abi,
watch: true,
args: [contracts, entryPointSelectors, calldata],
enabled: allContractsReady && contracts.length > 0,
blockIdentifier: "pending" as BlockNumber,
...readConfig,
});

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We are not supposed to call a particular contract here, you have to use starknet.js or starknet-react to implement a hook that can read multiple contracts at once.

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