From 532d32c863f3e4266d0bf89a188fd1eb08f0f7d7 Mon Sep 17 00:00:00 2001 From: miaorun Date: Wed, 10 Dec 2025 17:26:28 +0800 Subject: [PATCH] feat: add claimedAmount --- docs/staking/contract-integration.md | 32 +++ sidebars.js | 349 ++++++++++++++------------- 2 files changed, 209 insertions(+), 172 deletions(-) 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..277a5cb4 --- /dev/null +++ b/docs/staking/contract-integration.md @@ -0,0 +1,32 @@ +# Contract Integration Notes + +## 1. Contract + +- **Address**: `0x04c74e8a11c669acfb7ee01012bbf5cf1e57a10d` + +--- + +## 2. Function: + +### 2.1 `claimedAmount` + +Query how much reward has already been claimed by a specific owner. + +**Conceptual signature:** + +```ts +import {keccak256, toUtf8Bytes} from 'ethers'; + +// User wallet address (example) +const ADDRESS = '0x3a951869775c5d6c2d295e74b79406836da3d956'; + +// 1) Protocol type identifier +const protocolTypeIdentifier = keccak256(toUtf8Bytes('symbiotic')); + +// 2) Digest used in contract call +const ownerAddressDigest = keccak256( + toUtf8Bytes(protocolTypeIdentifier + ADDRESS.toLowerCase()), +); + +// rewardsContract.claimedAmount(ownerAddressDigest); +``` diff --git a/sidebars.js b/sidebars.js index 19ef4de9..6b70d9fb 100644 --- a/sidebars.js +++ b/sidebars.js @@ -10,107 +10,112 @@ */ module.exports = { - docs: [ + docs : [ { - type: "category", - label: "Manta Network", - collapsible: false, - items: [ + type : "category", + label : "Manta Network", + collapsible : false, + items : [ { - type: "category", - label: "What is Manta?", - items: [ + type : "category", + label : "What is Manta?", + items : [ { - type: "doc", - label: "What is Manta?", - id: "Introduction", + type : "doc", + label : "What is Manta?", + id : "Introduction", }, { - type: "doc", - label: "Manta Pacific", - id: "introduction/Manta-Pacific", + type : "doc", + label : "Manta Pacific", + id : "introduction/Manta-Pacific", }, { - type: "doc", - label: "Manta Atlantic", - id: "introduction/Manta-Atlantic", + type : "doc", + label : "Manta Atlantic", + id : "introduction/Manta-Atlantic", }, ], }, { - type: "doc", - label: "Manta Token", - id: "mantaToken/mantaToken", + type : "doc", + label : "Manta Token", + id : "mantaToken/mantaToken", }, { - type: "category", - label: "Research", - items: [ + type : "category", + label : "Research", + items : [ { - type: "doc", - label: "Fast Finality", - id: "concepts/fast-finality", + type : "doc", + label : "Fast Finality", + id : "concepts/fast-finality", }, { - type: "doc", - label: "OP Stack", - id: "concepts/OPStack", + type : "doc", + label : "OP Stack", + id : "concepts/OPStack", }, { - type: "doc", - label: "Celestia", - id: "concepts/Celestia", + type : "doc", + label : "Celestia", + id : "concepts/Celestia", }, { - type: "doc", - label: "Zero-Knowledge Proofs", - id: "concepts/ZKP", + type : "doc", + label : "Zero-Knowledge Proofs", + id : "concepts/ZKP", }, ], }, { - type: "category", - label: "Staking", - items: [ + type : "category", + label : "Staking", + items : [ { - type: "doc", - label: "Overview", - id: "staking/overview", + type : "doc", + label : "Overview", + id : "staking/overview", }, { - type: "doc", - label: "How-to Guides", - id: "staking/staking-howtos", + type : "doc", + label : "How-to Guides", + id : "staking/staking-howtos", }, { - type: "doc", - label: "Become an Operator", - id: "staking/become-symbiotic-fp", + type : "doc", + label : "Become an Operator", + id : "staking/become-symbiotic-fp", }, { - type: "doc", - label: "FAQs", - id: "staking/staking-faqs", + type : "doc", + label : "Contract Integration", + id : "staking/contract-integration", }, { - type: "doc", - label: "Fast Finality Audit Report", - id: "staking/fast-finality-audit", + type : "doc", + label : "FAQs", + id : "staking/staking-faqs", + }, + { + type : "doc", + label : "Fast Finality Audit Report", + id : "staking/fast-finality-audit", }, ], }, ], }, { - type: "category", - label: "Manta Pacific Network", - collapsible: false, - items: [ + type : "category", + label : "Manta Pacific Network", + collapsible : false, + items : [ { - type: "doc", - label: "Network Information", - id: "manta-pacific/Build on Manta/Network Information", + type : "doc", + label : "Network Information", + id : "manta-pacific/Build on Manta/Network Information", }, // { // type: "category", @@ -140,142 +145,142 @@ module.exports = { // ], // }, { - type: "category", - label: "Building on Manta", - items: [ + type : "category", + label : "Building on Manta", + items : [ { - type: "doc", - label: "EVM Compatibility", - id: "manta-pacific/EVM Compatible", + type : "doc", + label : "EVM Compatibility", + id : "manta-pacific/EVM Compatible", }, { - type: "doc", - label: "Manta Contracts", - id: "manta-pacific/Build on Manta/Contracts", + type : "doc", + label : "Manta Contracts", + id : "manta-pacific/Build on Manta/Contracts", }, { - type: "doc", - label: "Tokens", - id: "manta-pacific/Build on Manta/Tokens", + type : "doc", + label : "Tokens", + id : "manta-pacific/Build on Manta/Tokens", }, { - type: "doc", - label: "Fees", - id: "manta-pacific/Build on Manta/Fees", + type : "doc", + label : "Fees", + id : "manta-pacific/Build on Manta/Fees", }, { - type: "doc", - label: "Differences between Ethereum and Manta", - id: "manta-pacific/Build on Manta/Differences between Ethereum and MantaNetwork", + type : "doc", + label : "Differences between Ethereum and Manta", + id : "manta-pacific/Build on Manta/Differences between Ethereum and MantaNetwork", }, ], }, { - type: "category", - label: "Tools", - items: [ + type : "category", + label : "Tools", + items : [ { - type: "doc", - label: "Node Providers", - id: "manta-pacific/Tools/Node Providers", + type : "doc", + label : "Node Providers", + id : "manta-pacific/Tools/Node Providers", }, { - type: "doc", - label: "Block Explorers", - id: "manta-pacific/Tools/Block Explorers", + type : "doc", + label : "Block Explorers", + id : "manta-pacific/Tools/Block Explorers", }, { - type: "doc", - label: "Network Faucets", - id: "manta-pacific/Tools/Network Faucets", + type : "doc", + label : "Network Faucets", + id : "manta-pacific/Tools/Network Faucets", }, { - type: "doc", - label: "Oracles", - id: "manta-pacific/Tools/Oracles", + type : "doc", + label : "Oracles", + id : "manta-pacific/Tools/Oracles", }, { - type: "doc", - label: "Data Indexers", - id: "manta-pacific/Tools/Data Indexers", + type : "doc", + label : "Data Indexers", + id : "manta-pacific/Tools/Data Indexers", }, { - type: "doc", - label: "Onramps", - id: "manta-pacific/Tools/Onramps", + type : "doc", + label : "Onramps", + id : "manta-pacific/Tools/Onramps", }, { - type: "doc", - label: "Security Partners", - id: "manta-pacific/Tools/Security Partners", + type : "doc", + label : "Security Partners", + id : "manta-pacific/Tools/Security Partners", }, ], }, { - type: "category", - label: "Bridges", - items: [ + type : "category", + label : "Bridges", + items : [ { - type: "doc", - label: " Bridge $MANTA Token Between Manta Pacific and Manta Atlantic", - id: "manta-pacific/Tools/Bridge/Bridge $MANTA Token Between Manta Pacific and Manta Atlantic", + type : "doc", + label : " Bridge $MANTA Token Between Manta Pacific and Manta Atlantic", + id : "manta-pacific/Tools/Bridge/Bridge $MANTA Token Between Manta Pacific and Manta Atlantic", }, { - type: "category", - label: "Native Bridge", - items: [ + type : "category", + label : "Native Bridge", + items : [ { - type: "doc", - label: "How to Use Native Bridge", - id: "manta-pacific/Tools/Bridge/Native Bridge/How to Use Native Bridge", + type : "doc", + label : "How to Use Native Bridge", + id : "manta-pacific/Tools/Bridge/Native Bridge/How to Use Native Bridge", }, { - type: "doc", - label: "How to deploy Ethereum token on Manta", - id: "manta-pacific/Tools/Bridge/Native Bridge/How to deploy Ethereum token on Manta", + type : "doc", + label : "How to deploy Ethereum token on Manta", + id : "manta-pacific/Tools/Bridge/Native Bridge/How to deploy Ethereum token on Manta", }, { - type: "doc", - label: "How to list token on Native Bridge", - id: "manta-pacific/Tools/Bridge/Native Bridge/How to list token on Native Bridge", + type : "doc", + label : "How to list token on Native Bridge", + id : "manta-pacific/Tools/Bridge/Native Bridge/How to list token on Native Bridge", }, { - type: "doc", - label: "How to use JS SDK bridge token between Ethereum and Manta", - id: "manta-pacific/Tools/Bridge/Native Bridge/How to use JS SDK bridge token between Ethereum and Manta", + type : "doc", + label : "How to use JS SDK bridge token between Ethereum and Manta", + id : "manta-pacific/Tools/Bridge/Native Bridge/How to use JS SDK bridge token between Ethereum and Manta", }, { - type: "doc", - label: "FAQ", - id: "manta-pacific/Tools/Bridge/Native Bridge/FAQ", + type : "doc", + label : "FAQ", + id : "manta-pacific/Tools/Bridge/Native Bridge/FAQ", }, ], }, { - type: "doc", - label: "Third party Bridge", - id: "manta-pacific/Tools/Bridge/Third party Bridge", + type : "doc", + label : "Third party Bridge", + id : "manta-pacific/Tools/Bridge/Third party Bridge", }, { - type: "doc", - label: "Bridging Celestia‘s $TIA to Manta Pacific", - id: "manta-pacific/Tools/Bridge/Bridging Celestia‘s $TIA to Manta Pacific", + type : "doc", + label : "Bridging Celestia‘s $TIA to Manta Pacific", + id : "manta-pacific/Tools/Bridge/Bridging Celestia‘s $TIA to Manta Pacific", }, ], }, { - type: "category", - label: "Manta Pacific Node", - items: [ + type : "category", + label : "Manta Pacific Node", + items : [ // { // type: "doc", // label: "Hardware conditions", // id: "manta-pacific/Manta Pacific Node/Hardware conditions", // }, { - type: "doc", - label: "How to run Replica Node", - id: "manta-pacific/Manta Pacific Node/How to run Replica Node", + type : "doc", + label : "How to run Replica Node", + id : "manta-pacific/Manta Pacific Node/How to run Replica Node", }, // { // type: "doc", @@ -283,11 +288,11 @@ module.exports = { // id: "manta-pacific/Manta Pacific Node/Join Telegram to get node updates", // }, ], - }, + }, { - type: "doc", - label: "Manta Pacific Roadmap", - id: "concepts/Roadmap", + type : "doc", + label : "Manta Pacific Roadmap", + id : "concepts/Roadmap", }, // { // type: "category", @@ -300,42 +305,42 @@ module.exports = { // ], // }, { - type: "doc", - label: "SPACE ID Name Service and SPACE ID", - id: "manta-pacific/Space ID", + type : "doc", + label : "SPACE ID Name Service and SPACE ID", + id : "manta-pacific/Space ID", }, ], }, { - type: "category", - label: "Manta Atlantic Network", - collapsible: false, - items: [ + type : "category", + label : "Manta Atlantic Network", + collapsible : false, + items : [ { - type: "doc", - label: "Network Information", - id: "manta-atlantic/Network Information", + type : "doc", + label : "Network Information", + id : "manta-atlantic/Network Information", }, { - type: "category", - label: "Collator", - items: [ + type : "category", + label : "Collator", + items : [ { - type: "autogenerated", - dirName: "manta-atlantic/Collation", + type : "autogenerated", + dirName : "manta-atlantic/Collation", }, ], }, { - type: "category", - label: "Node", - items: [ + type : "category", + label : "Node", + items : [ "manta-atlantic/Node/Overview", "manta-atlantic/Node/Requirements", { - type: "category", - label: "SetupAndRun", - items: [ + type : "category", + label : "SetupAndRun", + items : [ "manta-atlantic/Node/SetupAndRun/full_node", "manta-atlantic/Node/SetupAndRun/archive_node", ], @@ -343,21 +348,21 @@ module.exports = { ], }, { - type: "doc", - label: "Bridge", - id: "manta-atlantic/Bridge", + type : "doc", + label : "Bridge", + id : "manta-atlantic/Bridge", }, { - type: "category", - label: "Staking", - items: [ + type : "category", + label : "Staking", + items : [ "manta-atlantic/Staking/Overview", "manta-atlantic/Staking/Rewards", "manta-atlantic/Staking/Rules", { - type: "category", - label: "Delegation", - items: [ + type : "category", + label : "Delegation", + items : [ "manta-atlantic/Staking/Delegation/dApp Overview", "manta-atlantic/Staking/Delegation/HowTo Delegate", ],