Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
ferranbt committed Jan 17, 2024
1 parent 099f514 commit 9dee511
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,28 @@ contract TestForge is Test, SuaveEnabled {
}
}
```

### Confidential inputs

Use the `setConfidentialInputs` function to set the confidential inputs during tests.

```solidity
// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.13;
import "forge-std/Test.sol";
import "src/Test.sol";
import "src/suavelib/Suave.sol";
contract TestForge is Test, SuaveEnabled {
function testConfidentialInputs() public {
bytes memory input = hex"abcd";
setConfidentialInputs(input);
bytes memory found2 = Suave.confidentialInputs();
assertEq0(input, found2);
}
}
```

The value for the confidential inputs gets reset for each test.

0 comments on commit 9dee511

Please sign in to comment.