Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions docs/staking/contract-integration.md
Original file line number Diff line number Diff line change
@@ -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);
```
5 changes: 5 additions & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down