Releases: lukso-network/lsp-smart-contracts
v0.6.1
What does this PR introduce?
- bump
package.json
version from0.6.0
->0.6.1
- added release to
CHANGELOG.md
BREAKING CHANGES
- the LSP2 array data keys defined in
constants.js
are now splitted in two:.length
and.index
(#192)
-
🧬 the interfaceId of the LSP1Delegate contract was changed from
0xc2d7bcc1
>0xa245bbda
, because of the change in its function definition. See below for more details. -
🔈 🗒️ the function
universalReceiverDelegate(...)
in theLSP1UniversalReceiverDelegate
contract now accept an extra parameteruint256 value
, to inform the delegate contract if some value was to the contract implementing the LSP1 standard.
The function definition was changed from this (before)
function universalReceiverDelegate(
address sender,
bytes32 typeId,
bytes memory data
) external returns (bytes memory result);
to this (after)
function universalReceiverDelegate(
address caller,
uint256 value,
bytes32 typeId,
bytes memory data
) external returns (bytes memory result);
See the function definition here for more info: https://github.com/lukso-network/lsp-smart-contracts/blob/ac4133b40c10e0b73227caa6f3a2b88b32bf4403/contracts/LSP1UniversalReceiver/ILSP1UniversalReceiverDelegate.sol#L10-L23
Features
-
update
receive()
function tofallback() payable
, to allow sending random bytes payload to the fallback function. (#194) -
🔈 the
universalReceiver(...)
function is now payable and can receive native tokens while being called. (#193) (5b2bc60) -
add error signatures in
constants.js
(#191) -
add LSP1 Type IDs in
constants.js
(#196)
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.
v0.5.0
Features
- 🔑 ➕ Add a new type of permissions
AllowedERC725YKeys
in the KeyManager. Enables to restrict anaddress
that has permissionSETDATA
to set only a specific set ofbytes32
keys.
This includes partial keys, which can be useful for keys that derive from the Mapping or Array key types defined in LSP2 - ERC725Y JSON Schema
-
🧬 added interface ids of ERC tokens standards in the file
constants.ts
. This includesERC20
,ERC721
,ERC223
,ERC777
andERC1155
. -
added proxy versions of
LSP7CompatibilityForERC20
andLSP8CompatibilityForERC721
Deprecated
- ➖ remove + drop support for
dataKeys[]
andallDataKeys()
function in Universal Profile contracts.
Bug fixes
ILSP8CompatabilityForERC721
isApprovedForAll(...)
params matchIERC721
⚠️ fix medium security vulnerability inLSP1UniversalReceiverUP
contract
A new security check has been added to this contract to that the profile(msg.sender) making the call to the Universal Receiver is the same profile than the one extracted from the Key Manager read from the owner()
function
Commits references
Features
- add check for multiple
ERC725Y
keys (5ee41c7) - add check for partial keys + test for Mapping keys (57923ca)
- add custom error log for AllowedERC725YKey (dcefa95)
- allow whitelisting any ERC725Y key if nothing set (41dd20f)
- create LSP7CompatabilityForERC20InitAbstract (516d195)
- create LSP8CompatabilityForERC721InitAbstract (1ded846)
- first draft implementation of
AllowedERC725YKeys
, with only one key check (ac567c3) - LSP7CompatibilityForERC20 proxy and constructor version (131eed0)
- LSP8CompatibilityForERC721 proxy and constructor version (ffccc4b)
Bug Fixes
v0.4.3
What Changes this PR introduce ?
- Fix OZ initializer breaking change
- Add InitAbstract contracts used for inheritance in case of proxies
- Move ERC725Account to the repo'
- Move related libraries
v0.3.0
This release mainly changes the way smart contracts are exposed in the npm package:
(build/
is now not in the path anymore)
in Javascript
You can use the contracts JSON ABI by importing them as follow:
import UniversalProfile from "@lukso/universalprofile-smart-contracts/artifacts/UniversalProfile.json";
const myContract = new this.web3.eth.Contract(UniversalProfile.abi, "", defaultOptions);
in Solidity
import UniversalProfile from "@lukso/universalprofile-smart-contracts/contracts/UniversalProfile.sol";
BREAKING CHANGE in the KeyManager: For the KeyManager, we changed the permission bit order!
The new order can be found here: https://docs.lukso.tech/standards/LSP6-KeyManager#-permission-values
All permission from SETDATA
on are pushed one bit higher, as we added the ADDPERMISSIONS
permission. To distinguish between CHANGEPERMISSION
and adding permissions (the latter is far more sensitive).
⚠ BREAKING CHANGES
-
ILSP6 interface return type change.
-
test!(KM): return bytes or revert on
execute
/executeRelayCall
Tests by interacting with TargetContract
-
test!(KM): Remove gasLimit specified in tests.
-
feat!(KM): Extend permission range to 256 (32 bytes)
-
test!(KM): Use 32 bytes padding for 32 bytes permissions range
-
test!: ➕ set AddressPermissions[] in tests
Addresses with permissions set MUST be added to an array inside ERC725Y key-value (see LSP6 specs)
-
Fixed KeyManager permission key name
-
the contracts + artifacts names have changed for all three packages
-
feat!: ✨ make ERC20 / 721 compatible versions of LSP7/8 deployable
-
fix: 💚 fix solhint CI error for empty block
-
build: ➖ remove submodule folder
ERC725 contracts are now imported as a npm package @erc725/smart-contracts/
Co-authored-by: YamenMerhi [email protected]
- npm: ➕ add npm dependency:
@erc725/smart-contracts
Bug Fixes
build
v0.2.2
This release is the first release of the final UniversalProfile setup. It should be seen as a draft and not production ready release! Please use with caution!
⚠ BREAKING CHANGES
-
ILSP6 interface return type change.
-
test!(KM): return bytes or revert on
execute
/executeRelayCall
Tests by interacting with TargetContract
-
test!(KM): Remove gasLimit specified in tests.
-
feat!(KM): Extend permission range to 256 (32 bytes)
-
test!(KM): Use 32 bytes padding for 32 bytes permissions range
-
test!: ➕ set AddressPermissions[] in tests
Addresses with permissions set MUST be added to an array inside ERC725Y key-value (see LSP6 specs)
Bug Fixes
JSON Artifacts
Include contracts ABIs as JSON.
Typechain and Hardhat
Migrated from truffle to hardhat 🚀