Skip to content

Commit

Permalink
feat: add initialisable
Browse files Browse the repository at this point in the history
(cherry picked from commit a5a24fe43c97d00d2cb08f8755d3c0e43a2eec70)
  • Loading branch information
superical committed Mar 21, 2024
1 parent 1286caa commit 9231a0d
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/initializables/DocumentStoreInitializable.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// SPDX-License-Identifier: Apache-2.0

pragma solidity >=0.8.23 <0.9.0;

import "../base/BaseDocumentStore.sol";

/**
* @title DocumentStore
* @notice A contract for storing and revoking documents with access control
*/
contract DocumentStoreInitializable is BaseDocumentStore {
/**
* @notice Initialises the contract with a name and initial admin
*/
constructor() initializer {}

/**
* @notice Internally initialises the contract with a name and owner
* @param _name The name of the contract
* @param initAdmin The owner of the contract
*/
function initialize(string memory _name, address initAdmin) public initializer {
__BaseDocumentStore_init(_name, initAdmin);
}
}
13 changes: 13 additions & 0 deletions src/initializables/OwnableDocumentStoreInitializable.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// SPDX-License-Identifier: Apache-2.0

pragma solidity >=0.8.23 <0.9.0;

import "../base/BaseOwnableDocumentStore.sol";

contract OwnableDocumentStoreInitializable is BaseOwnableDocumentStore {
constructor() initializer {}

function initialize(string memory name_, string memory symbol_, address initAdmin) public initializer {
__OwnableDocumentStore_init(name_, symbol_, initAdmin);
}
}

0 comments on commit 9231a0d

Please sign in to comment.