Skip to content

Commit

Permalink
Debug tx
Browse files Browse the repository at this point in the history
  • Loading branch information
lealobanov committed Dec 12, 2024
1 parent fea6907 commit 3c5b24d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions cadence/transactions/create_vault.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ transaction {
acct.capabilities.publish(receiverCap, at: /public/MainReceiver)

log("References created")
}

post {
// Check that the capabilities were created correctly
assert(
getAccount(0x02)
.capabilities
.borrow<&ExampleToken.Vault>(/public/MainReceiver) != nil,
message: "Vault Receiver Reference was not created correctly"
)
// Verify the capability by borrowing the reference
let borrowedVault = acct.capabilities
.borrow<&ExampleToken.Vault>(/public/MainReceiver)

if borrowedVault != nil {
log("Vault Receiver Reference successfully created and borrowed.")
} else {
log("Vault Receiver Reference creation or borrowing failed.")
}
}
}

0 comments on commit 3c5b24d

Please sign in to comment.