Skip to content

Commit

Permalink
style: prettify
Browse files Browse the repository at this point in the history
  • Loading branch information
superical committed Mar 25, 2024
1 parent 92bcb59 commit 54717b4
Show file tree
Hide file tree
Showing 14 changed files with 30 additions and 30 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Document Store

The [Document Store](https://github.com/Open-Attestation/document-store) repository contains the following:
The [Document Store](https://github.com/Open-Attestation/document-store) repository contains the following:

* The smart contract code for document store in the `/contracts` folder
* The node package for using this library in the `/src` folder
- The smart contract code for document store in the `/contracts` folder
- The node package for using this library in the `/src` folder

## Installation

Expand All @@ -19,9 +19,9 @@ npm i @govtechsg/document-store

Provide one of the following depending on your needs:

* To use the package, provide your own Web3 [provider](https://docs.ethers.io/v5/api/providers/api-providers/).
- To use the package, provide your own Web3 [provider](https://docs.ethers.io/v5/api/providers/api-providers/).

* To write to the blockchain, provide the [signer](https://docs.ethers.io/v5/api/signer/#Wallet) instead.
- To write to the blockchain, provide the [signer](https://docs.ethers.io/v5/api/signer/#Wallet) instead.

### Deploying a new document store

Expand Down
8 changes: 4 additions & 4 deletions script/DeployBase.s.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity >=0.8.23 <0.9.0;

import {Script} from "forge-std/Script.sol";
import {console2} from "forge-std/console2.sol";
import { Script } from "forge-std/Script.sol";
import { console2 } from "forge-std/console2.sol";

Check warning on line 5 in script/DeployBase.s.sol

View workflow job for this annotation

GitHub Actions / Linters / Code Lint

imported name console2 is not used

abstract contract DeployBaseScript is Script {
address internal constant FACTORY = 0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed;
Expand All @@ -14,7 +14,7 @@ abstract contract DeployBaseScript is Script {
}

function getSaltEntropy(string memory entropyName) internal view returns (bytes11) {
bytes11 entropy = bytes11(vm.envOr({name: entropyName, defaultValue: bytes("")}));
bytes11 entropy = bytes11(vm.envOr({ name: entropyName, defaultValue: bytes("") }));
require(entropy != bytes11(0), "Salt entropy not set");

Check warning on line 18 in script/DeployBase.s.sol

View workflow job for this annotation

GitHub Actions / Linters / Code Lint

Use Custom Errors instead of require statements

return entropy;
Expand All @@ -23,7 +23,7 @@ abstract contract DeployBaseScript is Script {
function getSalt(bytes11 entropy) internal view returns (bytes32 salt) {
require(entropy != bytes11(0), "Salt entropy not be zero");

Check warning on line 24 in script/DeployBase.s.sol

View workflow job for this annotation

GitHub Actions / Linters / Code Lint

Use Custom Errors instead of require statements

address deployer = vm.envOr({name: "DEPLOYER_ADDRESS", defaultValue: address(0)});
address deployer = vm.envOr({ name: "DEPLOYER_ADDRESS", defaultValue: address(0) });
require(deployer != address(0), "Deployer address not set");

Check warning on line 27 in script/DeployBase.s.sol

View workflow job for this annotation

GitHub Actions / Linters / Code Lint

Use Custom Errors instead of require statements

bytes20 deployerBytes = bytes20(deployer);
Expand Down
4 changes: 2 additions & 2 deletions script/DocumentStore.s.sol
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity >=0.8.23 <0.9.0;

import {console2} from "forge-std/console2.sol";
import { console2 } from "forge-std/console2.sol";

import {DocumentStoreDeployScript} from "./DeployBase.s.sol";
import { DocumentStoreDeployScript } from "./DeployBase.s.sol";
import "../src/DocumentStore.sol";

contract DocumentStoreScript is DocumentStoreDeployScript {
Expand Down
2 changes: 1 addition & 1 deletion script/DocumentStoreInitializable.s.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity >=0.8.23 <0.9.0;

import {DocumentStoreDeployScript} from "./DeployBase.s.sol";
import { DocumentStoreDeployScript } from "./DeployBase.s.sol";
import "../src/initializables/DocumentStoreInitializable.sol";

contract DocumentStoreInitializableScript is DocumentStoreDeployScript {
Expand Down
6 changes: 3 additions & 3 deletions script/DocumentStoreUpgradeable.s.sol
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity >=0.8.23 <0.9.0;

import {console2} from "forge-std/console2.sol";
import { console2 } from "forge-std/console2.sol";

import {DocumentStoreDeployScript} from "./DeployBase.s.sol";
import {DeployUtils} from "../src/libraries/DeployUtils.sol";
import { DocumentStoreDeployScript } from "./DeployBase.s.sol";
import { DeployUtils } from "../src/libraries/DeployUtils.sol";
import "../src/upgradeables/DocumentStoreUpgradeable.sol";

contract DocumentStoreUpgradeableScript is DocumentStoreDeployScript {
Expand Down
4 changes: 2 additions & 2 deletions script/OwnableDocumentStore.s.sol
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity >=0.8.23 <0.9.0;

import {console2} from "forge-std/console2.sol";
import { console2 } from "forge-std/console2.sol";

import {OwnableDocumentStoreDeployScript} from "./DeployBase.s.sol";
import { OwnableDocumentStoreDeployScript } from "./DeployBase.s.sol";
import "../src/OwnableDocumentStore.sol";

contract OwnableDocumentStoreScript is OwnableDocumentStoreDeployScript {
Expand Down
2 changes: 1 addition & 1 deletion script/OwnableDocumentStoreInitializable.s.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity >=0.8.23 <0.9.0;

import {OwnableDocumentStoreDeployScript} from "./DeployBase.s.sol";
import { OwnableDocumentStoreDeployScript } from "./DeployBase.s.sol";
import "../src/initializables/OwnableDocumentStoreInitializable.sol";

contract OwnableDocumentStoreInitializableScript is OwnableDocumentStoreDeployScript {
Expand Down
6 changes: 3 additions & 3 deletions script/OwnableDocumentStoreUpgradeable.s.sol
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity >=0.8.23 <0.9.0;

import {console2} from "forge-std/console2.sol";
import { console2 } from "forge-std/console2.sol";

import {OwnableDocumentStoreDeployScript} from "./DeployBase.s.sol";
import {DeployUtils} from "../src/libraries/DeployUtils.sol";
import { OwnableDocumentStoreDeployScript } from "./DeployBase.s.sol";
import { DeployUtils } from "../src/libraries/DeployUtils.sol";
import "../src/upgradeables/OwnableDocumentStoreUpgradeable.sol";

contract OwnableDocumentStoreUpgradeableScript is OwnableDocumentStoreDeployScript {
Expand Down
2 changes: 1 addition & 1 deletion src/base/BaseOwnableDocumentStore.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
pragma solidity >=0.8.23 <0.9.0;

import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";
import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
import { Strings } from "@openzeppelin/contracts/utils/Strings.sol";

import "../base/DocumentStoreAccessControl.sol";
import "../interfaces/IOwnableDocumentStore.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/DocumentStore.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity >=0.8.23 <0.9.0;

import "forge-std/Test.sol";
import {console2} from "forge-std/console2.sol";
import { console2 } from "forge-std/console2.sol";
import "@openzeppelin/contracts/access/IAccessControl.sol";

import "../src/DocumentStore.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/DocumentStoreBatchable.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity >=0.8.23 <0.9.0;

import "forge-std/Test.sol";
import {console2} from "forge-std/console2.sol";
import { console2 } from "forge-std/console2.sol";
import "@openzeppelin/contracts/access/IAccessControl.sol";

import "../src/DocumentStore.sol";
Expand Down
4 changes: 2 additions & 2 deletions test/DocumentStoreUpgradeable.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ pragma solidity >=0.8.23 <0.9.0;
import "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol";

import "../src/upgradeables/DocumentStoreUpgradeable.sol";
import {CommonTest} from "./CommonTest.t.sol";
import {DeployUtils} from "../src/libraries/DeployUtils.sol";
import { CommonTest } from "./CommonTest.t.sol";
import { DeployUtils } from "../src/libraries/DeployUtils.sol";

contract DocumentStoreUpgradeable_Test is CommonTest {
DocumentStoreUpgradeable public dsProxy;
Expand Down
4 changes: 2 additions & 2 deletions test/OwnableDocumentStore.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
pragma solidity >=0.8.23 <0.9.0;

import "forge-std/Test.sol";
import {console2} from "forge-std/console2.sol";
import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
import { console2 } from "forge-std/console2.sol";
import { Strings } from "@openzeppelin/contracts/utils/Strings.sol";

import "./CommonTest.t.sol";

Expand Down
4 changes: 2 additions & 2 deletions test/OwnableDocumentStoreUpgradeable.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ pragma solidity >=0.8.23 <0.9.0;
import "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol";

import "../src/upgradeables/OwnableDocumentStoreUpgradeable.sol";
import {CommonTest} from "./CommonTest.t.sol";
import {DeployUtils} from "../src/libraries/DeployUtils.sol";
import { CommonTest } from "./CommonTest.t.sol";
import { DeployUtils } from "../src/libraries/DeployUtils.sol";

contract OwnableDocumentStoreUpgradeable_Test is CommonTest {
OwnableDocumentStoreUpgradeable public dsProxy;
Expand Down

0 comments on commit 54717b4

Please sign in to comment.