You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Helium Sub Daos manages the daos and rewards structure of the Helium ecosystem. Other programs in the ecosystemare expected to call out to helium sub daos to update rewardable actions, like issuing a new hotspot and burningdata credits
Data Credits
Data credits manages the soulbound helium data credits, and how they can be burned to do several actions on the network. It also manages reading from an oracle to allow burning HNT for data credits
Helium Entity Manager
Helium Entity Manager is responsible for issuing the various types of hotspots and rewardable entities that Helium supports (wifi, iot, mobile hotspots, mobile mappers, etc)
Lazy Distributor
The lazy distributor is an oracle-powered token distributor that distributes tokens to holdersof particular NFTs as specified by oracles.
Oracle Architecture
In order to facilitate setting rewardsand distributing rewards in a single Solana transaction,I propose at the url specified in the oracle configuration, supportingGET andPOST
GET Request
Request current rewards for the hotspot. Provide?mint=... query param with the hotspot mint.
Which should return
{ "currentRewards": ...}
POST Request
Sign transaction to set rewards and distribute
{ transaction: ... // serialized transaction}
Which should return
{ transaction: ... // signed transaction}
Before signing the transaction, the oracle should validate (1) that the transaction contains only
setCurrentRewards instructions from other validators
distribute instructions
and (2) that the amount set forsetCurrentRewards for itself is correct.
Client Side
The client should:
Submit requests to all oracles to get the current total rewards amount
Form instructions to set rewards from all oracles using their specified rewards amount
Submit a sign transaction request to all oracles sequentially
Submit the signed transaction to Solana
Local Setup
Make sure you're using Node 18+
Install dependencies
corepack enableyarn set version 3.6.4yarn
Start localnet
$: TESTING=true anchor localnet
Start watcher
$: yarn watch
Bootstrap localnet
$: . ./scripts/bootstrap-localnet.sh
Run tests against localnet
$: anchor test --provider.cluster localnet --skip-deploy --skip-local-validator --skip-build
If you run into trouble with your installation, run the following command to rebuild everything from scratch.