Skip to content

Commit c9bb4f0

Browse files
fix: address remaining code snippet issues from PR review
- Fix FC_NETWORK declaration order and invalid FID in messages guide - Fix ID_GATEWAY_ADDRESS → ID_REGISTRY_ADDRESS in change-recovery guide - Fix makeUserData → makeUserDataAdd in register-ens guide - Fix unquoted fid key in fname API curl example - Fix latestBlock.blockhash → latestBlock.hash in verify-address guide Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 0bf5dd4 commit c9bb4f0

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/app/(docs)/developers/guides/accounts/change-recovery/page.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ await walletClient.writeContract(transferRequest);
3535
import {
3636
ID_REGISTRY_EIP_712_TYPES,
3737
idRegistryABI,
38-
ID_GATEWAY_ADDRESS,
38+
ID_REGISTRY_ADDRESS,
3939
} from '@farcaster/hub-web';
4040
import { walletClient, account } from './clients.ts';
4141

4242
const IdContract = {
4343
abi: idRegistryABI,
44-
address: ID_GATEWAY_ADDRESS,
44+
address: ID_REGISTRY_ADDRESS,
4545
chain: optimism,
4646
};
4747

src/app/(docs)/developers/guides/accounts/register-ens/page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const usernameProofMessage = makeUsernameProof(
6363

6464
// Once it's accepted, you can set the username to the ENS name
6565

66-
const usernameMessage = makeUserData(
66+
const usernameMessage = makeUserDataAdd(
6767
{
6868
type: UserDataType.USERNAME,
6969
value: claim.name,

src/app/(docs)/developers/guides/writing/messages/page.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ import {
2626
} from '@farcaster/hub-nodejs';
2727

2828
const ACCOUNT_PRIVATE_KEY: Hex = '0x...'; // Your account key's private key
29-
const FID = -1; // Your fid
29+
const FID = 123; // Your fid
30+
const FC_NETWORK = FarcasterNetwork.MAINNET;
3031
const ed25519Signer = new NobleEd25519Signer(ACCOUNT_PRIVATE_KEY);
3132
const dataOptions = {
3233
fid: FID,
3334
network: FC_NETWORK,
3435
};
35-
const FC_NETWORK = FarcasterNetwork.MAINNET;
3636
```
3737

3838
## Casts

src/app/(docs)/developers/guides/writing/verify-address/page.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const latestBlock = await publicClient.getBlock();
4242
const fid = 1n;
4343
const network = FarcasterNetwork.MAINNET;
4444
const address = alice.address;
45-
const blockHash = latestBlock.blockhash;
45+
const blockHash = latestBlock.hash;
4646

4747
const ethSignature = eip712Signer.signVerificationEthAddressClaim({
4848
fid,
@@ -99,7 +99,7 @@ const latestBlock = await publicClient.getBlock();
9999
const fid = 1n;
100100
const network = FarcasterNetwork.MAINNET;
101101
const address = alice.address;
102-
const blockHash = latestBlock.blockhash;
102+
const blockHash = latestBlock.hash;
103103

104104
const ethSignature = eip712Signer.signVerificationEthAddressClaim({
105105
fid,

src/app/(docs)/reference/fname/api/page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ e.g.
111111
curl -X POST https://fnames.farcaster.xyz/transfers \
112112
-H "Content-Type: application/json" \
113113
-d \
114-
'{"name": "farcaster", "owner": "0x...", "signature": "0x...", "from": 0, "to": 1000, "timestamp": 1641234567, fid: 1000}'
114+
'{"name": "farcaster", "owner": "0x...", "signature": "0x...", "from": 0, "to": 1000, "timestamp": 1641234567, "fid": 1000}'
115115
```
116116

117117
Once a name is registered, it still needs a [UserData](https://snapchain.farcaster.xyz/reference/datatypes/messages#2-userdata) message

0 commit comments

Comments
 (0)