Skip to content

Commit 20b5041

Browse files
committed
add ResourceDestroyed and revert schedule to access(all)
1 parent d75421f commit 20b5041

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

contracts/FlowCallbackScheduler.cdc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ access(all) contract FlowCallbackScheduler {
164164
self.id = id
165165
self.timestamp = timestamp
166166
}
167+
168+
// event emitted when the resource is destroyed
169+
access(all) event ResourceDestroyed(id: UInt64 = self.id, timestamp: UFix64 = self.timestamp)
167170
}
168171

169172
/// Estimated callback contains data for estimating callback scheduling.
@@ -1350,7 +1353,7 @@ access(all) contract FlowCallbackScheduler {
13501353
return <-vaultRef.withdraw(amount: amount) as! @FlowToken.Vault
13511354
}
13521355

1353-
access(account) fun schedule(
1356+
access(all) fun schedule(
13541357
callback: Capability<auth(Execute) &{CallbackHandler}>,
13551358
data: AnyStruct?,
13561359
timestamp: UFix64,

0 commit comments

Comments
 (0)