Skip to content

Commit

Permalink
Merge pull request #703 from lukso-network/develop
Browse files Browse the repository at this point in the history
chore(release): v0.11.0
  • Loading branch information
frozeman authored Sep 6, 2023
2 parents 3889bcd + b8eca3c commit 736ad22
Show file tree
Hide file tree
Showing 227 changed files with 47,239 additions and 4,286 deletions.
32 changes: 22 additions & 10 deletions .github/workflows/build-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,34 @@ jobs:
build-artifacts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout main branch
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.base.sha }}
fetch-depth: 0

- name: Check if version changed
uses: EndBug/version-check@v2
id: check
- name: Grab version in `package.json` in main
run: echo "version=$(cat package.json | jq -r .version)" >> $GITHUB_OUTPUT
id: base-version

- name: Checkout develop branch
uses: actions/checkout@v3

- name: Use Node.js '16.15.0'
uses: actions/setup-node@v2
- name: Grab version in `package.json` in develop
run: echo "version=$(cat package.json | jq -r .version)" >> $GITHUB_OUTPUT
id: new-version

- name: Compare versions
uses: madhead/semver-utils@latest
id: comparison
with:
node-version: "16.15.0"
cache: "npm"
version: ${{ steps.new-version.outputs.version }}
compare-to: ${{ steps.base-version.outputs.version }}

- name: Install Dependencies
run: npm ci
- name: Check if version increased
id: check
run: |
[[ ">" == "${{ steps.comparison.outputs.comparison-result }}" ]] && echo "changed=true" || echo "changed=false" >> "$GITHUB_OUTPUT"
# Trigger Release
- name: Repository Dispatch
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ jobs:
"lsp9init",
"lsp11",
"lsp11init",
"lsp17",
"lsp20",
"lsp20init",
"lsp23",
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/create-github-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,3 @@ jobs:
PR_BODY: ${{ steps.findPR.outputs.body }}
run: |-
echo ${PR_BODY}|cat - RELEASENOTES.md > /tmp/out && mv /tmp/out RELEASENOTES.md
- uses: ncipollo/release-action@v1
with:
artifacts: "ios/LSPSmartContracts.swift"
bodyFile: "RELEASENOTES.md"
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ env.APP_VERSION }}
3 changes: 2 additions & 1 deletion .github/workflows/publish-npm-artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ jobs:
run: |
npm ci
# This will also generate the Typechain types used by the Chai tests
# This will also generate the auto-generated constants for methods, errors and events,
# including extracting their devdocs and userdocs
- name: Build and Test
run: |
npx hardhat compile
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/solc_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,13 @@ jobs:
"0.8.12",
"0.8.13",
"0.8.14",
# 0.8.15 skipped as default in hardhat.config.ts
"0.8.15",
"0.8.16",
"0.8.17",
# 0.8.17 skipped as default in hardhat.config.ts
"0.8.18",
"0.8.19",
"0.8.20",
"0.8.21",
]
steps:
- uses: actions/checkout@v3
Expand Down
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,6 @@ deployments

.idea

# auto-generated docs
docs/

# Solidity Flattener
flat_contracts/

Expand All @@ -145,4 +142,4 @@ benchmark.md
/userdocs

# test temporary folder
/.test
/.test
2 changes: 1 addition & 1 deletion .solcover.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
skipFiles: ['Mocks', 'Legacy'],
skipFiles: ['Mocks', 'Legacy', 'Create2Factory'],
};
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,44 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [0.11.0](https://github.com/lukso-network/lsp-smart-contracts/compare/v0.11.0-rc.1...v0.11.0) (2023-09-06)

### ⚠ BREAKING CHANGES

- Include LSP20 in interfaceId calculation ([#668](https://github.com/lukso-network/lsp-smart-contracts/pull/668)), from: `0x3e89ad98` to `0x24871b3d`

- Return instead of revert when the `LSP1UniversalReceiverDelegateUP` is not able to register LSP5-LSP10 data keys. ([#672](https://github.com/lukso-network/lsp-smart-contracts/pull/672))

- Change event name in LSP6 from `VerifiedCall` to `PermissionsVerified`. ([#673](https://github.com/lukso-network/lsp-smart-contracts/pull/673))

- Rename LSP23 to `LSP23LinkedContractsFactory`. ([#675](https://github.com/lukso-network/lsp-smart-contracts/pull/675))

- Change LSP6 interfaceId from `0x38bb3cdb` to `0x66918867`. ([#696](https://github.com/lukso-network/lsp-smart-contracts/pull/696))

- Change LSP7 interfaceId from `0xda1f85e4` to `0x05519512`. ([#700](https://github.com/lukso-network/lsp-smart-contracts/pull/700))

- Change LSP8 interfaceId from `0x622e7a01` to `0x1ae9ba1f`. ([#700](https://github.com/lukso-network/lsp-smart-contracts/pull/700))

- Remove `LSP0Utils.sol`. ([#683](https://github.com/lukso-network/lsp-smart-contracts/pull/683))

- Change token LSP1 notification data format from `abi.encodepacked` to `abi.encode`. ([#699](https://github.com/lukso-network/lsp-smart-contracts/pull/699))

- Notify Operator via LSP1 in `authorizeOperator` in LSP7 and LSP8. ([#700](https://github.com/lukso-network/lsp-smart-contracts/pull/700))

### Features

- Add LSP25ExecuteRelayCall as its seperate standard. ([#678](https://github.com/lukso-network/lsp-smart-contracts/pull/678))

### Bug Fixes

- Refactor `_fallbackLSP17Extendable` function to enable to run code after it is called + prevent potential solc bug "storage write removal". ([#674](https://github.com/lukso-network/lsp-smart-contracts/pull/674))

- Update lsp8 compatible approve() logic to allow operators themselves to authorize operators. ([#681](https://github.com/lukso-network/lsp-smart-contracts/pull/681))

### Build

- upgrade `@erc725/smart-contracts` version to 5.2.0 ([#696](https://github.com/lukso-network/lsp-smart-contracts/pull/696))

## [0.11.0-rc.1](https://github.com/lukso-network/lsp-smart-contracts/compare/v0.1...v0.11.0-rc.1) (2023-08-08)

### ⚠ BREAKING CHANGES
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ import {
ERC725YDataKeys,
PERMISSIONS,
ALL_PERMISSIONS,
LSP25_VERSION,
ErrorSelectors,
EventSigHashes,
FunctionSelectors,
Expand Down
40 changes: 26 additions & 14 deletions constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,19 @@ export const INTERFACE_IDS = {
ERC1155: '0xd9b67a26',
ERC725X: '0x7545acac',
ERC725Y: '0x629aa694',
LSP0ERC725Account: '0x3e89ad98',
LSP0ERC725Account: '0x24871b3d',
LSP1UniversalReceiver: '0x6bb56a14',
LSP6KeyManager: '0x38bb3cdb',
LSP7DigitalAsset: '0xda1f85e4',
LSP8IdentifiableDigitalAsset: '0x622e7a01',
LSP6KeyManager: '0x66918867',
LSP7DigitalAsset: '0x05519512',
LSP8IdentifiableDigitalAsset: '0x1ae9ba1f',
LSP9Vault: '0x28af17e6',
LSP11BasicSocialRecovery: '0x049a28f1',
LSP14Ownable2Step: '0x94be5999',
LSP17Extendable: '0xa918fa6b',
LSP17Extension: '0xcee78b40',
LSP20CallVerification: '0x1a0eb6a5',
LSP20CallVerifier: '0x480c0ec2',
LSP25ExecuteRelayCall: '0x5ac79908',
};

// ERC1271
Expand Down Expand Up @@ -95,9 +96,9 @@ export type LSPSupportedStandard = { key: string; value: string };
* and contain a set of pre-defined ERC725Y Data Keys.
*/
export const SupportedStandards = {
LSP3UniversalProfile: {
key: '0xeafec4d89fa9619884b60000abe425d64acd861a49b8ddf5c0b6962110481f38',
value: '0xabe425d6',
LSP3Profile: {
key: '0xeafec4d89fa9619884b600005ef83ad9559033e6e941db7d7c495acdce616347',
value: '0x5ef83ad9',
} as LSPSupportedStandard,
LSP4DigitalAsset: {
key: '0xeafec4d89fa9619884b60000a4d96624a38f7ac2d8d9a604ecf07c12c77e480c',
Expand All @@ -123,7 +124,7 @@ export const ERC725YDataKeys = {
'0x0cfc51aec37c55a4d0b1a65c6255c4bf2fbdf6277f3cc0730c45b828b6db8b47',
},
LSP3: {
SupportedStandards_LSP3: SupportedStandards.LSP3UniversalProfile.key,
SupportedStandards_LSP3: SupportedStandards.LSP3Profile.key,

// keccak256('LSP3Profile')
LSP3Profile: '0x5ef83ad9559033e6e941db7d7c495acdce616347d28e90c7ce47cbfcfcad3bc5',
Expand Down Expand Up @@ -209,12 +210,6 @@ export const ERC725YDataKeys = {
// LSP6
// ----------

/**
* @dev LSP6 version number for signing `executeRelayCall(...)` transaction using EIP191
* @see for details see: https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-6-KeyManager.md#executerelaycall
*/
export const LSP6_VERSION = 6;

/**
* @dev The types of calls for an AllowedCall
*/
Expand Down Expand Up @@ -287,6 +282,10 @@ export const LSP1_TYPE_IDS = {
LSP7Tokens_RecipientNotification:
'0x20804611b3e2ea21c480dc465142210acf4a2485947541770ec1fb87dee4a55c',

// keccak256('LSP7Tokens_OperatorNotification')
LSP7Tokens_OperatorNotification:
'0x386072cc5a58e61263b434c722725f21031cd06e7c552cfaa06db5de8a320dbc',

// keccak256('LSP8Tokens_SenderNotification')
LSP8Tokens_SenderNotification:
'0xb23eae7e6d1564b295b4c3e3be402d9a2f0776c57bdf365903496f6fa481ab00',
Expand All @@ -295,6 +294,10 @@ export const LSP1_TYPE_IDS = {
LSP8Tokens_RecipientNotification:
'0x0b084a55ebf70fd3c06fd755269dac2212c4d3f0f4d09079780bfa50c1b2984d',

// keccak256('LSP8Tokens_OperatorNotification')
LSP8Tokens_OperatorNotification:
'0x8a1c15a8799f71b547e08e2bcb2e85257e81b0a07eee2ce6712549eef1f00970',

// keccak256('LSP9OwnershipTransferStarted')
LSP9OwnershipTransferStarted:
'0xaefd43f45fed1bcd8992f23c803b6f4ec45cf6b62b0d404d565f290a471e763f',
Expand All @@ -319,3 +322,12 @@ export const LSP1_TYPE_IDS = {
LSP14OwnershipTransferred_RecipientNotification:
'0xe32c7debcb817925ba4883fdbfc52797187f28f73f860641dab1a68d9b32902c',
};

// LSP25
// ----------

/**
* @dev LSP25 version number for signing `executeRelayCall(...)` transaction using EIP191
* @see for details see: https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-25-ExecuteRelayCall.md#executerelaycall
*/
export const LSP25_VERSION = 25;
44 changes: 8 additions & 36 deletions contracts/LSP0ERC725Account/ILSP0ERC725Account.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,53 +16,25 @@ import {
import {ILSP14Ownable2Step} from "../LSP14Ownable2Step/ILSP14Ownable2Step.sol";

/**
* @title Interface of the LSP0 - ERC725Account standard, an account based smart contract that represents an identity on-chain.
* https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-0-ERC725Account.md
* @title Interface of the [LSP-0-ERC725Account] standard, an account based smart contract that represents an identity on-chain.
*
* @author Fabian Vogelsteller <[email protected]>, Jean Cavallera (CJ42)
* @dev A smart contract account including basic functionalities such as:
*
* - Detecting supported standards using ERC165
* https://eips.ethereum.org/EIPS/eip-165
*
* - Executing several operation on other addresses including creating contracts using ERC725X
* https://github.com/ERC725Alliance/ERC725/blob/develop/docs/ERC-725.md
*
* - Storing data in a generic way using ERC725Y
* https://github.com/ERC725Alliance/ERC725/blob/develop/docs/ERC-725.md
*
* - Validating signatures using ERC1271
* https://eips.ethereum.org/EIPS/eip-1271
*
* - Receiving notification and react on them using LSP1
* https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-1-UniversalReceiver.md
*
* - Secure ownership management using LSP14
* https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-14-Ownable2Step.md
*
* - Extending the account with new functions and interfaceIds of future standards using LSP17
* https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-17-ContractExtension.md
*
* - Verifying calls on the owner to allow unified and standard interaction with the account using LSP20
* https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-20-CallVerification.md
*
* This interface implicitly inherits: IERC165, IERC725X, IERC725Y, IERC1271, ILSP1UniversalReceiver, ILSP14Ownable2Step
*/
interface ILSP0ERC725Account {
/**
* @notice Emitted when receiving native tokens
* @param sender The address of the sender
* @param value The amount of native tokens received
* @notice `value` native tokens received from `sender`.
* @dev Emitted when receiving native tokens.
* @param sender The address that sent some native tokens to this contract.
* @param value The amount of native tokens received.
*/
event ValueReceived(address indexed sender, uint256 indexed value);

/**
* @dev Allows a caller to batch different function calls in one call.
* Perform a delegatecall on self, to call different functions with preserving the context
* It is not possible to send value along the functions call due to the use of delegatecall.
* @notice Executing the following batch of abi-encoded function calls on the contract: `data`.
*
* @dev Allows a caller to batch different function calls in one call. Perform a `delegatecall` on self, to call different functions with preserving the context.
* @param data An array of ABI encoded function calls to be called on the contract.
* @return results An array of values returned by the executed functions.
* @return results An array of abi-encoded data returned by the functions executed.
*/
function batchCalls(
bytes[] calldata data
Expand Down
2 changes: 1 addition & 1 deletion contracts/LSP0ERC725Account/LSP0Constants.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity ^0.8.4;

// --- ERC165 interface ids
bytes4 constant _INTERFACEID_LSP0 = 0x3e89ad98;
bytes4 constant _INTERFACEID_LSP0 = 0x24871b3d;
bytes4 constant _INTERFACEID_ERC1271 = 0x1626ba7e;

// ERC1271 - Standard Signature Validation
Expand Down
45 changes: 15 additions & 30 deletions contracts/LSP0ERC725Account/LSP0ERC725Account.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,29 @@ import {
} from "@erc725/smart-contracts/contracts/custom/OwnableUnset.sol";

/**
* @title Deployable Implementation of LSP0-ERC725Account Standard
* https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-0-ERC725Account.md
* @title Deployable Implementation of [LSP-0-ERC725Account] Standard.
*
* @author Fabian Vogelsteller <[email protected]>, Jean Cavallera (CJ42)
* @dev A smart contract account including basic functionalities such as:
*
* - Detecting supported standards using ERC165
* https://eips.ethereum.org/EIPS/eip-165
*
* - Executing several operation on other addresses including creating contracts using ERC725X
* https://github.com/ERC725Alliance/ERC725/blob/develop/docs/ERC-725.md
*
* - Storing data in a generic way using ERC725Y
* https://github.com/ERC725Alliance/ERC725/blob/develop/docs/ERC-725.md
*
* - Validating signatures using ERC1271
* https://eips.ethereum.org/EIPS/eip-1271
*
* - Receiving notification and react on them using LSP1
* https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-1-UniversalReceiver.md
*
* - Secure ownership management using LSP14
* https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-14-Ownable2Step.md
*
* - Extending the account with new functions and interfaceIds of future standards using LSP17
* https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-17-ContractExtension.md
*
* - Verifying calls on the owner to allow unified and standard interaction with the account using LSP20
* https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-20-CallVerification.md
* @dev A smart contract account including basic functionalities such as:
* - Detecting supported standards using [ERC-165]
* - Executing several operation on other addresses including creating contracts using [ERC-725X]
* - A generic data key-value store using [ERC-725Y]
* - Validating signatures using [ERC-1271]
* - Receiving notification and react on them using [LSP-1-UniversalReceiver]
* - Safer ownership management through 2-steps transfer using [LSP-14-Ownable2Step]
* - Extending the account with new functions and interfaceIds of future standards using [LSP-17-ContractExtension]
* - Verifying calls on the owner to make it easier to interact with the account directly using [LSP-20-CallVerification]
*/
contract LSP0ERC725Account is LSP0ERC725AccountCore {
/**
* @notice Deploying the contract with owner set to: `initialOwner`
* @dev Set `initialOwner` as the contract owner.
* The `constructor` also allows funding the contract on deployment.
* @notice Deploying a LSP0ERC725Account contract with owner set to address `initialOwner`.
* @dev Set `initialOwner` as the contract owner. The `constructor` also allows funding the contract on deployment.
* @param initialOwner The owner of the contract.
*
* @custom:events {ValueReceived} event when funding the contract on deployment.
* @custom:events
* - {ValueReceived} event when funding the contract on deployment.
* - {OwnershipTransferred} event when `initialOwner` is set as the contract {owner}.
*/
constructor(address initialOwner) payable {
if (msg.value != 0) {
Expand Down
Loading

0 comments on commit 736ad22

Please sign in to comment.