forked from LIT-Protocol/LitNodeContracts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gas_costs.txt
226 lines (214 loc) · 29.5 KB
/
gas_costs.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
Compiled 1 Solidity file successfully
AccessControlConditions
storeAndRetrieveCondition
when unauthorized
✓ retrieves empty condition
when key is correct and condition is not permanent
✓ retrieves condition and updates it
when key is correct and condition is permanent
✓ retrieves condition and attempts to update it
Store condition with signer and retrieve
when key is incorrect
✓ retrieves empty condition
when signer is unauthorized
✓ fails to store condition with signer
when key is correct and condition is not permanent
✓ retrieves condition and fails to update it with incorrect creator
✓ retrieves condition and fails to update it with correct creator
when key is correct and condition is permanent
✓ retrieves condition and fails to update it
Allowlist
Test the Allowlist
unallowed by default
✓ is unallowed
when the owner sets things
✓ can allow and unallow things
LITToken
✓ grants the admin role to the deployer
✓ grants the minter role to the deployer
mint
when unauthorized
✓ reverts
when authorized
✓ mints tokens
PKPHelper
Attempt to Mint PKP NFT via PKPHelper
✓ mints successfully with permitted auth methods
✓ mints successfully with permitted auth methods using the simple non-typed function
✓ mints successfully with permitted auth methods and sends the PKP to itself
✓ mints without setting the pkp nft address as permitted
✓ mints successfully with empty auth methods
PKPNFT
Attempt to Mint PKP NFT
✓ refuses to mint for free
✓ refuses to mint because the PKP isnt routed yet
getting token uri
got pubkey, getting eth address
calling tokenURI
✓ mints successfully
Test free minting of PKP NFT
✓ refuses to mint with an empty sig
sig 0xcbe01b92c9b9b073d542660906344347980b29415910f78a1e28e0310d19e7b17cc331be2849e1217161f58d2746903287de89f0a51816050d40d6e5cf2005281b
r: 0xcbe01b92c9b9b073d542660906344347980b29415910f78a1e28e0310d19e7b1
s: 0x7cc331be2849e1217161f58d2746903287de89f0a51816050d40d6e5cf200528
v: 0x1b
✓ checks the signature for a free mint
Test Mint Grant And Burn
✓ mints, grants, and burns successfully
PKPPermissions
register a PKP and set routing permissions
when the PKP grants permission to an ETH address
✓ grants permission to an eth address and then revokes it
✓ grants permission to an IPFS id and then revokes it
✓ grants permission to an IPFS id and then revokes it
✓ registers and grants permission to a generic AuthMethod
✓ registers and grants permission to a generic AuthMethod with scopes
✓ updates root hash and verify state
register a PKP and set routing permissions for a burn test
when the PKP grants permission to an ETH address
✓ grants permission to an eth address and then revokes it and then burns it
PubkeyRouter
store and retrieve routing data
when routing data is unset
✓ retrieves empty routing data
when routing data is set
✓ sets and retrieves routing data
register a PKP and set routing permissions
when the PKP is minted, check the ETH address
fakePubkey 0x046db7b0736408e7874b746f6d54aa6e4d04fd8902b520af69493f62757e77e0b5247355f925af2b382b64c71fcb3ff3ad26469ca65b4d2945d6e6379a4f285b93
ethersResult 0xCFcf34ED9b3A5EaCCa536a8C67E93d845A13E4d0
pubkeyFromContract 0x046db7b0736408e7874b746f6d54aa6e4d04fd8902b520af69493f62757e77e0b5247355f925af2b382b64c71fcb3ff3ad26469ca65b4d2945d6e6379a4f285b93
ethAddressOfPKP 0xCFcf34ED9b3A5EaCCa536a8C67E93d845A13E4d0
✓ checks the PKP eth address and the reverse mapping
RateLimitNFT
Attempt to Mint Rate Limit NFT
✓ refuses to mint for free
Test free minting of Rate Limit NFT
✓ checks the signature for a free mint
Staking
deployer has 9999767108597509243307 eth. Funding stakers...
✓ can join as a staker
Constructor & Settings
✓ should staking token on constructor
✓ should set owner on constructor
validators and joining
✓ has the default validator set
✓ cannot stake 0
✓ cannot stake less than the minimum stake
setting new validators
✓ becomes a validator
✓ votes to register a PKP
✓ leaves as a validator
✓ kicks and slashes validator
setting new resolver contract address
✓ sets the new contract address
·------------------------------------------------------------------|----------------------------|-------------|-----------------------------·
| [90mSolc version: 0.8.17[39m · [90mOptimizer enabled: false[39m · [90mRuns: 200[39m · [90mBlock limit: 30000000 gas[39m │
···································································|····························|·············|······························
| [32m[1mMethods[22m[39m │
····························|······································|··············|·············|·············|···············|··············
| [1mContract[22m · [1mMethod[22m · [32mMin[39m · [32mMax[39m · [32mAvg[39m · [1m# calls[22m · [1meur (avg)[22m │
····························|······································|··············|·············|·············|···············|··············
| [90mAccessControlConditions[39m · setSigner · [36m29229[39m · [31m29241[39m · 29239 · [90m5[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mAccessControlConditions[39m · storeCondition · [36m49030[39m · [31m117512[39m · 100386 · [90m4[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mAccessControlConditions[39m · storeConditionWithSigner · [36m120225[39m · [31m120237[39m · 120228 · [90m4[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mAllowlist[39m · setAllowed · - · - · 49997 · [90m1[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mAllowlist[39m · setNotAllowed · - · - · 28576 · [90m1[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mLITToken[39m · approve · - · - · 46933 · [90m12[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mLITToken[39m · grantRole · - · - · 52028 · [90m1[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mLITToken[39m · mint · [36m71533[39m · [31m71629[39m · 71581 · [90m2[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mLITToken[39m · transfer · [36m35259[39m · [31m52359[39m · 50934 · [90m12[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mPKPHelper[39m · mintNextAndAddAuthMethods · - · - · 1765107 · [90m1[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mPKPHelper[39m · mintNextAndAddAuthMethodsWithTypes · [36m217482[39m · [31m1673139[39m · 993004 · [90m4[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mPKPNFT[39m · burn · - · - · 51612 · [90m1[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mPKPNFT[39m · freeMintNext · - · - · 190317 · [90m1[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mPKPNFT[39m · mintGrantAndBurnNext · - · - · 341504 · [90m1[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mPKPNFT[39m · mintNext · [36m164420[39m · [31m167220[39m · 164887 · [90m6[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mPKPNFT[39m · setFreeMintSigner · - · - · 30523 · [90m2[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mPKPNFT[39m · setPkpNftMetadataAddress · - · - · 47634 · [90m6[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mPKPNFT[39m · setPkpPermissionsAddress · [36m47535[39m · [31m47547[39m · 47545 · [90m6[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mPKPNFT[39m · setRouterAddress · [36m47535[39m · [31m47547[39m · 47544 · [90m14[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mPKPPermissions[39m · addPermittedAction · [36m184650[39m · [31m263954[39m · 237515 · [90m3[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mPKPPermissions[39m · addPermittedAddress · [36m179021[39m · [31m218821[39m · 198921 · [90m2[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mPKPPermissions[39m · addPermittedAuthMethod · [36m223996[39m · [31m254114[39m · 239055 · [90m2[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mPKPPermissions[39m · addPermittedAuthMethodScope · - · - · 41066 · [90m1[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mPKPPermissions[39m · removePermittedAction · [36m54387[39m · [31m54396[39m · 54392 · [90m2[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mPKPPermissions[39m · removePermittedAddress · - · - · 53767 · [90m2[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mPKPPermissions[39m · removePermittedAuthMethod · - · - · 54128 · [90m2[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mPKPPermissions[39m · removePermittedAuthMethodScope · - · - · 41135 · [90m1[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mPKPPermissions[39m · setRootHash · [36m38548[39m · [31m55648[39m · 47098 · [90m2[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mPubkeyRouter[39m · setRoutingData · [36m173049[39m · [31m218840[39m · 206134 · [90m9[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mPubkeyRouter[39m · voteForRoutingData · [36m84110[39m · [31m441827[39m · 210289 · [90m14[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mRateLimitNFT[39m · setFreeMintSigner · - · - · 47557 · [90m1[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mStaking[39m · advanceEpoch · [36m300444[39m · [31m559598[39m · 422188 · [90m4[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mStaking[39m · exit · - · - · 56821 · [90m1[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mStaking[39m · kickValidatorInNextEpoch · [36m65415[39m · [31m172715[39m · 81109 · [90m9[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mStaking[39m · lockValidatorsForNextEpoch · - · - · 30295 · [90m4[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mStaking[39m · requestToLeave · - · - · 36984 · [90m1[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mStaking[39m · setEpochLength · - · - · 30266 · [90m1[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mStaking[39m · setResolverContractAddress · - · - · 47761 · [90m1[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mStaking[39m · signalReadyForNextEpoch · [36m100520[39m · [31m115496[39m · 106805 · [90m39[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [90mStaking[39m · stakeAndJoin · [36m250691[39m · [31m306791[39m · 259724 · [90m11[39m · [32m[90m-[32m[39m │
····························|······································|··············|·············|·············|···············|··············
| [32m[1mDeployments[22m[39m · · [1m% of limit[22m · │
···································································|··············|·············|·············|···············|··············
| AccessControlConditions · - · - · 1146748 · [90m3.8 %[39m · [32m[90m-[32m[39m │
···································································|··············|·············|·············|···············|··············
| Allowlist · - · - · 551689 · [90m1.8 %[39m · [32m[90m-[32m[39m │
···································································|··············|·············|·············|···············|··············
| LITToken · - · - · 2313276 · [90m7.7 %[39m · [32m[90m-[32m[39m │
···································································|··············|·············|·············|···············|··············
| PKPHelper · [36m2034709[39m · [31m2034721[39m · 2034719 · [90m6.8 %[39m · [32m[90m-[32m[39m │
···································································|··············|·············|·············|···············|··············
| PKPNFT · - · - · 4926824 · [90m16.4 %[39m · [32m[90m-[32m[39m │
···································································|··············|·············|·············|···············|··············
| PKPNFTMetadata · - · - · 1368396 · [90m4.6 %[39m · [32m[90m-[32m[39m │
···································································|··············|·············|·············|···············|··············
| PKPPermissions · [36m4515072[39m · [31m4515084[39m · 4515083 · [90m15.1 %[39m · [32m[90m-[32m[39m │
···································································|··············|·············|·············|···············|··············
| PubkeyRouter · - · - · 2253040 · [90m7.5 %[39m · [32m[90m-[32m[39m │
···································································|··············|·············|·············|···············|··············
| RateLimitNFT · - · - · 4655557 · [90m15.5 %[39m · [32m[90m-[32m[39m │
···································································|··············|·············|·············|···············|··············
| Staking · [36m4990088[39m · [31m4990112[39m · 4990112 · [90m16.6 %[39m · [32m[90m-[32m[39m │
·------------------------------------------------------------------|--------------|-------------|-------------|---------------|-------------·
48 passing (10s)