A Solana smart contract for handling revenue sharing payments with encrypted computation support via Arcium.
This program implements a payment distribution system where payments can be split between recipients and broadcasters. It uses Arcium's confidential computing infrastructure for encrypted payment processing.
ble-revshare: Main program handling payment execution and revenue distribution
- Token whitelist management
- Payment execution with broadcaster revenue sharing (70/30 split)
- Arcium encrypted computation integration
- Payment statistics tracking via confidential computations
- Rust 1.79.0 or later
- Node.js 18+ and Yarn
- Solana CLI
- Arcium CLI
# Install dependencies
yarn install
# Build the program
arcium buildarcium buildexport ANCHOR_PROVIDER_URL="https://devnet.helius-rpc.com/?api-key=YOUR_API_KEY"
export ANCHOR_WALLET="~/.config/solana/id.json"
export ARCIUM_CLUSTER_OFFSET=456
arcium deploy \
--cluster-offset 456 \
--keypair-path ~/.config/solana/id.json \
--recovery-set-size 4 \
--rpc-url "https://devnet.helius-rpc.com/?api-key=YOUR_API_KEY"npx ts-node init-comp-def-final.tsexport ANCHOR_PROVIDER_URL="https://devnet.helius-rpc.com/?api-key=YOUR_API_KEY"
export ANCHOR_WALLET="~/.config/solana/id.json"
export ARCIUM_CLUSTER_OFFSET=456
yarn test.
├── programs/
│ └── ble-revshare/
│ └── src/
│ └── lib.rs # Main program logic
├── tests/
│ └── ble-revshare.ts # Test suite
├── encrypted-ixs/ # Encrypted instruction artifacts
├── migrations/ # Deployment migrations
└── Arcium.toml # Arcium configuration
| Variable | Description | Required |
|---|---|---|
ANCHOR_PROVIDER_URL |
Solana RPC URL | Yes |
ANCHOR_WALLET |
Path to wallet keypair | Yes |
ARCIUM_CLUSTER_OFFSET |
Arcium cluster offset | Yes |
- Program ID:
7fvHNYVuZP6EYt68GLUa4kU8f8dCBSaGafL9aDhhtMZN - Arcium Program ID:
Arcj82pX7HxYKLR92qvgZUAd7vGS1k4hQvAFcPATFdEQ
MIT