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

Marketplace fee #227

Open
olanod opened this issue Jun 9, 2022 · 0 comments
Open

Marketplace fee #227

olanod opened this issue Jun 9, 2022 · 0 comments

Comments

@olanod
Copy link
Member

olanod commented Jun 9, 2022

We need to define a standard format for the payment remark to be used by marketplaces to detect when a payment should leave a fee to the marketplace.

One option is to use a human readable format like JSON but comes at the cost of more expensive parsing and extra size(specially if the payload needs to include signatures for example), the alternative is to use SCALE that will be more efficient and take less space but requires extra work in the client. As we usually expect payments to be done from a custom client that is familiar with SCALE I'd opt for this option. On top of this to get better support in polkadot.js for the remark, it might be better for remarks to be typed(implementing Encode) instead of opaque bytes.

#[derive(Encode, Decode, TypeInfo)]
enum VirtoPaymentRemark {
    V0(CommunityId), // community id is checked to be a valid marketplace with a configured fee
}
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