Skip to content

Commit

Permalink
fix FlowEVMBridgeUtils.borrowCOA()
Browse files Browse the repository at this point in the history
  • Loading branch information
sisyphusSmiling committed Sep 19, 2024
1 parent 1da5a87 commit a506223
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cadence/contracts/bridge/FlowEVMBridgeHandlers.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ access(all) contract FlowEVMBridgeHandlers {
let unwrapResult = FlowEVMBridgeUtils.call(
signature: "withdraw(uint)",
targetEVMAddress: wflowAddress,
args: [UInt(amount)],
args: [amount],
gasLimit: FlowEVMBridgeConfig.gasLimit,
value: 0.0
)
Expand All @@ -344,7 +344,7 @@ access(all) contract FlowEVMBridgeHandlers {
// Cover underflow
assert(
postBalance > preBalance,
message: "Balance decremented after unwrapping WFLOW"
message: "Balance did not increment after unwrapping WFLOW amount=".concat(amount.toString())
)
// Confirm bridge COA's FLOW balance has incremented by the expected amount
assert(
Expand Down
2 changes: 1 addition & 1 deletion cadence/contracts/bridge/FlowEVMBridgeUtils.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,7 @@ contract FlowEVMBridgeUtils {
///
access(account)
view fun borrowCOA(): auth(EVM.Call, EVM.Withdraw) &EVM.CadenceOwnedAccount {
return self.account.storage.borrow<auth(EVM.Call) &EVM.CadenceOwnedAccount>(
return self.account.storage.borrow<auth(EVM.Call, EVM.Withdraw) &EVM.CadenceOwnedAccount>(
from: FlowEVMBridgeConfig.coaStoragePath
) ?? panic("Could not borrow COA reference")
}
Expand Down

0 comments on commit a506223

Please sign in to comment.