``` There was a time When nothing but Entropy was there. Then came the cryptographic Proof, And took it care.
Verifiability of Randomness, Since genesis block, Brings Consensus over realm vastness, So Algorand shall not fork. ```
Only generous hearts will rule over Algorand realm.
Show how generous is your heart donating some ALGOs to the Rewards Pool and claim the title of Randomic Majesty of Algorand or Verifiable Majesty of Algorand.
The more generous you are, the harder will be to be dethroned.
Join AlgoRealm channel!
Play AlgoRealm on CLI web emulator by @aorumbayev.
shell
$ poetry install # install dependencies
$ poetry shell # activate virtual environment
$ cd src # cd into source directory, to be replaced with UI webapp in future
Playing AlgoRealm from your CLI is pretty easy, just ask for help:
shell
$ python3 algorealm.py -h
```shell AlgoRealm, only generous heart will ever rule over Algorand. (by cusma)
Usage:
algorealm.py poem
algorealm.py dynasty [--test]
algorealm.py longevity (--crown | --sceptre) [--test]
algorealm.py braveness (--crown | --sceptre) [--test]
algorealm.py claim-majesty (--crown | --sceptre)
Commands: poem AlgoRealm's poem. dynasty Print the glorious dynasty of AlgoRealm's Majesties. longevity Print AlgoRealm's Majesties longevity. braveness Print AlgoRealm's Majesties braveness. claim-majesty Claim the Crown of Entropy or the Sceptre of Proof, become Majesty of Algorand. claim-card Brake the spell and claim the AlgoRealm Card by AlgoWorld. buy-order Place an order for the AlgoRealm Card. verify-order Verify the partially signed AlgoRealm Card buy order. sell-card Sell the AlgoRealm Card (paying a 10% royalty).
Options: -n, --notify Notify the Seller about your buy order on-chain. -t, --test TestNet mode -h, --help ```
⚠️ Keep your <mnemonic>
safe! Although you will only use it on you local machine, is it strongly recommended to make use of a dedicated account just to play AlgoRealm!
In case you want to give a try, you can play AlgoRealm on TestNet adding
-t
to CLI commands.
Who are the Majesties of the Algorand realm?
Discover it directly on Algorand blockchain
Discover it with your node:
shell
$ ./goal app read --app-id 137491307 --global
Discover it with the AlgoRealm CLI:
shell
$ python3 algorealm.py dynasty
``
__ __ ___ __ __
\*) \*) \*/ (*/ (*/
\*\_\*\_|O|_/*/_/*/
\_______________/
_ __ _______ __
/ \ [ | |_ __ \ [ |
/ _ \ | | .--./) .--. | |__) | .---. ,--. | | _ .--..--.
/ ___ \ | | / /'
\;/ .'\ \ | __ / / /__\\
'_\ : | | [ .-. .-. |
_/ / \ \_ | | \ \._//| \__. |_| | \ \_| \__.,// | |, | | | | | | | |
|____| |____|[___].',__
'..'|____| |___|'..'\'-;/[___][___||||]
( ( ))
DYNASTY
👑 jkbishbish claimed the Crown of Entropy on Block: 13578171 donating: 2 microALGOs to the Rewards Pool.
🪄 jkbishbish claimed the Sceptre of Proof on Block: 13578330 donating: 2 microALGOs to the Rewards Pool.
👑 tmc claimed the Crown of Entropy on Block: 14936018 donating: 3 microALGOs to the Rewards Pool.
🪄 tmc claimed the Sceptre of Proof on Block: 14936235 donating: 3 microALGOs to the Rewards Pool.
👑 nullun claimed the Crown of Entropy on Block: 14989913 donating: 4 microALGOs to the Rewards Pool.
🪄 nullun claimed the Sceptre of Proof on Block: 14989913 donating: 4 microALGOs to the Rewards Pool. ```
shell
$ python3 algorealm.py longevity --crown
``` 👑 RANDOMIC MAJESTY LONGEVITY
+--------------------+--------------------+ | Majesty Name | Longevity (blocks) | +--------------------+--------------------+ | MillionAlgosFather | 5768768 | | nullun | 3366046 | | jkbishbish | 1357847 | | Matt | 1248429 | | renangeo | 416539 | | 👑🅿️ | 158346 | | tmc | 53895 | | MillionAlgosFather | 32978 | | nullun | 3369 | +--------------------+--------------------+ ```
shell
$ python3 algorealm.py braveness --crown
``` 👑 RANDOMIC MAJESTY BRAVENESS
+--------------------+-----------+ | Majesty Name | Braveness | +--------------------+-----------+ | renangeo | 7.824 | | MillionAlgosFather | 4.605 | | 👑🅿️ | 1.609 | | jkbishbish | 1 | | tmc | 0.405 | | nullun | 0.288 | | nullun | 0.0 | | MillionAlgosFather | 0.0 | | Matt | 0.0 | +--------------------+-----------+ ```
Braveness is based on the relative gorwth of donation amounts (
d'
,d
):
braveness = ln(d') - ln(d)
Chose your <majesty-name>
and become part of the Dynasty! Remember that to dethrone the current Majesties you must donate to the Algorand's Rewards Pool more <microalgos>
than the last donation.
shell
$ python3 claim-majesty (--crown | --sceptre) <majesty-name> <microalgos> [--test]
⚠️ Enter the the mnemonic
formatting it as: "word_1 word_2 word_3 ... word_25"
and keep it safe!
The AlgoRealm Card is a unique AlgoWorld NFT Special Card, securely stored in an enchanted coffer.
Only the generous heart of the Great Majesty of Algorand will ever able to break the spell, claim the unique Special Card and trade it! So, you previously need to conquer both the Crown of Entropy and the Sceptre of Proof, ascending to AlgoRealm's throne.
The AlgoRealm Card can be claimed starting from block 16,250,000 using the command claim-card
: hold strong both the Crown and the Sceptre and keep the throne until there!
shell
$ python3 algorealm.py claim-card [--test]
⚠️ Enter the the mnemonic
formatting it as: "word_1 word_2 word_3 ... word_25"
and keep it safe!
As a Buyer you can easily place a buy-order proposal to the Seller using the buy-order
command. You just need to choose the <microalgos>
amount for the buy order proposal.
Using the --notify
option the Seller will receive a notification on-chain, being acknowledged about the new buy-order proposal.
shell
$ python3 algorealm.py buy-order <microalgos> [--notify] [--test]
⚠️ Enter the the mnemonic
formatting it as: "word_1 word_2 word_3 ... word_25"
and keep it safe!
As result, a Partially Signed Trade Group Transaction is created as trade.gtx
file in the algorealm.py
CLI directory. Note that there is no counter-party risk in this operation: as a Buyer you can safely send the trade.gtxn
file to the Seller, being sure that the trade will be executed if and only if the Seller will transfer the AlgoRealm Special Card to you.
As a Seller you can review and verify the buy-order proposal, validating the amounts of the trade. Place the trade.gtxn
file, received from the Buyer, in the same directory of your algorealm.py
CLI.
The verify-order
command requires your <seller-address>
as argument.
shell
$ python3 algorealm.py verify-order <seller-address>
Some compliancy checks are performed over the trade.gtx
file before displaying the buy-order summary:
```shell * =========================== ORDER SUMMARY =========================== *
BUYER: <BUYER_ADDRESS>
SELLER: <SELLER_ADDRESS>
AMOUNT: 1.0 ALGO
ROYALTY: 0.1 ALGO
LAST VALID BLOCK: 13184621
* ===================================================================== *
```
If you agree with the buy-order proposal you can sell the AlgoRealm Special Card.
As a Seller, if you agree with the buy-order proposal, you can sell your AlgoRealm Special Card using the command sell-card
.
shell
$ python3 algorealm.py sell-card [--test]
⚠️ Enter the the mnemonic
formatting it as: "word_1 word_2 word_3 ... word_25"
and keep it safe!
AlgoRealm could also be a good challenge to run your own Algorand node and familiarise the goal CLI commands.
If you enjoyed AlgoRealm or find it useful as free and open source learning example, consider tipping the Dev:
XODGWLOMKUPTGL3ZV53H3GZZWMCTJVQ5B2BZICFD3STSLA2LPSH6V6RW3I
Here you find the AlgoRealm slide deck presented at Algorand's Office Hours!
Join AlgoRealm channel!
Special thanks to everyone who forked or starred the repository ❤️
Check in the read me Save the AlgoRealm Law into your node directory.
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These problems occurred while renovating this repository.
This repository currently has no open or pending branches.
This release includes:
longevity
game action;braveness
game action;query
and CLI.This release includes:
algorealm.py
(the actual CLI), actions.py
(game actions), query.py
(blockchain data query), consts.py
(useful constants);[--test]
option to the CLI to play on TestNet;getpass
to avoid typing mnemonic
in plain text;claim-majesty
command with mutually exclusive options (--crown
or --sceptre
);TEAL
contract formatting;README.md
;algorand algorand-atomic-transfer algorand-smart-contract algorand-standard-assets algorand-teal blockchain python teal nft