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

[docs] Javascript Wagmi Smart Contract Interaction #3084

Open
vanyasav opened this issue Oct 14, 2024 · 5 comments
Open

[docs] Javascript Wagmi Smart Contract Interaction #3084

vanyasav opened this issue Oct 14, 2024 · 5 comments

Comments

@vanyasav
Copy link

Summary

As stated in the docs:

Wagmi actions can help us interact with wallets and smart contracts:

import { readContract } from '@wagmi/core'
import { USDTAbi } from '../abi/USDTAbi'

const USDTAddress = '0x...'

const data = readContract({
  address: USDTAddress,
  abi: USDTAbi,
  functionName: 'symbol'
})

Read more about Wagmi actions for smart contract interaction here.

But if you follow the link:

import { readContract } from '@wagmi/core'
import { abi } from './abi'
import { config } from './config'

const result = await readContract(config, {
  abi,
  address: '0x6b175474e89094c44da98b954eedeac495271d0f',
  functionName: 'totalSupply',
})

Is config missing from the docs?

Link to the related docs page

https://docs.reown.com/appkit/javascript/core/installation?platform=wagmi

@vanyasav
Copy link
Author

image

modal of class AppKit doesnt have disconnect function

@rtomas
Copy link
Contributor

rtomas commented Oct 15, 2024

modal of class AppKit doesnt have disconnect function
We are solving this issue soon.
https://linear.app/reown/issue/APKT-1045/[bug]-disconnect-is-not-exposed

@vanyasav
Copy link
Author

@rtomas what about config?

@rtomas
Copy link
Contributor

rtomas commented Oct 23, 2024

@vanyasav Where I can find that config import ?

@bolom
Copy link

bolom commented Oct 24, 2024

@vanyasav Where I can find that config import ?

modal.adapter.wagmiConfig

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
@bolom @rtomas @vanyasav and others