-
Notifications
You must be signed in to change notification settings - Fork 50
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
docs: update LSP16 natspec #720
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Task linked: DEV-8219 Update LSP16 Natspec |
👋 Hello ⛽📊 See Gas Benchmark report of Using UniversalProfile owned by an EOA🔀
|
execute scenarios - 👑 UP Owner |
⛽ Gas Usage |
---|---|
Transfer 1 LYX to an EOA without data | 37537 |
Transfer 1 LYX to a UP without data | 36639 |
Transfer 1 LYX to an EOA with 256 bytes of data | 42198 |
Transfer 1 LYX to a UP with 256 bytes of data | 44855 |
Transfer 0.1 LYX to 3x EOA without data | 70862 |
Transfer 0.1 LYX to 3x UP without data | 75680 |
Transfer 0.1 LYX to 3x EOA with 256 bytes of data | 84838 |
Transfer 0.1 LYX to 3x EOA with 256 bytes of data | 100321 |
🗄️ setData
scenarios
setData scenarios - 👑 UP Owner |
⛽ Gas Usage |
---|---|
Set a 20 bytes long value | 49971 |
Set a 60 bytes long value | 95293 |
Set a 160 bytes long value | 164465 |
Set a 300 bytes long value | 279676 |
Set a 600 bytes long value | 484124 |
Change the value of a data key already set | 32859 |
Remove the value of a data key already set | 27333 |
Set 2 data keys of 20 bytes long value | 78428 |
Set 2 data keys of 100 bytes long value | 260592 |
Set 3 data keys of 20 bytes long value | 105145 |
Change the value of three data keys already set of 20 bytes long value | 45445 |
Remove the value of three data keys already set | 41339 |
🗄️ Tokens
scenarios
Tokens scenarios - 👑 UP Owner |
⛽ Gas Usage |
---|---|
Minting a LSP7Token to a UP (No Delegate) from an EOA | 92016 |
Minting a LSP7Token to an EOA from an EOA | 59323 |
Transferring an LSP7Token from a UP to another UP (No Delegate) | 100102 |
Minting a LSP8Token to a UP (No Delegate) from an EOA | 158946 |
Minting a LSP8Token to an EOA from an EOA | 126253 |
Transferring an LSP8Token from a UP to another UP (No Delegate) | 148671 |
📝 Notes
- The
execute
andsetData
scenarios are executed on a fresh UniversalProfile smart contract, deployed as standard contracts (not as proxy behind a base contract implementation).
⛽📊 See Gas Benchmark report of Using UniversalProfile owned by an LSP6KeyManager
This document contains the gas usage for common interactions and scenarios when using UniversalProfile smart contracts.
🔀 execute
scenarios
👑 unrestricted controller
execute scenarios - 👑 main controller |
⛽ Gas Usage |
---|---|
transfer LYX to an EOA | 60449 |
transfer LYX to a UP | 62051 |
transfer tokens (LSP7) to an EOA (no data) | 107969 |
transfer tokens (LSP7) to a UP (no data) | 244399 |
transfer a NFT (LSP8) to a EOA (no data) | 171838 |
transfer a NFT (LSP8) to a UP (no data) | 291515 |
🛃 restricted controller
execute scenarios - 🛃 restricted controller |
⛽ Gas Usage |
---|---|
transfer some LYXes to an EOA - restricted to 1 x allowed address only (TRANSFERVALUE + 1x AllowedCalls) | 71641 |
transfers some tokens (LSP7) to an EOA - restricted to LSP7 + 2x allowed contracts only (CALL + 2x AllowedCalls) (no data) | 122660 |
transfers some tokens (LSP7) to an other UP - restricted to LSP7 + 2x allowed contracts only (CALL + 2x AllowedCalls) (no data) | 259090 |
transfers a NFT (LSP8) to an EOA - restricted to LSP8 + 2x allowed contracts only (CALL + 2x AllowedCalls) (no data) | 186494 |
transfers a NFT (LSP8) to an other UP - restricted to LSP8 + 2x allowed contracts only (CALL + 2x AllowedCalls) (no data) | 306171 |
🗄️ setData
scenarios
👑 unrestricted controller
setData scenarios - 👑 main controller |
⛽ Gas Usage |
---|---|
updates profile details (LSP3Profile metadata) | 136872 |
give permissions to a controller (AddressPermissions[] + AddressPermissions[index] + AddressPermissions:Permissions:) | 133007 |
restrict a controller to some specific ERC725Y Data Keys | 139279 |
restrict a controller to interact only with 3x specific addresses | 161983 |
remove a controller (its permissions + its address from the AddressPermissions[] array) | 67986 |
write 5x LSP12 Issued Assets | 233250 |
🛃 restricted controller
setData scenarios - 🛃 restricted controller |
⛽ Gas Usage |
---|---|
setData(bytes32,bytes) -> updates 1x data key |
102773 |
setData(bytes32[],bytes[]) -> updates 3x data keys (first x3) |
161512 |
setData(bytes32[],bytes[]) -> updates 3x data keys (middle x3) |
145666 |
setData(bytes32[],bytes[]) -> updates 3x data keys (last x3) |
170999 |
setData(bytes32[],bytes[]) -> updates 2x data keys + add 3x new controllers (including setting the array length + indexes under AddressPermissions[index]) |
250075 |
📝 Notes
- The
execute
andsetData
scenarios are executed on a fresh UniversalProfile and LSP6KeyManager smart contracts, deployed as standard contracts (not as proxy behind a base contract implementation).
CJ42
approved these changes
Sep 18, 2023
YamenMerhi
approved these changes
Sep 18, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR introduce?
PR Checklist
npm run lint
&&npm run lint:solidity
(solhint)npm run format
(prettier)npm run build
npm run test