Skip to content

[Cient] Allow transaction flow #10

@pradel

Description

@pradel

When arriving on the app, before depositing any money, a transaction should be broadcasted and included in a block (see how boom is working)

smth like this:

 doContractCall({
      network,
      contractAddress: 'ST000000000000000000002AMW42H',
      contractName: 'pox',
      functionName: 'allow-contract-caller',
      functionArgs: [
        contractPrincipalCV(
          'ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM',
          'stacks-bingo'
        ),
        noneCV(),
      ],
      onFinish: (data) => {
        console.log(data);
      },
    });
  1. Show in UI button to trigger the transaction
  2. If you reload the page query the mempool to see if a pending tx is included (bonus)
  3. Once tx is included, show the input for the amount

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions