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

Introduce Battle Action for new arena service #3089

Open
Atralupus opened this issue Dec 16, 2024 · 0 comments
Open

Introduce Battle Action for new arena service #3089

Atralupus opened this issue Dec 16, 2024 · 0 comments
Assignees

Comments

@Atralupus
Copy link
Member

Atralupus commented Dec 16, 2024

From planetarium/ArenaService#19

The action will be a simplified version of the existing BattleArena, removing elements like ticket management, win/loss records, and score tracking. Instead, it will focus solely on executing battles and recording the results in the state.

Additionally, it should include a metadata argument to verify the intent of the battle request by various services.

Proposed Action Parameters

public Address myAvatarAddress;
public Address enemyAvatarAddress;
public string metadata;
  • metadata: Services requesting the battle will sign the desired data and send it as a hashed string to be recorded on the chain. This works similarly to a JWT.
  • Since only the hash will be stored, this approach seems secure, but a thorough review is needed to ensure it doesn't compromise blockchain security.

Proposed State Format

public class BattleLog : IState
{
    public Address Challenger;
    public Address Opponent;
    public string Metadata;
    public bool IsVictory;
}

This structure is expected to record battle results.

Each service (e.g., Planetarium's ArenaService, another service) should be able to store AccountAddress differently, ensuring flexibility and customization across services.

@Atralupus Atralupus self-assigned this Dec 16, 2024
@Atralupus Atralupus moved this from Todo to Hold in Nine Chronicles Dec 27, 2024
@Atralupus Atralupus moved this from Hold to In Progress in Nine Chronicles Dec 27, 2024
@Atralupus Atralupus moved this from In Progress to Hold in Nine Chronicles Jan 2, 2025
@Atralupus Atralupus moved this from Hold to In Progress in Nine Chronicles Jan 2, 2025
@Atralupus Atralupus moved this from In Progress to Hold in Nine Chronicles Jan 6, 2025
@Atralupus Atralupus moved this from Hold to Review in Nine Chronicles Jan 7, 2025
@Atralupus Atralupus moved this from Review to Done in Nine Chronicles Jan 10, 2025
@Atralupus Atralupus moved this from Done to Todo in Nine Chronicles Jan 20, 2025
@Atralupus Atralupus moved this from Todo to Planned in Nine Chronicles Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Planned
Development

No branches or pull requests

1 participant