Skip to content
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: fix broken link in Natspec comment #689

Merged
merged 2 commits into from
Aug 28, 2023
Merged

docs: fix broken link in Natspec comment #689

merged 2 commits into from
Aug 28, 2023

Conversation

CJ42
Copy link
Member

@CJ42 CJ42 commented Aug 25, 2023

No description provided.

@github-actions
Copy link
Contributor

👋 Hello
⛽ I am the Gas Bot Reporter. I keep track of the gas costs of common interactions using Universal Profiles 🆙 !
📊 Here is a summary of the gas cost with the code introduced by this PR.

⛽📊 See Gas Benchmark report of Using UniversalProfile owned by an EOA

🔀 execute scenarios

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 42210
Transfer 1 LYX to a UP with 256 bytes of data 44867
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 84826
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 49959
Set a 60 bytes long value 95293
Set a 160 bytes long value 164441
Set a 300 bytes long value 279676
Set a 600 bytes long value 484148
Change the value of a data key already set 32847
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 260580
Set 3 data keys of 20 bytes long value 105133
Change the value of three data keys already set of 20 bytes long value 45433
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 91241
Minting a LSP7Token to an EOA from an EOA 59206
Transferring an LSP7Token from a UP to another UP (No Delegate) 98689
Minting a LSP8Token to a UP (No Delegate) from an EOA 158192
Minting a LSP8Token to an EOA from an EOA 126157
Transferring an LSP8Token from a UP to another UP (No Delegate) 147236

📝 Notes

  • The execute and setData 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) 107214
transfer tokens (LSP7) to a UP (no data) 242729
transfer a NFT (LSP8) to a EOA (no data) 171061
transfer a NFT (LSP8) to a UP (no data) 289802

🛃 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) 121865
transfers some tokens (LSP7) to an other UP - restricted to LSP7 + 2x allowed contracts only (CALL + 2x AllowedCalls) (no data) 257380
transfers a NFT (LSP8) to an EOA - restricted to LSP8 + 2x allowed contracts only (CALL + 2x AllowedCalls) (no data) 185700
transfers a NFT (LSP8) to an other UP - restricted to LSP8 + 2x allowed contracts only (CALL + 2x AllowedCalls) (no data) 304441

🗄️ 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 and setData scenarios are executed on a fresh UniversalProfile and LSP6KeyManager smart contracts, deployed as standard contracts (not as proxy behind a base contract implementation).

@github-actions
Copy link
Contributor

github-actions bot commented Aug 25, 2023

Changes to gas cost

Generated at commit: 262d43657f063c2038d2f88a413332bb104c4cbe, compared to commit: 9db488aad9065f88cfc3c5f43f47b1fab35fc5f0

🧾 Summary (10% most significant diffs)

Contract Method Avg (+/-) %
LSP6SetDataRestrictedController supportsInterface +55 ❌ +10.24%
LSP6SetDataUnrestrictedController supportsInterface +55 ❌ +10.24%
LSP6ExecuteRestrictedController supportsInterface +55 ❌ +9.82%
LSP6ExecuteUnrestrictedController supportsInterface +55 ❌ +9.82%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
LSP6SetDataRestrictedController 2,860,468 (+21,623) execute
givePermissionsToController
restrictControllerToERC725YKeys
supportsInterface
18,490 (+136)
120,634 (+107)
138,884 (+55)
592 (+55)
+0.74%
+0.09%
+0.04%
+10.24%
28,535 (+82)
120,634 (+107)
138,884 (+55)
592 (+55)
+0.29%
+0.09%
+0.04%
+10.24%
28,535 (+82)
120,634 (+107)
138,884 (+55)
592 (+55)
+0.29%
+0.09%
+0.04%
+10.24%
38,581 (+28)
120,634 (+107)
138,884 (+55)
592 (+55)
+0.07%
+0.09%
+0.04%
+10.24%
2 (0)
1 (0)
1 (0)
4 (0)
LSP6SetDataUnrestrictedController 2,860,468 (+21,623) execute
givePermissionsToController
restrictControllerToERC725YKeys
supportsInterface
18,490 (+136)
126,634 (+107)
147,384 (+55)
592 (+55)
+0.74%
+0.08%
+0.04%
+10.24%
28,535 (+82)
126,634 (+107)
147,384 (+55)
592 (+55)
+0.29%
+0.08%
+0.04%
+10.24%
28,535 (+82)
126,634 (+107)
147,384 (+55)
592 (+55)
+0.29%
+0.08%
+0.04%
+10.24%
38,581 (+28)
126,634 (+107)
147,384 (+55)
592 (+55)
+0.07%
+0.08%
+0.04%
+10.24%
2 (0)
1 (0)
1 (0)
4 (0)
LSP6ExecuteRestrictedController 2,875,691 (+21,631) lsp20VerifyCall
supportsInterface
transferLYXToEOA
transferLYXToUP
transferNFTToRandomEOA
transferNFTToRandomUP
transferTokensToRandomEOA
transferTokensToRandomUP
14,896 (-3)
615 (+55)
56,165 (-998)
31,496 (+31)
129,961 (-903)
237,763 (-949)
72,683 (-4,408)
207,220 (-4,459)
-0.02%
+9.82%
-1.75%
+0.10%
-0.69%
-0.40%
-5.72%
-2.11%
17,032 (-3)
615 (+55)
56,165 (-998)
31,496 (+31)
129,961 (-903)
237,763 (-949)
72,683 (-4,408)
207,220 (-4,459)
-0.02%
+9.82%
-1.75%
+0.10%
-0.69%
-0.40%
-5.72%
-2.11%
17,745 (-3)
615 (+55)
56,165 (-998)
31,496 (+31)
129,961 (-903)
237,763 (-949)
72,683 (-4,408)
207,220 (-4,459)
-0.02%
+9.82%
-1.75%
+0.10%
-0.69%
-0.40%
-5.72%
-2.11%
17,745 (-3)
615 (+55)
56,165 (-998)
31,496 (+31)
129,961 (-903)
237,763 (-949)
72,683 (-4,408)
207,220 (-4,459)
-0.02%
+9.82%
-1.75%
+0.10%
-0.69%
-0.40%
-5.72%
-2.11%
8 (0)
24 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
LSP6ExecuteUnrestrictedController 2,875,691 (+21,631) lsp20VerifyCall
supportsInterface
transferLYXToEOA
transferLYXToUP
transferNFTToRandomEOA
transferNFTToRandomUP
transferTokensToRandomEOA
transferTokensToRandomUP
14,896 (-3)
615 (+55)
56,795 (+31)
33,496 (+31)
128,710 (+10)
236,512 (-37)
71,119 (-3,268)
205,656 (-3,319)
-0.02%
+9.82%
+0.05%
+0.09%
+0.01%
-0.02%
-4.39%
-1.59%
17,032 (-3)
615 (+55)
56,795 (+31)
33,496 (+31)
128,710 (+10)
236,512 (-37)
71,119 (-3,268)
205,656 (-3,319)
-0.02%
+9.82%
+0.05%
+0.09%
+0.01%
-0.02%
-4.39%
-1.59%
17,745 (-3)
615 (+55)
56,795 (+31)
33,496 (+31)
128,710 (+10)
236,512 (-37)
71,119 (-3,268)
205,656 (-3,319)
-0.02%
+9.82%
+0.05%
+0.09%
+0.01%
-0.02%
-4.39%
-1.59%
17,745 (-3)
615 (+55)
56,795 (+31)
33,496 (+31)
128,710 (+10)
236,512 (-37)
71,119 (-3,268)
205,656 (-3,319)
-0.02%
+9.82%
+0.05%
+0.09%
+0.01%
-0.02%
-4.39%
-1.59%
8 (0)
24 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0)

@CJ42 CJ42 merged commit ba28362 into develop Aug 28, 2023
26 checks passed
@CJ42 CJ42 deleted the docs/broken-link branch August 28, 2023 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants