Skip to content

Commit 96dfd2f

Browse files
committed
fix: test direct setSupplyCap tx
1 parent dbd8e35 commit 96dfd2f

File tree

4 files changed

+8
-94
lines changed

4 files changed

+8
-94
lines changed

foundry.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ base = "${RPC_BASE}"
4343
metis = "${RPC_METIS}"
4444
linea = "${RPC_LINEA}"
4545
sepolia = "${RPC_SEPOLIA}"
46+
vtestnet = "${RPC_VTESTNET}"
4647

4748
[etherscan]
4849
mainnet = { key = "${ETHERSCAN_API_KEY}", chainId = 1 }

scripts/horizon/DeployUSCCCapsUpdatePayload.sol

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/deployments/inputs/USCCCapsUpdate.sol

Lines changed: 0 additions & 28 deletions
This file was deleted.

tests/deployments/horizon/USCCCapsUpdate.t.sol renamed to tests/horizon/multisig-txs/USCCCapsUpdateFork.t.sol

Lines changed: 7 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
pragma solidity ^0.8.0;
33

44
import {console2 as console} from 'forge-std/console2.sol';
5-
import {HorizonPhaseOneUpdateTest, IDefaultInterestRateStrategyV2, ReserveConfiguration, DataTypes} from '../HorizonPhaseOneUpdate.t.sol';
6-
import {DeployUSCCCapsUpdatePayload} from '../../../scripts/horizon/DeployUSCCCapsUpdatePayload.sol';
5+
import {HorizonPhaseOneUpdateTest, IDefaultInterestRateStrategyV2, ReserveConfiguration, DataTypes} from '../../deployments/HorizonPhaseOneUpdate.t.sol';
76

87
/// forge-config: default.evm_version = "cancun"
9-
contract USCCCapsUpdateTest is HorizonPhaseOneUpdateTest {
8+
contract USCCCapsUpdateForkTest is HorizonPhaseOneUpdateTest {
109
using ReserveConfiguration for DataTypes.ReserveConfigurationMap;
1110

1211
function test_listing(address token, TokenListingParams memory params) internal virtual override {
@@ -48,59 +47,18 @@ contract USCCCapsUpdateTest is HorizonPhaseOneUpdateTest {
4847
assertEq(config.getPaused(), false, 'unpaused');
4948
}
5049

51-
function loadDeployment() internal virtual override returns (DeploymentInfo memory) {
52-
address usccCapsUpdate = new DeployUSCCCapsUpdatePayload().run();
53-
vm.prank(EMERGENCY_MULTISIG);
54-
(bool success, ) = LISTING_EXECUTOR_ADDRESS.call(
55-
abi.encodeWithSignature(
56-
'executeTransaction(address,uint256,string,bytes,bool)',
57-
address(usccCapsUpdate), // target
58-
0, // value
59-
'execute()', // signature
60-
'', // data
61-
true // withDelegatecall
62-
)
63-
);
64-
require(success, 'Failed to execute transaction');
65-
50+
function loadDeployment() internal view override returns (DeploymentInfo memory) {
6651
return deploymentInfo;
6752
}
6853

6954
function loadUpdatedParams() internal virtual override {
7055
super.loadUpdatedParams();
7156
USCC_TOKEN_LISTING_PARAMS.supplyCap = 1_920_000;
7257
}
73-
}
74-
75-
/// forge-config: default.evm_version = "cancun"
76-
contract USCCCapsUpdatePostDeploymentForkTest is USCCCapsUpdateTest {
77-
function loadDeployment() internal override returns (DeploymentInfo memory) {
78-
address usccCapsUpdate = 0x008C5bA747286d6f7801A80EE2394AD2d5F9CfD3;
79-
vm.prank(EMERGENCY_MULTISIG);
80-
(bool success, ) = LISTING_EXECUTOR_ADDRESS.call(
81-
abi.encodeWithSignature(
82-
'executeTransaction(address,uint256,string,bytes,bool)',
83-
address(usccCapsUpdate), // target
84-
0, // value
85-
'execute()', // signature
86-
'', // data
87-
true // withDelegatecall
88-
)
89-
);
90-
require(success, 'Failed to execute transaction');
91-
92-
return deploymentInfo;
93-
}
94-
}
95-
96-
/// forge-config: default.evm_version = "cancun"
97-
contract USCCCapsUpdatePostExecutionForkTest is USCCCapsUpdateTest {
98-
function setUp() public override {
99-
vm.skip(true, 'post-payload execution');
100-
super.setUp();
101-
}
10258

103-
function loadDeployment() internal view override returns (DeploymentInfo memory) {
104-
return deploymentInfo;
59+
function setUp() public virtual override {
60+
vm.createSelectFork('vtestnet');
61+
initEnvironment();
62+
loadUpdatedParams();
10563
}
10664
}

0 commit comments

Comments
 (0)