Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4 design document for mvp #5

Merged
merged 8 commits into from
Mar 18, 2024
Merged

Conversation

franciscojoray
Copy link
Collaborator

No description provided.

@franciscojoray franciscojoray linked an issue Mar 18, 2024 that may be closed by this pull request
design/design.md Outdated
>* pos_x: **Int**
>* pos_y: **Int**
>* fuel: **Int**
>* pilot_token: **ByteArray**

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should be an AssetClass

design/design.md Outdated
## Transactions

### Create Pot UTxO:
This transaction creates the unique `Pot` UTxO locking min ada and an admin token.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should indicate that the tx stores in the datum the ship token policy id. Something like:

This transaction creates...... and an admin token. It stores in the datum the ShipToken policy id for being able to reference it in the validator.

design/design.md Outdated
![gatherFuel diagram](img/gatherFuel.png)


### Collect Rewards:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

User wallet must be shown in the inputs, given that the pilot token is needed for this operation.

design/design.md Outdated
## Introduction
This document describes the technical design of the Asteria dApp - the script UTxOs involved, the operations that take place both during the game and in the setup phase, and the necessary validators and minting policies.

There will be a single script UTxO for the `Pot`, several `PelletState` UTxOs and a `ShipState` UTxO for every user. The `Pot` UTxO locks the ada amount paid by each user when creating a ship, and it's position on the board is always assumed to be (0,0). Both `PelletState` and `ShipState` UTxOs have their positions specified in the datum. In order to identify valid game UTxOs, the admin will deposit a special token in the `PelletState` and `Pot` UTxOs when creating them.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could add at the end of this paragraph that the "admin token" is also used for parameterizing the pot and fuel validators, so we could have different "versions" of the game, each one with a different admin token.

design/design.md Outdated

#### *Gather Redeemer (includes gathering amount)*
* ship token is present in some input.
* there is a `ShipState` input with the same x and y datum coordinates as the `PelletState` UTxO.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be checked in the ship validator, not here. The rule should be "ship validator reads the pellet datum, but not the other way"

design/design.md Outdated
* there is a single `ShipState` input.
* the `PilotToken` is present in an input.
* no `ShipState` output.
* signed by ship owner.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how do you know who is the ship owner?? The pilot token is representing this, so no need to this check.

design/design.md Outdated
***TX:***
* a single token is minted.
* there is a single `ShipState` output.
* signed by the player joining the game.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this mean?

design/design.md Outdated
* there is a single `ShipState` output.
* signed by the player joining the game.

***DATUM:***

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's use constants to refer to game parameters, like the "minimum distance", also the fuel capacity, etc.

design/design.md Outdated
***VALUE:***
* the minted token is paid to the `ShipState` validator address.

#### BURN:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only one token is being burnt.

design/design.md Outdated
***VALUE:***
* the minted token is paid to the `ShipState` validator address.

#### BURN:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ship validator is in the input

@franciscojoray franciscojoray merged commit 0be3500 into main Mar 18, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Design document for MVP.
2 participants