@t-rex-network/t-rex 4.2.0-beta1 → 5.0.0-beta3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE.md +78 -0
- package/README.md +24 -27
- package/contracts/{roles/AgentRole.sol → ERC-3643/ERC3643ErrorsLib.sol} +60 -33
- package/contracts/ERC-3643/IERC3643.sol +61 -5
- package/contracts/ERC-3643/IERC3643ClaimTopicsRegistry.sol +11 -2
- package/contracts/ERC-3643/IERC3643Compliance.sol +21 -8
- package/contracts/ERC-3643/IERC3643IdentityRegistry.sol +33 -0
- package/contracts/ERC-3643/IERC3643IdentityRegistryStorage.sol +62 -7
- package/contracts/ERC-3643/IERC3643TrustedIssuersRegistry.sol +29 -12
- package/contracts/ERC-3643/base/ERC3643ClaimTopicsRegistry.sol +140 -0
- package/contracts/ERC-3643/base/ERC3643Compliance.sol +223 -0
- package/contracts/ERC-3643/base/ERC3643IdentityRegistry.sol +382 -0
- package/contracts/ERC-3643/base/ERC3643IdentityRegistryStorage.sol +290 -0
- package/contracts/ERC-3643/base/ERC3643Token.sol +601 -0
- package/contracts/ERC-3643/base/ERC3643TrustedIssuersRegistry.sol +237 -0
- package/contracts/compliance/modular/ComplianceLedger.sol +175 -0
- package/contracts/compliance/modular/ComplianceLedgerLib.sol +120 -0
- package/contracts/compliance/modular/IComplianceLedger.sol +104 -0
- package/contracts/compliance/modular/IModularCompliance.sol +119 -28
- package/contracts/compliance/modular/ITransferValidation.sol +308 -0
- package/contracts/compliance/modular/ModularCompliance.sol +399 -240
- package/contracts/compliance/modular/ModuleSetLib.sol +182 -0
- package/contracts/compliance/modular/MovementKindLib.sol +97 -0
- package/contracts/compliance/modular/TransferContextLib.sol +140 -0
- package/contracts/compliance/modular/TransferValidation.sol +822 -0
- package/contracts/compliance/modular/TransferValidationLib.sol +183 -0
- package/contracts/compliance/modular/modules/AbstractModuleUpgradeable.sol +87 -56
- package/contracts/compliance/modular/modules/IModule.sol +142 -58
- package/contracts/compliance/modular/modules/MaxBalancePerIdentityModule.sol +175 -0
- package/contracts/compliance/modular/modules/ModuleProxy.sol +24 -24
- package/contracts/compliance/modular/modules/SpenderVerificationModule.sol +149 -0
- package/contracts/compliance/modular/modules/SpenderWhitelistModule.sol +215 -0
- package/contracts/factory/ITREXFactory.sol +94 -44
- package/contracts/factory/TREXFactory.sol +408 -201
- package/contracts/interop/ISettlementHandler.sol +101 -0
- package/contracts/interop/ITREXMessaging.sol +166 -0
- package/contracts/{proxy/ModularComplianceProxy.sol → interop/ITrustedGatewayRegistry.sol} +48 -43
- package/contracts/interop/TREXMessaging.sol +189 -0
- package/contracts/interop/TREXMessagingLib.sol +425 -0
- package/contracts/{proxy/TrustedIssuersRegistryProxy.sol → interop/TrustedGatewayRegistry.sol} +46 -37
- package/contracts/libraries/AccessManagerSetupLib.sol +484 -0
- package/contracts/libraries/ErrorsLib.sol +172 -65
- package/contracts/libraries/EventsLib.sol +168 -66
- package/contracts/libraries/MessageTypesLib.sol +259 -0
- package/contracts/libraries/RolesLib.sol +146 -0
- package/contracts/{roles/Roles.sol → libraries/VersionLib.sol} +46 -49
- package/contracts/libraries/WalletKeyLib.sol +156 -0
- package/contracts/proxy/beacon/ITREXImplementationAuthority.sol +157 -0
- package/contracts/proxy/beacon/TREXImplementationAuthority.sol +188 -0
- package/contracts/registry/implementation/IdentityRegistryStorage.sol +215 -163
- package/contracts/registry/implementation/TREXRegistry.sol +475 -0
- package/contracts/registry/interface/IIdentityRegistryStorage.sol +30 -25
- package/contracts/registry/interface/ITREXRegistry.sol +180 -0
- package/contracts/token/IToken.sol +210 -49
- package/contracts/token/Token.sol +411 -476
- package/contracts/token/TokenDelegationLib.sol +339 -0
- package/contracts/token/TokenGuardsLib.sol +123 -0
- package/contracts/token/TokenLedgerLib.sol +316 -0
- package/contracts/token/TokenRecoveryLib.sol +130 -0
- package/contracts/{roles/AgentRoleUpgradeable.sol → utils/AccessManagedOwnable.sol} +31 -31
- package/contracts/{proxy/IdentityRegistryStorageProxy.sol → utils/AccessManagedOwnableBase.sol} +56 -34
- package/contracts/utils/AccessManagedOwnableUpgradeable.sol +116 -0
- package/contracts/utils/IUtilityChecker.sol +32 -26
- package/contracts/{roles/AbstractAgentRole.sol → utils/TREXAccessManager.sol} +54 -57
- package/contracts/utils/UtilityChecker.sol +175 -52
- package/contracts/utils/UtilityCheckerProxy.sol +24 -24
- package/contracts/{proxy/interface/IProxy.sol → vendor/IERC173.sol} +15 -28
- package/out/AbstractModuleUpgradeable.sol/AbstractModuleUpgradeable.json +1 -1
- package/out/AbstractSigner.sol/AbstractSigner.json +1 -0
- package/out/AccessManaged.sol/AccessManaged.json +1 -0
- package/out/AccessManagedOwnable.sol/AccessManagedOwnable.json +1 -0
- package/out/AccessManagedOwnableBase.sol/AccessManagedOwnableBase.json +1 -0
- package/out/AccessManagedOwnableUpgradeable.sol/AccessManagedOwnableUpgradeable.json +1 -0
- package/out/AccessManagedUpgradeable.sol/AccessManagedUpgradeable.json +1 -0
- package/out/AccessManager.sol/AccessManager.json +1 -0
- package/out/AccessManagerHelper.sol/AccessManagerHelper.json +1 -0
- package/out/AccessManagerSetupLib.sol/AccessManagerSetupLib.json +1 -0
- package/out/AccessManagerUpgradeable.sol/AccessManagerUpgradeable.json +1 -0
- package/out/Account.sol/Account.json +1 -0
- package/out/Address.sol/Address.json +1 -1
- package/out/Arrays.sol/Arrays.json +1 -1
- package/out/AuthorityUtils.sol/AuthorityUtils.json +1 -0
- package/out/Base.sol/CommonBase.json +1 -1
- package/out/Base.sol/ScriptBase.json +1 -1
- package/out/Base.sol/TestBase.json +1 -1
- package/out/Base64.sol/Base64.json +1 -0
- package/out/BeaconProxy.sol/BeaconProxy.json +1 -0
- package/out/BeaconProxyDeployer.sol/BeaconProxyDeployer.json +1 -0
- package/out/Bytes.sol/Bytes.json +1 -1
- package/out/Calldata.sol/Calldata.json +1 -0
- package/out/CapabilityModules.sol/AllTypesModule.json +1 -0
- package/out/CapabilityModules.sol/CappedRecipientModule.json +1 -0
- package/out/CapabilityModules.sol/DelegatedCapRuleModule.json +1 -0
- package/out/CapabilityModules.sol/DuplicateTypeModule.json +1 -0
- package/out/CapabilityModules.sol/LockedSenderModule.json +1 -0
- package/out/CapabilityModules.sol/NoTypeModule.json +1 -0
- package/out/CapabilityModules.sol/RecordingModule.json +1 -0
- package/out/CapabilityModules.sol/RuleAndMintTrackerModule.json +1 -0
- package/out/CapabilityModules.sol/RuleAndTrackerModule.json +1 -0
- package/out/CapabilityModules.sol/RuleOnlyModule.json +1 -0
- package/out/CapabilityModules.sol/SpenderOnlyModule.json +1 -0
- package/out/CapabilityModules.sol/TrackerOnlyModule.json +1 -0
- package/out/CapabilityModules.sol/UndeclaredRuleModule.json +1 -0
- package/out/CapabilityModules.sol/WritingRuleModule.json +1 -0
- package/out/ClaimIssuerAlwaysReverts.sol/ClaimIssuerAlwaysReverts.json +1 -0
- package/out/ClaimIssuerTrick.sol/ClaimIssuerTrick.json +1 -1
- package/out/Comparators.sol/Comparators.json +1 -1
- package/out/ComplianceLedger.sol/ComplianceLedger.json +1 -0
- package/out/ComplianceLedgerLib.sol/ComplianceLedgerLib.json +1 -0
- package/out/Context.sol/Context.json +1 -1
- package/out/ContextUpgradeable.sol/ContextUpgradeable.json +1 -1
- package/out/Countries.sol/Countries.json +1 -1
- package/out/Create2.sol/Create2.json +1 -1
- package/out/Create3.sol/Create3.json +1 -1
- package/out/DeployComplianceModules.s.sol/DeployComplianceModules.json +1 -0
- package/out/DeployComplianceModules.s.sol/ITokenCompliance.json +1 -0
- package/out/DeployUtilityChecker.s.sol/DeployUtilityChecker.json +1 -0
- package/out/ECDSA.sol/ECDSA.json +1 -1
- package/out/EIP712.sol/EIP712.json +1 -1
- package/out/EIP712Upgradeable.sol/EIP712Upgradeable.json +1 -1
- package/out/ERC165.sol/ERC165.json +1 -0
- package/out/ERC165Checker.sol/ERC165Checker.json +1 -0
- package/out/ERC165Upgradeable.sol/ERC165Upgradeable.json +1 -0
- package/out/ERC1967Proxy.sol/ERC1967Proxy.json +1 -1
- package/out/ERC1967Utils.sol/ERC1967Utils.json +1 -1
- package/out/ERC20.sol/ERC20.json +1 -1
- package/out/ERC20Pausable.sol/ERC20Pausable.json +1 -1
- package/out/ERC20PermitUpgradeable.sol/ERC20PermitUpgradeable.json +1 -1
- package/out/ERC20Upgradeable.sol/ERC20Upgradeable.json +1 -1
- package/out/ERC3643ClaimTopicsRegistry.sol/ERC3643ClaimTopicsRegistry.json +1 -0
- package/out/ERC3643Compliance.sol/ERC3643Compliance.json +1 -0
- package/out/ERC3643ErrorsLib.sol/ERC3643ErrorsLib.json +1 -0
- package/out/ERC3643IdentityRegistry.sol/ERC3643IdentityRegistry.json +1 -0
- package/out/ERC3643IdentityRegistryStorage.sol/ERC3643IdentityRegistryStorage.json +1 -0
- package/out/ERC3643Token.sol/ERC3643Token.json +1 -0
- package/out/ERC3643TrustedIssuersRegistry.sol/ERC3643TrustedIssuersRegistry.json +1 -0
- package/out/ERC4337Utils.sol/ERC4337Utils.json +1 -0
- package/out/ERC4337Utils.sol/IEntryPointExtra.json +1 -0
- package/out/ERC734Validator.sol/ERC734Validator.json +1 -0
- package/out/ERC7579Validator.sol/ERC7579Validator.json +1 -0
- package/out/ERC7786GatewayMock.sol/ERC7786GatewayMock.json +1 -0
- package/out/ERC7786Recipient.sol/ERC7786Recipient.json +1 -0
- package/out/ERC7913WebAuthnVerifier.sol/ERC7913WebAuthnVerifier.json +1 -0
- package/out/EnumerableSet.sol/EnumerableSet.json +1 -1
- package/out/Errors.sol/Errors.json +1 -1
- package/out/ErrorsLib.sol/ErrorsLib.json +1 -1
- package/out/EventsLib.sol/EventsLib.json +1 -1
- package/out/Hashes.sol/Hashes.json +1 -0
- package/out/HostileModules.sol/RevertEverywhereModule.json +1 -0
- package/out/HostileModules.sol/UnbindRevertingModule.json +1 -0
- package/out/IAccessManaged.sol/IAccessManaged.json +1 -0
- package/out/IAccessManager.sol/IAccessManager.json +1 -0
- package/out/IAuthority.sol/IAuthority.json +1 -0
- package/out/IBeacon.sol/IBeacon.json +1 -1
- package/out/IClaimIssuer.sol/IClaimIssuer.json +1 -1
- package/out/IComplianceLedger.sol/IComplianceLedger.json +1 -0
- package/out/IERC1271.sol/IERC1271.json +1 -0
- package/out/IERC165.sol/IERC165.json +1 -1
- package/out/IERC173.sol/IERC173.json +1 -1
- package/out/IERC1967.sol/IERC1967.json +1 -1
- package/out/IERC20.sol/IERC20.json +1 -1
- package/out/IERC20Metadata.sol/IERC20Metadata.json +1 -1
- package/out/IERC20Permit.sol/IERC20Permit.json +1 -1
- package/out/IERC3643.sol/IERC3643.json +1 -1
- package/out/IERC3643ClaimTopicsRegistry.sol/IERC3643ClaimTopicsRegistry.json +1 -1
- package/out/IERC3643Compliance.sol/IERC3643Compliance.json +1 -1
- package/out/IERC3643IdentityRegistry.sol/IERC3643IdentityRegistry.json +1 -1
- package/out/IERC3643IdentityRegistryStorage.sol/IERC3643IdentityRegistryStorage.json +1 -1
- package/out/IERC3643TrustedIssuersRegistry.sol/IERC3643TrustedIssuersRegistry.json +1 -1
- package/out/IERC4337.sol/IAccount.json +1 -0
- package/out/IERC4337.sol/IAccountExecute.json +1 -0
- package/out/IERC4337.sol/IAggregator.json +1 -0
- package/out/IERC4337.sol/IEntryPoint.json +1 -0
- package/out/IERC4337.sol/IEntryPointNonces.json +1 -0
- package/out/IERC4337.sol/IEntryPointStake.json +1 -0
- package/out/IERC4337.sol/IPaymaster.json +1 -0
- package/out/IERC5267.sol/IERC5267.json +1 -1
- package/out/IERC734.sol/IERC734.json +1 -1
- package/out/IERC735.sol/IERC735.json +1 -1
- package/out/IERC7913.sol/IERC7913SignatureVerifier.json +1 -0
- package/out/IIdentity.sol/IIdentity.json +1 -1
- package/out/IIdentityFactory.sol/IIdentityFactory.json +1 -0
- package/out/IIdentityRegistryStorage.sol/IIdentityRegistryStorage.json +1 -1
- package/out/IKeyExecutor.sol/IKeyExecutor.json +1 -0
- package/out/IModularCompliance.sol/IModularCompliance.json +1 -1
- package/out/IModule.sol/IModule.json +1 -1
- package/out/IMulticall3.sol/IMulticall3.json +1 -1
- package/out/IReputationRegistry.sol/IReputationRegistry.json +1 -0
- package/out/ISettlementHandler.sol/ISettlementHandler.json +1 -0
- package/out/ITREXFactory.sol/ITREXFactory.json +1 -1
- package/out/ITREXImplementationAuthority.sol/ITREXImplementationAuthority.json +1 -1
- package/out/ITREXMessaging.sol/ITREXMessaging.json +1 -0
- package/out/ITREXRegistry.sol/ITREXRegistry.json +1 -0
- package/out/IToken.sol/IToken.json +1 -1
- package/out/ITransferValidation.sol/ITransferValidation.json +1 -0
- package/out/ITrustedGatewayRegistry.sol/ITrustedGatewayRegistry.json +1 -0
- package/out/IUtilityChecker.sol/IUtilityChecker.json +1 -1
- package/out/Identity.sol/Identity.json +1 -1
- package/out/IdentityFactory.sol/IdentityFactory.json +1 -0
- package/out/IdentityModulesHelper.sol/IdentityModulesHelper.json +1 -0
- package/out/IdentityRegistryStorage.sol/IdentityRegistryStorage.json +1 -1
- package/out/IdentityTypes.sol/IdentityTypes.json +1 -0
- package/out/Initializable.sol/Initializable.json +1 -1
- package/out/InteropSuiteTest.sol/InteropSuiteTest.json +1 -0
- package/out/KeyApprovalModule.sol/IIdentityAccount.json +1 -0
- package/out/KeyApprovalModule.sol/KeyApprovalModule.json +1 -0
- package/out/KeyManager.sol/KeyManager.json +1 -0
- package/out/KeyPurposes.sol/KeyPurposes.json +1 -1
- package/out/KeyTypes.sol/KeyTypes.json +1 -1
- package/out/LowLevelCall.sol/LowLevelCall.json +1 -1
- package/out/Math.sol/Math.json +1 -1
- package/out/MaxBalancePerIdentityModule.sol/MaxBalancePerIdentityModule.json +1 -0
- package/out/MessageHashUtils.sol/MessageHashUtils.json +1 -1
- package/out/MessageTypesLib.sol/MessageTypesLib.json +1 -0
- package/out/MockTREXAccessManagerV2.sol/MockTREXAccessManagerV2.json +1 -0
- package/out/MockTokenV2.sol/MockTokenV2.json +1 -0
- package/out/Mocks.sol/ClaimTopicsRegistryMock.json +1 -0
- package/out/Mocks.sol/ComplianceMock.json +1 -0
- package/out/Mocks.sol/IdentityRegistryMock.json +1 -0
- package/out/Mocks.sol/IdentityRegistryStorageMock.json +1 -0
- package/out/Mocks.sol/TokenMock.json +1 -0
- package/out/Mocks.sol/TrustedIssuersRegistryMock.json +1 -0
- package/out/ModularCompliance.sol/ModularCompliance.json +1 -1
- package/out/ModuleNotPnP.sol/ModuleNotPnP.json +1 -1
- package/out/ModuleProxy.sol/ModuleProxy.json +1 -1
- package/out/ModuleSetLib.sol/ModuleSetLib.json +1 -0
- package/out/MovementKindLib.sol/MovementKindLib.json +1 -0
- package/out/Multicall.sol/Multicall.json +1 -0
- package/out/MulticallUpgradeable.sol/MulticallUpgradeable.json +1 -1
- package/out/Nonces.sol/Nonces.json +1 -1
- package/out/NoncesUpgradeable.sol/NoncesUpgradeable.json +1 -1
- package/out/Ownable.sol/Ownable.json +1 -1
- package/out/OwnableUpgradeable.sol/OwnableUpgradeable.json +1 -1
- package/out/P256.sol/P256.json +1 -0
- package/out/Packing.sol/Packing.json +1 -0
- package/out/Panic.sol/Panic.json +1 -1
- package/out/Pausable.sol/Pausable.json +1 -1
- package/out/PausableUpgradeable.sol/PausableUpgradeable.json +1 -1
- package/out/Proxy.sol/Proxy.json +1 -1
- package/out/ReentrancyGuardTransient.sol/ReentrancyGuardTransient.json +1 -0
- package/out/ReentrantModule.sol/ReentrantModule.json +1 -0
- package/out/ReputationRegistry.sol/ReputationRegistry.json +1 -0
- package/out/RolesLib.sol/RolesLib.json +1 -0
- package/out/SafeCalldataBatch.sol/SafeCalldataBatch.json +1 -0
- package/out/SafeCast.sol/SafeCast.json +1 -1
- package/out/SatelliteLiteMock.sol/SatelliteLiteMock.json +1 -0
- package/out/Script.sol/Script.json +1 -0
- package/out/ShortStrings.sol/ShortStrings.json +1 -1
- package/out/SignatureChecker.sol/SignatureChecker.json +1 -0
- package/out/SignedMath.sol/SignedMath.json +1 -1
- package/out/SlotDerivation.sol/SlotDerivation.json +1 -1
- package/out/SmartAccount.sol/SmartAccount.json +1 -0
- package/out/SpenderVerificationModule.sol/SpenderVerificationModule.json +1 -0
- package/out/SpenderWhitelistModule.sol/SpenderWhitelistModule.json +1 -0
- package/out/StdAssertions.sol/StdAssertions.json +1 -1
- package/out/StdChains.sol/StdChains.json +1 -1
- package/out/StdCheats.sol/StdCheats.json +1 -1
- package/out/StdCheats.sol/StdCheatsSafe.json +1 -1
- package/out/StdConstants.sol/StdConstants.json +1 -1
- package/out/StdError.sol/stdError.json +1 -1
- package/out/StdInvariant.sol/StdInvariant.json +1 -1
- package/out/StdJson.sol/stdJson.json +1 -1
- package/out/StdMath.sol/stdMath.json +1 -1
- package/out/StdStorage.sol/stdStorage.json +1 -1
- package/out/StdStorage.sol/stdStorageSafe.json +1 -1
- package/out/StdStyle.sol/StdStyle.json +1 -1
- package/out/StdToml.sol/stdToml.json +1 -1
- package/out/StdUtils.sol/StdUtils.json +1 -1
- package/out/StorageSlot.sol/StorageSlot.json +1 -1
- package/out/Strings.sol/Strings.json +1 -1
- package/out/Structs.sol/Structs.json +1 -1
- package/out/TREXAccessManager.sol/TREXAccessManager.json +1 -0
- package/out/TREXFactory.sol/TREXFactory.json +1 -1
- package/out/TREXImplementationAuthority.sol/TREXImplementationAuthority.json +1 -1
- package/out/TREXMessaging.sol/TREXMessaging.json +1 -0
- package/out/TREXMessagingLib.sol/TREXMessagingLib.json +1 -0
- package/out/TREXRegistry.sol/TREXRegistry.json +1 -0
- package/out/TestERC20.sol/TestERC20.json +1 -1
- package/out/TestModule.sol/TestModule.json +1 -1
- package/out/TestTREXFactory.sol/TestTREXFactory.json +1 -1
- package/out/Time.sol/Time.json +1 -0
- package/out/Token.sol/Token.json +1 -1
- package/out/TokenDelegationLib.sol/TokenDelegationLib.json +1 -0
- package/out/TokenGuardsLib.sol/TokenGuardsLib.json +1 -0
- package/out/TokenHandler.sol/TokenHandler.json +1 -0
- package/out/TokenLedgerHarness.sol/TokenLedgerHarness.json +1 -0
- package/out/TokenLedgerLib.sol/TokenLedgerLib.json +1 -0
- package/out/TokenRecoveryLib.sol/TokenRecoveryLib.json +1 -0
- package/out/TokenReservationStub.sol/TokenReservationStub.json +1 -0
- package/out/TransferContextLib.sol/TransferContextLib.json +1 -0
- package/out/TransferValidation.sol/TransferValidation.json +1 -0
- package/out/TransferValidationHarness.sol/TransferValidationHarness.json +1 -0
- package/out/TransferValidationLib.sol/TransferValidationLib.json +1 -0
- package/out/TransientSlot.sol/TransientSlot.json +1 -0
- package/out/TrustedGatewayRegistry.sol/TrustedGatewayRegistry.json +1 -0
- package/out/UUPSUpgradeable.sol/UUPSUpgradeable.json +1 -1
- package/out/UpgradeableBeacon.sol/UpgradeableBeacon.json +1 -0
- package/out/UtilityChecker.sol/UtilityChecker.json +1 -1
- package/out/UtilityCheckerProxy.sol/UtilityCheckerProxy.json +1 -1
- package/out/Utils.sol/Utils.json +1 -1
- package/out/VersionLib.sol/VersionLib.json +1 -0
- package/out/Vm.sol/Vm.json +1 -1
- package/out/Vm.sol/VmSafe.json +1 -1
- package/out/WalletKeyLib.sol/WalletKeyLib.json +1 -0
- package/out/WebAuthn.sol/WebAuthn.json +1 -0
- package/out/console.sol/console.json +1 -1
- package/out/draft-AccountERC7579Upgradeable.sol/AccountERC7579Upgradeable.json +1 -0
- package/out/draft-ERC7579Utils.sol/ERC7579Utils.json +1 -0
- package/out/draft-IERC1822.sol/IERC1822Proxiable.json +1 -1
- package/out/draft-IERC6093.sol/IERC1155Errors.json +1 -1
- package/out/draft-IERC6093.sol/IERC20Errors.json +1 -1
- package/out/draft-IERC6093.sol/IERC721Errors.json +1 -1
- package/out/draft-IERC7579.sol/IERC7579AccountConfig.json +1 -0
- package/out/draft-IERC7579.sol/IERC7579Execution.json +1 -0
- package/out/draft-IERC7579.sol/IERC7579Hook.json +1 -0
- package/out/draft-IERC7579.sol/IERC7579Module.json +1 -0
- package/out/draft-IERC7579.sol/IERC7579ModuleConfig.json +1 -0
- package/out/draft-IERC7579.sol/IERC7579Validator.json +1 -0
- package/out/draft-IERC7786.sol/IERC7786GatewaySource.json +1 -0
- package/out/draft-IERC7786.sol/IERC7786Recipient.json +1 -0
- package/out/draft-InteroperableAddress.sol/InteroperableAddress.json +1 -0
- package/out/libraries/Errors.sol/Errors.json +1 -1
- package/out/safeconsole.sol/safeconsole.json +1 -1
- package/package.json +14 -11
- package/contracts/ERC-3643/ERC3643EventsLib.sol +0 -150
- package/contracts/factory/ITREXGateway.sol +0 -234
- package/contracts/factory/TREXGateway.sol +0 -274
- package/contracts/proxy/AbstractProxy.sol +0 -146
- package/contracts/proxy/ClaimTopicsRegistryProxy.sol +0 -83
- package/contracts/proxy/IdentityRegistryProxy.sol +0 -95
- package/contracts/proxy/TokenProxy.sol +0 -97
- package/contracts/proxy/authority/IAFactory.sol +0 -122
- package/contracts/proxy/authority/IIAFactory.sol +0 -87
- package/contracts/proxy/authority/ITREXImplementationAuthority.sol +0 -239
- package/contracts/proxy/authority/TREXImplementationAuthority.sol +0 -350
- package/contracts/registry/implementation/ClaimTopicsRegistry.sol +0 -152
- package/contracts/registry/implementation/IdentityRegistry.sol +0 -352
- package/contracts/registry/implementation/TrustedIssuersRegistry.sol +0 -272
- package/contracts/registry/interface/IClaimTopicsRegistry.sol +0 -70
- package/contracts/registry/interface/IIdentityRegistry.sol +0 -102
- package/contracts/registry/interface/ITrustedIssuersRegistry.sol +0 -70
- package/contracts/roles/IERC173.sol +0 -21
- package/contracts/token/TokenStructs.sol +0 -74
- package/contracts/utils/InterfaceIdCalculator.sol +0 -223
- package/contracts/vendor/openzeppelin/Create3.sol +0 -143
- package/out/AbstractAgentRole.sol/AbstractAgentRole.json +0 -1
- package/out/AbstractProxy.sol/AbstractProxy.json +0 -1
- package/out/AgentRole.sol/AgentRole.json +0 -1
- package/out/AgentRoleUpgradeable.sol/AgentRoleUpgradeable.json +0 -1
- package/out/ClaimIssuer.sol/ClaimIssuer.json +0 -1
- package/out/ClaimTopicsRegistry.sol/ClaimTopicsRegistry.json +0 -1
- package/out/ClaimTopicsRegistryProxy.sol/ClaimTopicsRegistryProxy.json +0 -1
- package/out/ERC2771Context.sol/ERC2771Context.json +0 -1
- package/out/ERC2771ContextUpgradeable.sol/ERC2771ContextUpgradeable.json +0 -1
- package/out/ERC2771Forwarder.sol/ERC2771Forwarder.json +0 -1
- package/out/ERC3643EventsLib.sol/ERC3643EventsLib.json +0 -1
- package/out/IAFactory.sol/IAFactory.json +0 -1
- package/out/IClaimTopicsRegistry.sol/IClaimTopicsRegistry.json +0 -1
- package/out/IERC1363.sol/IERC1363.json +0 -1
- package/out/IIAFactory.sol/IIAFactory.json +0 -1
- package/out/IIdFactory.sol/IIdFactory.json +0 -1
- package/out/IIdentityRegistry.sol/IIdentityRegistry.json +0 -1
- package/out/IImplementationAuthority.sol/IImplementationAuthority.json +0 -1
- package/out/IProxy.sol/IProxy.json +0 -1
- package/out/ITREXGateway.sol/ITREXGateway.json +0 -1
- package/out/ITrustedIssuersRegistry.sol/ITrustedIssuersRegistry.json +0 -1
- package/out/IdFactory.sol/IdFactory.json +0 -1
- package/out/IdentityProxy.sol/IdentityProxy.json +0 -1
- package/out/IdentityRegistry.sol/IdentityRegistry.json +0 -1
- package/out/IdentityRegistryProxy.sol/IdentityRegistryProxy.json +0 -1
- package/out/IdentityRegistryStorageProxy.sol/IdentityRegistryStorageProxy.json +0 -1
- package/out/ImplementationAuthority.sol/ImplementationAuthority.json +0 -1
- package/out/InterfaceIdCalculator.sol/InterfaceIdCalculator.json +0 -1
- package/out/ModularComplianceProxy.sol/ModularComplianceProxy.json +0 -1
- package/out/Ownable2Step.sol/Ownable2Step.json +0 -1
- package/out/Ownable2StepUpgradeable.sol/Ownable2StepUpgradeable.json +0 -1
- package/out/Roles.sol/Roles.json +0 -1
- package/out/SafeERC20.sol/SafeERC20.json +0 -1
- package/out/Storage.sol/Storage.json +0 -1
- package/out/TREXGateway.sol/TREXGateway.json +0 -1
- package/out/TestAgentRole.sol/TestAgentRole.json +0 -1
- package/out/TestAgentRoleUpgradeable.sol/TestAgentRoleUpgradeable.json +0 -1
- package/out/TokenProxy.sol/TokenProxy.json +0 -1
- package/out/TrustedIssuersRegistry.sol/TrustedIssuersRegistry.json +0 -1
- package/out/TrustedIssuersRegistryProxy.sol/TrustedIssuersRegistryProxy.json +0 -1
- package/out/Version.sol/Version.json +0 -1
|
@@ -36,49 +36,68 @@
|
|
|
36
36
|
// +@@@@%-
|
|
37
37
|
// :#%%=
|
|
38
38
|
//
|
|
39
|
-
/**
|
|
40
|
-
* NOTICE
|
|
41
|
-
*
|
|
42
|
-
* The T-REX software is licensed under a proprietary license or the GPL v.3.
|
|
43
|
-
* If you choose to receive it under the GPL v.3 license, the following applies:
|
|
44
|
-
* T-REX is a suite of smart contracts implementing the ERC-3643 standard and
|
|
45
|
-
* developed by Tokeny to manage and transfer financial assets on EVM blockchains
|
|
46
|
-
*
|
|
47
|
-
* Copyright (C) 2025, Tokeny sàrl.
|
|
48
|
-
*
|
|
49
|
-
* This program is free software: you can redistribute it and/or modify
|
|
50
|
-
* it under the terms of the GNU General Public License as published by
|
|
51
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
52
|
-
* (at your option) any later version.
|
|
53
|
-
*
|
|
54
|
-
* This program is distributed in the hope that it will be useful,
|
|
55
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
56
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
57
|
-
* GNU General Public License for more details.
|
|
58
|
-
*
|
|
59
|
-
* You should have received a copy of the GNU General Public License
|
|
60
|
-
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
61
|
-
*/
|
|
62
|
-
pragma solidity 0.8.30;
|
|
63
|
-
|
|
64
|
-
import { IIdFactory } from "@onchain-id/solidity/contracts/factory/IIdFactory.sol";
|
|
65
39
|
|
|
66
|
-
|
|
40
|
+
// T-REX Smart Contracts
|
|
41
|
+
// The ERC-3643 token suite of the T-REX ecosystem.
|
|
42
|
+
//
|
|
43
|
+
// Copyright (C) 2026 Digital Asset Operational Services ISAC Ltd. ("T-REX Network")
|
|
44
|
+
//
|
|
45
|
+
// This file is part of the T-REX smart contract suite.
|
|
46
|
+
//
|
|
47
|
+
// This program is free software: you can redistribute it and/or modify
|
|
48
|
+
// it under the terms of the GNU General Public License as published by
|
|
49
|
+
// the Free Software Foundation, either version 3 of the License, or
|
|
50
|
+
// (at your option) any later version.
|
|
51
|
+
//
|
|
52
|
+
// This program is distributed in the hope that it will be useful,
|
|
53
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
54
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
55
|
+
// GNU General Public License for more details.
|
|
56
|
+
//
|
|
57
|
+
// You should have received a copy of the GNU General Public License
|
|
58
|
+
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
59
|
+
pragma solidity 0.8.30;
|
|
67
60
|
|
|
61
|
+
import { IIdentityFactory } from "@onchain-id/solidity/contracts/factory/IIdentityFactory.sol";
|
|
62
|
+
import { IERC734 } from "@onchain-id/solidity/contracts/interface/IERC734.sol";
|
|
63
|
+
import { IdentityTypes } from "@onchain-id/solidity/contracts/libraries/IdentityTypes.sol";
|
|
64
|
+
import { KeyPurposes } from "@onchain-id/solidity/contracts/libraries/KeyPurposes.sol";
|
|
65
|
+
import { KeyTypes } from "@onchain-id/solidity/contracts/libraries/KeyTypes.sol";
|
|
66
|
+
import { Structs } from "@onchain-id/solidity/contracts/storage/Structs.sol";
|
|
67
|
+
|
|
68
|
+
import {
|
|
69
|
+
AccessManagerUpgradeable
|
|
70
|
+
} from "@openzeppelin/contracts-upgradeable/access/manager/AccessManagerUpgradeable.sol";
|
|
71
|
+
import { IAccessManaged } from "@openzeppelin/contracts/access/manager/IAccessManaged.sol";
|
|
72
|
+
import { BeaconProxy } from "@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol";
|
|
73
|
+
import { UpgradeableBeacon } from "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol";
|
|
74
|
+
import { Create3 } from "@openzeppelin/contracts/utils/Create3.sol";
|
|
75
|
+
import { InteroperableAddress } from "@openzeppelin/contracts/utils/draft-InteroperableAddress.sol";
|
|
76
|
+
|
|
77
|
+
import { ModularCompliance } from "../compliance/modular/ModularCompliance.sol";
|
|
78
|
+
import { AccessManagerSetupLib } from "../libraries/AccessManagerSetupLib.sol";
|
|
68
79
|
import { ErrorsLib } from "../libraries/ErrorsLib.sol";
|
|
69
80
|
import { EventsLib } from "../libraries/EventsLib.sol";
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import { ITREXImplementationAuthority } from "../proxy/authority/ITREXImplementationAuthority.sol";
|
|
77
|
-
import { IIdentityRegistryStorage } from "../registry/interface/IIdentityRegistryStorage.sol";
|
|
78
|
-
import { Create3 } from "../vendor/openzeppelin/Create3.sol";
|
|
81
|
+
import { ITREXImplementationAuthority } from "../proxy/beacon/ITREXImplementationAuthority.sol";
|
|
82
|
+
import { IdentityRegistryStorage } from "../registry/implementation/IdentityRegistryStorage.sol";
|
|
83
|
+
import { TREXRegistry } from "../registry/implementation/TREXRegistry.sol";
|
|
84
|
+
import { IToken } from "../token/IToken.sol";
|
|
85
|
+
import { AccessManagedOwnable } from "../utils/AccessManagedOwnable.sol";
|
|
86
|
+
import { TREXAccessManager } from "../utils/TREXAccessManager.sol";
|
|
79
87
|
import { ITREXFactory } from "./ITREXFactory.sol";
|
|
80
88
|
|
|
81
|
-
|
|
89
|
+
/// @title TREXFactory
|
|
90
|
+
/// @notice Deploys T-REX suites at CREATE3 addresses anyone can compute from the salt before the suite exists.
|
|
91
|
+
/// @dev Deployment requirement on the IdentityFactory this factory uses: INDIVIDUAL and CORPORATE identity
|
|
92
|
+
/// creation for another account (`createIdentityFor`) must never be open to the IdentityFactory
|
|
93
|
+
/// authority's `PUBLIC_ROLE`, and neither may any other type that is not single-binding. Such a type binds
|
|
94
|
+
/// its new identity to any account set as its only MANAGEMENT key, without a signature from that account,
|
|
95
|
+
/// so anyone could bind a predicted token address first. The binding is permanent: the auto-created token
|
|
96
|
+
/// identity and a supplied ONCHAINID both revert on the occupied address, and that salt is lost on the
|
|
97
|
+
/// chain. Self-deploy (`createIdentity`) binds the caller only and may stay open. The same loss happens to a
|
|
98
|
+
/// deployer who pre-binds the predicted token with the predicted suite AccessManager as the only MANAGEMENT
|
|
99
|
+
/// key: that address has no code before the deploy, so nothing can hold the key and nothing can add one.
|
|
100
|
+
contract TREXFactory is ITREXFactory, AccessManagedOwnable {
|
|
82
101
|
|
|
83
102
|
/// the address of the implementation authority contract used in the tokens deployed by the factory
|
|
84
103
|
address private _implementationAuthority;
|
|
@@ -86,125 +105,244 @@ contract TREXFactory is ITREXFactory, Ownable {
|
|
|
86
105
|
/// the address of the Identity Factory used to deploy token OIDs
|
|
87
106
|
address private _idFactory;
|
|
88
107
|
|
|
108
|
+
/// the network's trusted gateway registry, wired into every token this factory deploys
|
|
109
|
+
address private _trustedGatewayRegistry;
|
|
110
|
+
|
|
89
111
|
/// mapping containing info about the token contracts corresponding to salt already used for CREATE3 deployments
|
|
90
112
|
mapping(string => address) public tokenDeployed;
|
|
91
113
|
|
|
92
|
-
///
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
114
|
+
/// The contract type each suite contract is predicted and deployed under, so both paths use one spelling.
|
|
115
|
+
string private constant ACCESS_MANAGER = "AccessManager";
|
|
116
|
+
string private constant TOKEN = "Token";
|
|
117
|
+
string private constant REGISTRY = "REGISTRY";
|
|
118
|
+
string private constant IRS = "IRS";
|
|
119
|
+
string private constant MC = "MC";
|
|
120
|
+
|
|
121
|
+
constructor(
|
|
122
|
+
address implementationAuthority,
|
|
123
|
+
address idFactory,
|
|
124
|
+
address trustedGatewayRegistry,
|
|
125
|
+
address accessManager
|
|
126
|
+
) AccessManagedOwnable(accessManager) {
|
|
127
|
+
// The same line `setAuthority` holds later: an address with no code answers no to every `restricted` call.
|
|
128
|
+
require(accessManager.code.length != 0, ErrorsLib.AccessManagerNotAContract(accessManager));
|
|
129
|
+
|
|
130
|
+
_setImplementationAuthority(implementationAuthority);
|
|
131
|
+
_setIdFactory(idFactory);
|
|
132
|
+
_setTrustedGatewayRegistry(trustedGatewayRegistry);
|
|
96
133
|
}
|
|
97
134
|
|
|
98
135
|
/**
|
|
99
136
|
* @dev See {ITREXFactory-deployTREXSuite}.
|
|
137
|
+
* With `tokenDetails.accessManager == address(0)` the factory deploys a `TREXAccessManager`, creates a
|
|
138
|
+
* domain named after the token, assigns the token and its storage, commissions the suite and hands
|
|
139
|
+
* `ADMIN_ROLE` to `tokenDetails.accessManagerAdmin`. With a supplied manager the factory never calls
|
|
140
|
+
* it: the suite deploys with no role wiring and is not operable until the issuer commissions it with
|
|
141
|
+
* `AccessManagerSetupLib.commissionSuite`.
|
|
100
142
|
*/
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
require((_claimDetails.issuers).length <= 5, ErrorsLib.MaxClaimIssuersReached(5));
|
|
110
|
-
require((_claimDetails.claimTopics).length <= 5, ErrorsLib.MaxClaimTopicsReached(5));
|
|
111
|
-
require(
|
|
112
|
-
(_tokenDetails.irAgents).length <= 5 && (_tokenDetails.tokenAgents).length <= 5,
|
|
113
|
-
ErrorsLib.MaxAgentsReached(5)
|
|
114
|
-
);
|
|
115
|
-
require((_tokenDetails.complianceModules).length <= 30, ErrorsLib.MaxModuleActionsReached(30));
|
|
116
|
-
require(
|
|
117
|
-
(_tokenDetails.complianceModules).length >= (_tokenDetails.complianceSettings).length,
|
|
118
|
-
ErrorsLib.InvalidCompliancePattern()
|
|
119
|
-
);
|
|
120
|
-
|
|
121
|
-
address tir = _deployTIR(
|
|
122
|
-
_salt, _implementationAuthority, _tokenDetails.owner, _claimDetails.issuers, _claimDetails.issuerClaims
|
|
143
|
+
function deployTREXSuite(string memory salt, TokenDetails calldata tokenDetails, ClaimDetails calldata claimDetails)
|
|
144
|
+
external
|
|
145
|
+
restricted
|
|
146
|
+
{
|
|
147
|
+
_validateDeploymentInputs(salt, tokenDetails, claimDetails);
|
|
148
|
+
|
|
149
|
+
_deploySuiteContracts(
|
|
150
|
+
salt, tokenDetails, claimDetails, ITREXImplementationAuthority(_implementationAuthority).beacons()
|
|
123
151
|
);
|
|
124
|
-
|
|
152
|
+
}
|
|
125
153
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
154
|
+
/**
|
|
155
|
+
* @dev See {ITREXFactory-deployTREXSuiteIsolated}.
|
|
156
|
+
* With `tokenDetails.accessManager == address(0)` the factory deploys a `TREXAccessManager`, creates a
|
|
157
|
+
* domain named after the token, assigns the token and its storage, commissions the suite and hands
|
|
158
|
+
* `ADMIN_ROLE` to `tokenDetails.accessManagerAdmin`. With a supplied manager the factory never calls
|
|
159
|
+
* it: the suite deploys with no role wiring and is not operable until the issuer commissions it with
|
|
160
|
+
* `AccessManagerSetupLib.commissionSuite`.
|
|
161
|
+
*/
|
|
162
|
+
function deployTREXSuiteIsolated(
|
|
163
|
+
string memory salt,
|
|
164
|
+
TokenDetails calldata tokenDetails,
|
|
165
|
+
ClaimDetails calldata claimDetails
|
|
166
|
+
) external restricted {
|
|
167
|
+
_validateDeploymentInputs(salt, tokenDetails, claimDetails);
|
|
168
|
+
|
|
169
|
+
// A reused IRS keeps the beacon that deployed it, so shared upgrades would still reach this suite.
|
|
170
|
+
// A BeaconProxy exposes no beacon getter, so it cannot be checked: isolated suites deploy their own.
|
|
171
|
+
require(tokenDetails.irs == address(0), ErrorsLib.IsolatedSuiteCannotReuseIRS());
|
|
172
|
+
|
|
173
|
+
ITREXImplementationAuthority authority = ITREXImplementationAuthority(_implementationAuthority);
|
|
174
|
+
ITREXImplementationAuthority.SuiteImplementations memory impls =
|
|
175
|
+
authority.implementationsFor(authority.currentVersion());
|
|
176
|
+
|
|
177
|
+
// The clones are owned by the suite's own AccessManager, so an isolated suite is upgraded through
|
|
178
|
+
// `AccessManager.execute(beacon, upgradeTo(...))`. An unmapped target function resolves to
|
|
179
|
+
// ADMIN_ROLE, so only that AccessManager's admin can upgrade until an operator maps `upgradeTo`
|
|
180
|
+
// to a narrower role. The shared authority's beacons are untouched and never propagate here.
|
|
181
|
+
address manager = tokenDetails.accessManager;
|
|
182
|
+
address accessManagerBeacon;
|
|
183
|
+
if (manager == address(0)) {
|
|
184
|
+
manager = _predictAddress(salt, ACCESS_MANAGER);
|
|
185
|
+
accessManagerBeacon =
|
|
186
|
+
address(new UpgradeableBeacon(impls.accessManagerImplementation, tokenDetails.accessManagerAdmin));
|
|
129
187
|
}
|
|
188
|
+
ITREXImplementationAuthority.SuiteBeacons memory beacons = ITREXImplementationAuthority.SuiteBeacons({
|
|
189
|
+
tokenBeacon: address(new UpgradeableBeacon(impls.tokenImplementation, manager)),
|
|
190
|
+
trexRegistryBeacon: address(new UpgradeableBeacon(impls.trexRegistryImplementation, manager)),
|
|
191
|
+
irsBeacon: address(new UpgradeableBeacon(impls.irsImplementation, manager)),
|
|
192
|
+
mcBeacon: address(new UpgradeableBeacon(impls.mcImplementation, manager)),
|
|
193
|
+
accessManagerBeacon: accessManagerBeacon
|
|
194
|
+
});
|
|
130
195
|
|
|
131
|
-
address
|
|
132
|
-
require(ir == _predictAddress(_salt, "IR"), ErrorsLib.AddressPredictionMismatch());
|
|
133
|
-
address mc = _deployMC(_salt, _tokenDetails);
|
|
196
|
+
address token = _deploySuiteContracts(salt, tokenDetails, claimDetails, beacons);
|
|
134
197
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
// the refactor).
|
|
138
|
-
if (_tokenDetails.irs != address(0)) {
|
|
139
|
-
IIdentityRegistryStorage(irs).bindIdentityRegistry(ir);
|
|
140
|
-
}
|
|
198
|
+
emit EventsLib.IsolatedSuiteDeployed(token, beacons);
|
|
199
|
+
}
|
|
141
200
|
|
|
142
|
-
|
|
143
|
-
|
|
201
|
+
/// @dev Shared input validation for both deployment entry points, so they stay in lock-step.
|
|
202
|
+
function _validateDeploymentInputs(
|
|
203
|
+
string memory salt,
|
|
204
|
+
TokenDetails calldata tokenDetails,
|
|
205
|
+
ClaimDetails calldata claimDetails
|
|
206
|
+
) private view {
|
|
207
|
+
require(tokenDeployed[salt] == address(0), ErrorsLib.TokenAlreadyDeployed());
|
|
208
|
+
if (tokenDetails.accessManager == address(0)) {
|
|
209
|
+
address admin = tokenDetails.accessManagerAdmin;
|
|
210
|
+
require(admin != address(0), ErrorsLib.ZeroAddress());
|
|
211
|
+
// None of these contracts ever acts as the manager's administrator, so naming one would leave the
|
|
212
|
+
// suite with none.
|
|
213
|
+
require(!_isFactoryOrSuiteContract(salt, admin), ErrorsLib.InvalidAccessManagerAdmin());
|
|
214
|
+
} else {
|
|
215
|
+
require(
|
|
216
|
+
tokenDetails.accessManager.code.length != 0,
|
|
217
|
+
ErrorsLib.AccessManagerNotAContract(tokenDetails.accessManager)
|
|
218
|
+
);
|
|
219
|
+
}
|
|
144
220
|
|
|
145
|
-
|
|
221
|
+
require(claimDetails.issuers.length <= 5, ErrorsLib.MaxClaimIssuersReached(5));
|
|
222
|
+
require(claimDetails.claimTopics.length <= 5, ErrorsLib.MaxClaimTopicsReached(5));
|
|
146
223
|
}
|
|
147
224
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
225
|
+
/// @dev Deploys the beacon proxies against `beacons`, wires them, and records the token.
|
|
226
|
+
/// Kept in its own frame so both entry points stay inside the stack budget.
|
|
227
|
+
function _deploySuiteContracts(
|
|
228
|
+
string memory salt,
|
|
229
|
+
TokenDetails calldata tokenDetails,
|
|
230
|
+
ClaimDetails calldata claimDetails,
|
|
231
|
+
ITREXImplementationAuthority.SuiteBeacons memory beacons
|
|
232
|
+
) private returns (address) {
|
|
233
|
+
address manager = tokenDetails.accessManager;
|
|
234
|
+
if (manager == address(0)) {
|
|
235
|
+
manager = _deployAccessManager(salt, beacons.accessManagerBeacon);
|
|
236
|
+
}
|
|
237
|
+
address irs = tokenDetails.irs;
|
|
238
|
+
if (irs == address(0)) {
|
|
239
|
+
irs = _deployIRS(salt, beacons.irsBeacon, manager);
|
|
240
|
+
} else {
|
|
241
|
+
address authority = IAccessManaged(irs).authority();
|
|
242
|
+
require(authority == manager, ErrorsLib.StorageAuthorityMismatch(irs, manager, authority));
|
|
243
|
+
}
|
|
244
|
+
address registry = _deployTREXRegistry(salt, beacons.trexRegistryBeacon, manager, irs, claimDetails);
|
|
245
|
+
// A fresh storage pins `_idFactory` and binds this registry before it has code, so without asking its
|
|
246
|
+
// factory; `setIdFactory` can leave the registry beacon on another one. A supplied storage binds a registry
|
|
247
|
+
// through `bindIdentityRegistry`, which checks the factory itself.
|
|
248
|
+
if (tokenDetails.irs == address(0)) {
|
|
249
|
+
address registryFactory = address(TREXRegistry(registry).identityFactory());
|
|
250
|
+
require(registryFactory == _idFactory, ErrorsLib.IdentityFactoryMismatch(_idFactory, registryFactory));
|
|
251
|
+
}
|
|
252
|
+
address mc = _deployMC(salt, beacons.mcBeacon, tokenDetails, manager);
|
|
253
|
+
address token = _deployToken(salt, beacons.tokenBeacon, tokenDetails, manager, registry, mc);
|
|
254
|
+
tokenDeployed[salt] = token;
|
|
255
|
+
if (tokenDetails.accessManager == address(0)) {
|
|
256
|
+
_handOverAccessManager(manager, tokenDetails.accessManagerAdmin, token, tokenDetails.name);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
emit EventsLib.TREXSuiteDeployed(token, registry, irs, mc, salt);
|
|
260
|
+
return token;
|
|
153
261
|
}
|
|
154
262
|
|
|
155
263
|
/**
|
|
156
264
|
* @dev See {ITREXFactory-getImplementationAuthority}.
|
|
157
265
|
*/
|
|
158
|
-
function getImplementationAuthority() external view
|
|
266
|
+
function getImplementationAuthority() external view returns (address) {
|
|
159
267
|
return _implementationAuthority;
|
|
160
268
|
}
|
|
161
269
|
|
|
162
270
|
/**
|
|
163
271
|
* @dev See {ITREXFactory-getIdFactory}.
|
|
164
272
|
*/
|
|
165
|
-
function getIdFactory() external view
|
|
273
|
+
function getIdFactory() external view returns (address) {
|
|
166
274
|
return _idFactory;
|
|
167
275
|
}
|
|
168
276
|
|
|
169
277
|
/**
|
|
170
278
|
* @dev See {ITREXFactory-getToken}.
|
|
171
279
|
*/
|
|
172
|
-
function getToken(string calldata
|
|
173
|
-
return tokenDeployed[
|
|
280
|
+
function getToken(string calldata salt) external view returns (address) {
|
|
281
|
+
return tokenDeployed[salt];
|
|
174
282
|
}
|
|
175
283
|
|
|
176
284
|
/**
|
|
177
285
|
* @dev See {ITREXFactory-setImplementationAuthority}.
|
|
178
286
|
*/
|
|
179
|
-
function setImplementationAuthority(address
|
|
180
|
-
|
|
181
|
-
|
|
287
|
+
function setImplementationAuthority(address implementationAuthorityAddress) public restricted {
|
|
288
|
+
_setImplementationAuthority(implementationAuthorityAddress);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* @dev See {ITREXFactory-setIdFactory}.
|
|
293
|
+
*/
|
|
294
|
+
function setIdFactory(address idFactoryAddress) public restricted {
|
|
295
|
+
_setIdFactory(idFactoryAddress);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/// internal setter for the implementation authority, see {ITREXFactory-setImplementationAuthority}
|
|
299
|
+
function _setImplementationAuthority(address implementationAuthorityAddress) internal {
|
|
300
|
+
require(implementationAuthorityAddress != address(0), ErrorsLib.ZeroAddress());
|
|
301
|
+
// should not be possible to set an authority that is missing any of the beacons
|
|
302
|
+
ITREXImplementationAuthority.SuiteBeacons memory beacons =
|
|
303
|
+
ITREXImplementationAuthority(implementationAuthorityAddress).beacons();
|
|
182
304
|
require(
|
|
183
|
-
|
|
184
|
-
&&
|
|
185
|
-
&&
|
|
186
|
-
&& (ITREXImplementationAuthority(implementationAuthority_)).getIRSImplementation() != address(0)
|
|
187
|
-
&& (ITREXImplementationAuthority(implementationAuthority_)).getMCImplementation() != address(0)
|
|
188
|
-
&& (ITREXImplementationAuthority(implementationAuthority_)).getTIRImplementation() != address(0),
|
|
305
|
+
beacons.tokenBeacon != address(0) && beacons.trexRegistryBeacon != address(0)
|
|
306
|
+
&& beacons.irsBeacon != address(0) && beacons.mcBeacon != address(0)
|
|
307
|
+
&& beacons.accessManagerBeacon != address(0),
|
|
189
308
|
ErrorsLib.InvalidImplementationAuthority()
|
|
190
309
|
);
|
|
191
|
-
_implementationAuthority =
|
|
192
|
-
emit EventsLib.ImplementationAuthoritySet(
|
|
310
|
+
_implementationAuthority = implementationAuthorityAddress;
|
|
311
|
+
emit EventsLib.ImplementationAuthoritySet(implementationAuthorityAddress);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/// internal setter for the identity factory, see {ITREXFactory-setIdFactory}
|
|
315
|
+
function _setIdFactory(address idFactoryAddress) internal {
|
|
316
|
+
require(idFactoryAddress != address(0), ErrorsLib.ZeroAddress());
|
|
317
|
+
_idFactory = idFactoryAddress;
|
|
318
|
+
emit EventsLib.IdFactorySet(idFactoryAddress);
|
|
193
319
|
}
|
|
194
320
|
|
|
195
321
|
/**
|
|
196
|
-
* @dev See {ITREXFactory-
|
|
322
|
+
* @dev See {ITREXFactory-getTrustedGatewayRegistry}.
|
|
197
323
|
*/
|
|
198
|
-
function
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
324
|
+
function getTrustedGatewayRegistry() external view returns (address) {
|
|
325
|
+
return _trustedGatewayRegistry;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* @dev See {ITREXFactory-setTrustedGatewayRegistry}.
|
|
330
|
+
*/
|
|
331
|
+
function setTrustedGatewayRegistry(address trustedGatewayRegistryAddress) public restricted {
|
|
332
|
+
_setTrustedGatewayRegistry(trustedGatewayRegistryAddress);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/// internal setter for the trusted gateway registry, see {ITREXFactory-setTrustedGatewayRegistry}
|
|
336
|
+
function _setTrustedGatewayRegistry(address trustedGatewayRegistryAddress) internal {
|
|
337
|
+
require(trustedGatewayRegistryAddress != address(0), ErrorsLib.ZeroAddress());
|
|
338
|
+
_trustedGatewayRegistry = trustedGatewayRegistryAddress;
|
|
339
|
+
emit EventsLib.TrustedGatewayRegistrySet(trustedGatewayRegistryAddress);
|
|
202
340
|
}
|
|
203
341
|
|
|
204
342
|
/**
|
|
205
343
|
* @dev Deploys a contract using CREATE3
|
|
206
344
|
* @param salt Base salt for deployment
|
|
207
|
-
* @param contractType Contract type identifier (e.g., "
|
|
345
|
+
* @param contractType Contract type identifier (e.g., "IR", "IRS")
|
|
208
346
|
* @param bytecode Full creation bytecode including constructor parameters
|
|
209
347
|
*/
|
|
210
348
|
function _deploy(string memory salt, string memory contractType, bytes memory bytecode) internal returns (address) {
|
|
@@ -223,6 +361,13 @@ contract TREXFactory is ITREXFactory, Ownable {
|
|
|
223
361
|
return Create3.computeAddress(_saltBytes(salt, contractType), address(this));
|
|
224
362
|
}
|
|
225
363
|
|
|
364
|
+
/// @dev Whether `account` is this factory or one of the contracts the suite for `salt` will be deployed at.
|
|
365
|
+
function _isFactoryOrSuiteContract(string memory salt, address account) private view returns (bool) {
|
|
366
|
+
return account == address(this) || account == _predictAddress(salt, ACCESS_MANAGER)
|
|
367
|
+
|| account == _predictAddress(salt, TOKEN) || account == _predictAddress(salt, REGISTRY)
|
|
368
|
+
|| account == _predictAddress(salt, IRS) || account == _predictAddress(salt, MC);
|
|
369
|
+
}
|
|
370
|
+
|
|
226
371
|
/**
|
|
227
372
|
* @dev Computes the CREATE3 salt for a given (salt, contractType) pair.
|
|
228
373
|
* Salt layout (32 bytes) — preserved from the previous CreateX integration so the per-factory address
|
|
@@ -232,125 +377,187 @@ contract TREXFactory is ITREXFactory, Ownable {
|
|
|
232
377
|
* 2) 1 byte: 0x00
|
|
233
378
|
* 3) 11 bytes: bytes11(keccak256(salt, contractType))
|
|
234
379
|
*
|
|
235
|
-
* The contractType discriminator prevents the
|
|
380
|
+
* The contractType discriminator prevents the 4 suite contracts from colliding on a single CREATE3 slot
|
|
236
381
|
* (they all share the user-provided salt).
|
|
237
382
|
*/
|
|
238
383
|
function _saltBytes(string memory salt, string memory contractType) private view returns (bytes32) {
|
|
239
|
-
return
|
|
240
|
-
|
|
384
|
+
return bytes20(address(this)) | keccak256(bytes(string.concat(salt, contractType))) >> 168;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
function _deployAccessManager(string memory salt, address accessManagerBeacon) private returns (address) {
|
|
388
|
+
return _deploy(
|
|
389
|
+
salt,
|
|
390
|
+
ACCESS_MANAGER,
|
|
391
|
+
_beaconProxyBytecode(
|
|
392
|
+
accessManagerBeacon, abi.encodeCall(AccessManagerUpgradeable.initialize, (address(this)))
|
|
393
|
+
)
|
|
241
394
|
);
|
|
242
395
|
}
|
|
243
396
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
) private returns (address) {
|
|
252
|
-
bytes memory _code = type(TrustedIssuersRegistryProxy).creationCode;
|
|
253
|
-
bytes memory _constructData = abi.encode(implementationAuthority_, _owner, _issuers, _issuerClaims);
|
|
254
|
-
bytes memory bytecode = abi.encodePacked(_code, _constructData);
|
|
255
|
-
return _deploy(_salt, "TIR", bytecode);
|
|
397
|
+
function _handOverAccessManager(address manager, address admin, address token, string memory name) private {
|
|
398
|
+
TREXAccessManager accessManager = TREXAccessManager(manager);
|
|
399
|
+
uint32 domainId = accessManager.createDomain(name);
|
|
400
|
+
accessManager.assign(domainId, token);
|
|
401
|
+
AccessManagerSetupLib.commissionSuite(accessManager, token);
|
|
402
|
+
accessManager.grantRole(AccessManagerSetupLib.ADMIN_ROLE, admin, 0);
|
|
403
|
+
accessManager.renounceRole(AccessManagerSetupLib.ADMIN_ROLE, address(this));
|
|
256
404
|
}
|
|
257
405
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
address
|
|
262
|
-
address
|
|
263
|
-
|
|
406
|
+
function _deployTREXRegistry(
|
|
407
|
+
string memory salt,
|
|
408
|
+
address trexRegistryBeacon,
|
|
409
|
+
address manager,
|
|
410
|
+
address identityStorage,
|
|
411
|
+
ClaimDetails calldata claimDetails
|
|
264
412
|
) private returns (address) {
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
413
|
+
return _deploy(
|
|
414
|
+
salt,
|
|
415
|
+
REGISTRY,
|
|
416
|
+
_beaconProxyBytecode(
|
|
417
|
+
trexRegistryBeacon,
|
|
418
|
+
abi.encodeCall(
|
|
419
|
+
TREXRegistry.init,
|
|
420
|
+
(
|
|
421
|
+
identityStorage,
|
|
422
|
+
manager,
|
|
423
|
+
claimDetails.claimTopics,
|
|
424
|
+
claimDetails.issuers,
|
|
425
|
+
claimDetails.issuerClaims
|
|
426
|
+
)
|
|
427
|
+
)
|
|
428
|
+
)
|
|
429
|
+
);
|
|
269
430
|
}
|
|
270
431
|
|
|
271
|
-
/// function used to deploy modular compliance contract using CREATE3
|
|
272
|
-
function _deployMC(string memory
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
432
|
+
/// function used to deploy modular compliance contract using CREATE3.
|
|
433
|
+
function _deployMC(string memory salt, address mcBeacon, TokenDetails calldata tokenDetails, address manager)
|
|
434
|
+
private
|
|
435
|
+
returns (address)
|
|
436
|
+
{
|
|
437
|
+
return _deploy(
|
|
438
|
+
salt,
|
|
439
|
+
MC,
|
|
440
|
+
_beaconProxyBytecode(
|
|
441
|
+
mcBeacon,
|
|
442
|
+
abi.encodeCall(
|
|
443
|
+
ModularCompliance.init,
|
|
444
|
+
(
|
|
445
|
+
_predictAddress(salt, TOKEN),
|
|
446
|
+
manager,
|
|
447
|
+
tokenDetails.complianceModules,
|
|
448
|
+
tokenDetails.complianceSettings
|
|
449
|
+
)
|
|
450
|
+
)
|
|
451
|
+
)
|
|
280
452
|
);
|
|
281
|
-
bytes memory bytecode = abi.encodePacked(_code, _constructData);
|
|
282
|
-
return _deploy(_salt, "MC", bytecode);
|
|
283
453
|
}
|
|
284
454
|
|
|
285
|
-
function
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
455
|
+
/// function used to deploy an identity registry storage using CREATE3.
|
|
456
|
+
function _deployIRS(string memory salt, address irsBeacon, address manager) private returns (address) {
|
|
457
|
+
return _deploy(
|
|
458
|
+
salt,
|
|
459
|
+
IRS,
|
|
460
|
+
_beaconProxyBytecode(
|
|
461
|
+
irsBeacon,
|
|
462
|
+
abi.encodeCall(IdentityRegistryStorage.init, (manager, _predictAddress(salt, REGISTRY), _idFactory))
|
|
463
|
+
)
|
|
464
|
+
);
|
|
291
465
|
}
|
|
292
466
|
|
|
293
|
-
///
|
|
294
|
-
///
|
|
295
|
-
function
|
|
296
|
-
|
|
297
|
-
TokenDetails calldata _tokenDetails,
|
|
298
|
-
address _trustedIssuersRegistry,
|
|
299
|
-
address _claimTopicsRegistry,
|
|
300
|
-
address _identityStorage
|
|
301
|
-
) private returns (address) {
|
|
302
|
-
bytes memory _code = type(IdentityRegistryProxy).creationCode;
|
|
303
|
-
bytes memory _constructData = abi.encode(
|
|
304
|
-
_implementationAuthority,
|
|
305
|
-
_trustedIssuersRegistry,
|
|
306
|
-
_claimTopicsRegistry,
|
|
307
|
-
_identityStorage,
|
|
308
|
-
_tokenDetails.owner,
|
|
309
|
-
_tokenDetails.irAgents,
|
|
310
|
-
_predictAddress(_salt, "Token")
|
|
311
|
-
);
|
|
312
|
-
bytes memory bytecode = abi.encodePacked(_code, _constructData);
|
|
313
|
-
return _deploy(_salt, "IR", bytecode);
|
|
467
|
+
/// @dev Assembles the creation bytecode of a stock OZ `BeaconProxy` pointed at `beacon` and
|
|
468
|
+
/// initialized atomically with `initData` inside the proxy constructor.
|
|
469
|
+
function _beaconProxyBytecode(address beacon, bytes memory initData) private pure returns (bytes memory) {
|
|
470
|
+
return bytes.concat(type(BeaconProxy).creationCode, abi.encode(beacon, initData));
|
|
314
471
|
}
|
|
315
472
|
|
|
316
|
-
///
|
|
317
|
-
///
|
|
318
|
-
///
|
|
319
|
-
///
|
|
473
|
+
/// Resolves the OID (caller-supplied or minted via `IIdentityFactory.createIdentityFor` against the
|
|
474
|
+
/// Token's predicted CREATE3 address) and deploys the Token proxy. A caller-supplied OID must already
|
|
475
|
+
/// be the IdentityFactory's active binding for that same predicted address: the suite never deploys onto
|
|
476
|
+
/// an address the factory resolves to a different identity, or to none (unbound or revoked). The deployer binds it first by
|
|
477
|
+
/// calling `createIdentityFor(predictedToken, IdentityTypes.ASSET, salt, keys)` on the IdentityFactory
|
|
478
|
+
/// with the role the ASSET policy names, and passes the returned identity as `ONCHAINID`. The caller of
|
|
479
|
+
/// the deploy must be a MANAGEMENT key of that identity.
|
|
480
|
+
/// `predictedToken` is `Create3.computeAddress(bytes20(factory) | keccak256(salt ++ "Token") >> 168, factory)`.
|
|
481
|
+
///
|
|
482
|
+
/// Minting is gated: the IdentityFactory resolves the role configured for `IdentityTypes.ASSET`
|
|
483
|
+
/// against its own authority, so this factory must hold that role there for the auto-mint path
|
|
484
|
+
/// (i.e. tokenDetails.ONCHAINID == address(0)):
|
|
485
|
+
/// 1. `identityFactory.setIdentityTypePolicy(IdentityTypes.ASSET, assetDeployer, false, true)`
|
|
486
|
+
/// 2. `accessManager.grantRole(assetDeployer, address(this), 0)`
|
|
487
|
+
/// with `assetDeployer = RolesLib.platform(RolesLib.PlatformRole.ASSET_DEPLOYER)`.
|
|
488
|
+
/// `AccessManagerSetupLib.setupIdentityFactoryPolicy` bundles both. The ASSET module bundle is
|
|
489
|
+
/// registered on the IdentityFactory itself (`setIdentityTypeModules`) as part of its deployment.
|
|
320
490
|
function _deployToken(
|
|
321
|
-
string memory
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
address
|
|
491
|
+
string memory salt,
|
|
492
|
+
address tokenBeacon,
|
|
493
|
+
TokenDetails calldata tokenDetails,
|
|
494
|
+
address manager,
|
|
495
|
+
address identityRegistry,
|
|
496
|
+
address compliance
|
|
325
497
|
) private returns (address) {
|
|
326
|
-
address
|
|
327
|
-
|
|
328
|
-
|
|
498
|
+
address predictedToken = _predictAddress(salt, TOKEN);
|
|
499
|
+
address oid = tokenDetails.ONCHAINID;
|
|
500
|
+
if (oid == address(0)) {
|
|
501
|
+
oid = IIdentityFactory(_idFactory)
|
|
502
|
+
.createIdentityFor(predictedToken, IdentityTypes.ASSET, salt, _managementKeys(manager));
|
|
503
|
+
} else {
|
|
504
|
+
// The token address is predictable, so anyone allowed to create ASSET identities can
|
|
505
|
+
// bind it to their own identity before this deploy runs. The binding is permanent, and
|
|
506
|
+
// the token would then answer to one identity while the IdentityFactory answers another.
|
|
507
|
+
// An unbound slot is refused too: this factory never binds a supplied identity, so the
|
|
508
|
+
// slot would stay open for anyone to take once the token is live.
|
|
509
|
+
// `getIdentity` answers only an active binding, so an unbound, a revoked and a squatted slot all fail.
|
|
510
|
+
address boundIdentity = IIdentityFactory(_idFactory)
|
|
511
|
+
.getIdentity(InteroperableAddress.formatEvmV1(block.chainid, predictedToken));
|
|
512
|
+
require(boundIdentity == oid, ErrorsLib.TokenIdentityNotBound(predictedToken, oid));
|
|
513
|
+
// Binding and deploying are two transactions and the salt is not tied to the caller, so another
|
|
514
|
+
// suite deployer could deploy this salt in between with the issuer's identity and its own admin.
|
|
515
|
+
// Only a MANAGEMENT key of the supplied identity may attach it to a token.
|
|
516
|
+
require(
|
|
517
|
+
IERC734(oid).keyHasPurpose(keccak256(abi.encodePacked(msg.sender)), KeyPurposes.MANAGEMENT),
|
|
518
|
+
ErrorsLib.TokenIdentityNotManagedByCaller(oid, msg.sender)
|
|
519
|
+
);
|
|
520
|
+
}
|
|
521
|
+
return
|
|
522
|
+
_deploy(salt, TOKEN, _tokenBytecode(tokenBeacon, tokenDetails, manager, identityRegistry, compliance, oid));
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
/// @dev Builds the single-entry MANAGEMENT key set granting `managementKey` control of the minted
|
|
526
|
+
/// token OID. Modules are not passed here: the IdentityFactory installs the bundle registered for
|
|
527
|
+
/// the ASSET type via `setIdentityTypeModules`.
|
|
528
|
+
function _managementKeys(address managementKey) private pure returns (Structs.KeyParam[] memory keys) {
|
|
529
|
+
keys = new Structs.KeyParam[](1);
|
|
530
|
+
keys[0] = Structs.KeyParam({
|
|
531
|
+
keyHash: keccak256(abi.encodePacked(managementKey)),
|
|
532
|
+
purpose: KeyPurposes.MANAGEMENT,
|
|
533
|
+
keyType: KeyTypes.ECDSA,
|
|
534
|
+
signerData: abi.encodePacked(managementKey),
|
|
535
|
+
clientData: ""
|
|
536
|
+
});
|
|
329
537
|
}
|
|
330
538
|
|
|
331
539
|
function _tokenBytecode(
|
|
332
|
-
|
|
333
|
-
TokenDetails calldata
|
|
334
|
-
address
|
|
335
|
-
address
|
|
336
|
-
|
|
337
|
-
address oid
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
_tokenDetails.tokenAgents
|
|
540
|
+
address tokenBeacon,
|
|
541
|
+
TokenDetails calldata tokenDetails,
|
|
542
|
+
address manager,
|
|
543
|
+
address identityRegistry,
|
|
544
|
+
address compliance,
|
|
545
|
+
address oid
|
|
546
|
+
) private view returns (bytes memory) {
|
|
547
|
+
return _beaconProxyBytecode(
|
|
548
|
+
tokenBeacon,
|
|
549
|
+
abi.encodeCall(
|
|
550
|
+
IToken.init,
|
|
551
|
+
(
|
|
552
|
+
tokenDetails.name,
|
|
553
|
+
tokenDetails.symbol,
|
|
554
|
+
tokenDetails.decimals,
|
|
555
|
+
identityRegistry,
|
|
556
|
+
compliance,
|
|
557
|
+
_trustedGatewayRegistry,
|
|
558
|
+
oid,
|
|
559
|
+
manager
|
|
560
|
+
)
|
|
354
561
|
)
|
|
355
562
|
);
|
|
356
563
|
}
|