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

Error on approving allowance example #97

Open
ondrejmaly1 opened this issue Aug 17, 2023 · 1 comment
Open

Error on approving allowance example #97

ondrejmaly1 opened this issue Aug 17, 2023 · 1 comment

Comments

@ondrejmaly1
Copy link

I am getting an error when running an example adjusting allowance. All other examples seems to be running fine

  const wallet = getWallet(isMainnet);
  const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain;
  console.log(`Address: ${await wallet.getAddress()}, chainId: ${chainId}`);

  const contracts = getContracts(isMainnet ? 137 : 80001);
  const usdc = getUsdcContract(isMainnet, wallet);
  const ctf = getCtfContract(isMainnet, wallet);

--> const usdcAllowanceCtf = (await usdc.allowance(wallet.address, ctf.address)) as BigNumber;

Uncaught Error Error: could not detect network (event="noNetwork", code=NETWORK_ERROR, version=providers/5.7.1)
at Logger.makeError (file:///C:/Work/Polymarket/clob-client/node_modules/@ethersproject/logger/lib/index.js:238:21)
at Logger.throwError (file:///C:/Work/Polymarket/clob-client/node_modules/@ethersproject/logger/lib/index.js:247:20)
at (file:///C:/Work/Polymarket/clob-client/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:609:54)
at step (file:///C:/Work/Polymarket/clob-client/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:48:23)
at (file:///C:/Work/Polymarket/clob-client/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:29:53)
at rejected (file:///C:/Work/Polymarket/clob-client/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:21:65)
at processTicksAndRejections (node:internal/process/task_queues:95:5)

@Ragnoraks
Copy link

I have the same error

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

No branches or pull requests

2 participants