-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor!: Roll back to old LSP1UniversalReceiverDelegate
Interface and functions
#741
Conversation
Changes to gas cost
🧾 Summary (10% most significant diffs)
Full diff report 👇
|
👋 Hello ⛽📊 Gas Benchmark ReportDeployment Costs
Runtime CostsUniversalProfile owned by an 🔑 EOA🔀
|
execute scenarios - UP owned by 🔑 EOA |
⛽ Gas Usage |
---|---|
Transfer 1 LYX to an EOA without data | 37537 (0 ) |
Transfer 1 LYX to a UP without data | 36639 (0 ) |
Transfer 1 LYX to an EOA with 256 bytes of data | 42210 (12 📈❌) |
Transfer 1 LYX to a UP with 256 bytes of data | 44867 (12 📈❌) |
Transfer 0.1 LYX to 3x EOA without data | 70862 (0 ) |
Transfer 0.1 LYX to 3x UP without data | 75680 (0 ) |
Transfer 0.1 LYX to 3x EOA with 256 bytes of data | 84802 (-24 📉✅) |
Transfer 0.1 LYX to 3x UPs with 256 bytes of data | 100357 (0 ) |
🗄️ setData
scenarios
setData scenarios - UP owned by 🔑 EOA |
⛽ Gas Usage |
---|---|
Set a 20 bytes long value | 49971 (0 ) |
Set a 60 bytes long value | 95281 (0 ) |
Set a 160 bytes long value | 164465 (0 ) |
Set a 300 bytes long value | 279676 (-12 📉✅) |
Set a 600 bytes long value | 484124 (36 📈❌) |
Change the value of a data key already set | 32847 (-12 📉✅) |
Remove the value of a data key already set | 27333 (0 ) |
Set 2 data keys of 20 bytes long value | 78454 (0 ) |
Set 2 data keys of 100 bytes long value | 260582 (-36 📉✅) |
Set 3 data keys of 20 bytes long value | 105171 (0 ) |
Change the value of three data keys already set of 20 bytes long value | 45471 (0 ) |
Remove the value of three data keys already set | 41360 (0 ) |
🗄️ Tokens
scenarios
Tokens scenarios - UP owned by 🔑 EOA |
⛽ Gas Usage |
---|---|
Minting a LSP7Token to a UP (No Delegate) from an EOA | 91982 (0 ) |
Minting a LSP7Token to an EOA from an EOA | 59289 (0 ) |
Transferring an LSP7Token from a UP to another UP (No Delegate) | 100092 (0 ) |
Minting a LSP8Token to a UP (No Delegate) from an EOA | 159126 (0 ) |
Minting a LSP8Token to an EOA from an EOA | 126433 (0 ) |
Transferring an LSP8Token from a UP to another UP (No Delegate) | 148899 (0 ) |
UniversalProfile owned by a 🔒📄 LSP6KeyManager
🔀 execute
scenarios
execute scenarios |
👑 main controller | 🛃 restricted controller |
---|---|---|
LYX transfer --> to an EOA | 66102 (0 ) | 76895 (0 ) |
LYX transfer --> to a UP | 67384 (0 ) | 79366 (0 ) |
LSP7 token transfer --> to an EOA | 117834 (-2,317 📉✅) | 132525 (-2,317 📉✅) |
LSP7 token transfer --> to a UP | 252048 (-4,633 📉✅) | 266739 (-4,633 📉✅) |
LSP8 NFT transfer --> to an EOA | 182077 (-2,317 📉✅) | 196745 (-2,317 📉✅) |
LSP8 NFT transfer --> to a UP | 299538 (-4,633 📉✅) | 314206 (-4,633 📉✅) |
🗄️ setData
scenarios
setData scenarios |
👑 main controller | 🛃 restricted controller |
---|---|---|
Update Profile details (LSP3Profile Metadata) | 68689 (0 ) | 78688 (0 ) |
Add a new controller with permission to SET_DATA + 3x allowed data keys: AddressPermissions[] + AddressPermissions[index] + AddressPermissions:Permissions:<controller> + AddressPermissions:AllowedERC725YDataKeys:<controller ) |
212087 (0 ) | 222152 (0 ) |
Update permissions of previous controller. Allow it now to SUPER_SETDATA |
53576 (0 ) | 56559 (0 ) |
Remove a controller: 1. decrease AddressPermissions[] Array length 2. remove the controller address at AddressPermissions[index] 3. set "0x" for the controller permissions under AddressPermissions:Permissions: |
80542 (0 ) | 91767 (0 ) |
Write 5x new LSP12 Issued Assets | 68242 (0 ) | 102846 (0 ) |
Update 3x data keys (first 3) | 127530 (0 ) | 161611 (0 ) |
Update 3x data keys (middle 3) | 107618 (0 ) | 145765 (0 ) |
Update 3x data keys (last 3) | 127530 (0 ) | 171098 (0 ) |
Set 2 x new data keys + add 3x new controllers | 815975 (0 ) | 877522 (0 ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make sure the universalReceiverDelegate
functions (in both the contracts/ and the Mock contracts) that inherit the ILSP1Delegate interface have the override
keyword, so that they can be compiled with old solc versions and so that the CI passes once it is merged ✅
...ts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol
Outdated
Show resolved
Hide resolved
...ts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol
Show resolved
Hide resolved
contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateDataUpdater.sol
Outdated
Show resolved
Hide resolved
contracts/Mocks/UniversalReceivers/UniversalReceiverDelegateGasConsumer.sol
Outdated
Show resolved
Hide resolved
tests/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP.behaviour.ts
Show resolved
Hide resolved
LSP1UniversalReceiverDelegate
Interface and functions
LSP1UniversalReceiverDelegate
Interface and functionsLSP1UniversalReceiverDelegate
Interface and functions
…/lukso-network/lsp-smart-contracts into revert/UniversalReceiverDelegate
What does this PR introduce?
♻️ Refactor
UniversalReceiverDelegate
Interface and functions0xa245bbda
The UniversalReceiverDelegate will include the
universalReceiverDelegate
function having two additional parameter thanuniversalReceiver
which are the:universalReceiver
universalReceiver
PR Checklist
npm run lint
&&npm run lint:solidity
(solhint)npm run format
(prettier)npm run build
npm run test