Skip to content

Commit

Permalink
fix: return to original test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
CheyenneAtapour committed Jul 19, 2024
1 parent 5b0b65b commit b7d9f6d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 548 deletions.
46 changes: 1 addition & 45 deletions contracts/src/v0.8/ccip/test/pools/GHO/GhoBaseTest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {IBurnMintERC20} from "../../../../shared/token/ERC20/IBurnMintERC20.sol"
import {IPool} from "../../../interfaces/pools/IPool.sol";
import {UpgradeableLockReleaseTokenPool} from "../../../pools/GHO/UpgradeableLockReleaseTokenPool.sol";
import {UpgradeableBurnMintTokenPool} from "../../../pools/GHO/UpgradeableBurnMintTokenPool.sol";
import {UpgradeableBurnMintTokenPoolOld} from "../../../pools/GHO/UpgradeableBurnMintTokenPoolOld.sol";
import {UpgradeableTokenPool} from "../../../pools/GHO/UpgradeableTokenPool.sol";
import {RateLimiter} from "../../../libraries/RateLimiter.sol";
import {BaseTest} from "../../BaseTest.t.sol";
Expand Down Expand Up @@ -66,49 +65,6 @@ abstract contract GhoBaseTest is BaseTest {
return address(tokenPoolProxy);
}

function _deployUpgradeableBurnMintTokenPoolOld(
address ghoToken,
address arm,
address router,
address owner,
address proxyAdmin
) internal returns (address) {
// Deploy BurnMintTokenPool for GHO token on source chain
UpgradeableBurnMintTokenPoolOld tokenPoolImpl = new UpgradeableBurnMintTokenPoolOld(ghoToken, arm, false);
// proxy deploy and init
address[] memory emptyArray = new address[](0);
bytes memory tokenPoolInitParams = abi.encodeWithSignature(
"initialize(address,address[],address)",
owner,
emptyArray,
router
);
TransparentUpgradeableProxy tokenPoolProxy = new TransparentUpgradeableProxy(
address(tokenPoolImpl),
proxyAdmin,
tokenPoolInitParams
);
// Manage ownership
changePrank(owner);
UpgradeableBurnMintTokenPoolOld(address(tokenPoolProxy)).acceptOwnership();
vm.stopPrank();

return address(tokenPoolProxy);
}

function _upgradeUpgradeableBurnMintTokenPool(
address payable tokenPoolProxy,
address ghoToken,
address arm,
address proxyAdmin
) internal {
// Deploy BurnMintTokenPool for GHO token on source chain
UpgradeableBurnMintTokenPool tokenPoolImpl = new UpgradeableBurnMintTokenPool(ghoToken, arm, false);
// proxy upgrade
vm.prank(proxyAdmin);
TransparentUpgradeableProxy(tokenPoolProxy).upgradeTo(address(tokenPoolImpl));
}

function _deployUpgradeableLockReleaseTokenPool(
address ghoToken,
address arm,
Expand Down Expand Up @@ -323,4 +279,4 @@ abstract contract GhoBaseTest is BaseTest {
function _isEthereumChain(uint256 chainId) internal pure returns (bool) {
return chainId == 0;
}
}
}
Loading

0 comments on commit b7d9f6d

Please sign in to comment.