Skip to content

Commit

Permalink
Merge pull request #63 from alephium/fix-issues
Browse files Browse the repository at this point in the history
Updates & Fixes
  • Loading branch information
polarker authored Feb 3, 2025
2 parents 6132792 + 9c1b079 commit f8ec3de
Show file tree
Hide file tree
Showing 96 changed files with 6,217 additions and 8,976 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.ralph-lsp
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Ralph Examples

A collection of example projects and code snippets demonstrating how to use Ralph, the smart contract programming language on Alephium with a focus on security and simplicity.

## Overview

This repository contains practical examples to help you learn and understand Ralph programming concepts. Whether you're new to Ralph or looking to deepen your understanding, these examples provide hands-on learning opportunities.

## Getting Started

1. Start the local development environment
```bash
> git clone git@github.com:alephium/alephium-stack.git
> cd alephium-stack/devnet
> docker-compose up -d
```

2. Go to each of the example and run the following commands
```bash
# e.g. the blind-auction example
> cd blind-auction
> npm install
> npm run compile
> npm run test
```

## Contributing

Contributions are welcome! If you have an example you'd like to share:

1. Fork the repository
2. Create a new branch for your example
3. Add your example with clear documentation
4. Submit a pull request

## Resources

- [Ralph Documentation](https://docs.alephium.org/ralph)
- [Build dApps on Alephium](https://docs.alephium.org/dapps)
21 changes: 9 additions & 12 deletions blind-auction/.project.json
Original file line number Diff line number Diff line change
@@ -1,48 +1,45 @@
{
"fullNodeVersion": "v3.0.2",
"fullNodeVersion": "v3.11.1",
"compilerOptionsUsed": {
"ignoreUnusedConstantsWarnings": false,
"ignoreUnusedVariablesWarnings": false,
"ignoreUnusedFieldsWarnings": false,
"ignoreUnusedPrivateFunctionsWarnings": false,
"ignoreUpdateFieldsCheckWarnings": false,
"ignoreCheckExternalCallerWarnings": false
"ignoreCheckExternalCallerWarnings": false,
"ignoreUnusedFunctionReturnWarnings": false,
"skipAbstractContractCheck": false
},
"infos": {
"Auction": {
"sourceFile": "auction.ral",
"sourceCodeHash": "712973ad0914c8721120b9e304c6fc9a86777da230bea04135f80657058db25c",
"bytecodeDebugPatch": "=6-6+e6=2-1=1+7=2-2+ac=2-2+e5431a=13-1+5=93-1+d=40+7a7e0214696e73657274206174206d617020706174683a2000=134+7a7e0214696e73657274206174206d617020706174683a2000=91-1+b=177-1+4=57-1+f=225-1+c=138+7a7e021472656d6f7665206174206d617020706174683a2000=51-1+8=21-1+b=40+7a7e021472656d6f7665206174206d617020706174683a2000=300",
"codeHashDebug": "648a2196562521f62c79c87ba5aa4461bcc1c38b06ff97a929977faf712cf8b2",
"warnings": []
"codeHashDebug": "648a2196562521f62c79c87ba5aa4461bcc1c38b06ff97a929977faf712cf8b2"
},
"AuctionEnd": {
"sourceFile": "scripts.ral",
"sourceCodeHash": "bd0ddc7f2042b7433851b5947c7ce2bb4fb6592dd4e5b5f9346340ee38a85bed",
"bytecodeDebugPatch": "",
"codeHashDebug": "",
"warnings": []
"codeHashDebug": ""
},
"Bid": {
"sourceFile": "auction.ral",
"sourceCodeHash": "712973ad0914c8721120b9e304c6fc9a86777da230bea04135f80657058db25c",
"bytecodeDebugPatch": "",
"codeHashDebug": "",
"warnings": []
"codeHashDebug": ""
},
"NewBid": {
"sourceFile": "scripts.ral",
"sourceCodeHash": "bd0ddc7f2042b7433851b5947c7ce2bb4fb6592dd4e5b5f9346340ee38a85bed",
"bytecodeDebugPatch": "",
"codeHashDebug": "",
"warnings": []
"codeHashDebug": ""
},
"Reveal": {
"sourceFile": "scripts.ral",
"sourceCodeHash": "bd0ddc7f2042b7433851b5947c7ce2bb4fb6592dd4e5b5f9346340ee38a85bed",
"bytecodeDebugPatch": "",
"codeHashDebug": "",
"warnings": []
"codeHashDebug": ""
}
}
}
37 changes: 7 additions & 30 deletions blind-auction/README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,10 @@
# My dApp Template
# Blind Auction

## Install
A decentralized blind auction implementation on the Alephium blockchain. In a blind auction (also known as a sealed-bid auction), bidders submit their bids without knowing others' bids, and the highest bidder wins.

```
npm install
```
## Features

## Start a local devnet for testing and development

```
npx @alephium/cli@latest devnet start
```

## Compile

Compile the TypeScript files into JavaScript:

```
npx @alephium/cli@latest compile
```

## Stop/restart devnet

```
npx @alephium/cli@latest devnet stop
```

## Testing

```
npx @alephium/cli@latest test
```
- Secure and private bidding process
- Automated winner selection
- Fair and transparent auction mechanism
- Built on Alephium blockchain
Loading

0 comments on commit f8ec3de

Please sign in to comment.