Skip to content

Commit

Permalink
minimize transaction entitlements
Browse files Browse the repository at this point in the history
  • Loading branch information
sisyphusSmiling committed Nov 25, 2024
1 parent 2480068 commit a96b79b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cadence/transactions/stepwise/1_fund_coa.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ transaction {
let coa: auth(EVM.Call) &EVM.CadenceOwnedAccount
let fundingVault: @FlowToken.Vault

prepare(signer: auth(BorrowValue, StorageCapabilities, PublishCapability, UnpublishCapability) &Account) {
prepare(signer: auth(BorrowValue) &Account) {
// Ensure a borrowable COA reference is available
let storagePath = /storage/evm
self.coa = signer.storage.borrow<auth(EVM.Call) &EVM.CadenceOwnedAccount>(from: storagePath)
Expand Down
2 changes: 1 addition & 1 deletion cadence/transactions/stepwise/2_wrap_flow.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ transaction(wflowAddressHex: String) {
let mintCost: UFix64
let wflowAddress: EVM.EVMAddress

prepare(signer: auth(BorrowValue, StorageCapabilities, PublishCapability, UnpublishCapability) &Account) {
prepare(signer: auth(BorrowValue) &Account) {
// Ensure a borrowable COA reference is available
let storagePath = /storage/evm
self.coa = signer.storage.borrow<auth(EVM.Call) &EVM.CadenceOwnedAccount>(from: storagePath)
Expand Down
2 changes: 1 addition & 1 deletion cadence/transactions/stepwise/3_approve.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ transaction(wflowAddressHex: String, maybeMintERC721AddressHex: String) {
let wflowAddress: EVM.EVMAddress
let erc721Address: EVM.EVMAddress

prepare(signer: auth(BorrowValue, StorageCapabilities, PublishCapability, UnpublishCapability) &Account) {
prepare(signer: auth(BorrowValue) &Account) {
// Ensure a borrowable COA reference is available
let storagePath = /storage/evm
self.coa = signer.storage.borrow<auth(EVM.Call) &EVM.CadenceOwnedAccount>(from: storagePath)
Expand Down
2 changes: 1 addition & 1 deletion cadence/transactions/stepwise/4_mint.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ transaction(maybeMintERC721AddressHex: String) {
let coa: auth(EVM.Call) &EVM.CadenceOwnedAccount
let erc721Address: EVM.EVMAddress

prepare(signer: auth(BorrowValue, StorageCapabilities, PublishCapability, UnpublishCapability) &Account) {
prepare(signer: auth(BorrowValue) &Account) {
// Ensure a borrowable COA reference is available
let storagePath = /storage/evm
self.coa = signer.storage.borrow<auth(EVM.Call) &EVM.CadenceOwnedAccount>(from: storagePath)
Expand Down

0 comments on commit a96b79b

Please sign in to comment.