-
Notifications
You must be signed in to change notification settings - Fork 533
Commit
…-with-no-tests feat: merge main to benefit from new deployment configs file
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.14; | ||
|
||
import {Ownable} from '@openzeppelin/contracts/access/Ownable.sol'; | ||
import {HydraS1AccountboundAttester} from '../../attesters/hydra-s1/HydraS1AccountboundAttester.sol'; | ||
import {Initializable} from '@openzeppelin/contracts/proxy/utils/Initializable.sol'; | ||
|
||
contract FrontendLib { | ||
address private immutable _hydraS1AccountboundAttester; | ||
|
||
constructor(address hydraS1AccountboundAttester) { | ||
_hydraS1AccountboundAttester = hydraS1AccountboundAttester; | ||
} | ||
|
||
function getHydraS1AccountboundAttesterDestinationOfNullifierBatch( | ||
uint256[] calldata nullifiers | ||
) external view returns (address[] memory) { | ||
address[] memory destinations = new address[](nullifiers.length); | ||
|
||
for (uint256 i = 0; i < nullifiers.length; i++) { | ||
destinations[i] = HydraS1AccountboundAttester(_hydraS1AccountboundAttester) | ||
.getDestinationOfNullifier(nullifiers[i]); | ||
} | ||
|
||
return destinations; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity ^0.8.14; | ||
|
||
import {Attestation, Request} from '../core/libs/Structs.sol'; | ||
import {Attester} from '../core/Attester.sol'; | ||
import {IAttester} from '../core/interfaces/IAttester.sol'; | ||
import {IHydraS1AccountboundAttester} from '../attesters/hydra-s1/interfaces/IHydraS1AccountboundAttester.sol'; | ||
|
||
contract MockHydraS1SimpleAttester { | ||
mapping(uint256 => address) internal _nullifiersDestinations; | ||
|
||
function getDestinationOfNullifier(uint256 nullifier) external view returns (address) { | ||
return _nullifiersDestinations[nullifier]; | ||
} | ||
|
||
function setDestinationOfNullifier(uint256 nullifier, address destination) external { | ||
_nullifiersDestinations[nullifier] = destination; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
100 |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.