Olas deploy staking contract
Skill Jinn-Network/shared-skills/skills/olas-deploy-staking-contract
Deploy an OLAS-compatible staking program with a custom activity checker, register the associated agent, and nominate the staking contract for emissions. Designed for reusable deployment workflows without project-specific secrets or local-machine details.From its SKILL.md
npx -y skills add Jinn-Network/shared-skills --skill olas-deploy-staking-contractAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
3.5 KB, 678 tokens by cl100k_base, as published. Nobody here has run it
Deploy OLAS Staking Contract
End-to-end deployment pattern for a new staking program using an activity checker and registry integration.
Use Cases
- New staking deployment for a new agent ID
- Migration to a fresh staking contract when immutable parameters must change
- Activity checker logic update
- Fresh setup in a new environment
Prerequisites
- Contract compilation succeeds
- Deployment wallet has gas on all required chains
- Required env vars are set by your deployment system (do not store credentials in the repo)
- Activity checker contract is implemented and tested
Deployment Pipeline
1) Compile
yarn compile
2) Register Agent (if needed)
- Upload package and metadata to IPFS
- Convert metadata CID to the required on-chain hash format
- Create the agent entry in the relevant registry contract
- Capture new agent ID from logs/events
3) Deploy Activity Checker + Staking Contract
- Deploy checker with required constructor parameters
- Initialize staking instance through staking factory
- Persist deployed addresses in a deployment artifact (JSON)
4) Nominate for Emissions
- Submit nominee transaction to vote-weighting contract
- Verify nominee appears in governance UI/API
5) Update Runtime Configuration
Update all runtime and indexer configs that reference:
- Staking contract address
- Agent ID
- Service hash / metadata hash
- Any allowlists used by monitoring/indexing systems
6) Fund and Activate
- Fund staking contract rewards pool
- Allocate governance votes where required
Parameter Planning
Plan these as immutable inputs:
maxNumServicesrewardsPerSecondminStakingDepositlivenessPeriodtimeForEmissionsmaxNumInactivityPeriods- checker-specific liveness ratio
Any change to immutable parameters requires a new deployment.
Activity Checker Design Notes
- Keep checker logic minimal and auditable
- Avoid hidden permission paths unless governance requires them
- Ensure liveness math is deterministic and documented
- Add bounds checks to prevent invalid accounting deltas
Recommended Tests
- Constructor validation
- Liveness pass/fail edge cases
- Nonce and delivery-count consistency checks
- Mainnet-fork integration for real contract interactions
Common Failure Modes
- Zero metadata hash: registry/verifier rejects empty hash
- ABI mismatch: incorrect type widths alter function selector
- Path-dependent env loading: scripts break across directories
- RPC instability: nonce/read inconsistencies across providers
- Assuming mutability: staking parameters are often immutable
Operational Safety Rules
- Never store private keys, mnemonics, or decrypted wallet material
- Never commit machine-specific absolute paths
- Never hardcode operator-identifying wallet addresses unless explicitly public and required
- Prefer placeholders in public docs:
<CHAIN_RPC_URL>,<DEPLOYER_ADDRESS>,<STAKING_CONTRACT>
Deliverables Checklist
- Contracts deployed and verified
- Agent registered with correct dependencies
- Nomination completed
- Runtime/indexer config updated
- Rewards funded
- Monitoring and alerting pointed at new contract
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.