Skip to content

Commit 519ae60

Browse files
committed
fix(tx-sdk): additional fixes to tx-sdk guides
1 parent 3de3019 commit 519ae60

File tree

6 files changed

+51
-66
lines changed

6 files changed

+51
-66
lines changed

docs/network/8-flare-tx-sdk.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ import DocCardList from "@theme/DocCardList";
1111

1212
The Flare Transaction SDK ([`@flarenetwork/flare-tx-sdk`](https://www.npmjs.com/package/@flarenetwork/flare-tx-sdk/)) is the official Node.js toolkit for performing common actions on all Flare networks - Flare, Coston2, Songbird, and Coston.
1313

14-
- Claim rewards (FlareDrop, staking, FTSO delegation, rFLR)
15-
- Delegate to FTSO providers
16-
- Stake on the P-chain
17-
- Vote on governance proposals
18-
- Retrieve account and balance information
19-
- Transfer native and wrapped coins
20-
- Interact with C-Chain contracts
14+
- [Claim rewards](/network/flare-tx-sdk/cookbook#claim-rewards) (FlareDrops, staking, FTSO delegation, rFLR)
15+
- [Delegate to FTSO providers](/network/flare-tx-sdk/cookbook#delegate-to-ftso-providers)
16+
- [Stake on the P-chain](/network/flare-tx-sdk/cookbook#stake-on-p-chain)
17+
- [Vote on governance proposals](/network/flare-tx-sdk/cookbook#vote-on-governance-proposals)
18+
- [Retrieve account and balance information](/network/flare-tx-sdk/cookbook#retrieve-account-balances)
19+
- [Transfer native and wrapped coins](/network/flare-tx-sdk/cookbook#wrap-and-transfer)
20+
- [Interact with C-Chain contracts](/network/flare-tx-sdk/cookbook#interact-with-c-chain-contracts)
2121

2222
Explore the following guides to get started:
2323

docs/network/flare-tx-sdk/1-getting-started.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Getting Started
3-
description: Connect to the SDK to EIP-1193 and Hardware wallets.
3+
description: Connect the SDK to MetaMask, Ledger, Trezor, and more.
44
keywords:
55
[
66
flare,
@@ -313,3 +313,9 @@ If none of the Wallet controllers listed here meet your needs, you can implement
313313
- Explore the [Cookbook](/network/flare-tx-sdk/cookbook) for task-oriented guides (balances, transfers, rewards, staking).
314314
- Check the [Advanced Features](/network/flare-tx-sdk/advanced-usage) for transaction callbacks and custom wallets.
315315
- Read the SDK source code on [GitHub](https://github.com/flare-foundation/flare-tx-sdk).
316+
317+
:::tip[Need help or found a bug?]
318+
319+
Open an issue on the [flare-foundation/flare-tx-sdk](https://github.com/flare-foundation/flare-tx-sdk) GitHub repository.
320+
321+
:::

docs/network/flare-tx-sdk/2-cookbook.mdx

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -278,30 +278,6 @@ await network.undelegateFromFtso(wallet);
278278

279279
:::
280280

281-
## Interact with C-Chain contracts
282-
283-
The SDK provides helpers for interacting with any smart contract on the C-Chain.
284-
285-
```javascript
286-
// Call a read-only contract method
287-
const result = await network.invokeContractCallOnC(contractAddress, abi, "methodName", [param1, param2]);
288-
289-
// Execute a transaction method that changes state
290-
// The `value` parameter is for payable methods
291-
await network.invokeContractMethodOnC(wallet, contractAddress, abi, "methodName", value, [param1, param2]);
292-
293-
// You can also use contract names for official Flare contracts
294-
const contractNames = await network.getFlareContracts(); // See available names
295-
await network.invokeContractMethodOnC(wallet, "FtsoRewardManager", abi, "claimReward", ...);
296-
```
297-
298-
:::info
299-
300-
- ABI must match the contract interface.
301-
- For official Flare contracts, names are predefined and easier to use.
302-
303-
:::
304-
305281
## Stake on P-Chain
306282

307283
Staking involves moving funds to the P-Chain, delegating them, and later transferring them back.
@@ -418,7 +394,37 @@ Queries may **fail** for older proposals, since historical governance vote data
418394

419395
:::
420396

397+
## Interact with C-Chain contracts
398+
399+
The SDK provides helpers for interacting with any smart contract on the C-Chain.
400+
401+
```javascript
402+
// Call a read-only contract method
403+
const result = await network.invokeContractCallOnC(contractAddress, abi, "methodName", [param1, param2]);
404+
405+
// Execute a transaction method that changes state
406+
// The `value` parameter is for payable methods
407+
await network.invokeContractMethodOnC(wallet, contractAddress, abi, "methodName", value, [param1, param2]);
408+
409+
// You can also use contract names for official Flare contracts
410+
const contractNames = await network.getFlareContracts(); // See available names
411+
await network.invokeContractMethodOnC(wallet, "FtsoRewardManager", abi, "claimReward", ...);
412+
```
413+
414+
:::info
415+
416+
- ABI must match the contract interface.
417+
- For official Flare contracts, names are predefined and easier to use.
418+
419+
:::
420+
421421
## Next steps
422422

423423
- Check the [Advanced Features](/network/flare-tx-sdk/advanced-usage) for transaction callbacks and custom wallets.
424424
- Read the SDK source code on [GitHub](https://github.com/flare-foundation/flare-tx-sdk).
425+
426+
:::tip[Need help or found a bug?]
427+
428+
Open an issue on the [flare-foundation/flare-tx-sdk](https://github.com/flare-foundation/flare-tx-sdk) GitHub repository.
429+
430+
:::

docs/network/flare-tx-sdk/3-advanced-usage.mdx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ tags: [advanced, javascript]
1111
Every transaction goes through a series of stages:
1212

1313
```plaintext
14-
[Unsigned] → [Before Signature] → [Signed] → [Before Submission]
15-
→ [Submitted] → [After Submission] → [Confirmed]
14+
[Unsigned] → [Before Signature] → [Signed] → [Before Submission] → [Submitted] → [After Submission] → [Confirmed]
1615
```
1716

1817
The SDK allows you to register callbacks at each stage to inspect or intercept the process.
@@ -153,3 +152,9 @@ export class EthersWallet implements SdkWallet {
153152
Start with C-Chain only. Add P-Chain support once you need staking or P-Chain operations.
154153

155154
:::
155+
156+
:::tip[Need help or found a bug?]
157+
158+
Open an issue on the [flare-foundation/flare-tx-sdk](https://github.com/flare-foundation/flare-tx-sdk) GitHub repository.
159+
160+
:::

docs/run-node/7-ftso-data-provider.mdx

Lines changed: 0 additions & 16 deletions
This file was deleted.

docs/run-node/8-fdc-attestation-provider.mdx

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)