Skip to content

Dev blockchain + (blockchain v2): wire frontend to v2 contracts - #45

Open
zohersahli wants to merge 12 commits into
Kattenelvis:devfrom
zohersahli:dev-blockchain
Open

Dev blockchain + (blockchain v2): wire frontend to v2 contracts#45
zohersahli wants to merge 12 commits into
Kattenelvis:devfrom
zohersahli:dev-blockchain

Conversation

@zohersahli

Copy link
Copy Markdown

No description provided.

…eatePoll/Proposal, update pollsBlockchain + env notes
- Add pollsAdapter.ts for unified v1/v2/REST polls support
- Fix createPoll to handle receipt.status as number or BigInt
- Update CreatePoll.svelte to use pollsAdapter
- Update blockchain test page to use unified adapters
- Add comprehensive logging for poll creation debugging
- Add EIP-1193 window.ethereum typing support (global + local event provider typing).

- Use eth_accounts first, then eth_requestAccounts only when needed.

- Handle user-rejected wallet connection (error code 4001) with explicit message.

- Validate active chainId against PUBLIC_V2_CHAIN_ID before creating signer.

- Reset cached signer/provider on accountsChanged and chainChanged to prevent stale wallet state.
- Reuse shared wallet/contract helpers from client.ts

- Use RPC provider for read-only calls (no MetaMask popups)

- Cache read-only Contract instance to avoid re-creating provider

- Keep write calls via signer-backed Polls contract
@Kattenelvis
Kattenelvis force-pushed the dev branch 5 times, most recently from bb57c5c to d798a39 Compare June 15, 2026 19:19
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