Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contracts/chain-adapters/ZkStack_Adapter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ contract ZkStack_Adapter is AdapterInterface {
);
} else {
// An ERC20 that is not WETH.
IERC20(l1Token).safeIncreaseAllowance(SHARED_BRIDGE, amount);
IERC20(l1Token).forceApprove(SHARED_BRIDGE, amount);
txHash = BRIDGE_HUB.requestL2TransactionTwoBridges{ value: txBaseCost }(
BridgeHubInterface.L2TransactionRequestTwoBridgesOuter({
chainId: CHAIN_ID,
Expand Down
10 changes: 5 additions & 5 deletions contracts/chain-adapters/ZkStack_CustomGasToken_Adapter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ contract ZkStack_CustomGasToken_Adapter is AdapterInterface {
*/
function relayMessage(address target, bytes memory message) external payable override {
uint256 txBaseCost = _pullCustomGas(L2_GAS_LIMIT);
IERC20(CUSTOM_GAS_TOKEN).safeIncreaseAllowance(SHARED_BRIDGE, txBaseCost);
IERC20(CUSTOM_GAS_TOKEN).forceApprove(SHARED_BRIDGE, txBaseCost);

// Returns the hash of the requested L2 transaction. This hash can be used to follow the transaction status.
bytes32 canonicalTxHash = BRIDGE_HUB.requestL2TransactionDirect(
Expand Down Expand Up @@ -153,7 +153,7 @@ contract ZkStack_CustomGasToken_Adapter is AdapterInterface {
// If the l1Token is WETH then unwrap it to ETH then send the ETH to the standard bridge along with the base
// cost of custom gas tokens.
L1_WETH.withdraw(amount);
IERC20(CUSTOM_GAS_TOKEN).safeIncreaseAllowance(SHARED_BRIDGE, txBaseCost);
IERC20(CUSTOM_GAS_TOKEN).forceApprove(SHARED_BRIDGE, txBaseCost);
// Note: When bridging ETH with `L2TransactionRequestTwoBridgesOuter`, the second bridge must be 0 for the shared bridge call to not revert.
// https://github.com/matter-labs/era-contracts/blob/aafee035db892689df3f7afe4b89fd6467a39313/l1-contracts/contracts/bridge/L1SharedBridge.sol#L328
txHash = BRIDGE_HUB.requestL2TransactionTwoBridges{ value: amount }(
Expand All @@ -171,7 +171,7 @@ contract ZkStack_CustomGasToken_Adapter is AdapterInterface {
);
} else if (l1Token == CUSTOM_GAS_TOKEN) {
// The chain's custom gas token.
IERC20(l1Token).safeIncreaseAllowance(SHARED_BRIDGE, txBaseCost + amount);
IERC20(l1Token).forceApprove(SHARED_BRIDGE, txBaseCost + amount);
txHash = BRIDGE_HUB.requestL2TransactionDirect(
BridgeHubInterface.L2TransactionRequestDirect({
chainId: CHAIN_ID,
Expand All @@ -187,8 +187,8 @@ contract ZkStack_CustomGasToken_Adapter is AdapterInterface {
);
} else {
// An ERC20 that is not WETH and not the custom gas token.
IERC20(CUSTOM_GAS_TOKEN).safeIncreaseAllowance(SHARED_BRIDGE, txBaseCost);
IERC20(l1Token).safeIncreaseAllowance(SHARED_BRIDGE, amount);
IERC20(CUSTOM_GAS_TOKEN).forceApprove(SHARED_BRIDGE, txBaseCost);
IERC20(l1Token).forceApprove(SHARED_BRIDGE, amount);
txHash = BRIDGE_HUB.requestL2TransactionTwoBridges(
BridgeHubInterface.L2TransactionRequestTwoBridgesOuter({
chainId: CHAIN_ID,
Expand Down
2 changes: 1 addition & 1 deletion contracts/erc7683/ERC7683OrderDepositorExternal.sol
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ contract ERC7683OrderDepositorExternal is ERC7683OrderDepositor, Ownable, MultiC
uint32 exclusivityDeadline,
bytes memory message
) internal override {
IERC20(inputToken).safeIncreaseAllowance(address(SPOKE_POOL), inputAmount);
IERC20(inputToken).forceApprove(address(SPOKE_POOL), inputAmount);

SPOKE_POOL.depositV3(
depositor,
Expand Down
Loading