Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
AndriianChestnykh committed Nov 12, 2024
1 parent d21320b commit 02c8578
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions contracts/verifiers/NewVerifierRnD.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.10;

contract NewVerifierRnD {

function setInvokeRequest(
uint256 invokeRequestId, // "id": "f8aee09d-f592-4fcc-8d2a-8938aa26676c",
string conditionString, // (1 || 2) && 3 && (100 || 101 || 102)
string[] memory linkedSignalNames, // ["linkID", "userID"]
uint256[][] memory linkedRequestIds, // [[1,2,3], [1,2,100,101,102]] // is AND logic only flexible enough?
) {

}

struct Request {
string metadata;
IValidator validator;
bytes data; // proof parameters: ZK groth16, plonk, ESDSA, EIP712, etc.
}

function setRequest(
uint256 requestId,
Request calldata request
) {
}

// ASTNode data structures, which we create for every invoke request

struct ASTNode {
uint256 left; // can be empty, (== 0)
uint256 right; // can be empty, (== 0)
uint256 operation; // can be empty(0) if left and right is empty (0)
uint256 value; // can be empty, if operation is not empty
}

mapping(uint256 id => ASTNode) astNodes;
uint256 rootASTNode;
}


// TODO check if signal is not too specific

0 comments on commit 02c8578

Please sign in to comment.