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

bot+app: Issue and Accept challenges #8

Open
16 tasks
rsodre opened this issue Apr 22, 2024 · 0 comments
Open
16 tasks

bot+app: Issue and Accept challenges #8

rsodre opened this issue Apr 22, 2024 · 0 comments
Assignees
Labels

Comments

@rsodre
Copy link
Contributor

rsodre commented Apr 22, 2024

Depends on #1, #5, #7

Tasks

  • Store duelist account data for Discord Users
    • Adapt the /social-app to store a new field: account_data
    • It holds a simple json string, exported from the Pistols client
  • Add Starknet connectors to /discord-bot
    • TBD
  • Create new command: issue_challenge
    • Input: challenged_address, containing the challenged duelist OR Discord user Id
    • Input: wager_value (optional)
    • Input: message (optional)
    • Fetch the user's account data from supabase.
    • Call the create_challenge() method on the [actions](pistols::actions) system
  • Create new command: accept_challenge
    • Input: duel_id
    • Input: accept, a boolean as True by default
    • Fetch the user's account data from supabase.
    • Call the reply_challenge() method on the pistols::actions system

The actions interface on Pistols:

    fn create_challenge(self: @TContractState,
        challenged: ContractAddress,
        message: felt252,
        wager_coin: u8,
        wager_value: u256,
        expire_seconds: u64,
    ) -> u128;
    fn reply_challenge(self: @TContractState,
        duel_id: u128,
        accepted: bool,
    ) -> ChallengeState;

Notes

  • If the commands are successful, the bot will automatically display notifications
  • If they fail, the bot must forward the reason to the player on Discord as a private message
  • We're working on the details, meanwhile this issue is ON HOLD
  • Let's also consider using Argent Session Keys?
@rsodre rsodre added help wanted Extra attention is needed ODHack and removed help wanted Extra attention is needed labels Apr 22, 2024
@rsodre rsodre mentioned this issue Apr 22, 2024
8 tasks
@rsodre rsodre changed the title bot: Issue and Accept challenges bot+app: Issue and Accept challenges Apr 22, 2024
@rsodre rsodre mentioned this issue Apr 23, 2024
6 tasks
@rsodre rsodre self-assigned this May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant