Skip to content

Commit

Permalink
Debugging tx
Browse files Browse the repository at this point in the history
  • Loading branch information
lealobanov committed Dec 12, 2024
1 parent 6992c61 commit fea6907
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cadence/transactions/create_vault.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ transaction {
prepare(acct: auth(Storage, Capabilities) &Account) {
// Create a new empty Vault object
let vaultA <- ExampleToken.createEmptyVault()

// Store the vault in the account storage
acct.storage.save<@ExampleToken.Vault>(<-vaultA, to: /storage/MainVault)

log("Empty Vault stored")

// Create a public Receiver capability to the Vault
let receiverCap = acct.capabilities.storage.issue<&ExampleToken.Vault{ExampleToken.Receiver, ExampleToken.Balance}>(
let receiverCap = acct.capabilities.storage.issue<&ExampleToken.Vault>(
/storage/MainVault
)
acct.capabilities.publish(receiverCap, at: /public/MainReceiver)
Expand All @@ -26,7 +26,7 @@ transaction {
assert(
getAccount(0x02)
.capabilities
.borrow<&ExampleToken.Vault{ExampleToken.Receiver}>(/public/MainReceiver) != nil,
.borrow<&ExampleToken.Vault>(/public/MainReceiver) != nil,
message: "Vault Receiver Reference was not created correctly"
)
}
Expand Down

0 comments on commit fea6907

Please sign in to comment.