Este é um projeto de aprendizado para desenvolver em Aiken, a linguagem de programação para smart contracts da blockchain Cardano.
This is a learning project for developing with Aiken, the programming language for Cardano blockchain smart contracts.
Aiken é uma linguagem de programação moderna, estaticamente tipada e funcional, projetada especificamente para escrever smart contracts (validadores on-chain) para a blockchain Cardano. É inspirada em linguagens como Elm, Gleam e Rust.
Aiken is a modern, statically typed, functional programming language specifically designed for writing smart contracts (on-chain validators) for the Cardano blockchain. It's inspired by languages like Elm, Gleam, and Rust.
.
├── README.md # Este arquivo / This file
├── aiken.toml # Configuração do projeto / Project configuration
├── lib/ # Código de biblioteca / Library code
│ └── aiken_learning/
│ └── utils.ak # Funções utilitárias / Utility functions
└── validators/ # Validadores de smart contract / Smart contract validators
├── hello_world.ak # Exemplo "Hello, World!" / "Hello, World!" example
├── counter.ak # Contador com estado / Counter with state
└── vesting.ak # Bloqueio temporal / Time-lock vesting
Versão do Aiken: 1.1.19+ (sintaxe atualizada)
Para trabalhar com este projeto, você precisa instalar o Aiken. Siga as instruções oficiais:
To work with this project, you need to install Aiken. Follow the official instructions:
Windows:
# 1. Instalar Rust via winget
winget install rustup
# 2. Recarregar variáveis de ambiente
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
# 3. Instalar Aiken via Cargo
cargo install aiken --locked
# 4. Verificar instalação
aiken --versionLinux/MacOS:
curl -sSfL https://install.aiken-lang.org | bash
aikupOu via Cargo (todas as plataformas) / Or via Cargo (all platforms):
cargo install aiken --lockedVerificar instalação / Verify installation:
aiken --versionaiken checkaiken buildaiken checkaiken fmtVSCODE_SETUP.md
IMPORTANT: For the best development experience, see VSCODE_SETUP.md
Já configurado neste projeto / Already configured in this project:
- ✅ Extensão Aiken instalada
- ✅ UTF-8 encoding
- ✅ Syntax highlighting para
.ak - ✅ Formatação automática
- ✅ IntelliSense ativo
Apenas recarregue o VS Code: Ctrl + Shift + P -> "Reload Window"
O arquivo validators/hello_world.ak contém um validador simples que verifica se o redeemer contém a mensagem "Hello, World!".
The validators/hello_world.ak file contains a simple validator that checks if the redeemer contains the message "Hello, World!".
O arquivo lib/aiken_learning/utils.ak contém funções utilitárias básicas com testes para demonstrar como escrever e testar código em Aiken.
The lib/aiken_learning/utils.ak file contains basic utility functions with tests to demonstrate how to write and test code in Aiken.
- Getting Started - Guia de início
- Language Tour - Tour pela linguagem
- Standard Library - Biblioteca padrão
- ✅ Configurar o projeto básico / Set up basic project
- ✅ Criar validador "Hello, World!" / Create "Hello, World!" validator
- ✅ Criar validador Counter / Create Counter validator
- ✅ Criar validador Vesting / Create Vesting validator
- ✅ Adicionar testes / Add tests
- ✅ Atualizar para sintaxe Aiken 1.1.19+ / Update to Aiken 1.1.19+ syntax
- 📚 Estudar a documentação oficial / Study the official documentation
- 🔨 Praticar criando validadores mais complexos / Practice creating more complex validators
- 🎯 Explorar exemplos da comunidade / Explore community examples
Status: Projeto funcionando com Aiken 1.1.19 - todos os testes passando! ✅
Apache-2.0
Bons estudos! / Happy learning! 🚀