diff --git a/HelloWorld/juvix.lock.yaml b/HelloWorld/juvix.lock.yaml index 63bf81a..18081ba 100644 --- a/HelloWorld/juvix.lock.yaml +++ b/HelloWorld/juvix.lock.yaml @@ -2,7 +2,7 @@ # Do not edit this file manually. version: 2 -checksum: bf6d9cde1d381ef43acf3f7c3d7a7be76f6e3c51c741f9be1e465568c211bf5a +checksum: 7e1503c9e6c5f62bedadd6b6637bc55e25372a26fe9628bbf5f4026fd1ad34a5 dependencies: - git: name: anoma_juvix-stdlib diff --git a/Material/1_Learn-Anoma-Apps.md b/Material/1_Learn-Anoma-Apps.md index 5346f9b..c48fa9c 100644 --- a/Material/1_Learn-Anoma-Apps.md +++ b/Material/1_Learn-Anoma-Apps.md @@ -192,6 +192,7 @@ The [**Anoma Resource Machine** (ARM)](#resource-machine) is a virtual machine b ## Applications Applications consist of application state and logic. + - State is modelled as resources and the data they contain - Logic is modelled as resource logic functions expressing the predicates required for a resource to be created and consumed @@ -199,15 +200,17 @@ Accordingly, resources and corresponding **resource logic functions** constitute Instead of creating and consuming resources and providing all data required in the transaction object directly and manually, users interact with an **application interface**. +
Interface details + The interface consists of + - Transaction function (the application write interface) - Outputs a transaction object - Example: Transfer of a resource to a new owner. - Projection functions (the application read interface) - - Outputs meanigful data projected from the state + - Outputs meaningful data projected from the state - Example: The total quantity of resources of specific kind owned by an identity - ```mermaid flowchart TB subgraph Application @@ -225,3 +228,29 @@ flowchart TB Backend --"read"--> Interface Interface --"write"--> Backend ``` + +
+ +### Kudos Token + +Accounting primitive for applications + +#### Feature Set + +- Identifiers (name, symbol, decimals) +- Orignator + - Can initially create new quantities of this kind/ +- Supply + - Fixed: The total quantity of resources of this kind is fixed. Resources can still be split and merged. + - Capped: Upper bound on the total quantity. Originator cannot create more than this limit. Owners can burn tokens, + - Unbound: Originator can inflate the supply. +- Transferability + - Transferable: Your normal token (ERC-20, NFT) + - Non-transferable: Soulbound token (SBT) + +#### `Token` Implementation + +- Resource Label: [1](https://github.com/anoma/anoma-applib/blob/a6c4993f203d759051ef4a31c0c6c7fde0a9e9a2/Applib/Token/Label.juvix#L8-L16),[2](../HelloWorld/.juvix-build/0.6.8/deps/c4c0b1e74196bd1135c8ea27b48f6756d7ec7aa8f5388511e02d6401d1f1c407/Applib/Token/Label.juvix) +- Resource Logic Function: [1](https://github.com/anoma/anoma-applib/blob/a6c4993f203d759051ef4a31c0c6c7fde0a9e9a2/Applib/Token/Logic.juvix#L13-L23),[2](../HelloWorld/.juvix-build/0.6.8/deps/c4c0b1e74196bd1135c8ea27b48f6756d7ec7aa8f5388511e02d6401d1f1c407/Applib/Token/Logic.juvix) +- Transaction functions (write interface): [1](https://github.com/anoma/anoma-applib/blob/a6c4993f203d759051ef4a31c0c6c7fde0a9e9a2/Applib/Transaction),[2](../HelloWorld/.juvix-build/0.6.8/deps/c4c0b1e74196bd1135c8ea27b48f6756d7ec7aa8f5388511e02d6401d1f1c407/Applib/Transaction) +- Projection functions (read interface): [1](https://github.com/anoma/anoma-applib/blob/a6c4993f203d759051ef4a31c0c6c7fde0a9e9a2/Applib/Projection/TotalQuantity.juvix#L9-L12),[2](../HelloWorld/.juvix-build/0.6.8/deps/c4c0b1e74196bd1135c8ea27b48f6756d7ec7aa8f5388511e02d6401d1f1c407/Applib/Projection/TotalQuantity.juvix)