Pular para o conteúdo
Skillpedia
APIs e servidores (backend)7,0 mil · #13627

genlayer-cli

O que ela faz

Esta skill explica como usar a ferramenta de linha de comando genlayer para implantar e interagir com contratos inteligentes. Ela cobre a troca entre redes e a inspeção de transações, para desenvolvedores que trabalham com o GenLayer Studio ou com testnets da GenLayer.

Quando usar

  • ✓Quando você quer implantar um contrato da GenLayer pela linha de comando.
  • ✓Quando você precisa alternar entre as redes local, studio ou testnet da GenLayer.
  • ✓Quando uma transação para um contrato da GenLayer falha e você quer inspecioná-la.

Link da skill

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

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/internet-court/internet-court-skill/blob/main/vendored/genlayer/genlayer-cli/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Quero implantar meu contrato da GenLayer na testnet Bradbury e ver o resultado da transação.”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

O agente instala a ferramenta, seleciona a rede necessária e executa comandos para implantar, chamar e inspecionar contratos. A skill recomenda escolher uma rede integrada em vez de digitar um endereço personalizado, porque a configuração integrada mantém a cadeia configurada corretamente.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do 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
Perguntas frequentes

Preciso de tokens para implantar na studionet?

Não. A skill diz que a studionet não cobra taxa de gás, então saldo zero não impede implantações nem chamadas.

Por que um lote de implantações pode ser recusado?

A studionet limita as requisições por minuto, por hora e por dia para cada endereço IP, então lotes grandes podem atingir o limite. A skill sugere limitar a velocidade ou usar a localnet.

Quais redes estão disponíveis?

localnet, studionet, testnet-asimov e testnet-bradbury.

Detalhes

Descrição original do autor

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

repo: internet-court/internet-court-skill

Popularidade

Estrelas no GitHub
7,0 mil
Posição no ranking
#13627
Licença
—
Atualizada em
26/10/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas