Skip to content

Pay for resources with generalise payment token #12

@mijoco-btc

Description

@mijoco-btc

The idea is to wrap an stx-transfer inside a fungible token (sip10) contract.

(define-public (mint-with (token <ft-trait>))

Payment methods can be set per resource (or via a default);

(pricing (unwrap! (map-get? payment-info (contract-of token)) ERR_UNKNOWN_TENDER))

and paid with generalised token;

(try! (contract-call? token transfer artistAmount contract-caller artistAddress none))

This way payment token can be specified by the resource as opposed to set in advance.

See this thread for generalised payments.

Also see this implementation of the idea

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions