Skip to content

Commit

Permalink
fix: force bridge and add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
romanagureev committed May 7, 2024
1 parent d77f882 commit d8a102d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion contracts/bridgers/PolygonzkEVMBridger.vy
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def __init__(_l1_bridge: PolygonZkEVMBridge, _network: uint32):
def bridge(_token: ERC20, _to: address, _amount: uint256):
"""
@notice Bridge a token to Polygon zkEVM using built-in PolygonZkEVMBridge
@dev Might need `claimAsset` on destination chain, save `depositCount` from POLYGON_ZKEVM_BRIDGE.BridgeEvent
@param _token The token to bridge
@param _to The address to deposit the token to on L2
@param _amount The amount of the token to deposit
Expand All @@ -36,7 +37,7 @@ def bridge(_token: ERC20, _to: address, _amount: uint256):
if _token.allowance(self, L1_BRIDGE.address) < _amount:
_token.approve(L1_BRIDGE.address, max_value(uint256))

L1_BRIDGE.bridgeAsset(DESTINATION_NETWORK, _to, _amount, _token.address, False, b"")
L1_BRIDGE.bridgeAsset(DESTINATION_NETWORK, _to, _amount, _token.address, True, b"")


@view
Expand Down

0 comments on commit d8a102d

Please sign in to comment.