Skip to content

Commit

Permalink
Use the temp fns in SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielbosio committed Sep 18, 2024
1 parent 545a1c7 commit 39607b4
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 11 deletions.
2 changes: 1 addition & 1 deletion batcher/aligned-sdk/abi/AlignedLayerServiceManager.json

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions batcher/aligned-sdk/src/sdk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,20 @@ async fn _is_proof_verified(

let service_manager = aligned_service_manager(eth_rpc_provider, contract_address).await?;

let task_created_call = service_manager.task_created_block(
aligned_verification_data.batch_merkle_root,
payment_service_addr,
);

info!("task created block: {}", task_created_call.await.unwrap());

let responded_call = service_manager.responded(
aligned_verification_data.batch_merkle_root,
payment_service_addr,
);

info!("responded: {}", responded_call.await.unwrap());

let call = service_manager.verify_batch_inclusion(
verification_data_comm.proof_commitment,
verification_data_comm.pub_input_commitment,
Expand Down
2 changes: 1 addition & 1 deletion contracts/bindings/AlignedLayerServiceManager/binding.go

Large diffs are not rendered by default.

Large diffs are not rendered by default.

15 changes: 7 additions & 8 deletions contracts/src/core/IAlignedLayerServiceManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,18 @@ pragma solidity =0.8.12;
import {IBLSSignatureChecker} from "eigenlayer-middleware/interfaces/IBLSSignatureChecker.sol";

interface IAlignedLayerServiceManager {
function createNewTask(
bytes32 batchMerkleRoot,
string calldata batchDataPointer
) external payable;
function createNewTask(bytes32 batchMerkleRoot, string calldata batchDataPointer) external payable;

// old respondToTask for smooth upgradeability:
function respondToTask(
bytes32 batchMerkleRoot,
IBLSSignatureChecker.NonSignerStakesAndSignature
memory nonSignerStakesAndSignature
IBLSSignatureChecker.NonSignerStakesAndSignature memory nonSignerStakesAndSignature
) external;

function respondToTaskV2(
bytes32 batchMerkleRoot,
address senderAddress,
IBLSSignatureChecker.NonSignerStakesAndSignature
memory nonSignerStakesAndSignature
IBLSSignatureChecker.NonSignerStakesAndSignature memory nonSignerStakesAndSignature
) external;

function verifyBatchInclusion(
Expand All @@ -35,4 +30,8 @@ interface IAlignedLayerServiceManager {
) external view returns (bool);

function balanceOf(address account) external view returns (uint256);

function taskCreatedBlock(bytes32 batchMerkleRoot, address senderAddress) external view returns (uint256);

function responded(bytes32 batchMerkleRoot, address senderAddress) external view returns (bool);
}

0 comments on commit 39607b4

Please sign in to comment.