From b7ed9ecc286668c5ab92317f9751545b7b655905 Mon Sep 17 00:00:00 2001 From: A5 Pickle Date: Thu, 4 Apr 2024 14:09:37 -0500 Subject: [PATCH 1/2] evm: approve -> safeIncreaseAllowance --- evm/src/contracts/WormholeCctpTokenMessenger.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evm/src/contracts/WormholeCctpTokenMessenger.sol b/evm/src/contracts/WormholeCctpTokenMessenger.sol index 836c457..0fb2ce3 100644 --- a/evm/src/contracts/WormholeCctpTokenMessenger.sol +++ b/evm/src/contracts/WormholeCctpTokenMessenger.sol @@ -94,7 +94,7 @@ abstract contract WormholeCctpTokenMessenger { * who will ultimately be burning the tokens. */ function setTokenMessengerApproval(address token, uint256 amount) internal { - IERC20(token).approve(address(_tokenMessenger), amount); + IERC20(token).safeIncreaseAllowance(address(_tokenMessenger), amount); } /** From 4c92c840ce0c525867511f6d838a57a759c415fa Mon Sep 17 00:00:00 2001 From: A5 Pickle Date: Thu, 4 Apr 2024 14:09:47 -0500 Subject: [PATCH 2/2] evm: remove Context --- evm/src/contracts/CircleIntegration/Setup.sol | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/evm/src/contracts/CircleIntegration/Setup.sol b/evm/src/contracts/CircleIntegration/Setup.sol index d5546b8..436730a 100644 --- a/evm/src/contracts/CircleIntegration/Setup.sol +++ b/evm/src/contracts/CircleIntegration/Setup.sol @@ -2,9 +2,8 @@ pragma solidity ^0.8.19; import {ERC1967Upgrade} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol"; -import {Context} from "@openzeppelin/contracts/utils/Context.sol"; -contract Setup is ERC1967Upgrade, Context { +contract Setup is ERC1967Upgrade { function setup(address implementation) public { require(implementation != address(0), "invalid implementation");