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

Bot releases are hidden (Show)

T-REX - 4.0.0

Published by Joachim-Lebrun over 1 year ago

TREX v4 release

Version 4.0.0 of TREX has been successfully audited by Hacken more details here

Breaking changes

  • Token Interface :
    • transferOwnershipOnTokenContract() function was removed and cannot be called anymore, call transferOwnership() instead, the function was a duplicate of transferOwnership() and was removed to simplify the interface and increase coherence.
    • addAgentOnTokenContract() function was removed and cannot be called anymore, call addAgent() instead, the function was a duplicate of addAgent() and was removed to simplify the interface and increase coherence.
    • removeAgentOnTokenContract() function was removed and cannot be called anymore, call removeAgent() instead, the function was a duplicate of removeAgent() and was removed to simplify the interface and increase coherence.
  • Identity Registry Interface :
    • transferOwnershipOnIdentityRegistryContract() function was removed and cannot be called anymore, call transferOwnership() instead, the function was a duplicate of transferOwnership() and was removed to simplify the interface and increase coherence.
    • addAgentOnIdentityRegistryContract() function was removed and cannot be called anymore, call addAgent() instead, the function was a duplicate of addAgent() and was removed to simplify the interface and increase coherence.
    • removeAgentOnIdentityRegistryContract() function was removed and cannot be called anymore, call removeAgent() instead, the function was a duplicate of removeAgent() and was removed to simplify the interface and increase coherence.
  • Identity Registry Storage Interface :
    • transferOwnershipOnIdentityRegistryStorage() function was removed and cannot be called anymore, call transferOwnership() instead, the function was a duplicate of transferOwnership() and was removed to simplify the interface and increase coherence.
  • Trusted Issuers Registry Interface :
    • transferOwnershipOnIssuersRegistryContract() function was removed and cannot be called anymore, call transferOwnership() instead, the function was a duplicate of transferOwnership() and was removed to simplify the interface and increase coherence.
  • Claim Topics Registry Interface :
    • transferOwnershipOnClaimTopicsRegistryContract() function was removed and cannot be called anymore, call transferOwnership() instead, the function was a duplicate of transferOwnership() and was removed to simplify the interface and increase coherence.
  • Compliance Interface :
    • Compliance contract becomes Modular Compliance, the features used by legacy compliance contracts have to be translated under the form of modules.
    • TokenAgentAdded event was removed from the interface, as there is no more need to add the Token agent list on the compliance contract, the new compliance, in v4, is capable to fetch directly the list of Token agents from the Token smart contract, without any need to store that list in its own memory.
    • TokenAgentRemoved event was removed from the interface, for the same reason as TokenAgentAdded.
    • transferOwnershipOnComplianceContract() function was removed and cannot be called anymore, call transferOwnership() instead, the function was a duplicate of transferOwnership() and was removed to simplify the interface and increase coherence.
    • addTokenAgent() function was removed and cannot be called anymore, the new compliance, in v4, is capable of fetching directly the list of Token agents from the Token smart contract, without any need to store that list in its own memory.
    • removeTokenAgent() function was removed and cannot be called anymore, the new compliance, in v4, is capable of fetching directly the list of Token agents from the Token smart contract, without any need to store that list in its own memory.
    • isTokenBound() function was removed from the interface, as there is only one token bound to a compliance contract, the existence of a function such as isTokenBound() was not necessary, the preferred option was to provide a getter, getTokenBound(), for the token address bound to the compliance instead.
    • tokenBound is no longer a public variable and has to be accessed by its getter, getTokenBound()

Update

  • TREXImplementationAuthority has been modified to allow token issuers to change the ImplementationAuthority to
    manage it by themselves, the interfaces and implementation of the contract changed, but the functions used by the
    proxies to fetch the implementation contracts addresses remain the same.
  • The change of TREXImplementationAuthority has to follow rules to ensure safety of the migration, these rules are
    enforced by smart contracts directly onchain. Tokeny's IA contract is the reference contract, other IA contracts
    are considered as auxiliary contracts and can only update implementations to the versions of implementation
    contracts listed on the reference IA by Tokeny, this is done to ensure security of the deployed tokens and prevent
    any malicious use of the upgradeability functions.
  • a factory contract has been added, to deploy new TREXImplementationAuthority smart contracts, only the IA
    contracts deployed by that factory or the reference IA are allowed to be used by TREX contracts, it is not
    possible to come with your own implementation of the TREXImplementationAuthority contract and use it for contracts
    already deployed by the TREX factory.
  • TREX Factory Contract has been added to the repository, this contract allows to deploy and set TREX tokens in 1 single transaction (deploys all contracts, initialize them and complete settings of contracts)
  • Trusted Issuers Registry Storage now maintains a mapping of truster issuers addresses allowed for a given claim topic.
    • This means adding/removing/updating a trusted issuer now cost more gas (especially removing and updating when removing topics).
  • Trusted Issuers Registry now implements a getTrustedIssuersForClaimTopic(uint256 claimTopic) method to query trusted issuers allowed for a given claim topic.
  • Identity Registry isVerified method now takes advantage of the new getTrustedIssuersForClaimTopic.
    • Verifying an identity should now cost less gas, as the registry now only attempts to fetch claims that would be allowed.
    • Identity can therefore no longer be blocked because it contains too many claims of a given topic.
  • update solhint and adapt all contracts to the standards
  • Modular Compliance, new functions and events :
    • ModuleAdded event was added to the interface, as the compliance contract becomes modular, this event is used to track the list of Modules added to a Modular compliance contract.
    • ModuleRemoved event was added to the interface, as the compliance contract becomes modular, this event is used to track the list of Modules removed from a Modular compliance contract.
    • ModuleInteraction event was added to the interface, this event is used to track all interactions done with bound modules and is emitted by the callModuleFunction() function.
    • getTokenBound() function was added to the interface, to help standardize the contract, the previously public variable tokenBound was set as private and this getter was added to retrieve the bound token address.
    • addModule() function was added to the interface, as part of the modularization of the compliance contract. This function allows you to add/bind a new module to the compliance.
    • removeModule() function was added to the interface, as part of the modularization of the compliance contract. This function allows you to remove/unbind a module previously added to the compliance.
    • callModuleFunction() function was added to the interface, as part of the modularization of the compliance contract. This function allows you to interact with any bound module.
    • getModules() function was added to the interface, as part of the modularization of the compliance contract. This function allows you to fetch the list of Modules currently bound to the Modular Compliance Contract
    • isModuleBound() function was added to the interface, as part of the modularization of the compliance contract. This function allows you to check if a module is bound or not to the Compliance Contract.
  • updated licenses from 2021 to 2022
  • All contracts proxification
  • Lint all contracts following best practices for smart contract development, update of solhint file to automate checks regarding this
  • Complete NatSpec for all functions and events

Fix

  • Update storage slot for ImplementationAuthority address on proxy contract to avoid storage collision
T-REX - 3.5.2

Published by Joachim-Lebrun almost 2 years ago

Update

  • testing multiple calls to init function
  • proxy implements Initializable from OpenZeppelin

Fix

  • bug related to Initializable library was allowing multiple calls on init function as the initializer modifier was not working properly
  • Double spdx identifier on ClaimTopicsRegistry.sol
T-REX - 4.0.0-beta1

Published by Joachim-Lebrun almost 2 years ago

beta release of TREX-v4

T-REX - 3.5.1

Published by Joachim-Lebrun about 3 years ago

  • fixed an issue on identity registry
T-REX - 3.5.0

Published by Joachim-Lebrun about 3 years ago

  • solidity 0.8.0
  • dvd transfers
  • full permissioning
  • fix tests
  • fix imports
  • update dependencies
T-REX - 3.4.0-beta4

Published by Joachim-Lebrun over 3 years ago

  • add nonce to DVD transfer ID to allow parallel identical transactions
T-REX - 3.4.0-beta3

Published by Joachim-Lebrun over 3 years ago

same as beta2 + exports of contracts for use in sdk

T-REX - 3.4.0-beta2

Published by Joachim-Lebrun over 3 years ago

  • permissioning contracts
  • DVD contracts
  • removed bugs introduced in the pre release script
T-REX - 3.4.0-beta1

Published by Joachim-Lebrun over 3 years ago

  • add DVD transfers contracts
  • modify permissioning contracts
T-REX - 3.3.0 - Proxies

Published by Nakasar over 3 years ago

  • Add proxies for Token and upgreadability.
T-REX - 3.2.0

Published by Joachim-Lebrun over 4 years ago

  • add bindToken and unbindToken functions on Compliance
  • add addTokenAgent and removeTokenAgent functions on Compliance
  • add getters for bound tokens and token agents on Compliance
  • test the new standard functions of compliance
T-REX - 3.2.0-beta1

Published by Joachim-Lebrun over 4 years ago

  • add bindToken and unbindToken functions on Compliance
  • add addTokenAgent and removeTokenAgent functions on Compliance
  • add getters for bound tokens and token agents on Compliance
  • test the new standard functions of compliance
T-REX - 3.1.0

Published by Nakasar over 4 years ago

  • Updated contract version.
  • Fixed CI publication action.
T-REX - 3.0.0

Published by Joachim-Lebrun over 4 years ago

T-REX - 2.5.1

Published by Nakasar over 4 years ago

T-REX - 3.0.0-beta5

Published by Joachim-Lebrun over 4 years ago

changed UnPaused event to Unpaused to match with v2

T-REX - 3.0.0-beta4

Published by Aboudjem over 4 years ago

Update T-REX

  • Removed version from constructor

  • Hardcoded "Version" Into the Constructor

  • Update tests

Co-authored-by: Adam BOUDJEMAA [email protected]

T-REX - 3.0.0-beta3

Published by Nakasar over 4 years ago

T-REX - 3.0.0-beta2

Published by Nakasar over 4 years ago

T-REX - 3.0.0-beta1

Published by Nakasar over 4 years ago