
Security News
Next.js Patches Critical Middleware Vulnerability (CVE-2025-29927)
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.
@erc725/smart-contracts
Advanced tools
This package is currently in BETA, use with caution!
This package contains an implementation of ERC725 to make it as easy as possible to get started.
If you see ways to improve this implementation, you are welcome to create an issue or a pull request.
The package has the following contracts:
ERC725X.sol
: The execute part of ERC725, allows to execute any other smart contract. Uses ERC173 as a basis.ERC725Y.sol
: The data part of ERC725, allows to attach any key-value data to a smart contract. Uses ERC173 as a basis.ERC725.sol
: Combines both implementations: ERC725X.sol
and ERC725Y.sol
.ERC725Account.sol
: An implementation that could be used for a smart contract based account.
event ValueReceived(address indexed sender, uint256 indexed value)
.keccak256('ERC725Type'): 0xee97c7dd2e734cf234c2ba0d83a74633e1ac7fc8a9fd779f8497a0109c71b993
to keccak256('ERC725Account'): 0xafdeb5d6e788fe0ba73c9eb2e30b8a4485e3a18fb31dd13e3b362f62a65c67a0
in the constructor.To use in your project install via npm
npm install @erc725/smart-contracts
And import in your contracts in solidity
import "@erc725/smart-contracts/contracts/ERC725Account.sol";
contract MyContract is ERC725Account {
...
}
And import in your contract ABI in JavaScript
import ERC725Account from "@erc725/smart-contracts/artifacts/ERC725Account.json";
const myContract = new web3.eth.Contract(ERC725Account.abi, "0xsomeaddress...");
Setup:
npm install
Run tests:
npm test
Run linter:
npm run lint
The table below contains a list of ERC165 interface IDs used by the Solidity implementations of the ERC725 smart contracts.
Interface Name | Interface ID | Description |
---|---|---|
ERC725X | 0x44c028fe | General executor |
ERC725Y | 0x5a988c0f | General key-value store |
ERC725Account | 0x63cb749b | ERC725X + ERC725Y + LSP1 + ERC1271 |
ERC165 | 0x01ffc9a7 | Standard Interface Detection for Contracts |
ERC1271 | 0x1626ba7e | Standard Signature Validation Method for Contracts |
LSP1 | 0x6bb56a14 | Universal Receiver entry function |
LSP1Delegate | 0xc2d7bcc1 | Universal Receiver delegated to an other smart contract |
The ERC725Account
's interface ID is calculated as the XOR
of the functions selectors from the interfaces it implements.
Despite the fact that an ERC725Account
is an ownable contract, the selectors from ERC173
(owner()
and transferOwnership(address)
) are omitted in the calculation.
getData // ERC725Y
^ setData // ERC725Y
^ execute // ERC725X
^ universalReceiver // LSP1
^ isValidSignature // ERC1271
= 0x63cb749b // ERC725Account
Notice: you need the
solc
compiler installed locally to use this command. Installation instructions can be found in the solidity documentation
The repository offers a shell utility tool that generate details about each contracts (function selectors, storage layout, evm opcodes...). You can obtain them via the following command.
npm run solc
This will generate files and folders under /solc
solc
|- bytecode/
|- evm/
|- metadata/
|- opcodes/
|- selectors/
|- storage-layout/
|- gas-costs.md
FAQs
ERC725 contract implementations
The npm package @erc725/smart-contracts receives a total of 1,258 weekly downloads. As such, @erc725/smart-contracts popularity was classified as popular.
We found that @erc725/smart-contracts demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.
Security News
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
Product
Socket, the leader in open source security, is now available on Google Cloud Marketplace for simplified procurement and enhanced protection against supply chain attacks.