Skip to content

Merge celestia-feat-stateless-batcher to celestia integration #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: celestia-integration
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ optimizer = true
optimizer_runs = 1
via_ir = true
solc_version = '0.8.25'
evm_version = 'cancun'
fs_permissions = [{ access = "read", path = "./"}]
remappings = ['ds-test/=lib/forge-std/lib/ds-test/src/',
'forge-std/=lib/forge-std/src/',
Expand All @@ -25,4 +26,4 @@ auto_detect_remappings = false
[fmt]
number_underscore = 'thousands'
line_length = 100
# See more config options https://github.com/foundry-rs/foundry/tree/master/config
# See more config options https://github.com/foundry-rs/foundry/tree/master/config
27 changes: 22 additions & 5 deletions src/mocks/EspressoTEEVerifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,29 @@ pragma solidity ^0.8.0;
*/

contract EspressoTEEVerifierMock {
enum TeeType {
SGX
}
mapping(address => bool) public registeredSigner;
constructor() {}

function verify(
bytes calldata rawQuote,
bytes32 reportDataHash
) external view returns (bool success) {
return (true);
function verify(bytes calldata signature, bytes32 userDataHash) external {
return;
}

function registerSigner(
bytes calldata attestation,
bytes calldata data,
TeeType teeType
) external {
// data length should be 20 bytes
require(data.length == 20, "Invalid data length");

address signer = address(uint160(bytes20(data[:20])));
registeredSigner[signer] = true;
}

function registeredSigners(address signer, TeeType teeType) external view returns (bool) {
return registeredSigner[signer];
}
}
2 changes: 1 addition & 1 deletion test/foundry/Inbox.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ contract InboxTest is AbsInboxTest {
uint256 userEthBalanceBefore = address(user).balance;

// deposit too many eth shall fail
// TODO: Fix test
// vm.prank(user);
// TODO: Fix this test
// uint256 invalidDepositAmount = 300 ether;
// vm.expectRevert();
// ethInbox.depositEth{value: invalidDepositAmount}();
Expand Down
Loading