Skip to content

Commit bcfaf40

Browse files
committed
chore: documentation, and deploy
1 parent 963c414 commit bcfaf40

4 files changed

Lines changed: 14 additions & 74 deletions

File tree

README.md

Lines changed: 3 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,6 @@
1-
## Foundry
1+
## Pluto Onchain Verifier
22

3-
**Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.**
3+
This is a simple contract that verifies signatures from a given notary.
44

5-
Foundry consists of:
5+
The contract is deployed on Base Sepolia at
66

7-
- **Forge**: Ethereum testing framework (like Truffle, Hardhat and DappTools).
8-
- **Cast**: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data.
9-
- **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network.
10-
- **Chisel**: Fast, utilitarian, and verbose solidity REPL.
11-
12-
## Documentation
13-
14-
https://book.getfoundry.sh/
15-
16-
## Usage
17-
18-
### Build
19-
20-
```shell
21-
$ forge build
22-
```
23-
24-
### Test
25-
26-
```shell
27-
$ forge test
28-
```
29-
30-
### Format
31-
32-
```shell
33-
$ forge fmt
34-
```
35-
36-
### Gas Snapshots
37-
38-
```shell
39-
$ forge snapshot
40-
```
41-
42-
### Anvil
43-
44-
```shell
45-
$ anvil
46-
```
47-
48-
### Deploy
49-
50-
```shell
51-
$ forge script script/Counter.s.sol:CounterScript --rpc-url <your_rpc_url> --private-key <your_private_key>
52-
```
53-
54-
### Cast
55-
56-
```shell
57-
$ cast <subcommand>
58-
```
59-
60-
### Help
61-
62-
```shell
63-
$ forge --help
64-
$ anvil --help
65-
$ cast --help
66-
```

script/SignatureChecker.s.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
pragma solidity ^0.8.13;
33

44
import {Script, console} from "forge-std/Script.sol";
5-
import {SignatureChecker} from "../src/SignatureChecker.sol";
5+
import {Verifier} from "../src/Verifier.sol";
66

7-
contract SignatureCheckerScript is Script {
8-
SignatureChecker public signatureChecker;
7+
contract VerifierScript is Script {
8+
Verifier public verifier;
99

1010
function setUp() public {}
1111

1212
function run() public {
1313
vm.startBroadcast();
1414

15-
signatureChecker = new SignatureChecker(0xfdf07A5dCfa7b74f4c28DAb23eaD8B1c43Be801F);
15+
verifier = new Verifier(0xfdf07A5dCfa7b74f4c28DAb23eaD8B1c43Be801F);
1616

1717
vm.stopBroadcast();
1818
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ pragma solidity ^0.8.20;
33

44
import "@openzeppelin/contracts/access/Ownable.sol";
55

6-
/// @title SignatureChecker
6+
/// @title Verifier
77
/// @notice A contract that verifies signatures
8-
contract SignatureChecker is Ownable {
8+
contract Verifier is Ownable {
99
/// @notice Mapping of notary addresses to their validity
1010
mapping(address => bool) public isNotary;
1111

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
pragma solidity ^0.8.13;
33

44
import {Test, console} from "forge-std/Test.sol";
5-
import {SignatureChecker} from "../src/SignatureChecker.sol";
5+
import {Verifier} from "../src/Verifier.sol";
66

7-
contract SignatureCheckerTest is Test {
8-
SignatureChecker public signatureChecker;
7+
contract VerifierTest is Test {
8+
Verifier public verifier;
99

1010
function setUp() public {
11-
signatureChecker = new SignatureChecker(0xfdf07A5dCfa7b74f4c28DAb23eaD8B1c43Be801F);
11+
verifier = new Verifier(0xfdf07A5dCfa7b74f4c28DAb23eaD8B1c43Be801F);
1212
}
1313

1414
function test_isValidSignature() public {
@@ -22,6 +22,6 @@ contract SignatureCheckerTest is Test {
2222
bytes32 value = 0x8452c9b9140222b08593a26daa782707297be9f7b3e8281d7b4974769f19afd0;
2323
bytes32 manifest = 0x7df909980a1642d0370a4a510422201ce525da6b319a7b9e9656771fa7336d5a;
2424

25-
assertEq(signatureChecker.verifyNotarySignature(digest, v, r, s, signer, manifest, value), true);
25+
assertEq(verifier.verifyNotarySignature(digest, v, r, s, signer, manifest, value), true);
2626
}
2727
}

0 commit comments

Comments
 (0)