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

Pay for resources with generalise payment token #12

Open
radicleart opened this issue Jun 5, 2024 · 0 comments
Open

Pay for resources with generalise payment token #12

radicleart opened this issue Jun 5, 2024 · 0 comments

Comments

@radicleart
Copy link
Owner

radicleart commented Jun 5, 2024

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

@radicleart radicleart changed the title Generalise payment token Pay for resources with generalise payment token Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant