🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis
Socket
Book a DemoInstallSign in
Socket

@hashgraph/asset-tokenization-contracts

Package Overview
Dependencies
Maintainers
15
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hashgraph/asset-tokenization-contracts

npmnpm
Version
1.15.0
Version published
Weekly downloads
292
27.51%
Maintainers
15
Weekly downloads
 
Created
Source

Asset Tokenization Studio - Contracts

License

Table of Contents

Description

The contracts module contains the code of all the solidity smart contracts deployed on Hedera.

The standard used for security token is ERC-1400.

Version 1.15.0 introduces partial compatibility with the ERC-3643 (TREX) standard; full identity and compliance support will be added in future releases.

ERC-3643 compatibility

functionstatus
onchainID() external view returns (address)Pending
version() external view returns (string memory)Done
identityRegistry() external view returns (IIdentityRegistry)Pending
compliance() external view returns (ICompliance)Pending
paused() external view returns (bool)Done
isFrozen(address _userAddress) external view returns (bool)Done
getFrozenTokens(address _userAddress) external view returns (uint256)Done
setName(string calldata _name) externalDone
setSymbol(string calldata _symbol) externalDone
setOnchainID(address _onchainID) externalPending
pause() externalDone
unpause() externalDone
setAddressFrozen(address _userAddress, bool _freeze) externalDone
freezePartialTokens(address _userAddress, uint256 _amount) externalDone
unfreezePartialTokens(address _userAddress, uint256 _amount) externalDone
setIdentityRegistry(address _identityRegistry) externalPending
setCompliance(address _compliance) externalPending
forcedTransfer(address _from, address _to, uint256 _amount) external returns (bool)Done
mint(address _to, uint256 _amount) externalDone
burn(address _userAddress, uint256 _amount) externalDone
recoveryAddress(address _lostWallet, address _newWallet, address _investorOnchainID) external returns (bool)Done
batchTransfer(address[] calldata _toList, uint256[] calldata _amounts) externalDone
batchForcedTransfer(address[] calldata _fromList, address[] calldata _toList, uint256[] calldata _amounts) externalDone
batchMint(address[] calldata _toList, uint256[] calldata _amounts) externalDone
batchBurn(address[] calldata _userAddresses, uint256[] calldata _amounts) externalDone
batchSetAddressFrozen(address[] calldata _userAddresses, bool[] calldata _freeze) externalDone
batchFreezePartialTokens(address[] calldata _userAddresses, uint256[] calldata _amounts) externalDone
batchUnfreezePartialTokens(address[] calldata _userAddresses, uint256[] calldata _amounts) externalDone

Installation

Run the command :

npm ci

Build

Run the command :

npm run compile:force

Tasks

deployAll

Deploys the full infrastructure (factory, resolver, facets, and initialized contracts) in a single execution.

Parameters:

  • useDeployed (optional, default: true): Reuses already deployed contracts.
  • file-name (optional): The output file name.
  • privateKey (optional): Private key in raw hexadecimal format.
  • signerAddress (optional): Signer address from the Hardhat signers array.
  • signerPosition (optional): Index of the signer in the Hardhat signers array.
npx hardhat deployAll --useDeployed false

deploy

Deploys a specific contract.

Parameters:

  • contractName (required): Name of the contract to deploy (e.g., ERC20, Bond).
  • privateKey (optional): Private key in raw hexadecimal format.
  • signerAddress (optional): Signer address from the Hardhat signers array.
  • signerPosition (optional): Index of the signer in the Hardhat signers array.
npx hardhat deploy --contractName ERC20

keccak256

Calculates and prints the Keccak-256 hash of a given string.

Parameters:

  • input (required): The string to be hashed.
npx hardhat keccak256 "ADMIN_ROLE"

getConfigurationInfo

Fetches and displays detailed information about all facets (implementations) associated with a specific configuration ID from the BusinessLogicResolver.

Parameters:

  • resolver (required): The resolver proxy admin address.
  • configurationId (required): The configuration ID.
  • network (required): The network to use (e.g., local, previewnet, testnet, mainnet).
npx hardhat getConfigurationInfo  <resolverAddress> <configurationId> --network <network-name>

getResolverBusinessLogics

Retrieves and lists all registered business logic keys (contract identifiers) from a BusinessLogicResolver contract.

Parameters:

  • resolver (required): The resolver proxy admin address.
  • network (required): The network to use (e.g., local, previewnet, testnet, mainnet).
npx hardhat getResolverBusinessLogics <resolverAddress> --network <network-name>

updateBusinessLogicKeys

Registers or updates the addresses of a list of business logic implementation contracts in a specified BusinessLogicResolver.

Parameters:

  • resolverAddress (required): The address of the BusinessLogicResolver contract.
  • implementationAddressList (required): A comma-separated list of contract addresses to be registered or updated in the resolver.At least all facets already registered must be included.
  • privateKey (optional): The private key in raw hexadecimal format of the account that will sign the transaction.
  • signerAddress (optional): The address of the signer to select from the Hardhat signers array.
  • signerPosition (optional): The index of the signer to select from the Hardhat signers array.
  • network (required): The network to run the command on (e.g., localhost, mainnet, testnet).
npx hardhat updateBusinessLogicKeys <resolverAddress> <allFacetsAddressList> --network <network-name>

updateProxyImplementation

Upgrades the implementation address for a given transparent proxy contract. This task executes the upgrade by calling the upgrade function on the associated ProxyAdmin contract. The signer executing this task must be the owner of the ProxyAdmin contract.

Parameters:

  • proxyAdminAddress (required): The address of the ProxyAdmin contract that owns the proxy.
  • transparentProxyAddress (required): The address of the transparent proxy contract to be upgraded.
  • newImplementationAddress (required): The address of the new implementation contract.
  • privateKey (optional): The private key in raw hexadecimal format of the account that will sign the transaction.
  • signerAddress (optional): The address of the signer to select from the Hardhat signers array.
  • signerPosition (optional): The index of the signer to select from the Hardhat signers array.
  • network (required): The network to run the command on (e.g., localhost, mainnet, testnet).
npx hardhat updateProxyImplementation <proxyAdminAddress> <transparentProxyAddress> <newImplementationAddress> --network <networkName>

getProxyAdminConfig

Retrieves key configuration details from a ProxyAdmin contract. It fetches the owner of the ProxyAdmin contract and the current implementation address for a specific proxy contract that it manages.

Parameters:

  • proxyAdmin (required): The address of the ProxyAdmin contract.
  • proxy (required): The address of the proxy contract managed by the ProxyAdmin.
  • network (required): The network to run the command on (e.g., localhost, mainnet, testnet).
npx hardhat getProxyAdminConfig <proxyAdminAddress> <proxyAddress> --network <networkName>

Test

The contracts tests are located in the test folder at the root of the contracts module.

In order to execute all the tests run this command from the contracts folder:

npm run test

Adding a new facet

When introducing a new facet to the project, make sure to follow these steps:

  • Register the contract name
    Add the name of the new facet to the CONTRACT_NAMES array in the Configuration.ts file.

  • Update the deploy task listener
    In the deployAll task, include the new facet so its contract address is properly tracked via the mirror node.

  • Deploy the facet
    In scripts/deploy.ts, within the deployAtsContracts function, add the logic to deploy the new facet and ensure the script awaits its deployment.

Latest Deployed Smart Contracts

ContractAddressID
Business Logic Resolver Proxy0x20448EABf5d0EC3De6e26cce124Bf7b83E71F4610.0.6349503
Business Logic Resolver Proxy Admin0xBcAd67895fa1AB30Df5d693307e33660bB3599640.0.6349502
Business Logic Resolver0xc253Cd59916ed746c26d479c22208bd899F2F84e0.0.6349501
Factory Proxy0xDC7371539489925573Cb4cf645fE4185E9A34e1a0.0.6349546
Factory Proxy Admin0xc65e58224c647e6274F7aADa6B970Ee414DB2A3A0.0.6349545
Factory0x60896554591765161B5cb30934FB028fD0dD8CBB0.0.6349544
Access Control0xdF76da9E60dFdFC9a7807A006f86Dbd2b7eba2b10.0.6349504
Cap0xcc0C74A0F02873423681b1B4a14BfC4c9b90a2680.0.6349505
Control List0xa05d3Ab681b07aD0194266140acd0D28E13e49320.0.6349506
Kyc0x2635272E889a9f41043f043B7e878DB6578F59210.0.6349507
SsiManagement0xABBFd0f021B09e48FC134f793790D45396F312310.0.6349508
Pause0x6358D00e1500e2DC14cD076318AA90eD37db2FDb0.0.6349509
ERC200xCfC89968210EAEB7eBcdF332385562eB7982Ff6B0.0.6349512
ERC14100xD39a5923a14346088077234BB2a1AD0bC5f221b70.0.6349513
ERC15940xF0a03D43D0E134f870659593A84f366F12E647820.0.6349514
ERC16430xB7DF58517970079b534b2AB23C90582917c0fC2C0.0.6349515
ERC16440x9959aB13DBc4bcaE106d78F6b7d3f33d8b6Deadc0.0.6349516
Snapshots0x0063FAdf9c4A38101b23F1215462f570A1805A180.0.6349517
Diamond Facet0x085826Ee602dc86F94f9B3603B35E4E2CA430f0b0.0.6349518
Equity0x82c250Ab02CbD1A7a7098460DBbCe95A216ED3DA0.0.6349519
Bond0xA9baf66163cb8ef74d73De9eB02eE3b321d302F00.0.6349520
Scheduled Snapshots0x5f8f36f338F239b2AD669eE6A1cBaF819B5BB0ac0.0.6349521
Scheduled Balance Adjustments0x2DbeE4b90CfCbb655eDFf0e6b989149087e8393a0.0.6349524
Scheduled Tasks0x900fA92765d466d14AF0C1F2C1e649144dAb34170.0.6349525
Corporate Actions0x9AA5cEE07F067435066588580228BfDB6785152b0.0.6349526
Lock0x9Dde239930346251411A5543F499f324A10F65E10.0.6349510
Hold0x9EF517df653883450c6B2c19e57491a980D48A660.0.6349511
Transfer and Lock0x5B0CEA189499A2CF29ea3C657ED88b01FFA3528b0.0.6349527
Adjust Balances0x042e75E2679bcd03901F372fcC661ede508911ca0.0.6349528
Clearing Action Facet0xd853bD0535c6F8242a90778Eca6B816B2F7Cbe3d0.0.6349537
Clearing Transfer Facet0x8657Fced3D157De64D948cD2E0F1573D0B9F75270.0.6349530
Clearing Redeem Facet0xb5E711220F25093581001B5A102D468C9CFBA5370.0.6349532
Clearing Hold Creation Facet0x4e41a4be0D4A11A10Af6D8E5D710860F7f8877140.0.6349535
Clearing Read Facet0xd0A6A587D9E718e2ce597539D5dF8F6ad4bD8D930.0.6349536
External Pause Management Facet0x4780E9985D781417fD16d5eE35C5Aeef2aeF26Ba0.0.6349538
External Control List Management Facet0xdD854B7d21A581F29cF1a85b784af8F0Bb4516550.0.6349539
External Kyc List Management Facet0xd961b9FeD6E817e79148295bbFe904E92A5CA2280.0.6349540
Protected Partitions0x2b86fDa0fe11E2eb6cf2C3a20f88cD5FB6d573E60.0.6349529
ERC36430x48C2FaC3660f30E0Fa6C539f28acc78D528f5dCb0.0.6349541

FAQs

Package last updated on 18 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts