Skip to content

Instantly share code, notes, and snippets.

View austinkline's full-sized avatar

Austin Kline austinkline

View GitHub Profile
@austinkline
austinkline / Royalties.cdc
Last active January 27, 2023 21:00
Add royalties to Cuvée Collective
case Type<MetadataViews.Royalties>():
// note: Royalties are not aware of the token being used with, so the path is not useful right now
// eventually the FungibleTokenSwitchboard might be an option
// https://github.com/onflow/flow-ft/blob/master/contracts/FungibleTokenSwitchboard.cdc
let cut = MetadataViews.Royalty(
receiver: Collector.account.getCapability<&{FungibleToken.Receiver}>(/public/somePath),
cut: 0.05 // 5% royaty,
description: "Some description here"
)
var royalties: [MetadataViews.Royalty] = [cut]