diff --git a/cadence/transactions/makeFriends.cdc b/cadence/transactions/makeFriends.cdc new file mode 100644 index 0000000..e2bade0 --- /dev/null +++ b/cadence/transactions/makeFriends.cdc @@ -0,0 +1,19 @@ +// read more about Cadence transactions here https://developers.flow.com/cadence/language/transactions +import "Person" + +transaction { + let acc: AuthAccount + + prepare(signer: AuthAccount) { + self.acc = signer + } + + pre {} + + execute { + // save the resource to the storage, read more about it here https://developers.flow.com/cadence/language/accounts#account-storage + self.acc.save<@Person.Friendship>(<-Person.makeFriends(), to: StoragePath(identifier: "friendship")!) + } + + post {} +}