Skip to content

Commit

Permalink
Jt/claim flow doc update (#2346)
Browse files Browse the repository at this point in the history
  • Loading branch information
jterzis authored Feb 11, 2025
1 parent ec87bb5 commit e541313
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 19 deletions.
37 changes: 19 additions & 18 deletions packages/docs/run/contracts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ description: Smart Contracts powering the Towns Protocol are deployed to Ethereu


<Note>
All contract source and deployed addresses can also be found on the [Towns Protocol repo in github](https://github.com/river-build/river).
Contract source code is located in the `contracts` [directory](https://github.com/river-build/river/tree/main/contracts).
All contract source and deployed addresses can also be found on the [Towns Protocol repo in github](https://github.com/towns-protocol/towns).
Contract source code is located in the `contracts` [directory](https://github.com/towns-protocol/towns/tree/main/contracts).
Deployed addresses can be found under `packages/generated` for testnet and mainnet, respectively.
</Note>

Expand All @@ -24,42 +24,43 @@ Deployed addresses can be found under `packages/generated` for testnet and mainn

Below are contract addresses to diamond contracts that are required to register a node operator on Base.

<Note>All contracts are deployed using the [Diamond](https://eips.ethereum.org/EIPS/eip-2535) pattern for modularity. Contract source can be found in the [river](https://github.com/river-build/river/tree/main/contracts/src) repo.</Note>
<Note>All contracts are deployed using the [Diamond](https://eips.ethereum.org/EIPS/eip-2535) pattern for modularity. Contract source can be found in the [towns](https://github.com/towns-protocol/towns/tree/main/contracts/src) repo.</Note>

| Contract Name | Testnet Address | Mainnet Address | Network |
| --- | --- | --- | -- |
| Base Registry | [baseRegistry.json](https://github.com/river-build/river/blob/main/packages/generated/deployments/gamma/base/addresses/baseRegistry.json) | [baseRegistry.json](https://github.com/river-build/river/blob/main/packages/generated/deployments/omega/base/addresses/baseRegistry.json) | Base |
| Base Registry | [baseRegistry.json](https://github.com/towns-protocol/towns/blob/main/packages/generated/deployments/gamma/base/addresses/baseRegistry.json) | [baseRegistry.json](https://github.com/towns-protocol/towns/blob/main/packages/generated/deployments/omega/base/addresses/baseRegistry.json) | Base |

Below are the deployed diamond contracts that are required to run Stream Nodes in the Towns Network.

| Contract Name | Testnet Address | Mainnet Address | Network |
| --- | --- | --- | -- |
| SpaceFactory | [spaceFactory.json](https://github.com/river-build/river/blob/main/packages/generated/deployments/gamma/base/addresses/spaceFactory.json) | [spaceFactory.json](https://github.com/river-build/river/blob/main/packages/generated/deployments/omega/base/addresses/spaceFactory.json) | Base |
| Entitlements | [entitlementChecker.json](https://github.com/river-build/river/blob/main/packages/generated/deployments/gamma/base/addresses/entitlementChecker.json) | [entitlementChecker.json](https://github.com/river-build/river/blob/main/packages/generated/deployments/omega/base/addresses/baseRegistry.json) | Base |
| River Registry | [riverRegistry.json](https://github.com/river-build/river/blob/main/packages/generated/deployments/gamma/river/addresses/riverRegistry.json) | [riverRegistry.json](https://github.com/river-build/river/blob/main/packages/generated/deployments/omega/river/addresses/riverRegistry.json) | Towns Chain |
| Wallet Link | [walletLink.json](https://github.com/river-build/river/blob/main/packages/generated/deployments/gamma/base/addresses/walletLink.json) | [walletLink.json](https://github.com/river-build/river/blob/main/packages/generated/deployments/omega/base/addresses/spaceFactory.json) | Base |
| SpaceFactory | [spaceFactory.json](https://github.com/towns-protocol/towns/blob/main/packages/generated/deployments/gamma/base/addresses/spaceFactory.json) | [spaceFactory.json](https://github.com/towns-protocol/towns/blob/main/packages/generated/deployments/omega/base/addresses/spaceFactory.json) | Base |
| Entitlements | [entitlementChecker.json](https://github.com/towns-protocol/towns/blob/main/packages/generated/deployments/gamma/base/addresses/entitlementChecker.json) | [entitlementChecker.json](https://github.com/towns-protocol/towns/blob/main/packages/generated/deployments/omega/base/addresses/baseRegistry.json) | Base |
| River Registry | [riverRegistry.json](https://github.com/towns-protocol/towns/blob/main/packages/generated/deployments/gamma/river/addresses/riverRegistry.json) | [riverRegistry.json](https://github.com/towns-protocol/towns/blob/main/packages/generated/deployments/omega/river/addresses/riverRegistry.json) | Towns Chain |
| Wallet Link | [walletLink.json](https://github.com/towns-protocol/towns/blob/main/packages/generated/deployments/gamma/base/addresses/walletLink.json) | [walletLink.json](https://github.com/towns-protocol/towns/blob/main/packages/generated/deployments/omega/base/addresses/spaceFactory.json) | Base |

### Towns Token Addresses
| Network | Address |
| --- | --- |
| Base | [0x91930fd11ABAa5241241d3B07c02A8d0B5ac1920](https://basescan.org/address/0x91930fd11ABAa5241241d3B07c02A8d0B5ac1920) |
| Base Sepolia | [0x00000000A22C618fd6b4D7E9A335C4B96B189a38](https://sepolia.basescan.org/address/0x00000000A22C618fd6b4D7E9A335C4B96B189a38) |
| Base | [0x00000000A22C618fd6b4D7E9A335C4B96B189a38](https://basescan.org/address/0x00000000A22C618fd6b4D7E9A335C4B96B189a38) |
| Ethereum Mainnet | [0x53319181e003E7f86fB79f794649a2aB680Db244](https://etherscan.io/address/0x53319181e003e7f86fb79f794649a2ab680db244) |

### Mainnet Towns Chain Resources

| Description | URL |
| --- | --- |
| Towns Chain Explorer | [explorer.river.build](https://explorer.river.build) |
| Towns Chain RPC Node (HTTP) | [rpc.river.build](https://rpc.river.build) |
| Towns Chain Hub | [river-mainnet.hub.river.build](https://river-mainnet.hub.river.build) |
| Towns Chain Bridge L1 -> L2 | [river-mainnet.bridge.river.build](https://river-mainnet.bridge.river.build) |
| Towns Chain Status | [river-mainnet.status.river.build](https://river-mainnet.status.river.build/) |
| Towns Chain Explorer | [explorer.towns.com](https://explorer.towns.com) |
| Towns Chain RPC Node (HTTP) | [rpc.towns.com](https://rpc.towns.com) |
| Towns Chain Hub | [mainnet.hub.towns.com](https://mainnet.hub.towns.com) |
| Towns Chain Bridge L1 -> L2 | [mainnet.bridge.towns.com](https://mainnet.bridge.towns.com) |
| Towns Chain Status | [mainnet.status.towns.com](https://mainnet.status.towns.com/) |

### Testnet Towns Chain Resources

| Description | URL |
| --- | --- |
| Towns Chain Explorer | [testnet.explorer.river.build](https://testnet.explorer.river.build) |
| Towns Chain RPC Node (HTTP) | [testnet.rpc.river.build](https://testnet.rpc.river.build/http) |
| Towns Chain Hub | [river-testnet.hub.river.build](https://river-testnet.hub.river.build) |
| Towns Chain Bridge L1 -> L2 | [river-testnet.bridge.river.build](https://river-testnet.bridge.river.build) |
| Towns Chain Explorer | [testnet.explorer.towns.com](https://testnet.explorer.towns.com) |
| Towns Chain RPC Node (HTTP) | [testnet.rpc.towns.com](https://testnet.rpc.towns.com/http) |
| Towns Chain Hub | [testnet.hub.towns.com](https://testnet.hub.towns.com) |
| Towns Chain Bridge L1 -> L2 | [testnet.bridge.towns.com](https://testnet.bridge.towns.com) |
6 changes: 5 additions & 1 deletion packages/docs/towns-token/claiming.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ At the end of each distribution period, addresses that are delegating or designa

## Claim Execution

Rewards are claimed by calling the `claim()` function on the Distribution contract, which transfers the tokens to the claimant's wallet.
Rewards are claimed by calling the `claimReward(address beneficiary, address recipient)` function on the [RewardsDistribution](https://github.com/towns-protocol/towns/blob/main/contracts/src/base/registry/facets/distribution/v2/RewardsDistribution.sol) contract, which transfers the tokens to the recipient's wallet.

The `claimReward` function is called from the claimer address, who is either the beneficiary or an authorized claimer that can claim the reward for the beneficiary.

<Note>Since the RewardsDistribution contract is a facet of the BaseRegistry contract, the `claimReward` function is called from the BaseRegistry contract address (see [contracts](../run/contracts)).</Note>

If the wallet is already delegating on Base, the newly acquired tokens are automatically delegated to the same operator, conforming to the [ERC20Votes](https://docs.openzeppelin.com/contracts/4.x/api/token/erc20#ERC20Votes) specification.

0 comments on commit e541313

Please sign in to comment.