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

add event for collection initialization #27

Merged
merged 1 commit into from
Dec 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion contracts/FlowtyWrapped.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ pub contract FlowtyWrapped: NonFungibleToken, ViewResolver {
/// The event that is emitted when the contract is created
pub event ContractInitialized()

pub event CollectionCreated(uuid: UInt64)

/// The event that is emitted when an NFT is withdrawn from a Collection
pub event Withdraw(id: UInt64, from: Address?)

Expand Down Expand Up @@ -236,7 +238,9 @@ pub contract FlowtyWrapped: NonFungibleToken, ViewResolver {
/// @return The new Collection resource
///
pub fun createEmptyCollection(): @NonFungibleToken.Collection {
return <- create Collection()
let c <- create Collection()
emit CollectionCreated(uuid: c.uuid)
return <- c
}

pub resource interface AdminPublic {}
Expand Down
Loading