@@ -9,6 +9,7 @@ import {Bridge} from "../src/abstract/Bridge.sol";
99import {IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol " ;
1010import {WrappedToken} from "../src/WrappedToken.sol " ;
1111import {Pausable} from "@openzeppelin/contracts/utils/Pausable.sol " ;
12+ import {EthGetLogsPrecompileHelperTypes} from "pod-sdk/types/EthGetLogsPrecompileHelperTypes.sol " ;
1213
1314contract BridgeMintBurnTest is BridgeBehaviorTest {
1415 BridgeMintBurn private _bridge;
@@ -49,7 +50,7 @@ contract BridgeMintBurnTest is BridgeBehaviorTest {
4950 }
5051
5152 function test_Claim_SingleLog_MintsToRecipient () public {
52- BridgeMintBurn .RpcLog[] memory logs = new BridgeMintBurn .RpcLog [](1 );
53+ EthGetLogsPrecompileHelperTypes .RpcLog[] memory logs = new EthGetLogsPrecompileHelperTypes .RpcLog [](1 );
5354 logs[0 ] = _makeLog (0 , _mirror, DEPOSIT_AMOUNT, recipient);
5455 _mockEthGetLogs (0 , bytes ("0x1 " ), _mirror, logs);
5556 assertEq (_token.balanceOf (recipient), 0 );
@@ -68,15 +69,15 @@ contract BridgeMintBurnTest is BridgeBehaviorTest {
6869 }
6970
7071 function test_Claim_RevertIfDailyLimitExhausted () public {
71- BridgeMintBurn .RpcLog[] memory logs = new BridgeMintBurn .RpcLog [](1 );
72+ EthGetLogsPrecompileHelperTypes .RpcLog[] memory logs = new EthGetLogsPrecompileHelperTypes .RpcLog [](1 );
7273 logs[0 ] = _makeLog (0 , _mirror, tokenLimits.claim + 1 , recipient);
7374 _mockEthGetLogs (0 , bytes ("0x1 " ), _mirror, logs);
7475 vm.expectRevert (abi.encodeWithSelector (IBridge.DailyLimitExhausted.selector ));
7576 _bridge.claim (0 , _mirror, bytes ("0x1 " ));
7677 }
7778
7879 function test_Claim_RevertIfDailyLimitExhausted_ButSucceedAfterOneDay () public {
79- BridgeMintBurn .RpcLog[] memory logs = new BridgeMintBurn .RpcLog [](1 );
80+ EthGetLogsPrecompileHelperTypes .RpcLog[] memory logs = new EthGetLogsPrecompileHelperTypes .RpcLog [](1 );
8081 logs[0 ] = _makeLog (0 , _mirror, DEPOSIT_AMOUNT, recipient);
8182 _mockEthGetLogs (0 , bytes ("0x1 " ), _mirror, logs);
8283 _bridge.claim (0 , _mirror, bytes ("0x1 " ));
@@ -90,14 +91,14 @@ contract BridgeMintBurnTest is BridgeBehaviorTest {
9091 }
9192
9293 function test_Claim_RevertIfNoDepositsFound () public {
93- BridgeMintBurn .RpcLog[] memory logs = new BridgeMintBurn .RpcLog [](0 );
94+ EthGetLogsPrecompileHelperTypes .RpcLog[] memory logs = new EthGetLogsPrecompileHelperTypes .RpcLog [](0 );
9495 _mockEthGetLogs (0 , bytes ("0x1 " ), _mirror, logs);
9596 vm.expectRevert (abi.encodeWithSelector (IBridgeMintBurn.NoDepositsFound.selector ));
9697 _bridge.claim (0 , _mirror, bytes ("0x1 " ));
9798 }
9899
99100 function test_Claim_RevertIfMultipleDepositsFound () public {
100- BridgeMintBurn .RpcLog[] memory logs = new BridgeMintBurn .RpcLog [](2 );
101+ EthGetLogsPrecompileHelperTypes .RpcLog[] memory logs = new EthGetLogsPrecompileHelperTypes .RpcLog [](2 );
101102 logs[0 ] = _makeLog (0 , _mirror, DEPOSIT_AMOUNT, recipient);
102103 logs[1 ] = _makeLog (0 , _mirror, DEPOSIT_AMOUNT, recipient);
103104 _mockEthGetLogs (0 , bytes ("0x1 " ), _mirror, logs);
@@ -108,7 +109,7 @@ contract BridgeMintBurnTest is BridgeBehaviorTest {
108109 function test_Claim_RevertIfMirrorTokenNotFound () public {
109110 // Use a token not mapped in mirrorTokens
110111 address unknownMirror = address (0xBEEF );
111- BridgeMintBurn .RpcLog[] memory logs = new BridgeMintBurn .RpcLog [](1 );
112+ EthGetLogsPrecompileHelperTypes .RpcLog[] memory logs = new EthGetLogsPrecompileHelperTypes .RpcLog [](1 );
112113 logs[0 ] = _makeLog (0 , unknownMirror, DEPOSIT_AMOUNT, recipient);
113114 _mockEthGetLogs (0 , bytes ("0x1 " ), unknownMirror, logs);
114115
@@ -117,7 +118,7 @@ contract BridgeMintBurnTest is BridgeBehaviorTest {
117118 }
118119
119120 function test_Claim_RevertIfAlreadyProcessed () public {
120- BridgeMintBurn .RpcLog[] memory logs = new BridgeMintBurn .RpcLog [](1 );
121+ EthGetLogsPrecompileHelperTypes .RpcLog[] memory logs = new EthGetLogsPrecompileHelperTypes .RpcLog [](1 );
121122 logs[0 ] = _makeLog (0 , _mirror, DEPOSIT_AMOUNT, recipient);
122123 _mockEthGetLogs (0 , bytes ("0x1 " ), _mirror, logs);
123124 _bridge.claim (0 , _mirror, bytes ("0x1 " ));
@@ -136,7 +137,7 @@ contract BridgeMintBurnTest is BridgeBehaviorTest {
136137 }
137138
138139 function test_Claim_RevertIfPrecompileCallFails () public {
139- BridgeMintBurn.ExternalEthGetLogsArgs memory args = _buildArgs (0 , bytes ("0x1 " ), _mirror);
140+ EthGetLogsPrecompileHelperTypes.PrecompileArgs memory args = _buildArgs (0 , bytes ("0x1 " ), _mirror);
140141 podMockEthGetLogsRevert (abi.encode (args));
141142
142143 vm.expectRevert (abi.encodeWithSelector (IBridgeMintBurn.PrecompileCallFailed.selector ));
@@ -171,22 +172,25 @@ contract BridgeMintBurnTest is BridgeBehaviorTest {
171172 function _buildArgs (uint256 id , bytes memory fromBlock , address tokenAddr )
172173 internal
173174 pure
174- returns (BridgeMintBurn.ExternalEthGetLogsArgs memory )
175+ returns (EthGetLogsPrecompileHelperTypes.PrecompileArgs memory )
175176 {
176- BridgeMintBurn.EthGetLogsArgs memory inner = BridgeMintBurn. EthGetLogsArgs ({
177+ EthGetLogsPrecompileHelperTypes.RpcArgs memory inner = EthGetLogsPrecompileHelperTypes. RpcArgs ({
177178 fromBlock: fromBlock,
178179 toBlock: hex "66696e616c697a6564 " ,
179180 addr: tokenAddr,
180181 blockHash: bytes32 (0 ),
181182 topics: _buildTopics (id, tokenAddr)
182183 });
183- return BridgeMintBurn. ExternalEthGetLogsArgs ({chainId: 1 , ethGetLogsArgs: inner});
184+ return EthGetLogsPrecompileHelperTypes. PrecompileArgs ({chainId: 1 , ethGetLogsArgs: inner});
184185 }
185186
186- function _mockEthGetLogs (uint256 id , bytes memory fromBlock , address tokenAddr , BridgeMintBurn.RpcLog[] memory logs )
187- internal
188- {
189- BridgeMintBurn.ExternalEthGetLogsArgs memory args = _buildArgs (id, fromBlock, tokenAddr);
187+ function _mockEthGetLogs (
188+ uint256 id ,
189+ bytes memory fromBlock ,
190+ address tokenAddr ,
191+ EthGetLogsPrecompileTypes.RpcLog[] memory logs
192+ ) internal {
193+ EthGetLogsPrecompileTypes.PrecompileArgs memory args = _buildArgs (id, fromBlock, tokenAddr);
190194 podMockEthGetLogs (abi.encode (args), abi.encode (logs));
191195 }
192196
@@ -200,9 +204,9 @@ contract BridgeMintBurnTest is BridgeBehaviorTest {
200204 function _makeLog (uint256 id , address tokenAddr , uint256 amount , address to )
201205 internal
202206 pure
203- returns (BridgeMintBurn .RpcLog memory )
207+ returns (EthGetLogsPrecompileTypes .RpcLog memory )
204208 {
205- return BridgeMintBurn .RpcLog ({
209+ return EthGetLogsPrecompileTypes .RpcLog ({
206210 addr: tokenAddr,
207211 topics: _buildTopics (id, tokenAddr),
208212 data: abi.encode (amount, to),
0 commit comments