用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/genlayerlabs/intelligent-oracle --skill genlayer-cli命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | genlayer-cli |
| description | Use the GenLayer CLI to inspect, interact with, and debug this repo's intelligent contracts. |
| allowed-tools | ["Bash","Read"] |
Use this skill for local Studio management, account/network inspection, contract calls, receipts, and transaction debugging. For this repo's normal factory deployment, prefer the deploy skill, which runs the scripts/ package.
npm install -g genlayer
genlayer network set
genlayer network set studionet
genlayer network set localnet
genlayer network info
genlayer network list
Built-in networks include localnet, studionet, testnet-asimov, and testnet-bradbury.
Use genlayer network set for built-in networks. Avoid --rpc for built-ins because it can bypass chain metadata needed for polling and receipt decoding.
StudioNet is gasless. A zero GEN balance is normal there.
genlayer account
genlayer account list
genlayer account create --name dev1
genlayer account use dev1
genlayer account unlock
genlayer account lock
genlayer account import --name imported --private-key 0x...
Headless environments may not support keychain unlock. Commands that sign transactions can prompt for a keystore password unless a deployment script uses env-based private keys.
This repo deploys the registry factory through scripts/deploy.ts using genlayer-js:
cd scripts && npm run deploy
The deploy script reads:
scripts/.env PRIVATE_KEYscripts/.env RPC_URLintelligent-contracts/IntelligentOracleFactory.pyintelligent-contracts/IntelligentOracle.pyAfter deployment, copy the registry address into root app envs:
IC_REGISTRY_ADDRESS=0x...
NEXT_PUBLIC_IC_REGISTRY_ADDRESS=0x...
Avoid direct CLI deployment for the registry factory in normal work. The factory constructor needs the full oracle source code as an argument, and the scripts/ package already handles that in the same way the project expects.
Use CLI deployment only for isolated experiments where the deployed contract does not need to match the app's registry flow.
Read calls:
genlayer call <registry-address> get_contract_addresses
genlayer call <oracle-address> get_dict
genlayer call <oracle-address> get_status
Write calls:
genlayer write <oracle-address> resolve --args "https://example.com/evidence"
The registry write method used by the API is:
create_new_prediction_market(
prediction_market_id,
title,
description,
potential_outcomes,
rules,
data_source_domains,
resolution_urls,
earliest_resolution_date
)
genlayer receipt <txHash>
genlayer receipt <txHash> --stdout
genlayer receipt <txHash> --stderr
genlayer receipt <txHash> --status FINALIZED --retries 50 --interval 3000
Debug order:
genlayer schema <address>.genlayer code <address>.scripts/deploy.ts.genlayer init
genlayer up
genlayer up --reset-db
genlayer stop
When switching to local Studio, update both server and browser envs in the root app:
GENLAYER_RPC_URL=http://localhost:4000/api
NEXT_PUBLIC_GENLAYER_RPC_URL=http://localhost:4000/api