v0.6.0
What does this release introduce?
see the release changelog for more details
BREAKING CHANGES
🧬 Many interface IDs have been changed
- LSP0:
0x63cb749b
>0x9a3bfe88
- LSP6:
0x6f4df48b
>0xc403d48f
- LSP9:
0x75edcee5
>0x8c1d44f6
LSP0 + LSP9 now includes the functions from ClaimOwnership when calculating their interface ID.
🔑 LSP6 - Key Manager
- the contract includes the standard
target()
function in its interface, that enables to retrieve the address of the ERC725 Account linked to this Key Manager. - ⛔ delegatecall is also disabled in the KeyManager by default for security, as this type of operation is dangerous and could be harmful for the linked account.
- The
Executed
event in the KeyManager now include only thebytes4
selector of the function run on the linked ERC725 account. 📉 This reduce gas and transaction cost when interacting with Universal Profile via Key Manager. - the parameters of the function
executeRelayCall(...)
have been changed and re-ordered. Function selector changed from0x32e6d0ab
❌ to0xc403d48f
✅ (see lukso-network/LIPs#77 and #159 for details about the changes)
Before
function executeRelayCall(
address _signedFor,
uint256 _nonce,
bytes calldata _data,
bytes memory _signature
) external payable returns (bytes memory);
Now
function executeRelayCall(
bytes memory _signature,
uint256 _nonce,
bytes calldata _calldata
) external payable returns (bytes memory);
- The
signature
inexecuteRelayCall(...)
includes an additional parameterchainId
. It MUST be constructed as follow:
<block.chainid> + <KeyManager address> + <signer nonce> + <_calldata payload>
LSP2
-
the
SupportedStandards:{LSPN}
metadata keys were changed with a new bytes ordering. See lukso-network/LIPs#84 for details about the change. -
the name + semantics of multiple key types were changed:
Mapping
: includes standard Mapping + oldBytes20Mapping
Bytes20MappingWithGrouping
❌ > renamed toMappingWithGrouping
.
For more details about the LSP2 breaking changes, see:
Features
- LSP0 and LSP9 contracts now use ClaimOwnership as a new mechanism to transfer ownership of the contract to a new owner.
🔑 LSP6 - Key Manager
- LSP6KeyManager now introduce two additional paths to interact with the linked ERC725Account:
claimOwnership()
: for transferring ownership from an EOA to a KeyManager, or upgrading to a KeyManager.setData(bytes32,bytes)
: enable to set a single ERC725Y data key, without the need to wrap it into an array.
- introduce the following SUPER permissions in LSP6KeyManager:
SUPERS_SETDATA
: allow to skip checks for AllowedERC725YKeys and save gas when setting data on the linked account.SUPER_TRANSFERVALUE
,SUPER_CALL
,SUPER_STATICCALL
andSUPER_DELEGATECALL
: allow to skip checks for AllowedAddresses, Functions and Standards and save gas on contract interactions.
- The functions
execute(...)
andexecuteRelayCall(...)
now handle and bubble up custom Solidityerror
fired on target contracts.
🪙 🎨 Tokens & NFTs Standards (LSP7 + LSP8)
- Both LSP7 and LSP8 + the LSP7/8 Capped Supply preset contracts now use Solidity custom
error
Others
- 🏭 introduce a
UniversalFactory
contract, that enable to deploy Universal Profile and other LSP smart contracts across multiple chains at the same address.
Bug Fixes
🔔 LSP1 - Universal Receiver
- an extra check has been added to ensure the sender is a smart contract and not an EOA, so to prevent spamming on the Universal Receiver Delegate.
🔑 LSP6 - Key Manager
- add
chainId
parameter inexecuteRelayCall(...)
, to prevent replay attacks across multiple chains. - value can now be forwarded via the
executeRelayCall(...)
function.
🪙 🎨 Tokens & NFTs Standards (LSP7 + LSP8)
- The data keys
LSP4TokenName
andLSP4TokenSymbol
is now not editable in both LSP7 and LSP8. - apply check-effect-interaction pattern in LSP7 and LSP8 contracts
🏗️ Build
@erc725/smart-contracts
The main changes relates to the @erc725/smart-contracts
main dependency. The dependency was bumped from 2.3.0
to 3.1.0
. This introduced several breaking changes:
-
ERC725X
:Executed
event inERC725X.execute(...)
now include only the first 4 bytes of the function selector being run on the contract being called. 📉- 🚫 the operation type
DELEGATE_CALL
does not check anymore if theowner()
has been changed after doing a delegatecall. This resulting in disallowing this operation type completely on the KeyManager. - value cannot be passed as a parameter (MUST be 0) for operation types
STATICCALL
andDELEGATECALL
- the
to
address MUST beaddress(0)
for operation typeCREATE
andCREATE2
-
ERC725Y
:DataChanged
event only emit the data key edited, not the value that was changed. 📉- introduce overloaded functions
getData(bytes32)
andsetData(bytes32,bytes)
to enable to read/write only one data key from the key-value store. 🗄️
For more details about these changes, see https://github.com/ERC725Alliance/ERC725/blob/develop/implementations/CHANGELOG.md
constants.js
file
- The constant file was changed from Typescript to Javascript.
- The permission
DELEGATECALL
was removed from theALL_DEFAULT_PERMISSIONS
constant value.