From 54717b440e36e22f522ff90f4f9fa23e16b5be63 Mon Sep 17 00:00:00 2001 From: Seth Date: Mon, 25 Mar 2024 15:50:11 +0800 Subject: [PATCH] style: prettify --- README.md | 10 +++++----- script/DeployBase.s.sol | 8 ++++---- script/DocumentStore.s.sol | 4 ++-- script/DocumentStoreInitializable.s.sol | 2 +- script/DocumentStoreUpgradeable.s.sol | 6 +++--- script/OwnableDocumentStore.s.sol | 4 ++-- script/OwnableDocumentStoreInitializable.s.sol | 2 +- script/OwnableDocumentStoreUpgradeable.s.sol | 6 +++--- src/base/BaseOwnableDocumentStore.sol | 2 +- test/DocumentStore.t.sol | 2 +- test/DocumentStoreBatchable.t.sol | 2 +- test/DocumentStoreUpgradeable.t.sol | 4 ++-- test/OwnableDocumentStore.t.sol | 4 ++-- test/OwnableDocumentStoreUpgradeable.t.sol | 4 ++-- 14 files changed, 30 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 94f2e39..59215b0 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 diff --git a/script/DeployBase.s.sol b/script/DeployBase.s.sol index 833a4ce..2351cb0 100644 --- a/script/DeployBase.s.sol +++ b/script/DeployBase.s.sol @@ -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"; abstract contract DeployBaseScript is Script { address internal constant FACTORY = 0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed; @@ -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"); return entropy; @@ -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"); - 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"); bytes20 deployerBytes = bytes20(deployer); diff --git a/script/DocumentStore.s.sol b/script/DocumentStore.s.sol index 86b6afb..87ea64c 100644 --- a/script/DocumentStore.s.sol +++ b/script/DocumentStore.s.sol @@ -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 { diff --git a/script/DocumentStoreInitializable.s.sol b/script/DocumentStoreInitializable.s.sol index 2bcfba2..d1d6fe7 100644 --- a/script/DocumentStoreInitializable.s.sol +++ b/script/DocumentStoreInitializable.s.sol @@ -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 { diff --git a/script/DocumentStoreUpgradeable.s.sol b/script/DocumentStoreUpgradeable.s.sol index 3085d96..81008d1 100644 --- a/script/DocumentStoreUpgradeable.s.sol +++ b/script/DocumentStoreUpgradeable.s.sol @@ -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 { diff --git a/script/OwnableDocumentStore.s.sol b/script/OwnableDocumentStore.s.sol index 789bcd5..cc2446d 100644 --- a/script/OwnableDocumentStore.s.sol +++ b/script/OwnableDocumentStore.s.sol @@ -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 { diff --git a/script/OwnableDocumentStoreInitializable.s.sol b/script/OwnableDocumentStoreInitializable.s.sol index b81f082..76635a3 100644 --- a/script/OwnableDocumentStoreInitializable.s.sol +++ b/script/OwnableDocumentStoreInitializable.s.sol @@ -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 { diff --git a/script/OwnableDocumentStoreUpgradeable.s.sol b/script/OwnableDocumentStoreUpgradeable.s.sol index 0f0abb0..3ec707f 100644 --- a/script/OwnableDocumentStoreUpgradeable.s.sol +++ b/script/OwnableDocumentStoreUpgradeable.s.sol @@ -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 { diff --git a/src/base/BaseOwnableDocumentStore.sol b/src/base/BaseOwnableDocumentStore.sol index d5aecc3..a9746e9 100644 --- a/src/base/BaseOwnableDocumentStore.sol +++ b/src/base/BaseOwnableDocumentStore.sol @@ -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"; diff --git a/test/DocumentStore.t.sol b/test/DocumentStore.t.sol index 759f89b..6d3dd14 100644 --- a/test/DocumentStore.t.sol +++ b/test/DocumentStore.t.sol @@ -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"; diff --git a/test/DocumentStoreBatchable.t.sol b/test/DocumentStoreBatchable.t.sol index e28f192..5409c07 100644 --- a/test/DocumentStoreBatchable.t.sol +++ b/test/DocumentStoreBatchable.t.sol @@ -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"; diff --git a/test/DocumentStoreUpgradeable.t.sol b/test/DocumentStoreUpgradeable.t.sol index 36a8486..782933a 100644 --- a/test/DocumentStoreUpgradeable.t.sol +++ b/test/DocumentStoreUpgradeable.t.sol @@ -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; diff --git a/test/OwnableDocumentStore.t.sol b/test/OwnableDocumentStore.t.sol index 4e09ab2..a0be9bd 100644 --- a/test/OwnableDocumentStore.t.sol +++ b/test/OwnableDocumentStore.t.sol @@ -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"; diff --git a/test/OwnableDocumentStoreUpgradeable.t.sol b/test/OwnableDocumentStoreUpgradeable.t.sol index 545972b..3fdfb35 100644 --- a/test/OwnableDocumentStoreUpgradeable.t.sol +++ b/test/OwnableDocumentStoreUpgradeable.t.sol @@ -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;