Skip to content

Commit

Permalink
add FLOW filter on fromEVM requests & remove unused entitlement
Browse files Browse the repository at this point in the history
  • Loading branch information
sisyphusSmiling committed Apr 15, 2024
1 parent e6b186c commit e13f8a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions cadence/contracts/bridge/FlowEVMBridge.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@ contract FlowEVMBridge : IFlowEVMNFTBridge, IFlowEVMTokenBridge {
feeProvider.isAvailableToWithdraw(amount: FlowEVMBridgeUtils.calculateBridgeFee(used: 0, includeBase: true)):
"Insufficient fee paid"
!type.isSubtype(of: Type<@{NonFungibleToken.Collection}>()): "Mixed asset types are not yet supported"
!type.isInstance(Type<@FlowToken.Vault>()): "Must use the CadenceOwnedAccount interface to bridge $FLOW from EVM"
self.typeRequiresOnboarding(type) == false: "NFT must first be onboarded"
}
// Withdraw from feeProvider and deposit to self
Expand Down
4 changes: 1 addition & 3 deletions cadence/contracts/bridge/FlowEVMBridgeAccessor.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ access(all)
contract FlowEVMBridgeAccessor {

access(all) let StoragePath: StoragePath

/// Entitlement allowing for updates to the Router
access(all) entitlement RouterAdmin

/// BridgeAccessor implementation used by the EVM contract to route bridge calls from COA resources
///
Expand Down Expand Up @@ -124,6 +121,7 @@ contract FlowEVMBridgeAccessor {
executed: "Callback must be executed"
}
executed = true
is
return caller.call(
to: FlowEVMBridge.getAssociatedEVMAddress(with: type)
?? panic("No EVM address associated with type"),
Expand Down

0 comments on commit e13f8a9

Please sign in to comment.