a16z / zkdocs

306 stars 30 forks source link

Replicating tax-bracket fails #4

Open olyashok opened 2 years ago

olyashok commented 2 years ago
  1. Build and deployed everything.
  2. Backend up.
  3. Schema deployed fine and i got zkDoc address via "yarn hardhat build-deploy-schema --schema /home/node/zkcv/zkdocs/zkdocs-backend/test/test_schemas/tax_bracket.json --network localhost. "
  4. Did /home/node/zkcv/zkdocs/cp_script.sh tax_bracket /home/node/zkcv/zkdocs/zkdocs-backend/test/test_schemas/tax_bracket.json
  5. Checked zkdocs-ui/src/lib/Config.ts
  6. Did ./cp_snarkjs.sh

Still getting this error on Fill form in the client:

Error: Error: call revert exception [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (method="schemaHash()", data="0x", errorArgs=null, errorName=null, errorSignature=null, reason=null, code=CALL_EXCEPTION, version=abi/5.6.1)

olyashok commented 2 years ago

@sragss @skgbafa

i can see the contract on ethereal - schemaHash() works fine there - no idea why this call fails in SelectDocWidget.tsx

contract .schemaHash() .then(async (schemaHash: string) => { let schemaMeta = await findSchemaForHash(schemaHash); if (schemaMeta === undefined) { setError("No schema found."); } else { schemaMeta.contractAddr = contractAddress!; props.setSchemaMeta(schemaMeta!); } }) .catch((err: any) => setError(err)); };

sragss commented 2 years ago

Can you confirm that your wallet is connected to the hardhat testnet?

olyashok commented 2 years ago

Yes its connected to localhost hardhat

Kind regards Alex


From: sragss @.> Sent: Monday, July 18, 2022 12:35:05 PM To: a16z/zkdocs @.> Cc: olyashok @.>; Author @.> Subject: Re: [a16z/zkdocs] Replicating tax-bracket fails (Issue #4)

Can you confirm that your wallet is connected to the hardhat testnet?

— Reply to this email directly, view it on GitHubhttps://github.com/a16z/zkdocs/issues/4#issuecomment-1187717645, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMBUT7SEOJELOCNDFDTT2ELVUWBTTANCNFSM532AKK2A. You are receiving this because you authored the thread.Message ID: @.***>

j-wang2 commented 1 year ago

Any updates on this? I am also having the same error :( @olyashok @sragss

sragss commented 1 year ago

Could you try the new demo instructions? Should simplify the process quite a bit.

https://github.com/a16z/zkdocs#local-demo

I believe this error could only occur due to connecting to the wrong network or entering the wrong zkDoc contract address. Both of those footguns could be mitigated with a more error resistant UI flow.