This repository contains the interfaces for Stack's Points Protocol, which are used to extend the core points protocol on the Stack chain.
To get started with the Stack Protocol Interfaces, follow these steps:
- Set up your Solidity development environment (e.g. Forge, Hardhat).
- Connect to the Stack network using the provided network information (see the "Network Information" section below).
- Import the
IPoints
andIPointsObserver
interfaces into your Solidity contract. - Implement the necessary functions from the interfaces in your contract.
- Deploy your contract to the Stack chain.
Name | Value |
---|---|
Network Name | Stack |
Description | The public mainnet for Stack. |
Chain ID | 78225 |
Currency Symbol | ETH |
RPC Endpoint | https://rpc.stack.so |
Bridge | https://bridge.stack.so |
Block Explorer | https://explorer.stack.so |
Points Protocol | 0x000000000c2B4A5816cbb76e9bb3f70D175940A3 |
Points Interface | IPoints.sol |
Observer Interface | IPointsObserver.sol |
Here's an example of how to use the IPoints interface in your Solidity contract:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import "./IPoints.sol";
// Ensure this contract is added as an issuer to the Points Protocol
// Use `addIssuer()` in the Points contract.
contract OnchainIssuer {
address private constant pointsAddress = 0x000000000c2B4A5816cbb76e9bb3f70D175940A3;
private constant uint256 systemId = 1; // your point system ID
IPoints private pointsContract = IPoints(pointsAddress);
constructor() {}
function addPointsToUser(address user, uint256 points) external {
pointsContract.addPoints(systemId, user, points);
}
// ... (add more functions as needed)
}