Skip to content

Commit

Permalink
Update getting-started.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jxom authored Dec 16, 2022
1 parent 8454570 commit ea22ce1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions site/docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { mainnet } from 'viem/chains'

const client = createPublicClient({
chain: mainnet,
transport: http()
transport: http(),
})
```

Expand All @@ -30,11 +30,14 @@ In a production app, it is highly recommended to pass through your authenticated

Now that you have a Client set up, you can now interact with Ethereum and consume [Actions](/TODO)!

```tsx {6}
```tsx {9}
import { createPublicClient, http, fetchBlockNumber } from 'viem'
import { mainnet } from 'viem/chains'

const client = createPublicClient(http({ chain: mainnet }))
const client = createPublicClient({
chain: mainnet,
transport: http(),
})

const blockNumber = await fetchBlockNumber(client)
```

3 comments on commit ea22ce1

@vercel
Copy link

@vercel vercel bot commented on ea22ce1 Dec 16, 2022

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

viem-site – ./site

viem-site-git-main-wagmi-dev.vercel.app
viem-site.vercel.app
viem-site-wagmi-dev.vercel.app

@vercel
Copy link

@vercel vercel bot commented on ea22ce1 Dec 16, 2022

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

viem-benchmark – ./playgrounds/benchmark

viem-benchmark.vercel.app
viem-benchmark-git-main-wagmi-dev.vercel.app
viem-benchmark-wagmi-dev.vercel.app

@vercel
Copy link

@vercel vercel bot commented on ea22ce1 Dec 16, 2022

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

viem-playground – ./playgrounds/dev

viem-playground-git-main-wagmi-dev.vercel.app
viem-playground.vercel.app
viem-playground-wagmi-dev.vercel.app

Please sign in to comment.