Files
linea-monorepo/contracts/test/foundry/bridging/eth/mocks/ETHYieldManagerMock.sol
2025-06-27 17:06:52 +02:00

31 lines
690 B
Solidity

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.30;
contract ETHYieldManagerMock {
struct Deposit {
address from;
uint256 value;
}
uint256 public nextRequestId;
Deposit[] public deposits;
receive() external payable {
deposits.push(Deposit({ from: msg.sender, value: msg.value }));
}
function depositsLength() external view returns (uint256) {
return deposits.length;
}
function lastDeposit() external view returns (Deposit memory) {
require(deposits.length > 0, "No deposits made");
return deposits[deposits.length - 1];
}
function requestWithdrawal(uint256) external returns (uint256 requestId) {
return nextRequestId++;
}
}