-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #63 from alephium/fix-issues
Updates & Fixes
- Loading branch information
Showing
96 changed files
with
6,217 additions
and
8,976 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.ralph-lsp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": "" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.