Skip to content

Commit

Permalink
refactor: user-based contracts
Browse files Browse the repository at this point in the history
perf: repo readme
  • Loading branch information
Emmanuel Joseph (JET) committed Oct 2, 2024
1 parent ec43128 commit e7703aa
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 20 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,20 @@ An open-source, enterprise-grade Multi-Signature Vault smart contract developed

## Features

- Multi-signature functionality with flexible threshold settings.
- Separate timelocks for transactions and owner overrides.
- Multi-Signature Vault functionality to manage **ETH** and **ERC20** tokens.
- Separate timelocks for transactions and owner overrides with delays.
- Role-based access control (Owner, Executor, Signers).
- Secure self-destruct mechanism with safety checks.
- Flexible and administrative threshold settings.

## Use Cases

The MultiSigEnterpriseVault is ideal for:

- **Enterprise Teams**: Organizations that require multiple approvals before executing high-value transactions, ensuring decentralized control.
- **DAOs (Decentralised Autonomous Organizations)**: Enables decentralized decision-making with threshold-based approvals for critical actions.
- **Family or Joint Accounts**: Multiple signatories can manage shared assets securely with transaction approval mechanisms.
- **Fund Custodians**: Securely manage pooled funds with transaction timelock to prevent unilateral decisions.

## Getting Started

Expand Down
2 changes: 1 addition & 1 deletion src/components/MultiSigTransaction.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {SafeERC20} from '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol
import {IMultiSigTransaction} from '../interfaces/IMultiSigTransaction.sol';
import {Transaction} from '../utilities/VaultStructs.sol';
import {ArraysUtils} from '../libraries/ArraysUtils.sol';
import {User} from './User.sol';
import {User} from './user/User.sol';

/**
* @title MultiSigTransaction
Expand Down
12 changes: 6 additions & 6 deletions src/components/User.sol → src/components/user/User.sol
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.27;

import '../libraries/Counters.sol';
import '../utilities/VaultConstants.sol';
import {IUser} from '../interfaces/IUser.sol';
import '../../libraries/Counters.sol';
import '../../utilities/VaultConstants.sol';
import {OwnerRole} from './roles/OwnerRole.sol';
import {SignerRole} from './roles/SignerRole.sol';
import {RoleType} from '../utilities/VaultEnums.sol';
import {ExecutorRole} from './roles/ExecutorRole.sol';
import {UserProfile} from '../utilities/VaultStructs.sol';
import {AddressUtils} from '../libraries/AddressUtils.sol';
import {IUser} from '../../interfaces/user/IUser.sol';
import {RoleType} from '../../utilities/VaultEnums.sol';
import {UserProfile} from '../../utilities/VaultStructs.sol';
import {AddressUtils} from '../../libraries/AddressUtils.sol';

/**
* @title User Contract
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
pragma solidity ^0.8.27;

import {AccessControl} from '@openzeppelin/contracts/access/AccessControl.sol';
import {IExecutorRole} from '../../interfaces/roles/IExecutorRole.sol';
import {AddressUtils} from '../../libraries/AddressUtils.sol';
import {SafeMath} from '../../libraries/SafeMath.sol';
import '../../utilities/VaultConstants.sol';
import {IExecutorRole} from '../../../interfaces/user/roles/IExecutorRole.sol';
import {AddressUtils} from '../../../libraries/AddressUtils.sol';
import {SafeMath} from '../../../libraries/SafeMath.sol';
import '../../../utilities/VaultConstants.sol';

/**
* @title Executor Role Contract
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
pragma solidity ^0.8.27;

import {AccessControl} from '@openzeppelin/contracts/access/AccessControl.sol';
import {IOwnerRole} from '../../interfaces/roles/IOwnerRole.sol';
import {OWNER_ROLE} from '../../utilities/VaultConstants.sol';
import {IOwnerRole} from '../../../interfaces/user/roles/IOwnerRole.sol';
import {OWNER_ROLE} from '../../../utilities/VaultConstants.sol';

/**
* @title Owner Role Contract
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
pragma solidity ^0.8.27;

import {AccessControl} from '@openzeppelin/contracts/access/AccessControl.sol';
import {SIGNER_ROLE, OWNER_ROLE} from '../../utilities/VaultConstants.sol';
import {ISignerRole} from '../../interfaces/roles/ISignerRole.sol';
import {AddressUtils} from '../../libraries/AddressUtils.sol';
import {ArraysUtils} from '../../libraries/ArraysUtils.sol';
import '../../libraries/Counters.sol';
import {SIGNER_ROLE, OWNER_ROLE} from '../../../utilities/VaultConstants.sol';
import {ISignerRole} from '../../../interfaces/user/roles/ISignerRole.sol';
import {AddressUtils} from '../../../libraries/AddressUtils.sol';
import {ArraysUtils} from '../../../libraries/ArraysUtils.sol';
import '../../../libraries/Counters.sol';

/**
* @title Signer Role Contract
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit e7703aa

Please sign in to comment.