Skip to content

How to deploy a contract and transfer STX in one call? #1797

@matronator

Description

@matronator

How can I deploy a contract and transfer STX at the same time using one Wallet popup? I want to use the @stacks/connect request method to first transfer some amount of STX from the user who connected their wallet and then deploy a contract to create a new fungible token for that same user.

However the way it is setup now, I get two wallet popups, first for the STX transfer and second for the contract deployment.

How can I consolidate them to a single call/popup?

Also, how can I get the senderKey from the user who's connected his wallet, to use any functions from the @stacks/transaction package?

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