Skip to content

Commit

Permalink
TX succeeds
Browse files Browse the repository at this point in the history
  • Loading branch information
lealobanov committed Dec 3, 2024
1 parent dfff9a9 commit e46f278
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
14 changes: 12 additions & 2 deletions cadence/transaction.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,21 @@ transaction {

// Borrow the specified Set from the admin
self.borrowedSet = self.admin.borrowSet(setID: 1)

// Create plays if they don't already exist
let playIDs: [UInt32] = [1, 2, 3]
for playID in playIDs {
if TopShot.getPlayMetaData(playID: playID) == nil {
let metadata: {String: String} = {
"Player": "Player Name ".concat(playID.toString()),
"Play": "Play Description ".concat(playID.toString())
}
self.admin.createPlay(metadata: metadata)
}
}
}

execute {
// Create plays
// Add plays to the set
self.borrowedSet.addPlay(playID: 1)
self.borrowedSet.addPlay(playID: 2)
Expand Down
2 changes: 1 addition & 1 deletion emulator-account.pkey
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0xdc07d83a937644ff362b279501b7f7a3735ac91a0f3647147acf649dda804e28
0xb6ebc3895e1df1de0999390bb2aa302509f256460e960ed3eed8a4d3826322d8

0 comments on commit e46f278

Please sign in to comment.