Aller au contenu
Skillpedia
API et serveurs (backend)7.0k · #13627

genlayer-cli

Ce qu’il fait

Ce skill explique comment utiliser l'outil en ligne de commande genlayer pour déployer des contrats intelligents et interagir avec eux. Il couvre le passage d'un réseau à l'autre et l'inspection des transactions, pour les développeurs qui travaillent avec GenLayer Studio ou les réseaux de test de GenLayer.

Quand l’utiliser

  • ✓Quand vous voulez déployer un contrat GenLayer depuis la ligne de commande.
  • ✓Quand vous devez passer d'un réseau GenLayer à un autre, local, studio ou de test.
  • ✓Quand une transaction vers un contrat GenLayer échoue et que vous voulez l'inspecter.

Lien du skill

https://github.com/internet-court/internet-court-skill/blob/main/vendored/genlayer/genlayer-cli/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/internet-court/internet-court-skill/blob/main/vendored/genlayer/genlayer-cli/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Je veux déployer mon contrat GenLayer sur le réseau de test Bradbury et voir le résultat de la transaction.”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

L'agent installe l'outil, sélectionne le réseau dont vous avez besoin et lance les commandes pour déployer, appeler et inspecter les contrats. Le skill conseille de choisir un réseau intégré plutôt que de saisir une adresse personnalisée, car le réglage intégré garde la configuration de la chaîne correcte.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

GenLayer CLI

The genlayer CLI manages contract deployment, interaction, transaction inspection, and network configuration. Works with GenLayer Studio (local), studio.genlayer.com, and Testnet Bradbury.

Setup

npm install -g genlayer

Network Configuration

genlayer network set                    # Interactive selector
genlayer network set testnet-bradbury   # Direct
genlayer network info                   # Show current network config
genlayer network list                   # List all networks

Networks: localnet, studionet, testnet-asimov, testnet-bradbury

Note: studionet is gasless — no tokens are required to deploy or interact with contracts. A 0 GEN balance is expected and does not prevent any operations.

Note: studionet is rate-limited per IP — 60 req/min, 1000 req/hr, 10000 req/day. Limits aren't permanent — batching many deploy/write calls trips -32429 / HTTP 429 and further requests are rejected until the window resets (next minute / hour / day cycle). -32028 signals the pending-queue cap — up to 32 in-flight txs per sender; a separate cap also applies per contract. Throttle batch scripts, wait for receipts between submissions, or use localnet for heavy batches.

Always use genlayer network set instead of --rpc for built-in networks. The --rpc flag bypasses the chain configuration (consensus contract ABI, isStudio flag, etc.) and will cause transaction polling failures. Only use --rpc for custom/private networks not in the built-in list.

Account Management

genlayer account                        # Show active account (address, balance, network)
genlayer account list                   # List all accounts
genlayer account create --name dev1     # Create new account
genlayer account use dev1               # Set active account
genlayer account unlock                 # Cache key in OS keychain (no password prompts)
genlayer account lock                   # Remove from keychain

# Import from private key or keystore
genlayer account import --name imported --private-key 0x...
genlayer account import --name imported --keystore ./keystore.json

# Send tokens
genlayer account send 0x123...abc 10gen

Amount formats: "10gen", "0.5gen", or raw wei "1000000000000000000"

Non-interactive usage (CI/CD, containers, agents)

account create, account import, and account send accept --password <password> to skip interactive prompts:

genlayer account create --name dev1 --password "mypassword"
genlayer account import --name imported --private-key 0x... --password "mypassword"

account unlock requires an OS keychain (macOS Keychain, GNOME Keyring, etc.) and will fail in headless containers. When the account is locked, commands that sign transactions (deploy, write, appeal, account send) will prompt for the keystore password. To automate these, pipe the password via stdin:

echo "mypassword" | genlayer deploy --contract contracts/my_contract.py --args "arg1"

Funding Accounts

New accounts start with 0 GEN. Funding requirements depend on the network:

StudioNet is gasless — accounts with 0 GEN can deploy and interact with contracts without any funding. A zero balance on StudioNet is expected and normal. Skip funding entirely when using StudioNet.

For testnets (Bradbury, Asimov), fund the account before deploying or writing.

Faucet: https://testnet-faucet.genlayer.foundation/

  1. Get your address: genlayer account -> copy the address field
  2. Go to the faucet URL, paste the address, and claim 100 GEN (once per 24 hours)
  3. Verify: genlayer account should show the updated balance

The faucet uses Cloudflare Turnstile and cannot be automated from CLI -- the user must claim manually in a browser. Works for both Testnet Bradbury and Testnet Asimov.

Contract Deployment

# Deploy a specific contract
genlayer deploy --contract contracts/my_contract.py
genlayer deploy --contract contracts/my_contract.py --args "arg1" 42

# Run all deploy scripts in deploy/ folder
genlayer deploy

Contract Interaction

Read (no transaction)

genlayer call <address> <method>
genlayer call 0x123...abc get_data --args "key1"

Write (sends transaction)

genlayer write <address> <method>
genlayer write 0x123...abc set_data --args "hello"

Inspect contract

genlayer schema <address
Questions fréquentes

Ai-je besoin de jetons pour déployer sur studionet ?

Non. Le skill indique que studionet est sans frais de gaz, donc un solde nul ne bloque ni le déploiement ni les appels.

Pourquoi un lot de déploiements peut-il être refusé ?

Studionet limite le nombre de requêtes par minute, par heure et par jour pour chaque adresse IP, donc de gros lots peuvent atteindre la limite. Le skill suggère de ralentir ou d'utiliser localnet.

Quels réseaux sont disponibles ?

Localnet, studionet, testnet-asimov et testnet-bradbury.

Détails

Description originale de l’auteur

Use the GenLayer CLI to deploy, interact with, and debug intelligent contracts.

repo: internet-court/internet-court-skill

Popularité

Étoiles GitHub
7.0k
Position au classement
#13627
Licence
—
Mis à jour
26/10/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires