T-REX

T-REX is a suite of smart contracts implementing the EIP 3643 and developed by Tokeny to manage and transfer financial assets on EVM blockchains

GPL-3.0 License

Downloads
1K
Stars
189
Committers
8
T-REX - 4.1.5 Latest Release

Published by Joachim-Lebrun about 1 month ago

patch compliance module maxBalanceModule

T-REX - 4.1.5-beta1

Published by aliarbak 7 months ago

T-REX - 4.1.4

Published by Joachim-Lebrun 7 months ago

[4.1.4]

Added

  • Introduced AbstractModuleUpgradeable: Enables compliance modules to be compatible with ERC-1967 and ERC-1822 standards.
  • Introduced ModuleProxy: ERC-1967 compliant proxy contract for Upgradeable compliance modules.

Update

  • Upgraded all compliance modules to inherit from AbstractModuleUpgradeable and made them Upgradeable.
T-REX - 4.2.0-beta1

Published by aliarbak 8 months ago

T-REX - 4.1.3

Published by Joachim-Lebrun 8 months ago

Update

  • AbstractProxy: updated the storage slot for TREXImplementationAuthority from
    0xc5f16f0fcc639fa48a6947836d9850f504798523bf8c9a3a87d5876cf622bcf7 to
    0x821f3e4d3d679f19eacc940c87acf846ea6eae24a63058ea750304437a62aafc to avoid issues with blockchain explorers
    confusing the proxy pattern of T-REX for an ERC-1822 proxy (old storage slot was the slot used by ERC-1822) which
    caused errors in displaying the right ABIs for proxies using this implementation.
T-REX - 4.1.2

Published by aliarbak 10 months ago

[4.1.2]

  • Compliance Modules:
    • Removed _compliance parameter from setSupplyLimit function of the SupplyLimitModule
T-REX - 4.1.2-beta1

Published by aliarbak 10 months ago

T-REX - 4.1.1 - TREX Gateway and new modules, DvA

Published by Nakasar 12 months ago

[4.1.1]

Breaking Changes

  • TREXFactory Constructor: Now requires the address of the Identity Factory.
    • Reason: The Identity Factory is used to deploy ONCHAINIDs for tokens.

Added

  • Compliance Modules:

    • Introduced Supply Limit Module: Restricts minting tokens beyond a specified limit.
    • Introduced Time Transfers Limits: Prevents holders from transferring tokens beyond a set limit within a specified timeframe.
    • Introduced Max Balance Module: Ensures an individual holder doesn't exceed a certain percentage of the total supply.
    • Added two exchange-specific modules:
      • Time Exchange Limits: Limits token transfers on trusted exchanges within a set timeframe.
      • Monthly Exchange Limits: Restricts the amount of tokens that can be transferred on trusted exchanges each month.
    • Introduced Transfer Fees : Collects fees from transfers (issuers determine fee rates).
  • IModule Enhancement:

    • Added a new function: function name() external pure returns (string memory _name);. This mandates all compliance modules to declare a constant variable, e.g., function name() public pure returns (string memory _name) { return "CountryRestrictModule"; }.
    • New function isPlugAndPlay: Added to the IModule interface. This function, function isPlugAndPlay() external pure returns (bool), indicates whether a compliance module can be bound without presetting. It is now mandatory for all compliance modules to declare this function.
    • New function canComplianceBind: Also added to the IModule interface. Compliance modules must implement function canComplianceBind(address _compliance) external view returns (bool), which checks if presetting is required before binding a compliance module.
  • TREXFactory Enhancements:

    • New function setIdFactory: Sets the Identity Factory responsible for deploying token ONCHAINIDs.
    • New function getIdFactory: Retrieves the address of the associated Identity Factory.
  • TREXGateway Contract:

    • Deployed as a central interface for the TREX ecosystem, facilitating various crucial operations:
      • Factory Management: Manages the Factory contract address, enabling updates and ownership transfers.
      • Public Deployment Control: Toggles the ability for public entities to deploy TREX contracts, enhancing security and flexibility.
      • Fee Management: Sets and adjusts deployment fee details, including amount, token type, and collector address, and enables or disables fee requirements.
      • Deployer Management: Adds or removes approved deployers and applies fee discounts, including batch operations for efficiency. Ensures streamlined deployment processes for TREX contracts.
      • Suite Deployment: Directly deploys TREX suites of contracts using provided token and claim details, with support for batch deployments. Incorporates fee collection and deployment status checks for each deployment, emphasizing security and compliance.
      • Status and Fee Queries: Provides functions to retrieve current public deployment status, Factory contract address, deployment fee details, and deployment fee status.
      • Fee Calculation: Dynamically calculates deployment fees for deployers, considering applicable discounts.
  • DvATransferManager Contract:

    • Introduced the DvATransferManager contract to streamline the process of internal fund transfers needing multi-party intermediate approvals.
      • Token owners define the transfer authorization criteria, including recipient approval, agent approval, and potential additional approvers.
      • Investors submit transfer requests.
      • Approvers are empowered to either sanction or reject these requests.
      • Transfers are executed only upon receiving unanimous approval from all designated approvers.

Updates

Smart Contract Enhancements

  • TREXFactory:

    • Modified the deployTREXSuite function to now auto-deploy a Token ONCHAINID if it's not already available (i.e., if the onchainid address in _tokenDetails is the zero address).
  • ModularCompliance:

    • Updated the addModule function to invoke the new isPlugAndPlay and canComplianceBind functions, ensuring compatibility checks before binding any compliance module.

Code Quality Improvements

  • Enhanced the GitHub Actions workflow by adding TypeScript linting (lint:ts) for test files, ensuring higher code quality and adherence to coding standards.
  • Executed a comprehensive linting pass on all test files, addressing and resolving any linting issues. This ensures a consistent code style and improved readability across the test suite.
  • Updated the push_checking.yml GitHub Actions workflow to include automatic TypeScript linting checks on pull requests. This addition enforces coding standards and helps maintain high-quality code submissions from all contributors.
T-REX - V 4.1.0

Published by Joachim-Lebrun 12 months ago

[4.1.0]

Breaking Changes

  • TREXFactory Constructor: Now requires the address of the Identity Factory.
    • Reason: The Identity Factory is used to deploy ONCHAINIDs for tokens.

Added

  • Compliance Modules:

    • Introduced Supply Limit Module: Restricts minting tokens beyond a specified limit.
    • Introduced Time Transfers Limits: Prevents holders from transferring tokens beyond a set limit within a specified timeframe.
    • Introduced Max Balance Module: Ensures an individual holder doesn't exceed a certain percentage of the total supply.
    • Added two exchange-specific modules:
      • Time Exchange Limits: Limits token transfers on trusted exchanges within a set timeframe.
      • Monthly Exchange Limits: Restricts the amount of tokens that can be transferred on trusted exchanges each month.
    • Introduced Transfer Fees : Collects fees from transfers (issuers determine fee rates).
  • IModule Enhancement:

    • Added a new function: function name() external pure returns (string memory _name);. This mandates all compliance modules to declare a constant variable, e.g., function name() public pure returns (string memory _name) { return "CountryRestrictModule"; }.
    • New function isPlugAndPlay: Added to the IModule interface. This function, function isPlugAndPlay() external pure returns (bool), indicates whether a compliance module can be bound without presetting. It is now mandatory for all compliance modules to declare this function.
    • New function canComplianceBind: Also added to the IModule interface. Compliance modules must implement function canComplianceBind(address _compliance) external view returns (bool), which checks if presetting is required before binding a compliance module.
  • TREXFactory Enhancements:

    • New function setIdFactory: Sets the Identity Factory responsible for deploying token ONCHAINIDs.
    • New function getIdFactory: Retrieves the address of the associated Identity Factory.
  • TREXGateway Contract:

    • Deployed as a central interface for the TREX ecosystem, facilitating various crucial operations:
      • Factory Management: Manages the Factory contract address, enabling updates and ownership transfers.
      • Public Deployment Control: Toggles the ability for public entities to deploy TREX contracts, enhancing security and flexibility.
      • Fee Management: Sets and adjusts deployment fee details, including amount, token type, and collector address, and enables or disables fee requirements.
      • Deployer Management: Adds or removes approved deployers and applies fee discounts, including batch operations for efficiency. Ensures streamlined deployment processes for TREX contracts.
      • Suite Deployment: Directly deploys TREX suites of contracts using provided token and claim details, with support for batch deployments. Incorporates fee collection and deployment status checks for each deployment, emphasizing security and compliance.
      • Status and Fee Queries: Provides functions to retrieve current public deployment status, Factory contract address, deployment fee details, and deployment fee status.
      • Fee Calculation: Dynamically calculates deployment fees for deployers, considering applicable discounts.
  • DvATransferManager Contract:

    • Introduced the DvATransferManager contract to streamline the process of internal fund transfers needing multi-party intermediate approvals.
      • Token owners define the transfer authorization criteria, including recipient approval, agent approval, and potential additional approvers.
      • Investors submit transfer requests.
      • Approvers are empowered to either sanction or reject these requests.
      • Transfers are executed only upon receiving unanimous approval from all designated approvers.

Updates

Smart Contract Enhancements

  • TREXFactory:

    • Modified the deployTREXSuite function to now auto-deploy a Token ONCHAINID if it's not already available (i.e., if the onchainid address in _tokenDetails is the zero address).
  • ModularCompliance:

    • Updated the addModule function to invoke the new isPlugAndPlay and canComplianceBind functions, ensuring compatibility checks before binding any compliance module.

Code Quality Improvements

  • Enhanced the GitHub Actions workflow by adding TypeScript linting (lint:ts) for test files, ensuring higher code quality and adherence to coding standards.
  • Executed a comprehensive linting pass on all test files, addressing and resolving any linting issues. This ensures a consistent code style and improved readability across the test suite.
  • Updated the push_checking.yml GitHub Actions workflow to include automatic TypeScript linting checks on pull requests. This addition enforces coding standards and helps maintain high-quality code submissions from all contributors.
T-REX - 4.1.0-beta-9

Published by aliarbak 12 months ago

T-REX - 4.1.0-beta-8

Published by aliarbak 12 months ago

T-REX - 4.1.0-beta6

Published by aliarbak 12 months ago

T-REX - 4.1.0-beta5

Published by aliarbak 12 months ago

T-REX - 4.1.0-beta3

Published by aliarbak 12 months ago

T-REX - 4.1.0-beta2

Published by aliarbak 12 months ago

T-REX - 4.1.0-beta1

Published by aliarbak 12 months ago

Added

  • Implement a new compliance module Supply Limit Module that prevents minting more tokens that the specified limit.
  • Implement a new compliance module Time Transfers limits that prevents holders from transfering more token than a specified limit in a given time frame.
  • Implement a new compliance module Max Balance Module that prevents an individual holder to own more than a given percentage of the supply.
  • Implement two new compliance modules Time Exchange limits and Monthly Exchange limits that limit exchanges transfers. These are used to authorized specific trusted exchanges to hold tokens but limited to a certain amount transfered for a given time frame.
  • Add function name() external pure returns (string memory _name); to IModule. Compliance modules now require a
    function name() public pure returns (string memory _name) { return "CountryRestrictModule"; }
    constant variable to be declared.
  • DVATransferManager contract
T-REX - 4.0.1

Published by Joachim-Lebrun over 1 year ago

Version 4.0.1

All tests were rewritten using hardhat instead of truffle for optimisation and improvements (tests now properly check revert messages and emitted events).

Update in contract source:

  • Compliance module view methods no longer require the modifier onlyComplianceBound.
  • Update to version 4.0.1
  • coverage folder and coverage.json are now ignored.
  • Update module exports.
  • Action on push (link & tests) now runs coverage and uploads coverage results to action artifacts.
  • Action on pre-release and release now runs coverage and uploads coverage results to release artifacts.
  • Update the license note date to 2023 (previously 2022)
  • Remove migrations contract

Update documentation

  • README updated
  • CONTRIBUTING documentation added
  • WhitePaper pdf added
  • remove outdated documentation on transfers
T-REX - 4.0.1-beta2

Published by Nakasar over 1 year ago

All tests were rewritten using hardhat instead of truffle for optimisation and improvements (tests now properly check revert messages and emitted events).

Update in contract source:

  • Compliance module view methods no longer require the modifier onlyComplianceBound.
  • Update to version 4.0.1
  • coverage folder and coverage.json are now ignored.
  • Update module exports.
  • Action on push (link & tests) now runs coverage and uploads coverage results to action artifacts.
  • Action on pre-release and release now runs coverage and uploads coverage results to release artifacts.
T-REX - 4.0.1-beta1

Published by Nakasar over 1 year ago

Test and package with hardhat.

T-REX - 4.0.1-beta0

Published by Nakasar over 1 year ago

Test and package with hardhat.