Skip to content

Commit

Permalink
docs: up 7702 (#2705)
Browse files Browse the repository at this point in the history
fix 7702 docs
  • Loading branch information
AyushBherwani1998 authored Sep 9, 2024
1 parent 9de10f8 commit 7bdb6f9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion site/pages/docs/accounts/local/signTransaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ import { privateKeyToAccount } from 'viem/accounts'
const account = privateKeyToAccount('0x...')
// ---cut---
const authorization = await account.experimental_signAuthorization({
address: '0x...',
contractAddress: '0x...',
chainId: 1,
nonce: 1,
})
Expand Down
10 changes: 5 additions & 5 deletions site/pages/experimental/eip7702/hashAuthorization.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { hashAuthorization } from 'viem/experimental'
import { hashAuthorization } from 'viem/experimental'

hashAuthorization({
address: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045',
contractAddress: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045',
chainId: 1,
nonce: 0,
})
Expand All @@ -43,7 +43,7 @@ Address of the contract to set as code for the Authority.
import { hashAuthorization } from 'viem/experimental'

hashAuthorization({
address: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045', // [!code focus]
contractAddress: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045', // [!code focus]
chainId: 1,
nonce: 0,
})
Expand All @@ -59,7 +59,7 @@ Chain ID to authorize.
import { hashAuthorization } from 'viem/experimental'

hashAuthorization({
address: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045',
contractAddress: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045',
chainId: 1, // [!code focus]
nonce: 0,
})
Expand All @@ -75,7 +75,7 @@ Nonce of the Authority to authorize.
import { hashAuthorization } from 'viem/experimental'

hashAuthorization({
address: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045',
contractAddress: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045',
chainId: 1,
nonce: 0, // [!code focus]
})
Expand All @@ -92,7 +92,7 @@ Output format.
import { hashAuthorization } from 'viem/experimental'

hashAuthorization({
address: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045',
contractAddress: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045',
chainId: 1,
nonce: 0,
to: 'bytes', // [!code focus]
Expand Down
10 changes: 4 additions & 6 deletions site/pages/experimental/eip7702/recoverAuthorizationAddress.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,14 @@ import { recoverAuthorizationAddress } from 'viem/experimental'
import { walletClient } from './client'
// ---cut---
const signature = await walletClient.signAuthorization({
authorization: {
address: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045',
chainId: 1,
nonce: 0,
}
contractAddress: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045',
chainId: 1,
nonce: 0,
})

const address = await recoverAuthorizationAddress({
authorization: {
address: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045',
contractAddress: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045',
chainId: 1,
nonce: 0,
},
Expand Down

0 comments on commit 7bdb6f9

Please sign in to comment.