Guest User

AppStorage Layout

a guest
Nov 24th, 2023
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.38 KB | None | 0 0
  1. Contract Storage Layout:
  2. {
  3. "storage": [
  4. {
  5. "astId": 141,
  6. "contract": "LibAppStorage.sol:MyContract",
  7. "label": "myStorage",
  8. "offset": 0,
  9. "slot": "0",
  10. "type": "t_struct(AppStorage)138_storage"
  11. }
  12. ],
  13. "types": {
  14. "t_address": {
  15. "encoding": "inplace",
  16. "label": "address",
  17. "numberOfBytes": "20"
  18. },
  19. "t_array(t_bytes32)dyn_storage": {
  20. "base": "t_bytes32",
  21. "encoding": "dynamic_array",
  22. "label": "bytes32[]",
  23. "numberOfBytes": "32"
  24. },
  25. "t_array(t_uint256)dyn_storage": {
  26. "base": "t_uint256",
  27. "encoding": "dynamic_array",
  28. "label": "uint256[]",
  29. "numberOfBytes": "32"
  30. },
  31. "t_bool": {
  32. "encoding": "inplace",
  33. "label": "bool",
  34. "numberOfBytes": "1"
  35. },
  36. "t_bytes32": {
  37. "encoding": "inplace",
  38. "label": "bytes32",
  39. "numberOfBytes": "32"
  40. },
  41. "t_contract(IERC20Extended)895": {
  42. "encoding": "inplace",
  43. "label": "contract IERC20Extended",
  44. "numberOfBytes": "20"
  45. },
  46. "t_contract(IERC721Extended)1010": {
  47. "encoding": "inplace",
  48. "label": "contract IERC721Extended",
  49. "numberOfBytes": "20"
  50. },
  51. "t_mapping(t_bytes32,t_bytes32)": {
  52. "encoding": "mapping",
  53. "key": "t_bytes32",
  54. "label": "mapping(bytes32 => bytes32)",
  55. "numberOfBytes": "32",
  56. "value": "t_bytes32"
  57. },
  58. "t_mapping(t_bytes32,t_uint256)": {
  59. "encoding": "mapping",
  60. "key": "t_bytes32",
  61. "label": "mapping(bytes32 => uint256)",
  62. "numberOfBytes": "32",
  63. "value": "t_uint256"
  64. },
  65. "t_mapping(t_uint256,t_array(t_uint256)dyn_storage)": {
  66. "encoding": "mapping",
  67. "key": "t_uint256",
  68. "label": "mapping(uint256 => uint256[])",
  69. "numberOfBytes": "32",
  70. "value": "t_array(t_uint256)dyn_storage"
  71. },
  72. "t_mapping(t_uint256,t_bool)": {
  73. "encoding": "mapping",
  74. "key": "t_uint256",
  75. "label": "mapping(uint256 => bool)",
  76. "numberOfBytes": "32",
  77. "value": "t_bool"
  78. },
  79. "t_mapping(t_uint256,t_mapping(t_uint256,t_uint256))": {
  80. "encoding": "mapping",
  81. "key": "t_uint256",
  82. "label": "mapping(uint256 => mapping(uint256 => uint256))",
  83. "numberOfBytes": "32",
  84. "value": "t_mapping(t_uint256,t_uint256)"
  85. },
  86. "t_mapping(t_uint256,t_string_storage)": {
  87. "encoding": "mapping",
  88. "key": "t_uint256",
  89. "label": "mapping(uint256 => string)",
  90. "numberOfBytes": "32",
  91. "value": "t_string_storage"
  92. },
  93. "t_mapping(t_uint256,t_struct(UintToUintMap)1272_storage)": {
  94. "encoding": "mapping",
  95. "key": "t_uint256",
  96. "label": "mapping(uint256 => struct EnumerableMap.UintToUintMap)",
  97. "numberOfBytes": "32",
  98. "value": "t_struct(UintToUintMap)1272_storage"
  99. },
  100. "t_mapping(t_uint256,t_uint256)": {
  101. "encoding": "mapping",
  102. "key": "t_uint256",
  103. "label": "mapping(uint256 => uint256)",
  104. "numberOfBytes": "32",
  105. "value": "t_uint256"
  106. },
  107. "t_string_storage": {
  108. "encoding": "bytes",
  109. "label": "string",
  110. "numberOfBytes": "32"
  111. },
  112. "t_struct(AppStorage)138_storage": {
  113. "encoding": "inplace",
  114. "label": "struct AppStorage",
  115. "members": [
  116. {
  117. "astId": 11,
  118. "contract": "LibAppStorage.sol:MyContract",
  119. "label": "diamondInitialized",
  120. "offset": 0,
  121. "slot": "0",
  122. "type": "t_bool"
  123. },
  124. {
  125. "astId": 14,
  126. "contract": "LibAppStorage.sol:MyContract",
  127. "label": "token",
  128. "offset": 1,
  129. "slot": "0",
  130. "type": "t_contract(IERC20Extended)895"
  131. },
  132. {
  133. "astId": 17,
  134. "contract": "LibAppStorage.sol:MyContract",
  135. "label": "nft",
  136. "offset": 0,
  137. "slot": "1",
  138. "type": "t_contract(IERC721Extended)1010"
  139. },
  140. {
  141. "astId": 19,
  142. "contract": "LibAppStorage.sol:MyContract",
  143. "label": "DIAMOND_ADDRESS",
  144. "offset": 0,
  145. "slot": "2",
  146. "type": "t_address"
  147. },
  148. {
  149. "astId": 21,
  150. "contract": "LibAppStorage.sol:MyContract",
  151. "label": "duration",
  152. "offset": 0,
  153. "slot": "3",
  154. "type": "t_uint256"
  155. },
  156. {
  157. "astId": 23,
  158. "contract": "LibAppStorage.sol:MyContract",
  159. "label": "minPrice",
  160. "offset": 0,
  161. "slot": "4",
  162. "type": "t_uint256"
  163. },
  164. {
  165. "astId": 25,
  166. "contract": "LibAppStorage.sol:MyContract",
  167. "label": "startingPrice",
  168. "offset": 0,
  169. "slot": "5",
  170. "type": "t_uint256"
  171. },
  172. {
  173. "astId": 27,
  174. "contract": "LibAppStorage.sol:MyContract",
  175. "label": "startAt",
  176. "offset": 0,
  177. "slot": "6",
  178. "type": "t_uint256"
  179. },
  180. {
  181. "astId": 29,
  182. "contract": "LibAppStorage.sol:MyContract",
  183. "label": "discountRate",
  184. "offset": 0,
  185. "slot": "7",
  186. "type": "t_uint256"
  187. },
  188. {
  189. "astId": 34,
  190. "contract": "LibAppStorage.sol:MyContract",
  191. "label": "petDna",
  192. "offset": 0,
  193. "slot": "8",
  194. "type": "t_mapping(t_uint256,t_array(t_uint256)dyn_storage)"
  195. },
  196. {
  197. "astId": 38,
  198. "contract": "LibAppStorage.sol:MyContract",
  199. "label": "itemPrice",
  200. "offset": 0,
  201. "slot": "9",
  202. "type": "t_mapping(t_uint256,t_uint256)"
  203. },
  204. {
  205. "astId": 42,
  206. "contract": "LibAppStorage.sol:MyContract",
  207. "label": "itemPoints",
  208. "offset": 0,
  209. "slot": "10",
  210. "type": "t_mapping(t_uint256,t_uint256)"
  211. },
  212. {
  213. "astId": 46,
  214. "contract": "LibAppStorage.sol:MyContract",
  215. "label": "itemName",
  216. "offset": 0,
  217. "slot": "11",
  218. "type": "t_mapping(t_uint256,t_string_storage)"
  219. },
  220. {
  221. "astId": 50,
  222. "contract": "LibAppStorage.sol:MyContract",
  223. "label": "itemTimeExtension",
  224. "offset": 0,
  225. "slot": "12",
  226. "type": "t_mapping(t_uint256,t_uint256)"
  227. },
  228. {
  229. "astId": 54,
  230. "contract": "LibAppStorage.sol:MyContract",
  231. "label": "itemDelta",
  232. "offset": 0,
  233. "slot": "13",
  234. "type": "t_mapping(t_uint256,t_uint256)"
  235. },
  236. {
  237. "astId": 58,
  238. "contract": "LibAppStorage.sol:MyContract",
  239. "label": "itemEquipExpires",
  240. "offset": 0,
  241. "slot": "14",
  242. "type": "t_mapping(t_uint256,t_uint256)"
  243. },
  244. {
  245. "astId": 62,
  246. "contract": "LibAppStorage.sol:MyContract",
  247. "label": "itemIsSellable",
  248. "offset": 0,
  249. "slot": "15",
  250. "type": "t_mapping(t_uint256,t_bool)"
  251. },
  252. {
  253. "astId": 68,
  254. "contract": "LibAppStorage.sol:MyContract",
  255. "label": "petItemExpires",
  256. "offset": 0,
  257. "slot": "16",
  258. "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_uint256))"
  259. },
  260. {
  261. "astId": 72,
  262. "contract": "LibAppStorage.sol:MyContract",
  263. "label": "itemSupply",
  264. "offset": 0,
  265. "slot": "17",
  266. "type": "t_mapping(t_uint256,t_uint256)"
  267. },
  268. {
  269. "astId": 77,
  270. "contract": "LibAppStorage.sol:MyContract",
  271. "label": "itemsOwned",
  272. "offset": 0,
  273. "slot": "18",
  274. "type": "t_mapping(t_uint256,t_struct(UintToUintMap)1272_storage)"
  275. },
  276. {
  277. "astId": 79,
  278. "contract": "LibAppStorage.sol:MyContract",
  279. "label": "PRECISION",
  280. "offset": 0,
  281. "slot": "19",
  282. "type": "t_uint256"
  283. },
  284. {
  285. "astId": 81,
  286. "contract": "LibAppStorage.sol:MyContract",
  287. "label": "_tokenIds",
  288. "offset": 0,
  289. "slot": "20",
  290. "type": "t_uint256"
  291. },
  292. {
  293. "astId": 83,
  294. "contract": "LibAppStorage.sol:MyContract",
  295. "label": "_itemIds",
  296. "offset": 0,
  297. "slot": "21",
  298. "type": "t_uint256"
  299. },
  300. {
  301. "astId": 85,
  302. "contract": "LibAppStorage.sol:MyContract",
  303. "label": "la",
  304. "offset": 0,
  305. "slot": "22",
  306. "type": "t_uint256"
  307. },
  308. {
  309. "astId": 87,
  310. "contract": "LibAppStorage.sol:MyContract",
  311. "label": "lb",
  312. "offset": 0,
  313. "slot": "23",
  314. "type": "t_uint256"
  315. },
  316. {
  317. "astId": 91,
  318. "contract": "LibAppStorage.sol:MyContract",
  319. "label": "petName",
  320. "offset": 0,
  321. "slot": "24",
  322. "type": "t_mapping(t_uint256,t_string_storage)"
  323. },
  324. {
  325. "astId": 95,
  326. "contract": "LibAppStorage.sol:MyContract",
  327. "label": "timeUntilStarving",
  328. "offset": 0,
  329. "slot": "25",
  330. "type": "t_mapping(t_uint256,t_uint256)"
  331. },
  332. {
  333. "astId": 99,
  334. "contract": "LibAppStorage.sol:MyContract",
  335. "label": "petScore",
  336. "offset": 0,
  337. "slot": "26",
  338. "type": "t_mapping(t_uint256,t_uint256)"
  339. },
  340. {
  341. "astId": 103,
  342. "contract": "LibAppStorage.sol:MyContract",
  343. "label": "timePetBorn",
  344. "offset": 0,
  345. "slot": "27",
  346. "type": "t_mapping(t_uint256,t_uint256)"
  347. },
  348. {
  349. "astId": 107,
  350. "contract": "LibAppStorage.sol:MyContract",
  351. "label": "lastAttackUsed",
  352. "offset": 0,
  353. "slot": "28",
  354. "type": "t_mapping(t_uint256,t_uint256)"
  355. },
  356. {
  357. "astId": 111,
  358. "contract": "LibAppStorage.sol:MyContract",
  359. "label": "lastAttacked",
  360. "offset": 0,
  361. "slot": "29",
  362. "type": "t_mapping(t_uint256,t_uint256)"
  363. },
  364. {
  365. "astId": 115,
  366. "contract": "LibAppStorage.sol:MyContract",
  367. "label": "stars",
  368. "offset": 0,
  369. "slot": "30",
  370. "type": "t_mapping(t_uint256,t_uint256)"
  371. },
  372. {
  373. "astId": 119,
  374. "contract": "LibAppStorage.sol:MyContract",
  375. "label": "ethOwed",
  376. "offset": 0,
  377. "slot": "31",
  378. "type": "t_mapping(t_uint256,t_uint256)"
  379. },
  380. {
  381. "astId": 123,
  382. "contract": "LibAppStorage.sol:MyContract",
  383. "label": "petRewardDebt",
  384. "offset": 0,
  385. "slot": "32",
  386. "type": "t_mapping(t_uint256,t_uint256)"
  387. },
  388. {
  389. "astId": 125,
  390. "contract": "LibAppStorage.sol:MyContract",
  391. "label": "ethAccPerShare",
  392. "offset": 0,
  393. "slot": "33",
  394. "type": "t_uint256"
  395. },
  396. {
  397. "astId": 127,
  398. "contract": "LibAppStorage.sol:MyContract",
  399. "label": "totalScores",
  400. "offset": 0,
  401. "slot": "34",
  402. "type": "t_uint256"
  403. },
  404. {
  405. "astId": 131,
  406. "contract": "LibAppStorage.sol:MyContract",
  407. "label": "petMigrated",
  408. "offset": 0,
  409. "slot": "35",
  410. "type": "t_mapping(t_uint256,t_bool)"
  411. },
  412. {
  413. "astId": 133,
  414. "contract": "LibAppStorage.sol:MyContract",
  415. "label": "hasTheDiamond",
  416. "offset": 0,
  417. "slot": "36",
  418. "type": "t_uint256"
  419. },
  420. {
  421. "astId": 137,
  422. "contract": "LibAppStorage.sol:MyContract",
  423. "label": "itemBought",
  424. "offset": 0,
  425. "slot": "37",
  426. "type": "t_mapping(t_uint256,t_uint256)"
  427. }
  428. ],
  429. "numberOfBytes": "1216"
  430. },
  431. "t_struct(Bytes32Set)2518_storage": {
  432. "encoding": "inplace",
  433. "label": "struct EnumerableSet.Bytes32Set",
  434. "members": [
  435. {
  436. "astId": 2517,
  437. "contract": "LibAppStorage.sol:MyContract",
  438. "label": "_inner",
  439. "offset": 0,
  440. "slot": "0",
  441. "type": "t_struct(Set)2324_storage"
  442. }
  443. ],
  444. "numberOfBytes": "64"
  445. },
  446. "t_struct(Bytes32ToBytes32Map)1026_storage": {
  447. "encoding": "inplace",
  448. "label": "struct EnumerableMap.Bytes32ToBytes32Map",
  449. "members": [
  450. {
  451. "astId": 1021,
  452. "contract": "LibAppStorage.sol:MyContract",
  453. "label": "_keys",
  454. "offset": 0,
  455. "slot": "0",
  456. "type": "t_struct(Bytes32Set)2518_storage"
  457. },
  458. {
  459. "astId": 1025,
  460. "contract": "LibAppStorage.sol:MyContract",
  461. "label": "_values",
  462. "offset": 0,
  463. "slot": "2",
  464. "type": "t_mapping(t_bytes32,t_bytes32)"
  465. }
  466. ],
  467. "numberOfBytes": "96"
  468. },
  469. "t_struct(Set)2324_storage": {
  470. "encoding": "inplace",
  471. "label": "struct EnumerableSet.Set",
  472. "members": [
  473. {
  474. "astId": 2319,
  475. "contract": "LibAppStorage.sol:MyContract",
  476. "label": "_values",
  477. "offset": 0,
  478. "slot": "0",
  479. "type": "t_array(t_bytes32)dyn_storage"
  480. },
  481. {
  482. "astId": 2323,
  483. "contract": "LibAppStorage.sol:MyContract",
  484. "label": "_indexes",
  485. "offset": 0,
  486. "slot": "1",
  487. "type": "t_mapping(t_bytes32,t_uint256)"
  488. }
  489. ],
  490. "numberOfBytes": "64"
  491. },
  492. "t_struct(UintToUintMap)1272_storage": {
  493. "encoding": "inplace",
  494. "label": "struct EnumerableMap.UintToUintMap",
  495. "members": [
  496. {
  497. "astId": 1271,
  498. "contract": "LibAppStorage.sol:MyContract",
  499. "label": "_inner",
  500. "offset": 0,
  501. "slot": "0",
  502. "type": "t_struct(Bytes32ToBytes32Map)1026_storage"
  503. }
  504. ],
  505. "numberOfBytes": "96"
  506. },
  507. "t_uint256": {
  508. "encoding": "inplace",
  509. "label": "uint256",
  510. "numberOfBytes": "32"
  511. }
  512. }
  513. }
Advertisement
Add Comment
Please, Sign In to add comment