# @erc725/smart-contracts 5.0.0
## ERC725
- Change interfaceId of ERC725X and ERC725Y:
- ERC725X from `0x570ef073` to `0x7545acac`
- ERC725Y from `0x714df77c` to `0x629aa694`
- Remove function overloading in `setData`/`getData` and `execute`
```js=
// Old
function getData(bytes32[] memory dataKeys) external view returns(bytes[] memory dataValues);
Changed to:
// New
function getDataBatch(bytes32[] memory dataKeys) external view returns(bytes[] memory dataValues);
```
```js=
// Old
function execute(uint256[] memory operationTypes, address[] memory targets, uint256[] memory values, bytes[] memory dataValues) external payable returns(bytes[] memory);
Changed to:
// New
function executeBatch(uint256[] memory operationTypes, address[] memory targets, uint256[] memory values, bytes[] memory dataValues) external payable returns(bytes[] memory);
```
```js=
// Old
function setData(bytes32[] memory dataKeys, bytes[] memory dataValues) external payable;
Changed to:
// New
function setDataBatch(bytes32[] memory dataKeys, bytes[] memory dataValues) external payable;
```
This change was added to make the standard language-independant, as some other blockchain languages such as Vyper and Cairo don't support function overloading and don't plan to support it.
This change made it easier for contracts to detect functions in the interface, and will be helpful for js/ts code, so instead of having these notation:
```js
// web3.js example
// setData
myContract.methods['setData(bytes32,bytes)'](dataKey, dataValue).send()
// setData Array
myContract.methods['setData(bytes32[],bytes[])']([dataKeys, ...], [dataValues, ...]).send()
// execute
myContract.methods['execute(uint256,address,uint256,bytes)'](OPERATION_CALL, target.address, 2WEI, "0x").send();
// execute Array
myContract.methods['execute(uint256[],address[],uint256[],bytes[])']([OPERATION_CALL, OPERATION_CREATE], [target.address, ZERO_ADDRESS], [2WEI, 0WEI], ["0x", CONTRACT_BYTECODE]).send()
// OR
// setData
myContract.methods['0x7f23690c'](dataKey, dataValue).send()
// setData Array
myContract.methods['0x14a6e293']([dataKeys, ...], [dataValues, ...]).send()
// execute
myContract.methods['0x44c028fe'](OPERATION_CALL, target.address, 2WEI, "0x").send();
// execute Array
myContract.methods['0x13ced88d']([OPERATION_CALL, OPERATION_CREATE], [target.address, ZERO_ADDRESS], [2WEI, 0WEI], ["0x", CONTRACT_BYTECODE]).send()
```
You can call the function directly with `.functionName` notation for example:
```js
// web3.js example
// setData
myContract.methods.setData(dataKey, dataValue).send()
// setData Array
myContract.methods.setDataBatch([dataKeys, ...], [dataValues, ...]).send()
// execute
myContract.methods.execute(OPERATION_CALL, target.address, 2WEI, "0x").send();
// execute Array
myContract.methods.executeBatch([OPERATION_CALL, OPERATION_CREATE], [target.address, ZERO_ADDRESS], [2WEI, 0WEI], ["0x", CONTRACT_BYTECODE]).send()
```
# @lukso/lsp-smart-contracts 0.10.0
## InterfaceIds
- Change in the interfaceIds:
- ERC725X from `0x570ef073` to `0x7545acac`
- ERC725Y from `0x714df77c` to `0x629aa694`
- LSP0 from `0x0f15a0af` to `0x3e89ad98`
- LSP6 from `0xfb437414` to `0x06561226`
- LSP9 from `0x06561226` to `0x28af17e6`
## LSP0
- Remove function overloading for `execute`, `setData` and `getData`. Check first section for more information.
## LSP6
- Remove function overloading for `execute` and `executeRelayCall`.
```js=
// Old
function execute(uint256[] memory values, bytes[] memory payload) external payable returns(bytes[] memory);
Changed to:
// New
function executeBatch(uint256[] memory values, bytes[] memory payload) external payable returns(bytes[] memory);
```
```js=
// Old
function executeRelayCall(bytes[] memory signatures, uint256[] memory nonces, uint256[] memory validityTimestamps, uint256[] memory values, bytes[] memory payloads) external payable returns (bytes[] memory)
Changed to:
// New
function executeRelayCallBatch(bytes[] memory signatures, uint256[] memory nonces, uint256[] memory validityTimestamps, uint256[] memory values, bytes[] memory payloads) external payable returns (bytes[] memory)
```
Which make it easier to call previous overloaded functions such as `execute` and `executeBatch`, `executeRelayCall` and `executeRelayCallBatch`. Same example of ERC725.
Instead of calling functions with `[]` notation you can directly call the functions with `.functionName` notation.
<hr>
- Add validityTimestamp feature for signed Messages.
- Before Messages were signed like this:
`0x19 <0x00> <KeyManager address> <LSP6_VERSION> <chainId> <nonce> <value> <payload>`
- Now Messages are signed like this:
`0x19 <0x00> <KeyManager address> <LSP6_VERSION> <chainId> <nonce> <validityTimestamps> <value> <payload>`
With:
- `0x19`: byte intended to ensure that the `signed_data` is not valid RLP.
- `0x00`: version 0 of the EIP191.
- `KeyManager address`: The address of the Key Manager executing the payload.
- `LSP6_VERSION`: Version relative to the LSP6KeyManager defined as a uint256 equal to 6.
- `chainId`: The chainId of the blockchain where the Key Manager is deployed, as a uint256.
- `nonce`: The nonce to sign the payload with, as a uint256.
- `validityTimestamps`: Two uint128 timestamps concatenated, the first timestamp determines from when the payload can be executed, the second timestamp delimits the end of the validity of the payload. If validityTimestamps is 0, the checks of the timestamps are skipped.
- `value`: The amount of native token to transfer to the linked target contract alongside the call.
- `payload`: The payload to be executed.
To construct in `ethers.js` you can use a function like this:
```ts=
export function createValidityTimestamps(
startingTimestamp: number,
endingTimestamp: number
): BytesLike {
return ethers.utils.hexConcat([
ethers.utils.zeroPad(ethers.utils.hexlify(startingTimestamp), 16),
ethers.utils.zeroPad(ethers.utils.hexlify(endingTimestamp), 16),
]);
}
```
The function signature of `executeRelayCall` and `executeRelayCallBatch` changed to:
```solidity
function executeRelayCall(bytes memory signature, uint256 nonce, uint256 validityTimestamps, bytes memory payload) external payable returns (bytes memory)
```
```solidity
function executeRelayCallBatch(bytes[] memory signatures, uint256[] memory nonces, uint256[] memory validityTimestamps, uint256[] memory values, bytes[] memory payloads) external payable returns (bytes[] memory)
```
## LSP7
- Remove function overloading for `setData` and `getData`. Check first section for more information.
- Add `increaseAllowance`/`decreaseAllowance` as non standard functions to solve double spend allowance issue.
- Change the visibility of tokens variable to private to enforce access through standard functions
## LSP8
- Remove function overloading for `setData` and `getData`. Check first section for more information.
- Change the visibility of tokens variable to private to enforce access through standard functions
## LSP9
- Remove function overloading for `execute`, `setData` and `getData`. Check first section for more information.