From 517024446d3df9b364af92dcf9e470cbaca326e4 Mon Sep 17 00:00:00 2001 From: hsutaiyu Date: Fri, 26 Dec 2025 12:55:32 +0800 Subject: [PATCH] Add staking contract integration doc Add staking rewards contract address of Symbiotic FP and sample code for interface integration --- docs/staking/contract-integration.md | 39 ++++++++++++++++++++++++++++ sidebars.js | 5 ++++ 2 files changed, 44 insertions(+) create mode 100644 docs/staking/contract-integration.md diff --git a/docs/staking/contract-integration.md b/docs/staking/contract-integration.md new file mode 100644 index 00000000..3d6a81cf --- /dev/null +++ b/docs/staking/contract-integration.md @@ -0,0 +1,39 @@ +# Contract Integration Notes + +## 1. Reward Contract + +**Address**: `0x04c74e8a11c669acfb7ee01012bbf5cf1e57a10d` + +--- + +## 2. Interface + +### 2.1 `claimedAmount` + +Query the reward amount already claimed by a specific owner. + +**Code Example:** + +```ts +import {keccak256, toUtf8Bytes} from 'ethers'; + +// User wallet address (example) +const ADDRESS = '0xabc...'; + +// 1) Protocol type identifier +const protocolTypeIdentifier = keccak256(toUtf8Bytes('symbiotic')); + +// 2) Digest used in contract call +// For Operators +const operatorAddressDigest = keccak256( + toUtf8Bytes(protocolTypeIdentifier + ADDRESS.toLowerCase()) + 'operator', +); + +// For Delegators +const ownerAddressDigest = keccak256( + toUtf8Bytes(protocolTypeIdentifier + ADDRESS.toLowerCase()) +); + +// Contract call +// rewardsContract.claimedAmount(ownerAddressDigest); +``` \ No newline at end of file diff --git a/sidebars.js b/sidebars.js index 19ef4de9..fa0bc544 100644 --- a/sidebars.js +++ b/sidebars.js @@ -88,6 +88,11 @@ module.exports = { label: "Become an Operator", id: "staking/become-symbiotic-fp", }, + { + type: "doc", + label: "Contract Integration", + id: "staking/contract-integration", + }, { type: "doc", label: "FAQs",