web3gbit-cli 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (989) hide show
  1. package/--broadcast +0 -0
  2. package/--private-key +0 -0
  3. package/--rpc-url +0 -0
  4. package/.github/workflows/test.yml +38 -0
  5. package/.gitmodules +3 -0
  6. package/GbitToken_flat.sol +2 -0
  7. package/GbitToken_flat.solnpx +0 -0
  8. package/README.md +72 -0
  9. package/admin-cli.js +413 -0
  10. package/cache/solidity-files-cache.json +1 -0
  11. package/foundry.lock +8 -0
  12. package/foundry.toml +6 -0
  13. package/lib/forge-std/.gitattributes +1 -0
  14. package/lib/forge-std/.github/CODEOWNERS +1 -0
  15. package/lib/forge-std/.github/dependabot.yml +6 -0
  16. package/lib/forge-std/.github/workflows/ci.yml +125 -0
  17. package/lib/forge-std/.github/workflows/sync.yml +36 -0
  18. package/lib/forge-std/CONTRIBUTING.md +193 -0
  19. package/lib/forge-std/LICENSE-APACHE +203 -0
  20. package/lib/forge-std/LICENSE-MIT +25 -0
  21. package/lib/forge-std/README.md +268 -0
  22. package/lib/forge-std/RELEASE_CHECKLIST.md +12 -0
  23. package/lib/forge-std/foundry.toml +18 -0
  24. package/lib/forge-std/package.json +16 -0
  25. package/lib/forge-std/scripts/vm.py +636 -0
  26. package/lib/forge-std/src/Base.sol +48 -0
  27. package/lib/forge-std/src/Config.sol +60 -0
  28. package/lib/forge-std/src/LibVariable.sol +477 -0
  29. package/lib/forge-std/src/Script.sol +28 -0
  30. package/lib/forge-std/src/StdAssertions.sol +779 -0
  31. package/lib/forge-std/src/StdChains.sol +295 -0
  32. package/lib/forge-std/src/StdCheats.sol +825 -0
  33. package/lib/forge-std/src/StdConfig.sol +632 -0
  34. package/lib/forge-std/src/StdConstants.sol +30 -0
  35. package/lib/forge-std/src/StdError.sol +15 -0
  36. package/lib/forge-std/src/StdInvariant.sol +120 -0
  37. package/lib/forge-std/src/StdJson.sol +275 -0
  38. package/lib/forge-std/src/StdMath.sol +47 -0
  39. package/lib/forge-std/src/StdStorage.sol +475 -0
  40. package/lib/forge-std/src/StdStyle.sol +333 -0
  41. package/lib/forge-std/src/StdToml.sol +275 -0
  42. package/lib/forge-std/src/StdUtils.sol +200 -0
  43. package/lib/forge-std/src/Test.sol +32 -0
  44. package/lib/forge-std/src/Vm.sol +2500 -0
  45. package/lib/forge-std/src/console.sol +1551 -0
  46. package/lib/forge-std/src/console2.sol +4 -0
  47. package/lib/forge-std/src/interfaces/IERC1155.sol +105 -0
  48. package/lib/forge-std/src/interfaces/IERC165.sol +12 -0
  49. package/lib/forge-std/src/interfaces/IERC20.sol +43 -0
  50. package/lib/forge-std/src/interfaces/IERC4626.sol +190 -0
  51. package/lib/forge-std/src/interfaces/IERC6909.sol +72 -0
  52. package/lib/forge-std/src/interfaces/IERC721.sol +164 -0
  53. package/lib/forge-std/src/interfaces/IERC7540.sol +144 -0
  54. package/lib/forge-std/src/interfaces/IERC7575.sol +241 -0
  55. package/lib/forge-std/src/interfaces/IMulticall3.sol +68 -0
  56. package/lib/forge-std/src/safeconsole.sol +13248 -0
  57. package/lib/forge-std/test/CommonBase.t.sol +44 -0
  58. package/lib/forge-std/test/Config.t.sol +381 -0
  59. package/lib/forge-std/test/LibVariable.t.sol +452 -0
  60. package/lib/forge-std/test/StdAssertions.t.sol +141 -0
  61. package/lib/forge-std/test/StdChains.t.sol +227 -0
  62. package/lib/forge-std/test/StdCheats.t.sol +638 -0
  63. package/lib/forge-std/test/StdConstants.t.sol +38 -0
  64. package/lib/forge-std/test/StdError.t.sol +119 -0
  65. package/lib/forge-std/test/StdJson.t.sol +49 -0
  66. package/lib/forge-std/test/StdMath.t.sol +202 -0
  67. package/lib/forge-std/test/StdStorage.t.sol +485 -0
  68. package/lib/forge-std/test/StdStyle.t.sol +110 -0
  69. package/lib/forge-std/test/StdToml.t.sol +49 -0
  70. package/lib/forge-std/test/StdUtils.t.sol +342 -0
  71. package/lib/forge-std/test/Vm.t.sol +18 -0
  72. package/lib/forge-std/test/compilation/CompilationScript.sol +8 -0
  73. package/lib/forge-std/test/compilation/CompilationScriptBase.sol +8 -0
  74. package/lib/forge-std/test/compilation/CompilationTest.sol +8 -0
  75. package/lib/forge-std/test/compilation/CompilationTestBase.sol +8 -0
  76. package/lib/forge-std/test/fixtures/broadcast.log.json +187 -0
  77. package/lib/forge-std/test/fixtures/config.toml +81 -0
  78. package/lib/forge-std/test/fixtures/test.json +8 -0
  79. package/lib/forge-std/test/fixtures/test.toml +6 -0
  80. package/lib/openzeppelin-contracts/.changeset/blue-mirrors-agree.md +5 -0
  81. package/lib/openzeppelin-contracts/.changeset/bright-webs-create.md +5 -0
  82. package/lib/openzeppelin-contracts/.changeset/clean-worlds-end.md +5 -0
  83. package/lib/openzeppelin-contracts/.changeset/config.json +12 -0
  84. package/lib/openzeppelin-contracts/.changeset/curly-pandas-flow.md +5 -0
  85. package/lib/openzeppelin-contracts/.changeset/flat-ideas-count.md +5 -0
  86. package/lib/openzeppelin-contracts/.changeset/fluffy-facts-brake.md +5 -0
  87. package/lib/openzeppelin-contracts/.changeset/forty-ads-design.md +5 -0
  88. package/lib/openzeppelin-contracts/.changeset/full-emus-hear.md +5 -0
  89. package/lib/openzeppelin-contracts/.changeset/fuzzy-lizards-do.md +5 -0
  90. package/lib/openzeppelin-contracts/.changeset/grumpy-cats-brake.md +5 -0
  91. package/lib/openzeppelin-contracts/.changeset/khaki-crews-join.md +5 -0
  92. package/lib/openzeppelin-contracts/.changeset/new-socks-deny.md +5 -0
  93. package/lib/openzeppelin-contracts/.changeset/shaky-phones-mix.md +5 -0
  94. package/lib/openzeppelin-contracts/.changeset/social-tools-sniff.md +5 -0
  95. package/lib/openzeppelin-contracts/.changeset/spotty-plums-brush.md +5 -0
  96. package/lib/openzeppelin-contracts/.changeset/stale-lizards-cheat.md +5 -0
  97. package/lib/openzeppelin-contracts/.changeset/swift-planets-juggle.md +5 -0
  98. package/lib/openzeppelin-contracts/.changeset/tame-monkeys-make.md +5 -0
  99. package/lib/openzeppelin-contracts/.changeset/tender-pans-yawn.md +5 -0
  100. package/lib/openzeppelin-contracts/.changeset/thick-banks-relate.md +5 -0
  101. package/lib/openzeppelin-contracts/.changeset/vast-worlds-pull.md +5 -0
  102. package/lib/openzeppelin-contracts/.changeset/whole-turkeys-swim.md +5 -0
  103. package/lib/openzeppelin-contracts/.changeset/yellow-clowns-mate.md +5 -0
  104. package/lib/openzeppelin-contracts/.changeset/young-corners-help.md +5 -0
  105. package/lib/openzeppelin-contracts/.codecov.yml +16 -0
  106. package/lib/openzeppelin-contracts/.editorconfig +21 -0
  107. package/lib/openzeppelin-contracts/.gitattributes +3 -0
  108. package/lib/openzeppelin-contracts/.github/CODEOWNERS +10 -0
  109. package/lib/openzeppelin-contracts/.github/ISSUE_TEMPLATE/bug_report.md +21 -0
  110. package/lib/openzeppelin-contracts/.github/ISSUE_TEMPLATE/config.yml +4 -0
  111. package/lib/openzeppelin-contracts/.github/ISSUE_TEMPLATE/feature_request.md +14 -0
  112. package/lib/openzeppelin-contracts/.github/PULL_REQUEST_TEMPLATE.md +20 -0
  113. package/lib/openzeppelin-contracts/.github/actions/gas-compare/action.yml +51 -0
  114. package/lib/openzeppelin-contracts/.github/actions/setup/action.yml +108 -0
  115. package/lib/openzeppelin-contracts/.github/actions/storage-layout/action.yml +57 -0
  116. package/lib/openzeppelin-contracts/.github/workflows/actionlint.yml +18 -0
  117. package/lib/openzeppelin-contracts/.github/workflows/changeset.yml +28 -0
  118. package/lib/openzeppelin-contracts/.github/workflows/checks.yml +132 -0
  119. package/lib/openzeppelin-contracts/.github/workflows/docs.yml +19 -0
  120. package/lib/openzeppelin-contracts/.github/workflows/formal-verification.yml +63 -0
  121. package/lib/openzeppelin-contracts/.github/workflows/release-cycle.yml +212 -0
  122. package/lib/openzeppelin-contracts/.github/workflows/release-upgradeable.yml +95 -0
  123. package/lib/openzeppelin-contracts/.github/workflows/upgradeable.yml +35 -0
  124. package/lib/openzeppelin-contracts/.gitmodules +10 -0
  125. package/lib/openzeppelin-contracts/.husky/pre-commit +2 -0
  126. package/lib/openzeppelin-contracts/.mocharc.js +4 -0
  127. package/lib/openzeppelin-contracts/.prettierrc +15 -0
  128. package/lib/openzeppelin-contracts/.solcover.js +21 -0
  129. package/lib/openzeppelin-contracts/CHANGELOG.md +1364 -0
  130. package/lib/openzeppelin-contracts/CODE_OF_CONDUCT.md +73 -0
  131. package/lib/openzeppelin-contracts/CONTRIBUTING.md +36 -0
  132. package/lib/openzeppelin-contracts/FUNDING.json +10 -0
  133. package/lib/openzeppelin-contracts/GUIDELINES.md +170 -0
  134. package/lib/openzeppelin-contracts/LICENSE +22 -0
  135. package/lib/openzeppelin-contracts/README.md +122 -0
  136. package/lib/openzeppelin-contracts/RELEASING.md +45 -0
  137. package/lib/openzeppelin-contracts/SECURITY.md +43 -0
  138. package/lib/openzeppelin-contracts/audits/2017-03.md +292 -0
  139. package/lib/openzeppelin-contracts/audits/2018-10.pdf +0 -0
  140. package/lib/openzeppelin-contracts/audits/2022-10-Checkpoints.pdf +0 -0
  141. package/lib/openzeppelin-contracts/audits/2022-10-ERC4626.pdf +0 -0
  142. package/lib/openzeppelin-contracts/audits/2023-05-v4.9.pdf +0 -0
  143. package/lib/openzeppelin-contracts/audits/2023-10-v5.0.pdf +0 -0
  144. package/lib/openzeppelin-contracts/audits/2024-10-v5.1.pdf +0 -0
  145. package/lib/openzeppelin-contracts/audits/2024-12-v5.2.pdf +0 -0
  146. package/lib/openzeppelin-contracts/audits/2025-04-v5.3.pdf +0 -0
  147. package/lib/openzeppelin-contracts/audits/2025-07-v5.4.pdf +0 -0
  148. package/lib/openzeppelin-contracts/audits/2025-10-v5.5.pdf +0 -0
  149. package/lib/openzeppelin-contracts/audits/README.md +22 -0
  150. package/lib/openzeppelin-contracts/contracts/access/AccessControl.sol +207 -0
  151. package/lib/openzeppelin-contracts/contracts/access/IAccessControl.sol +98 -0
  152. package/lib/openzeppelin-contracts/contracts/access/Ownable.sol +100 -0
  153. package/lib/openzeppelin-contracts/contracts/access/Ownable2Step.sol +67 -0
  154. package/lib/openzeppelin-contracts/contracts/access/README.adoc +45 -0
  155. package/lib/openzeppelin-contracts/contracts/access/extensions/AccessControlDefaultAdminRules.sol +372 -0
  156. package/lib/openzeppelin-contracts/contracts/access/extensions/AccessControlEnumerable.sol +81 -0
  157. package/lib/openzeppelin-contracts/contracts/access/extensions/IAccessControlDefaultAdminRules.sol +192 -0
  158. package/lib/openzeppelin-contracts/contracts/access/extensions/IAccessControlEnumerable.sol +31 -0
  159. package/lib/openzeppelin-contracts/contracts/access/manager/AccessManaged.sol +112 -0
  160. package/lib/openzeppelin-contracts/contracts/access/manager/AccessManager.sol +741 -0
  161. package/lib/openzeppelin-contracts/contracts/access/manager/AuthorityUtils.sol +36 -0
  162. package/lib/openzeppelin-contracts/contracts/access/manager/IAccessManaged.sol +32 -0
  163. package/lib/openzeppelin-contracts/contracts/access/manager/IAccessManager.sol +403 -0
  164. package/lib/openzeppelin-contracts/contracts/access/manager/IAuthority.sol +14 -0
  165. package/lib/openzeppelin-contracts/contracts/account/Account.sol +151 -0
  166. package/lib/openzeppelin-contracts/contracts/account/README.adoc +30 -0
  167. package/lib/openzeppelin-contracts/contracts/account/extensions/draft-AccountERC7579.sol +420 -0
  168. package/lib/openzeppelin-contracts/contracts/account/extensions/draft-AccountERC7579Hooked.sol +107 -0
  169. package/lib/openzeppelin-contracts/contracts/account/extensions/draft-ERC7821.sol +70 -0
  170. package/lib/openzeppelin-contracts/contracts/account/utils/EIP7702Utils.sol +21 -0
  171. package/lib/openzeppelin-contracts/contracts/account/utils/draft-ERC4337Utils.sol +279 -0
  172. package/lib/openzeppelin-contracts/contracts/account/utils/draft-ERC7579Utils.sol +280 -0
  173. package/lib/openzeppelin-contracts/contracts/crosschain/CrosschainLinked.sol +108 -0
  174. package/lib/openzeppelin-contracts/contracts/crosschain/ERC7786Recipient.sol +70 -0
  175. package/lib/openzeppelin-contracts/contracts/crosschain/README.adoc +29 -0
  176. package/lib/openzeppelin-contracts/contracts/crosschain/bridges/BridgeERC20.sol +36 -0
  177. package/lib/openzeppelin-contracts/contracts/crosschain/bridges/BridgeERC20Core.sol +79 -0
  178. package/lib/openzeppelin-contracts/contracts/crosschain/bridges/BridgeERC7802.sol +33 -0
  179. package/lib/openzeppelin-contracts/contracts/finance/README.adoc +14 -0
  180. package/lib/openzeppelin-contracts/contracts/finance/VestingWallet.sol +160 -0
  181. package/lib/openzeppelin-contracts/contracts/finance/VestingWalletCliff.sol +54 -0
  182. package/lib/openzeppelin-contracts/contracts/governance/Governor.sol +819 -0
  183. package/lib/openzeppelin-contracts/contracts/governance/IGovernor.sol +454 -0
  184. package/lib/openzeppelin-contracts/contracts/governance/README.adoc +197 -0
  185. package/lib/openzeppelin-contracts/contracts/governance/TimelockController.sol +470 -0
  186. package/lib/openzeppelin-contracts/contracts/governance/extensions/GovernorCountingFractional.sol +190 -0
  187. package/lib/openzeppelin-contracts/contracts/governance/extensions/GovernorCountingOverridable.sol +222 -0
  188. package/lib/openzeppelin-contracts/contracts/governance/extensions/GovernorCountingSimple.sol +96 -0
  189. package/lib/openzeppelin-contracts/contracts/governance/extensions/GovernorNoncesKeyed.sol +91 -0
  190. package/lib/openzeppelin-contracts/contracts/governance/extensions/GovernorPreventLateQuorum.sol +92 -0
  191. package/lib/openzeppelin-contracts/contracts/governance/extensions/GovernorProposalGuardian.sol +59 -0
  192. package/lib/openzeppelin-contracts/contracts/governance/extensions/GovernorSequentialProposalId.sol +75 -0
  193. package/lib/openzeppelin-contracts/contracts/governance/extensions/GovernorSettings.sol +106 -0
  194. package/lib/openzeppelin-contracts/contracts/governance/extensions/GovernorStorage.sol +134 -0
  195. package/lib/openzeppelin-contracts/contracts/governance/extensions/GovernorSuperQuorum.sol +59 -0
  196. package/lib/openzeppelin-contracts/contracts/governance/extensions/GovernorTimelockAccess.sol +346 -0
  197. package/lib/openzeppelin-contracts/contracts/governance/extensions/GovernorTimelockCompound.sol +165 -0
  198. package/lib/openzeppelin-contracts/contracts/governance/extensions/GovernorTimelockControl.sol +167 -0
  199. package/lib/openzeppelin-contracts/contracts/governance/extensions/GovernorVotes.sol +63 -0
  200. package/lib/openzeppelin-contracts/contracts/governance/extensions/GovernorVotesQuorumFraction.sol +113 -0
  201. package/lib/openzeppelin-contracts/contracts/governance/extensions/GovernorVotesSuperQuorumFraction.sol +135 -0
  202. package/lib/openzeppelin-contracts/contracts/governance/utils/IVotes.sol +60 -0
  203. package/lib/openzeppelin-contracts/contracts/governance/utils/Votes.sol +253 -0
  204. package/lib/openzeppelin-contracts/contracts/governance/utils/VotesExtended.sol +85 -0
  205. package/lib/openzeppelin-contracts/contracts/interfaces/IERC1155.sol +6 -0
  206. package/lib/openzeppelin-contracts/contracts/interfaces/IERC1155MetadataURI.sol +6 -0
  207. package/lib/openzeppelin-contracts/contracts/interfaces/IERC1155Receiver.sol +6 -0
  208. package/lib/openzeppelin-contracts/contracts/interfaces/IERC1271.sol +17 -0
  209. package/lib/openzeppelin-contracts/contracts/interfaces/IERC1363.sol +86 -0
  210. package/lib/openzeppelin-contracts/contracts/interfaces/IERC1363Receiver.sol +32 -0
  211. package/lib/openzeppelin-contracts/contracts/interfaces/IERC1363Spender.sol +26 -0
  212. package/lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol +6 -0
  213. package/lib/openzeppelin-contracts/contracts/interfaces/IERC1820Implementer.sol +20 -0
  214. package/lib/openzeppelin-contracts/contracts/interfaces/IERC1820Registry.sol +112 -0
  215. package/lib/openzeppelin-contracts/contracts/interfaces/IERC1967.sol +24 -0
  216. package/lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol +6 -0
  217. package/lib/openzeppelin-contracts/contracts/interfaces/IERC20Metadata.sol +6 -0
  218. package/lib/openzeppelin-contracts/contracts/interfaces/IERC2309.sol +19 -0
  219. package/lib/openzeppelin-contracts/contracts/interfaces/IERC2612.sol +8 -0
  220. package/lib/openzeppelin-contracts/contracts/interfaces/IERC2981.sol +26 -0
  221. package/lib/openzeppelin-contracts/contracts/interfaces/IERC3156.sol +7 -0
  222. package/lib/openzeppelin-contracts/contracts/interfaces/IERC3156FlashBorrower.sol +27 -0
  223. package/lib/openzeppelin-contracts/contracts/interfaces/IERC3156FlashLender.sol +41 -0
  224. package/lib/openzeppelin-contracts/contracts/interfaces/IERC4626.sol +230 -0
  225. package/lib/openzeppelin-contracts/contracts/interfaces/IERC4906.sol +20 -0
  226. package/lib/openzeppelin-contracts/contracts/interfaces/IERC5267.sol +28 -0
  227. package/lib/openzeppelin-contracts/contracts/interfaces/IERC5313.sol +16 -0
  228. package/lib/openzeppelin-contracts/contracts/interfaces/IERC5805.sol +9 -0
  229. package/lib/openzeppelin-contracts/contracts/interfaces/IERC6372.sol +17 -0
  230. package/lib/openzeppelin-contracts/contracts/interfaces/IERC6909.sol +125 -0
  231. package/lib/openzeppelin-contracts/contracts/interfaces/IERC721.sol +6 -0
  232. package/lib/openzeppelin-contracts/contracts/interfaces/IERC721Enumerable.sol +6 -0
  233. package/lib/openzeppelin-contracts/contracts/interfaces/IERC721Metadata.sol +6 -0
  234. package/lib/openzeppelin-contracts/contracts/interfaces/IERC721Receiver.sol +6 -0
  235. package/lib/openzeppelin-contracts/contracts/interfaces/IERC7751.sol +12 -0
  236. package/lib/openzeppelin-contracts/contracts/interfaces/IERC777.sol +200 -0
  237. package/lib/openzeppelin-contracts/contracts/interfaces/IERC777Recipient.sol +35 -0
  238. package/lib/openzeppelin-contracts/contracts/interfaces/IERC777Sender.sol +35 -0
  239. package/lib/openzeppelin-contracts/contracts/interfaces/IERC7913.sol +18 -0
  240. package/lib/openzeppelin-contracts/contracts/interfaces/README.adoc +138 -0
  241. package/lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol +20 -0
  242. package/lib/openzeppelin-contracts/contracts/interfaces/draft-IERC4337.sol +255 -0
  243. package/lib/openzeppelin-contracts/contracts/interfaces/draft-IERC6093.sol +162 -0
  244. package/lib/openzeppelin-contracts/contracts/interfaces/draft-IERC7579.sol +227 -0
  245. package/lib/openzeppelin-contracts/contracts/interfaces/draft-IERC7674.sol +17 -0
  246. package/lib/openzeppelin-contracts/contracts/interfaces/draft-IERC7786.sol +64 -0
  247. package/lib/openzeppelin-contracts/contracts/interfaces/draft-IERC7802.sol +32 -0
  248. package/lib/openzeppelin-contracts/contracts/interfaces/draft-IERC7821.sol +44 -0
  249. package/lib/openzeppelin-contracts/contracts/metatx/ERC2771Context.sol +90 -0
  250. package/lib/openzeppelin-contracts/contracts/metatx/ERC2771Forwarder.sol +372 -0
  251. package/lib/openzeppelin-contracts/contracts/metatx/README.adoc +17 -0
  252. package/lib/openzeppelin-contracts/contracts/mocks/AccessManagedTarget.sol +34 -0
  253. package/lib/openzeppelin-contracts/contracts/mocks/AccessManagerMock.sol +20 -0
  254. package/lib/openzeppelin-contracts/contracts/mocks/ArraysMock.sol +171 -0
  255. package/lib/openzeppelin-contracts/contracts/mocks/AuthorityMock.sol +69 -0
  256. package/lib/openzeppelin-contracts/contracts/mocks/Base64Dirty.sol +19 -0
  257. package/lib/openzeppelin-contracts/contracts/mocks/BatchCaller.sol +20 -0
  258. package/lib/openzeppelin-contracts/contracts/mocks/CallReceiverMock.sol +106 -0
  259. package/lib/openzeppelin-contracts/contracts/mocks/ConstructorMock.sol +34 -0
  260. package/lib/openzeppelin-contracts/contracts/mocks/ContextMock.sol +35 -0
  261. package/lib/openzeppelin-contracts/contracts/mocks/DummyImplementation.sol +61 -0
  262. package/lib/openzeppelin-contracts/contracts/mocks/EIP712Verifier.sol +16 -0
  263. package/lib/openzeppelin-contracts/contracts/mocks/ERC1271WalletMock.sol +24 -0
  264. package/lib/openzeppelin-contracts/contracts/mocks/ERC165Mock.sol +100 -0
  265. package/lib/openzeppelin-contracts/contracts/mocks/ERC2771ContextMock.sol +28 -0
  266. package/lib/openzeppelin-contracts/contracts/mocks/ERC3156FlashBorrowerMock.sol +53 -0
  267. package/lib/openzeppelin-contracts/contracts/mocks/EtherReceiverMock.sol +17 -0
  268. package/lib/openzeppelin-contracts/contracts/mocks/InitializableMock.sol +130 -0
  269. package/lib/openzeppelin-contracts/contracts/mocks/MerkleProofCustomHashMock.sol +62 -0
  270. package/lib/openzeppelin-contracts/contracts/mocks/MerkleTreeMock.sol +52 -0
  271. package/lib/openzeppelin-contracts/contracts/mocks/MulticallHelper.sol +23 -0
  272. package/lib/openzeppelin-contracts/contracts/mocks/MultipleInheritanceInitializableMocks.sol +131 -0
  273. package/lib/openzeppelin-contracts/contracts/mocks/PausableMock.sol +31 -0
  274. package/lib/openzeppelin-contracts/contracts/mocks/ReentrancyAttack.sol +17 -0
  275. package/lib/openzeppelin-contracts/contracts/mocks/ReentrancyMock.sol +59 -0
  276. package/lib/openzeppelin-contracts/contracts/mocks/ReentrancyTransientMock.sol +59 -0
  277. package/lib/openzeppelin-contracts/contracts/mocks/RegressionImplementation.sol +61 -0
  278. package/lib/openzeppelin-contracts/contracts/mocks/SingleInheritanceInitializableMocks.sol +49 -0
  279. package/lib/openzeppelin-contracts/contracts/mocks/Stateless.sol +62 -0
  280. package/lib/openzeppelin-contracts/contracts/mocks/StorageSlotMock.sol +87 -0
  281. package/lib/openzeppelin-contracts/contracts/mocks/TimelockReentrant.sol +26 -0
  282. package/lib/openzeppelin-contracts/contracts/mocks/TransientSlotMock.sol +61 -0
  283. package/lib/openzeppelin-contracts/contracts/mocks/UpgradeableBeaconMock.sol +27 -0
  284. package/lib/openzeppelin-contracts/contracts/mocks/VotesExtendedMock.sol +42 -0
  285. package/lib/openzeppelin-contracts/contracts/mocks/VotesMock.sol +42 -0
  286. package/lib/openzeppelin-contracts/contracts/mocks/account/AccountMock.sol +181 -0
  287. package/lib/openzeppelin-contracts/contracts/mocks/account/modules/ERC7579Mock.sol +128 -0
  288. package/lib/openzeppelin-contracts/contracts/mocks/account/utils/ERC7579UtilsMock.sol +23 -0
  289. package/lib/openzeppelin-contracts/contracts/mocks/compound/CompTimelock.sol +174 -0
  290. package/lib/openzeppelin-contracts/contracts/mocks/crosschain/ERC7786GatewayMock.sol +56 -0
  291. package/lib/openzeppelin-contracts/contracts/mocks/crosschain/ERC7786RecipientMock.sol +31 -0
  292. package/lib/openzeppelin-contracts/contracts/mocks/docs/AccessManagerEnumerable.sol +161 -0
  293. package/lib/openzeppelin-contracts/contracts/mocks/docs/ERC20WithAutoMinerReward.sol +22 -0
  294. package/lib/openzeppelin-contracts/contracts/mocks/docs/ERC4626Fees.sol +109 -0
  295. package/lib/openzeppelin-contracts/contracts/mocks/docs/MyNFT.sol +9 -0
  296. package/lib/openzeppelin-contracts/contracts/mocks/docs/access-control/AccessControlERC20MintBase.sol +25 -0
  297. package/lib/openzeppelin-contracts/contracts/mocks/docs/access-control/AccessControlERC20MintMissing.sol +24 -0
  298. package/lib/openzeppelin-contracts/contracts/mocks/docs/access-control/AccessControlERC20MintOnlyRole.sol +23 -0
  299. package/lib/openzeppelin-contracts/contracts/mocks/docs/access-control/AccessControlModified.sol +14 -0
  300. package/lib/openzeppelin-contracts/contracts/mocks/docs/access-control/AccessManagedERC20MintBase.sol +16 -0
  301. package/lib/openzeppelin-contracts/contracts/mocks/docs/access-control/MyContractOwnable.sol +17 -0
  302. package/lib/openzeppelin-contracts/contracts/mocks/docs/account/MyAccountEIP7702.sol +20 -0
  303. package/lib/openzeppelin-contracts/contracts/mocks/docs/account/MyFactoryAccount.sol +37 -0
  304. package/lib/openzeppelin-contracts/contracts/mocks/docs/governance/MyGovernor.sol +80 -0
  305. package/lib/openzeppelin-contracts/contracts/mocks/docs/governance/MyToken.sol +21 -0
  306. package/lib/openzeppelin-contracts/contracts/mocks/docs/governance/MyTokenTimestampBased.sol +32 -0
  307. package/lib/openzeppelin-contracts/contracts/mocks/docs/governance/MyTokenWrapped.sol +28 -0
  308. package/lib/openzeppelin-contracts/contracts/mocks/docs/token/ERC1155/GameItems.sol +21 -0
  309. package/lib/openzeppelin-contracts/contracts/mocks/docs/token/ERC1155/MyERC115HolderContract.sol +7 -0
  310. package/lib/openzeppelin-contracts/contracts/mocks/docs/token/ERC20/GLDToken.sol +11 -0
  311. package/lib/openzeppelin-contracts/contracts/mocks/docs/token/ERC6909/ERC6909GameItems.sol +26 -0
  312. package/lib/openzeppelin-contracts/contracts/mocks/docs/token/ERC721/GameItem.sol +19 -0
  313. package/lib/openzeppelin-contracts/contracts/mocks/docs/utilities/Base64NFT.sol +27 -0
  314. package/lib/openzeppelin-contracts/contracts/mocks/docs/utilities/Multicall.sol +15 -0
  315. package/lib/openzeppelin-contracts/contracts/mocks/governance/GovernorCountingOverridableMock.sol +18 -0
  316. package/lib/openzeppelin-contracts/contracts/mocks/governance/GovernorFractionalMock.sol +14 -0
  317. package/lib/openzeppelin-contracts/contracts/mocks/governance/GovernorMock.sol +14 -0
  318. package/lib/openzeppelin-contracts/contracts/mocks/governance/GovernorNoncesKeyedMock.sol +44 -0
  319. package/lib/openzeppelin-contracts/contracts/mocks/governance/GovernorPreventLateQuorumMock.sol +40 -0
  320. package/lib/openzeppelin-contracts/contracts/mocks/governance/GovernorProposalGuardianMock.sol +27 -0
  321. package/lib/openzeppelin-contracts/contracts/mocks/governance/GovernorSequentialProposalIdMock.sol +39 -0
  322. package/lib/openzeppelin-contracts/contracts/mocks/governance/GovernorStorageMock.sol +79 -0
  323. package/lib/openzeppelin-contracts/contracts/mocks/governance/GovernorSuperQuorumMock.sol +95 -0
  324. package/lib/openzeppelin-contracts/contracts/mocks/governance/GovernorTimelockAccessMock.sol +70 -0
  325. package/lib/openzeppelin-contracts/contracts/mocks/governance/GovernorTimelockCompoundMock.sol +69 -0
  326. package/lib/openzeppelin-contracts/contracts/mocks/governance/GovernorTimelockControlMock.sol +69 -0
  327. package/lib/openzeppelin-contracts/contracts/mocks/governance/GovernorVoteMock.sol +20 -0
  328. package/lib/openzeppelin-contracts/contracts/mocks/governance/GovernorVotesSuperQuorumFractionMock.sol +37 -0
  329. package/lib/openzeppelin-contracts/contracts/mocks/governance/GovernorWithParamsMock.sol +51 -0
  330. package/lib/openzeppelin-contracts/contracts/mocks/proxy/BadBeacon.sol +11 -0
  331. package/lib/openzeppelin-contracts/contracts/mocks/proxy/ClashingImplementation.sol +19 -0
  332. package/lib/openzeppelin-contracts/contracts/mocks/proxy/ERC1967ProxyUnsafe.sol +13 -0
  333. package/lib/openzeppelin-contracts/contracts/mocks/proxy/UUPSUpgradeableMock.sol +35 -0
  334. package/lib/openzeppelin-contracts/contracts/mocks/token/ERC1155ReceiverMock.sol +74 -0
  335. package/lib/openzeppelin-contracts/contracts/mocks/token/ERC1363ForceApproveMock.sol +13 -0
  336. package/lib/openzeppelin-contracts/contracts/mocks/token/ERC1363NoReturnMock.sol +33 -0
  337. package/lib/openzeppelin-contracts/contracts/mocks/token/ERC1363ReceiverMock.sol +52 -0
  338. package/lib/openzeppelin-contracts/contracts/mocks/token/ERC1363ReturnFalseMock.sol +34 -0
  339. package/lib/openzeppelin-contracts/contracts/mocks/token/ERC1363SpenderMock.sol +47 -0
  340. package/lib/openzeppelin-contracts/contracts/mocks/token/ERC20ApprovalMock.sol +10 -0
  341. package/lib/openzeppelin-contracts/contracts/mocks/token/ERC20BridgeableMock.sol +30 -0
  342. package/lib/openzeppelin-contracts/contracts/mocks/token/ERC20DecimalsMock.sol +17 -0
  343. package/lib/openzeppelin-contracts/contracts/mocks/token/ERC20ExcessDecimalsMock.sol +9 -0
  344. package/lib/openzeppelin-contracts/contracts/mocks/token/ERC20FlashMintMock.sol +26 -0
  345. package/lib/openzeppelin-contracts/contracts/mocks/token/ERC20ForceApproveMock.sol +13 -0
  346. package/lib/openzeppelin-contracts/contracts/mocks/token/ERC20GetterHelper.sol +38 -0
  347. package/lib/openzeppelin-contracts/contracts/mocks/token/ERC20Mock.sol +16 -0
  348. package/lib/openzeppelin-contracts/contracts/mocks/token/ERC20MulticallMock.sol +8 -0
  349. package/lib/openzeppelin-contracts/contracts/mocks/token/ERC20NoReturnMock.sol +30 -0
  350. package/lib/openzeppelin-contracts/contracts/mocks/token/ERC20Reentrant.sol +39 -0
  351. package/lib/openzeppelin-contracts/contracts/mocks/token/ERC20ReturnFalseMock.sol +19 -0
  352. package/lib/openzeppelin-contracts/contracts/mocks/token/ERC20VotesAdditionalCheckpointsMock.sol +31 -0
  353. package/lib/openzeppelin-contracts/contracts/mocks/token/ERC20VotesLegacyMock.sol +253 -0
  354. package/lib/openzeppelin-contracts/contracts/mocks/token/ERC20VotesTimestampMock.sol +29 -0
  355. package/lib/openzeppelin-contracts/contracts/mocks/token/ERC4626LimitsMock.sol +23 -0
  356. package/lib/openzeppelin-contracts/contracts/mocks/token/ERC4626Mock.sol +17 -0
  357. package/lib/openzeppelin-contracts/contracts/mocks/token/ERC4626OffsetMock.sol +17 -0
  358. package/lib/openzeppelin-contracts/contracts/mocks/token/ERC4646FeesMock.sol +40 -0
  359. package/lib/openzeppelin-contracts/contracts/mocks/token/ERC721ConsecutiveEnumerableMock.sol +42 -0
  360. package/lib/openzeppelin-contracts/contracts/mocks/token/ERC721ConsecutiveMock.sol +61 -0
  361. package/lib/openzeppelin-contracts/contracts/mocks/token/ERC721ReceiverMock.sol +47 -0
  362. package/lib/openzeppelin-contracts/contracts/mocks/token/ERC721URIStorageMock.sol +17 -0
  363. package/lib/openzeppelin-contracts/contracts/mocks/utils/cryptography/ERC7739Mock.sol +12 -0
  364. package/lib/openzeppelin-contracts/contracts/package.json +32 -0
  365. package/lib/openzeppelin-contracts/contracts/proxy/Clones.sol +294 -0
  366. package/lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol +62 -0
  367. package/lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Utils.sol +177 -0
  368. package/lib/openzeppelin-contracts/contracts/proxy/Proxy.sol +69 -0
  369. package/lib/openzeppelin-contracts/contracts/proxy/README.adoc +87 -0
  370. package/lib/openzeppelin-contracts/contracts/proxy/beacon/BeaconProxy.sol +57 -0
  371. package/lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol +16 -0
  372. package/lib/openzeppelin-contracts/contracts/proxy/beacon/UpgradeableBeacon.sol +70 -0
  373. package/lib/openzeppelin-contracts/contracts/proxy/transparent/ProxyAdmin.sol +45 -0
  374. package/lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol +118 -0
  375. package/lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol +238 -0
  376. package/lib/openzeppelin-contracts/contracts/proxy/utils/UUPSUpgradeable.sol +148 -0
  377. package/lib/openzeppelin-contracts/contracts/token/ERC1155/ERC1155.sol +416 -0
  378. package/lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155.sol +123 -0
  379. package/lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155Receiver.sol +59 -0
  380. package/lib/openzeppelin-contracts/contracts/token/ERC1155/README.adoc +43 -0
  381. package/lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/ERC1155Burnable.sol +28 -0
  382. package/lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/ERC1155Pausable.sol +38 -0
  383. package/lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/ERC1155Supply.sol +88 -0
  384. package/lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/ERC1155URIStorage.sol +58 -0
  385. package/lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol +20 -0
  386. package/lib/openzeppelin-contracts/contracts/token/ERC1155/utils/ERC1155Holder.sol +42 -0
  387. package/lib/openzeppelin-contracts/contracts/token/ERC1155/utils/ERC1155Utils.sol +88 -0
  388. package/lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol +305 -0
  389. package/lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol +79 -0
  390. package/lib/openzeppelin-contracts/contracts/token/ERC20/README.adoc +81 -0
  391. package/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC1363.sol +135 -0
  392. package/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Burnable.sol +39 -0
  393. package/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Capped.sol +54 -0
  394. package/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Crosschain.sol +38 -0
  395. package/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20FlashMint.sol +130 -0
  396. package/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Pausable.sol +33 -0
  397. package/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Permit.sol +77 -0
  398. package/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Votes.sol +83 -0
  399. package/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Wrapper.sol +89 -0
  400. package/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC4626.sol +315 -0
  401. package/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol +26 -0
  402. package/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Permit.sol +90 -0
  403. package/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/draft-ERC20Bridgeable.sol +51 -0
  404. package/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/draft-ERC20TemporaryApproval.sol +119 -0
  405. package/lib/openzeppelin-contracts/contracts/token/ERC20/utils/ERC1363Utils.sol +95 -0
  406. package/lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol +280 -0
  407. package/lib/openzeppelin-contracts/contracts/token/ERC6909/ERC6909.sol +224 -0
  408. package/lib/openzeppelin-contracts/contracts/token/ERC6909/README.adoc +27 -0
  409. package/lib/openzeppelin-contracts/contracts/token/ERC6909/extensions/ERC6909ContentURI.sol +59 -0
  410. package/lib/openzeppelin-contracts/contracts/token/ERC6909/extensions/ERC6909Metadata.sol +83 -0
  411. package/lib/openzeppelin-contracts/contracts/token/ERC6909/extensions/ERC6909TokenSupply.sol +41 -0
  412. package/lib/openzeppelin-contracts/contracts/token/ERC721/ERC721.sol +433 -0
  413. package/lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol +135 -0
  414. package/lib/openzeppelin-contracts/contracts/token/ERC721/IERC721Receiver.sol +28 -0
  415. package/lib/openzeppelin-contracts/contracts/token/ERC721/README.adoc +69 -0
  416. package/lib/openzeppelin-contracts/contracts/token/ERC721/extensions/ERC721Burnable.sol +26 -0
  417. package/lib/openzeppelin-contracts/contracts/token/ERC721/extensions/ERC721Consecutive.sol +176 -0
  418. package/lib/openzeppelin-contracts/contracts/token/ERC721/extensions/ERC721Enumerable.sol +165 -0
  419. package/lib/openzeppelin-contracts/contracts/token/ERC721/extensions/ERC721Pausable.sol +37 -0
  420. package/lib/openzeppelin-contracts/contracts/token/ERC721/extensions/ERC721Royalty.sol +26 -0
  421. package/lib/openzeppelin-contracts/contracts/token/ERC721/extensions/ERC721URIStorage.sol +62 -0
  422. package/lib/openzeppelin-contracts/contracts/token/ERC721/extensions/ERC721Votes.sol +47 -0
  423. package/lib/openzeppelin-contracts/contracts/token/ERC721/extensions/ERC721Wrapper.sol +102 -0
  424. package/lib/openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Enumerable.sol +29 -0
  425. package/lib/openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Metadata.sol +27 -0
  426. package/lib/openzeppelin-contracts/contracts/token/ERC721/utils/ERC721Holder.sol +26 -0
  427. package/lib/openzeppelin-contracts/contracts/token/ERC721/utils/ERC721Utils.sol +50 -0
  428. package/lib/openzeppelin-contracts/contracts/token/common/ERC2981.sol +139 -0
  429. package/lib/openzeppelin-contracts/contracts/token/common/README.adoc +10 -0
  430. package/lib/openzeppelin-contracts/contracts/utils/Address.sol +167 -0
  431. package/lib/openzeppelin-contracts/contracts/utils/Arrays.sol +888 -0
  432. package/lib/openzeppelin-contracts/contracts/utils/Base58.sol +240 -0
  433. package/lib/openzeppelin-contracts/contracts/utils/Base64.sol +234 -0
  434. package/lib/openzeppelin-contracts/contracts/utils/Blockhash.sol +54 -0
  435. package/lib/openzeppelin-contracts/contracts/utils/Bytes.sol +332 -0
  436. package/lib/openzeppelin-contracts/contracts/utils/CAIP10.sol +54 -0
  437. package/lib/openzeppelin-contracts/contracts/utils/CAIP2.sol +51 -0
  438. package/lib/openzeppelin-contracts/contracts/utils/Calldata.sol +25 -0
  439. package/lib/openzeppelin-contracts/contracts/utils/Comparators.sol +19 -0
  440. package/lib/openzeppelin-contracts/contracts/utils/Context.sol +28 -0
  441. package/lib/openzeppelin-contracts/contracts/utils/Create2.sol +91 -0
  442. package/lib/openzeppelin-contracts/contracts/utils/Errors.sol +34 -0
  443. package/lib/openzeppelin-contracts/contracts/utils/LowLevelCall.sol +127 -0
  444. package/lib/openzeppelin-contracts/contracts/utils/Memory.sol +146 -0
  445. package/lib/openzeppelin-contracts/contracts/utils/Multicall.sol +37 -0
  446. package/lib/openzeppelin-contracts/contracts/utils/Nonces.sol +46 -0
  447. package/lib/openzeppelin-contracts/contracts/utils/NoncesKeyed.sol +74 -0
  448. package/lib/openzeppelin-contracts/contracts/utils/Packing.sol +1656 -0
  449. package/lib/openzeppelin-contracts/contracts/utils/Panic.sol +57 -0
  450. package/lib/openzeppelin-contracts/contracts/utils/Pausable.sol +112 -0
  451. package/lib/openzeppelin-contracts/contracts/utils/README.adoc +160 -0
  452. package/lib/openzeppelin-contracts/contracts/utils/RLP.sol +476 -0
  453. package/lib/openzeppelin-contracts/contracts/utils/ReentrancyGuard.sol +119 -0
  454. package/lib/openzeppelin-contracts/contracts/utils/ReentrancyGuardTransient.sol +84 -0
  455. package/lib/openzeppelin-contracts/contracts/utils/RelayedCall.sol +133 -0
  456. package/lib/openzeppelin-contracts/contracts/utils/ShortStrings.sol +122 -0
  457. package/lib/openzeppelin-contracts/contracts/utils/SlotDerivation.sol +155 -0
  458. package/lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol +143 -0
  459. package/lib/openzeppelin-contracts/contracts/utils/Strings.sol +508 -0
  460. package/lib/openzeppelin-contracts/contracts/utils/TransientSlot.sol +183 -0
  461. package/lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol +284 -0
  462. package/lib/openzeppelin-contracts/contracts/utils/cryptography/EIP712.sol +160 -0
  463. package/lib/openzeppelin-contracts/contracts/utils/cryptography/Hashes.sol +31 -0
  464. package/lib/openzeppelin-contracts/contracts/utils/cryptography/MerkleProof.sol +510 -0
  465. package/lib/openzeppelin-contracts/contracts/utils/cryptography/MessageHashUtils.sol +228 -0
  466. package/lib/openzeppelin-contracts/contracts/utils/cryptography/P256.sol +408 -0
  467. package/lib/openzeppelin-contracts/contracts/utils/cryptography/README.adoc +76 -0
  468. package/lib/openzeppelin-contracts/contracts/utils/cryptography/RSA.sol +154 -0
  469. package/lib/openzeppelin-contracts/contracts/utils/cryptography/SignatureChecker.sol +191 -0
  470. package/lib/openzeppelin-contracts/contracts/utils/cryptography/TrieProof.sol +230 -0
  471. package/lib/openzeppelin-contracts/contracts/utils/cryptography/WebAuthn.sol +261 -0
  472. package/lib/openzeppelin-contracts/contracts/utils/cryptography/draft-ERC7739Utils.sol +207 -0
  473. package/lib/openzeppelin-contracts/contracts/utils/cryptography/signers/AbstractSigner.sol +23 -0
  474. package/lib/openzeppelin-contracts/contracts/utils/cryptography/signers/MultiSignerERC7913.sol +259 -0
  475. package/lib/openzeppelin-contracts/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol +208 -0
  476. package/lib/openzeppelin-contracts/contracts/utils/cryptography/signers/SignerECDSA.sol +56 -0
  477. package/lib/openzeppelin-contracts/contracts/utils/cryptography/signers/SignerEIP7702.sol +25 -0
  478. package/lib/openzeppelin-contracts/contracts/utils/cryptography/signers/SignerERC7913.sol +63 -0
  479. package/lib/openzeppelin-contracts/contracts/utils/cryptography/signers/SignerP256.sol +64 -0
  480. package/lib/openzeppelin-contracts/contracts/utils/cryptography/signers/SignerRSA.sol +65 -0
  481. package/lib/openzeppelin-contracts/contracts/utils/cryptography/signers/SignerWebAuthn.sol +51 -0
  482. package/lib/openzeppelin-contracts/contracts/utils/cryptography/signers/draft-ERC7739.sol +98 -0
  483. package/lib/openzeppelin-contracts/contracts/utils/cryptography/verifiers/ERC7913P256Verifier.sol +29 -0
  484. package/lib/openzeppelin-contracts/contracts/utils/cryptography/verifiers/ERC7913RSAVerifier.sol +23 -0
  485. package/lib/openzeppelin-contracts/contracts/utils/cryptography/verifiers/ERC7913WebAuthnVerifier.sol +35 -0
  486. package/lib/openzeppelin-contracts/contracts/utils/draft-InteroperableAddress.sol +235 -0
  487. package/lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol +25 -0
  488. package/lib/openzeppelin-contracts/contracts/utils/introspection/ERC165Checker.sol +142 -0
  489. package/lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol +25 -0
  490. package/lib/openzeppelin-contracts/contracts/utils/math/Math.sol +763 -0
  491. package/lib/openzeppelin-contracts/contracts/utils/math/SafeCast.sol +1162 -0
  492. package/lib/openzeppelin-contracts/contracts/utils/math/SignedMath.sol +68 -0
  493. package/lib/openzeppelin-contracts/contracts/utils/structs/Accumulators.sol +130 -0
  494. package/lib/openzeppelin-contracts/contracts/utils/structs/BitMaps.sol +60 -0
  495. package/lib/openzeppelin-contracts/contracts/utils/structs/Checkpoints.sol +833 -0
  496. package/lib/openzeppelin-contracts/contracts/utils/structs/CircularBuffer.sol +152 -0
  497. package/lib/openzeppelin-contracts/contracts/utils/structs/DoubleEndedQueue.sol +237 -0
  498. package/lib/openzeppelin-contracts/contracts/utils/structs/EnumerableMap.sol +1443 -0
  499. package/lib/openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol +895 -0
  500. package/lib/openzeppelin-contracts/contracts/utils/structs/Heap.sol +259 -0
  501. package/lib/openzeppelin-contracts/contracts/utils/structs/MerkleTree.sol +267 -0
  502. package/lib/openzeppelin-contracts/contracts/utils/types/Time.sol +133 -0
  503. package/lib/openzeppelin-contracts/contracts/vendor/compound/ICompoundTimelock.sol +86 -0
  504. package/lib/openzeppelin-contracts/contracts/vendor/compound/LICENSE +11 -0
  505. package/lib/openzeppelin-contracts/docs/README.md +16 -0
  506. package/lib/openzeppelin-contracts/docs/antora.yml +7 -0
  507. package/lib/openzeppelin-contracts/docs/config.js +21 -0
  508. package/lib/openzeppelin-contracts/docs/modules/ROOT/images/access-control-multiple.svg +97 -0
  509. package/lib/openzeppelin-contracts/docs/modules/ROOT/images/access-manager-functions.svg +47 -0
  510. package/lib/openzeppelin-contracts/docs/modules/ROOT/images/access-manager.svg +99 -0
  511. package/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack-3a.png +0 -0
  512. package/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack-3b.png +0 -0
  513. package/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack-6.png +0 -0
  514. package/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack.png +0 -0
  515. package/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-deposit.png +0 -0
  516. package/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-mint.png +0 -0
  517. package/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-rate-linear.png +0 -0
  518. package/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-rate-loglog.png +0 -0
  519. package/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-rate-loglogext.png +0 -0
  520. package/lib/openzeppelin-contracts/docs/modules/ROOT/images/tally-exec.png +0 -0
  521. package/lib/openzeppelin-contracts/docs/modules/ROOT/images/tally-vote.png +0 -0
  522. package/lib/openzeppelin-contracts/docs/modules/ROOT/nav.adoc +29 -0
  523. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/access-control.adoc +339 -0
  524. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/account-abstraction.adoc +100 -0
  525. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/accounts.adoc +354 -0
  526. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/backwards-compatibility.adoc +50 -0
  527. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/eoa-delegation.adoc +143 -0
  528. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/erc1155.adoc +118 -0
  529. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/erc20-supply.adoc +71 -0
  530. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/erc20.adoc +67 -0
  531. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/erc4626.adoc +214 -0
  532. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/erc6909.adoc +47 -0
  533. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/erc721.adoc +58 -0
  534. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/extending-contracts.adoc +51 -0
  535. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/faq.adoc +13 -0
  536. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/governance.adoc +242 -0
  537. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/index.adoc +100 -0
  538. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/multisig.adoc +308 -0
  539. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/tokens.adoc +31 -0
  540. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/upgradeable.adoc +77 -0
  541. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/utilities.adoc +634 -0
  542. package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/wizard.adoc +15 -0
  543. package/lib/openzeppelin-contracts/docs/templates/contract.hbs +141 -0
  544. package/lib/openzeppelin-contracts/docs/templates/helpers.js +46 -0
  545. package/lib/openzeppelin-contracts/docs/templates/page.hbs +4 -0
  546. package/lib/openzeppelin-contracts/docs/templates/properties.js +88 -0
  547. package/lib/openzeppelin-contracts/eslint.config.mjs +29 -0
  548. package/lib/openzeppelin-contracts/foundry.toml +20 -0
  549. package/lib/openzeppelin-contracts/fv/Makefile +54 -0
  550. package/lib/openzeppelin-contracts/fv/README.md +60 -0
  551. package/lib/openzeppelin-contracts/fv/diff/access_manager_AccessManager.sol.patch +97 -0
  552. package/lib/openzeppelin-contracts/fv/diff/account_extensions_draft-AccountERC7579.sol.patch +25 -0
  553. package/lib/openzeppelin-contracts/fv/diff/token_ERC721_ERC721.sol.patch +11 -0
  554. package/lib/openzeppelin-contracts/fv/harnesses/AccessControlDefaultAdminRulesHarness.sol +46 -0
  555. package/lib/openzeppelin-contracts/fv/harnesses/AccessControlHarness.sol +6 -0
  556. package/lib/openzeppelin-contracts/fv/harnesses/AccessManagedHarness.sol +36 -0
  557. package/lib/openzeppelin-contracts/fv/harnesses/AccessManagerHarness.sol +116 -0
  558. package/lib/openzeppelin-contracts/fv/harnesses/AccountHarness.sol +60 -0
  559. package/lib/openzeppelin-contracts/fv/harnesses/DoubleEndedQueueHarness.sol +58 -0
  560. package/lib/openzeppelin-contracts/fv/harnesses/ERC20FlashMintHarness.sol +36 -0
  561. package/lib/openzeppelin-contracts/fv/harnesses/ERC20PermitHarness.sol +16 -0
  562. package/lib/openzeppelin-contracts/fv/harnesses/ERC20WrapperHarness.sol +22 -0
  563. package/lib/openzeppelin-contracts/fv/harnesses/ERC3156FlashBorrowerHarness.sol +13 -0
  564. package/lib/openzeppelin-contracts/fv/harnesses/ERC721Harness.sol +37 -0
  565. package/lib/openzeppelin-contracts/fv/harnesses/ERC721ReceiverHarness.sol +11 -0
  566. package/lib/openzeppelin-contracts/fv/harnesses/EnumerableMapHarness.sol +55 -0
  567. package/lib/openzeppelin-contracts/fv/harnesses/EnumerableSetHarness.sol +35 -0
  568. package/lib/openzeppelin-contracts/fv/harnesses/InitializableHarness.sol +23 -0
  569. package/lib/openzeppelin-contracts/fv/harnesses/NoncesHarness.sol +14 -0
  570. package/lib/openzeppelin-contracts/fv/harnesses/Ownable2StepHarness.sol +10 -0
  571. package/lib/openzeppelin-contracts/fv/harnesses/OwnableHarness.sol +10 -0
  572. package/lib/openzeppelin-contracts/fv/harnesses/PausableHarness.sol +18 -0
  573. package/lib/openzeppelin-contracts/fv/harnesses/TimelockControllerHarness.sol +13 -0
  574. package/lib/openzeppelin-contracts/fv/reports/2021-10.pdf +0 -0
  575. package/lib/openzeppelin-contracts/fv/reports/2022-03.pdf +0 -0
  576. package/lib/openzeppelin-contracts/fv/reports/2022-05.pdf +0 -0
  577. package/lib/openzeppelin-contracts/fv/run.js +68 -0
  578. package/lib/openzeppelin-contracts/fv/specs/AccessControl.conf +8 -0
  579. package/lib/openzeppelin-contracts/fv/specs/AccessControl.spec +119 -0
  580. package/lib/openzeppelin-contracts/fv/specs/AccessControlDefaultAdminRules.conf +8 -0
  581. package/lib/openzeppelin-contracts/fv/specs/AccessControlDefaultAdminRules.spec +467 -0
  582. package/lib/openzeppelin-contracts/fv/specs/AccessManaged.conf +14 -0
  583. package/lib/openzeppelin-contracts/fv/specs/AccessManaged.spec +49 -0
  584. package/lib/openzeppelin-contracts/fv/specs/AccessManager.conf +10 -0
  585. package/lib/openzeppelin-contracts/fv/specs/AccessManager.spec +837 -0
  586. package/lib/openzeppelin-contracts/fv/specs/Account.conf +9 -0
  587. package/lib/openzeppelin-contracts/fv/specs/Account.spec +490 -0
  588. package/lib/openzeppelin-contracts/fv/specs/DoubleEndedQueue.conf +8 -0
  589. package/lib/openzeppelin-contracts/fv/specs/DoubleEndedQueue.spec +300 -0
  590. package/lib/openzeppelin-contracts/fv/specs/ERC20.conf +9 -0
  591. package/lib/openzeppelin-contracts/fv/specs/ERC20.spec +352 -0
  592. package/lib/openzeppelin-contracts/fv/specs/ERC20FlashMint.conf +10 -0
  593. package/lib/openzeppelin-contracts/fv/specs/ERC20FlashMint.spec +55 -0
  594. package/lib/openzeppelin-contracts/fv/specs/ERC20Wrapper.conf +13 -0
  595. package/lib/openzeppelin-contracts/fv/specs/ERC20Wrapper.spec +226 -0
  596. package/lib/openzeppelin-contracts/fv/specs/ERC721.conf +10 -0
  597. package/lib/openzeppelin-contracts/fv/specs/ERC721.spec +695 -0
  598. package/lib/openzeppelin-contracts/fv/specs/EnumerableMap.conf +8 -0
  599. package/lib/openzeppelin-contracts/fv/specs/EnumerableMap.spec +364 -0
  600. package/lib/openzeppelin-contracts/fv/specs/EnumerableSet.conf +8 -0
  601. package/lib/openzeppelin-contracts/fv/specs/EnumerableSet.spec +272 -0
  602. package/lib/openzeppelin-contracts/fv/specs/Initializable.conf +8 -0
  603. package/lib/openzeppelin-contracts/fv/specs/Initializable.spec +176 -0
  604. package/lib/openzeppelin-contracts/fv/specs/Nonces.conf +8 -0
  605. package/lib/openzeppelin-contracts/fv/specs/Nonces.spec +92 -0
  606. package/lib/openzeppelin-contracts/fv/specs/Ownable.conf +8 -0
  607. package/lib/openzeppelin-contracts/fv/specs/Ownable.spec +77 -0
  608. package/lib/openzeppelin-contracts/fv/specs/Ownable2Step.conf +8 -0
  609. package/lib/openzeppelin-contracts/fv/specs/Ownable2Step.spec +108 -0
  610. package/lib/openzeppelin-contracts/fv/specs/Pausable.conf +8 -0
  611. package/lib/openzeppelin-contracts/fv/specs/Pausable.spec +96 -0
  612. package/lib/openzeppelin-contracts/fv/specs/TimelockController.conf +10 -0
  613. package/lib/openzeppelin-contracts/fv/specs/TimelockController.spec +299 -0
  614. package/lib/openzeppelin-contracts/fv/specs/helpers/helpers.spec +13 -0
  615. package/lib/openzeppelin-contracts/fv/specs/methods/IAccessControl.spec +8 -0
  616. package/lib/openzeppelin-contracts/fv/specs/methods/IAccessControlDefaultAdminRules.spec +36 -0
  617. package/lib/openzeppelin-contracts/fv/specs/methods/IAccessManaged.spec +5 -0
  618. package/lib/openzeppelin-contracts/fv/specs/methods/IAccessManager.spec +33 -0
  619. package/lib/openzeppelin-contracts/fv/specs/methods/IAccount.spec +34 -0
  620. package/lib/openzeppelin-contracts/fv/specs/methods/IERC20.spec +11 -0
  621. package/lib/openzeppelin-contracts/fv/specs/methods/IERC2612.spec +5 -0
  622. package/lib/openzeppelin-contracts/fv/specs/methods/IERC3156FlashBorrower.spec +3 -0
  623. package/lib/openzeppelin-contracts/fv/specs/methods/IERC3156FlashLender.spec +5 -0
  624. package/lib/openzeppelin-contracts/fv/specs/methods/IERC5313.spec +3 -0
  625. package/lib/openzeppelin-contracts/fv/specs/methods/IERC721.spec +17 -0
  626. package/lib/openzeppelin-contracts/fv/specs/methods/IERC721Receiver.spec +3 -0
  627. package/lib/openzeppelin-contracts/fv/specs/methods/IOwnable.spec +5 -0
  628. package/lib/openzeppelin-contracts/fv/specs/methods/IOwnable2Step.spec +7 -0
  629. package/lib/openzeppelin-contracts/fv-requirements.txt +4 -0
  630. package/lib/openzeppelin-contracts/hardhat/async-test-sanity.js +10 -0
  631. package/lib/openzeppelin-contracts/hardhat/env-artifacts.js +29 -0
  632. package/lib/openzeppelin-contracts/hardhat/ignore-unreachable-warnings.js +45 -0
  633. package/lib/openzeppelin-contracts/hardhat/remappings.js +18 -0
  634. package/lib/openzeppelin-contracts/hardhat/skip-foundry-tests.js +6 -0
  635. package/lib/openzeppelin-contracts/hardhat/task-test-get-files.js +25 -0
  636. package/lib/openzeppelin-contracts/hardhat.config.js +124 -0
  637. package/lib/openzeppelin-contracts/logo.svg +15 -0
  638. package/lib/openzeppelin-contracts/netlify.toml +3 -0
  639. package/lib/openzeppelin-contracts/package-lock.json +11140 -0
  640. package/lib/openzeppelin-contracts/package.json +108 -0
  641. package/lib/openzeppelin-contracts/remappings.txt +1 -0
  642. package/lib/openzeppelin-contracts/renovate.json +4 -0
  643. package/lib/openzeppelin-contracts/scripts/checks/compare-layout.js +28 -0
  644. package/lib/openzeppelin-contracts/scripts/checks/compareGasReports.js +249 -0
  645. package/lib/openzeppelin-contracts/scripts/checks/coverage.sh +24 -0
  646. package/lib/openzeppelin-contracts/scripts/checks/extract-layout.js +39 -0
  647. package/lib/openzeppelin-contracts/scripts/checks/generation.sh +6 -0
  648. package/lib/openzeppelin-contracts/scripts/checks/inheritance-ordering.js +55 -0
  649. package/lib/openzeppelin-contracts/scripts/checks/pragma-validity.js +45 -0
  650. package/lib/openzeppelin-contracts/scripts/fetch-common-contracts.js +50 -0
  651. package/lib/openzeppelin-contracts/scripts/gen-nav.js +81 -0
  652. package/lib/openzeppelin-contracts/scripts/generate/format-lines.js +16 -0
  653. package/lib/openzeppelin-contracts/scripts/generate/helpers/sanitize.js +5 -0
  654. package/lib/openzeppelin-contracts/scripts/generate/run.js +61 -0
  655. package/lib/openzeppelin-contracts/scripts/generate/templates/Arrays.js +505 -0
  656. package/lib/openzeppelin-contracts/scripts/generate/templates/Arrays.opts.js +9 -0
  657. package/lib/openzeppelin-contracts/scripts/generate/templates/Checkpoints.js +242 -0
  658. package/lib/openzeppelin-contracts/scripts/generate/templates/Checkpoints.opts.js +18 -0
  659. package/lib/openzeppelin-contracts/scripts/generate/templates/Checkpoints.t.js +141 -0
  660. package/lib/openzeppelin-contracts/scripts/generate/templates/Enumerable.opts.js +56 -0
  661. package/lib/openzeppelin-contracts/scripts/generate/templates/EnumerableMap.js +464 -0
  662. package/lib/openzeppelin-contracts/scripts/generate/templates/EnumerableSet.js +470 -0
  663. package/lib/openzeppelin-contracts/scripts/generate/templates/MerkleProof.js +186 -0
  664. package/lib/openzeppelin-contracts/scripts/generate/templates/MerkleProof.opts.js +11 -0
  665. package/lib/openzeppelin-contracts/scripts/generate/templates/Packing.js +92 -0
  666. package/lib/openzeppelin-contracts/scripts/generate/templates/Packing.opts.js +3 -0
  667. package/lib/openzeppelin-contracts/scripts/generate/templates/Packing.t.js +48 -0
  668. package/lib/openzeppelin-contracts/scripts/generate/templates/SafeCast.js +136 -0
  669. package/lib/openzeppelin-contracts/scripts/generate/templates/Slot.opts.js +15 -0
  670. package/lib/openzeppelin-contracts/scripts/generate/templates/SlotDerivation.js +119 -0
  671. package/lib/openzeppelin-contracts/scripts/generate/templates/SlotDerivation.t.js +127 -0
  672. package/lib/openzeppelin-contracts/scripts/generate/templates/StorageSlot.js +77 -0
  673. package/lib/openzeppelin-contracts/scripts/generate/templates/StorageSlotMock.js +57 -0
  674. package/lib/openzeppelin-contracts/scripts/generate/templates/TransientSlot.js +80 -0
  675. package/lib/openzeppelin-contracts/scripts/generate/templates/TransientSlotMock.js +35 -0
  676. package/lib/openzeppelin-contracts/scripts/generate/templates/conversion.js +34 -0
  677. package/lib/openzeppelin-contracts/scripts/get-contracts-metadata.js +55 -0
  678. package/lib/openzeppelin-contracts/scripts/git-user-config.sh +6 -0
  679. package/lib/openzeppelin-contracts/scripts/helpers.js +7 -0
  680. package/lib/openzeppelin-contracts/scripts/minimize-pragma.js +140 -0
  681. package/lib/openzeppelin-contracts/scripts/prepack.sh +23 -0
  682. package/lib/openzeppelin-contracts/scripts/prepare-docs.sh +26 -0
  683. package/lib/openzeppelin-contracts/scripts/release/format-changelog.js +33 -0
  684. package/lib/openzeppelin-contracts/scripts/release/synchronize-versions.js +15 -0
  685. package/lib/openzeppelin-contracts/scripts/release/update-comment.js +34 -0
  686. package/lib/openzeppelin-contracts/scripts/release/version.sh +11 -0
  687. package/lib/openzeppelin-contracts/scripts/release/workflow/check-upgradeable.sh +27 -0
  688. package/lib/openzeppelin-contracts/scripts/release/workflow/exit-prerelease.sh +8 -0
  689. package/lib/openzeppelin-contracts/scripts/release/workflow/github-release.js +48 -0
  690. package/lib/openzeppelin-contracts/scripts/release/workflow/integrity-check.sh +20 -0
  691. package/lib/openzeppelin-contracts/scripts/release/workflow/pack.sh +26 -0
  692. package/lib/openzeppelin-contracts/scripts/release/workflow/publish.sh +26 -0
  693. package/lib/openzeppelin-contracts/scripts/release/workflow/rerun.js +7 -0
  694. package/lib/openzeppelin-contracts/scripts/release/workflow/set-changesets-pr-title.js +17 -0
  695. package/lib/openzeppelin-contracts/scripts/release/workflow/start.sh +35 -0
  696. package/lib/openzeppelin-contracts/scripts/release/workflow/state.js +112 -0
  697. package/lib/openzeppelin-contracts/scripts/remove-ignored-artifacts.js +45 -0
  698. package/lib/openzeppelin-contracts/scripts/set-max-old-space-size.sh +10 -0
  699. package/lib/openzeppelin-contracts/scripts/solc-versions.js +15 -0
  700. package/lib/openzeppelin-contracts/scripts/solhint-custom/index.js +118 -0
  701. package/lib/openzeppelin-contracts/scripts/solhint-custom/package.json +8 -0
  702. package/lib/openzeppelin-contracts/scripts/update-docs-branch.js +65 -0
  703. package/lib/openzeppelin-contracts/scripts/upgradeable/README.md +21 -0
  704. package/lib/openzeppelin-contracts/scripts/upgradeable/alias/Initializable.sol +5 -0
  705. package/lib/openzeppelin-contracts/scripts/upgradeable/alias/UUPSUpgradeable.sol +5 -0
  706. package/lib/openzeppelin-contracts/scripts/upgradeable/patch-apply.sh +19 -0
  707. package/lib/openzeppelin-contracts/scripts/upgradeable/patch-save.sh +18 -0
  708. package/lib/openzeppelin-contracts/scripts/upgradeable/transpile-onto.sh +54 -0
  709. package/lib/openzeppelin-contracts/scripts/upgradeable/transpile.sh +50 -0
  710. package/lib/openzeppelin-contracts/scripts/upgradeable/upgradeable.patch +390 -0
  711. package/lib/openzeppelin-contracts/slither.config.json +4 -0
  712. package/lib/openzeppelin-contracts/solhint.config.js +29 -0
  713. package/lib/openzeppelin-contracts/test/TESTING.md +3 -0
  714. package/lib/openzeppelin-contracts/test/access/AccessControl.behavior.js +874 -0
  715. package/lib/openzeppelin-contracts/test/access/AccessControl.test.js +19 -0
  716. package/lib/openzeppelin-contracts/test/access/Ownable.test.js +79 -0
  717. package/lib/openzeppelin-contracts/test/access/Ownable2Step.test.js +102 -0
  718. package/lib/openzeppelin-contracts/test/access/extensions/AccessControlDefaultAdminRules.test.js +32 -0
  719. package/lib/openzeppelin-contracts/test/access/extensions/AccessControlEnumerable.test.js +24 -0
  720. package/lib/openzeppelin-contracts/test/access/manager/AccessManaged.test.js +146 -0
  721. package/lib/openzeppelin-contracts/test/access/manager/AccessManager.behavior.js +257 -0
  722. package/lib/openzeppelin-contracts/test/access/manager/AccessManager.predicate.js +456 -0
  723. package/lib/openzeppelin-contracts/test/access/manager/AccessManager.test.js +2489 -0
  724. package/lib/openzeppelin-contracts/test/access/manager/AuthorityUtils.test.js +112 -0
  725. package/lib/openzeppelin-contracts/test/account/Account.behavior.js +144 -0
  726. package/lib/openzeppelin-contracts/test/account/Account.test.js +48 -0
  727. package/lib/openzeppelin-contracts/test/account/AccountECDSA.test.js +52 -0
  728. package/lib/openzeppelin-contracts/test/account/AccountEIP7702.t.sol +116 -0
  729. package/lib/openzeppelin-contracts/test/account/AccountEIP7702.test.js +52 -0
  730. package/lib/openzeppelin-contracts/test/account/AccountERC7913.test.js +138 -0
  731. package/lib/openzeppelin-contracts/test/account/AccountMultiSigner.test.js +326 -0
  732. package/lib/openzeppelin-contracts/test/account/AccountMultiSignerWeighted.test.js +312 -0
  733. package/lib/openzeppelin-contracts/test/account/AccountP256.test.js +58 -0
  734. package/lib/openzeppelin-contracts/test/account/AccountRSA.test.js +58 -0
  735. package/lib/openzeppelin-contracts/test/account/AccountWebAuthn.test.js +88 -0
  736. package/lib/openzeppelin-contracts/test/account/examples/AccountEIP7702WithModulesMock.test.js +99 -0
  737. package/lib/openzeppelin-contracts/test/account/extensions/AccountERC7579.behavior.js +621 -0
  738. package/lib/openzeppelin-contracts/test/account/extensions/AccountERC7579.test.js +60 -0
  739. package/lib/openzeppelin-contracts/test/account/extensions/AccountERC7579Hooked.test.js +60 -0
  740. package/lib/openzeppelin-contracts/test/account/extensions/ERC7821.behavior.js +145 -0
  741. package/lib/openzeppelin-contracts/test/account/utils/EIP7702Utils.test.js +53 -0
  742. package/lib/openzeppelin-contracts/test/account/utils/draft-ERC4337Utils.test.js +594 -0
  743. package/lib/openzeppelin-contracts/test/account/utils/draft-ERC7579Utils.t.sol +434 -0
  744. package/lib/openzeppelin-contracts/test/account/utils/draft-ERC7579Utils.test.js +399 -0
  745. package/lib/openzeppelin-contracts/test/crosschain/BridgeERC20.behavior.js +163 -0
  746. package/lib/openzeppelin-contracts/test/crosschain/BridgeERC20.test.js +46 -0
  747. package/lib/openzeppelin-contracts/test/crosschain/ERC7786Recipient.test.js +73 -0
  748. package/lib/openzeppelin-contracts/test/finance/VestingWallet.behavior.js +87 -0
  749. package/lib/openzeppelin-contracts/test/finance/VestingWallet.test.js +65 -0
  750. package/lib/openzeppelin-contracts/test/finance/VestingWalletCliff.test.js +70 -0
  751. package/lib/openzeppelin-contracts/test/governance/Governor.t.sol +59 -0
  752. package/lib/openzeppelin-contracts/test/governance/Governor.test.js +980 -0
  753. package/lib/openzeppelin-contracts/test/governance/TimelockController.test.js +1279 -0
  754. package/lib/openzeppelin-contracts/test/governance/extensions/GovernorCountingFractional.test.js +248 -0
  755. package/lib/openzeppelin-contracts/test/governance/extensions/GovernorCountingOverridable.test.js +346 -0
  756. package/lib/openzeppelin-contracts/test/governance/extensions/GovernorERC721.test.js +131 -0
  757. package/lib/openzeppelin-contracts/test/governance/extensions/GovernorNoncesKeyed.test.js +243 -0
  758. package/lib/openzeppelin-contracts/test/governance/extensions/GovernorPreventLateQuorum.test.js +185 -0
  759. package/lib/openzeppelin-contracts/test/governance/extensions/GovernorProposalGuardian.test.js +132 -0
  760. package/lib/openzeppelin-contracts/test/governance/extensions/GovernorSequentialProposalId.test.js +202 -0
  761. package/lib/openzeppelin-contracts/test/governance/extensions/GovernorStorage.test.js +175 -0
  762. package/lib/openzeppelin-contracts/test/governance/extensions/GovernorSuperQuorum.test.js +168 -0
  763. package/lib/openzeppelin-contracts/test/governance/extensions/GovernorSuperQuorumGreaterThanQuorum.t.sol +83 -0
  764. package/lib/openzeppelin-contracts/test/governance/extensions/GovernorTimelockAccess.test.js +864 -0
  765. package/lib/openzeppelin-contracts/test/governance/extensions/GovernorTimelockCompound.test.js +448 -0
  766. package/lib/openzeppelin-contracts/test/governance/extensions/GovernorTimelockControl.test.js +504 -0
  767. package/lib/openzeppelin-contracts/test/governance/extensions/GovernorVotesQuorumFraction.test.js +165 -0
  768. package/lib/openzeppelin-contracts/test/governance/extensions/GovernorVotesSuperQuorumFraction.test.js +160 -0
  769. package/lib/openzeppelin-contracts/test/governance/extensions/GovernorWithParams.test.js +245 -0
  770. package/lib/openzeppelin-contracts/test/governance/utils/ERC6372.behavior.js +28 -0
  771. package/lib/openzeppelin-contracts/test/governance/utils/Votes.behavior.js +325 -0
  772. package/lib/openzeppelin-contracts/test/governance/utils/Votes.test.js +102 -0
  773. package/lib/openzeppelin-contracts/test/governance/utils/VotesExtended.test.js +152 -0
  774. package/lib/openzeppelin-contracts/test/helpers/access-manager.js +85 -0
  775. package/lib/openzeppelin-contracts/test/helpers/account.js +16 -0
  776. package/lib/openzeppelin-contracts/test/helpers/chains.js +56 -0
  777. package/lib/openzeppelin-contracts/test/helpers/constants.js +7 -0
  778. package/lib/openzeppelin-contracts/test/helpers/deploy.js +14 -0
  779. package/lib/openzeppelin-contracts/test/helpers/eip712-types.js +61 -0
  780. package/lib/openzeppelin-contracts/test/helpers/eip712.js +45 -0
  781. package/lib/openzeppelin-contracts/test/helpers/enums.js +15 -0
  782. package/lib/openzeppelin-contracts/test/helpers/erc4337.js +244 -0
  783. package/lib/openzeppelin-contracts/test/helpers/erc7579.js +58 -0
  784. package/lib/openzeppelin-contracts/test/helpers/erc7739.js +118 -0
  785. package/lib/openzeppelin-contracts/test/helpers/governance.js +218 -0
  786. package/lib/openzeppelin-contracts/test/helpers/iterate.js +41 -0
  787. package/lib/openzeppelin-contracts/test/helpers/math.js +33 -0
  788. package/lib/openzeppelin-contracts/test/helpers/methods.js +14 -0
  789. package/lib/openzeppelin-contracts/test/helpers/precompiles.js +12 -0
  790. package/lib/openzeppelin-contracts/test/helpers/random.js +26 -0
  791. package/lib/openzeppelin-contracts/test/helpers/signers.js +222 -0
  792. package/lib/openzeppelin-contracts/test/helpers/storage.js +48 -0
  793. package/lib/openzeppelin-contracts/test/helpers/strings.js +5 -0
  794. package/lib/openzeppelin-contracts/test/helpers/time.js +33 -0
  795. package/lib/openzeppelin-contracts/test/helpers/trie.js +79 -0
  796. package/lib/openzeppelin-contracts/test/helpers/txpool.js +28 -0
  797. package/lib/openzeppelin-contracts/test/metatx/ERC2771Context.test.js +109 -0
  798. package/lib/openzeppelin-contracts/test/metatx/ERC2771Forwarder.t.sol +279 -0
  799. package/lib/openzeppelin-contracts/test/metatx/ERC2771Forwarder.test.js +384 -0
  800. package/lib/openzeppelin-contracts/test/proxy/Clones.behaviour.js +160 -0
  801. package/lib/openzeppelin-contracts/test/proxy/Clones.t.sol +91 -0
  802. package/lib/openzeppelin-contracts/test/proxy/Clones.test.js +177 -0
  803. package/lib/openzeppelin-contracts/test/proxy/ERC1967/ERC1967Proxy.test.js +36 -0
  804. package/lib/openzeppelin-contracts/test/proxy/ERC1967/ERC1967Utils.test.js +162 -0
  805. package/lib/openzeppelin-contracts/test/proxy/Proxy.behaviour.js +198 -0
  806. package/lib/openzeppelin-contracts/test/proxy/beacon/BeaconProxy.test.js +141 -0
  807. package/lib/openzeppelin-contracts/test/proxy/beacon/UpgradeableBeacon.test.js +55 -0
  808. package/lib/openzeppelin-contracts/test/proxy/transparent/ProxyAdmin.test.js +82 -0
  809. package/lib/openzeppelin-contracts/test/proxy/transparent/TransparentUpgradeableProxy.behaviour.js +367 -0
  810. package/lib/openzeppelin-contracts/test/proxy/transparent/TransparentUpgradeableProxy.test.js +28 -0
  811. package/lib/openzeppelin-contracts/test/proxy/utils/Initializable.test.js +216 -0
  812. package/lib/openzeppelin-contracts/test/proxy/utils/UUPSUpgradeable.test.js +120 -0
  813. package/lib/openzeppelin-contracts/test/sanity.test.js +27 -0
  814. package/lib/openzeppelin-contracts/test/token/ERC1155/ERC1155.behavior.js +865 -0
  815. package/lib/openzeppelin-contracts/test/token/ERC1155/ERC1155.test.js +258 -0
  816. package/lib/openzeppelin-contracts/test/token/ERC1155/extensions/ERC1155Burnable.test.js +66 -0
  817. package/lib/openzeppelin-contracts/test/token/ERC1155/extensions/ERC1155Pausable.test.js +105 -0
  818. package/lib/openzeppelin-contracts/test/token/ERC1155/extensions/ERC1155Supply.test.js +119 -0
  819. package/lib/openzeppelin-contracts/test/token/ERC1155/extensions/ERC1155URIStorage.test.js +70 -0
  820. package/lib/openzeppelin-contracts/test/token/ERC1155/utils/ERC1155Holder.test.js +56 -0
  821. package/lib/openzeppelin-contracts/test/token/ERC1155/utils/ERC1155Utils.test.js +299 -0
  822. package/lib/openzeppelin-contracts/test/token/ERC20/ERC20.behavior.js +269 -0
  823. package/lib/openzeppelin-contracts/test/token/ERC20/ERC20.test.js +199 -0
  824. package/lib/openzeppelin-contracts/test/token/ERC20/extensions/ERC1363.test.js +370 -0
  825. package/lib/openzeppelin-contracts/test/token/ERC20/extensions/ERC20Burnable.test.js +105 -0
  826. package/lib/openzeppelin-contracts/test/token/ERC20/extensions/ERC20Capped.test.js +55 -0
  827. package/lib/openzeppelin-contracts/test/token/ERC20/extensions/ERC20Crosschain.test.js +83 -0
  828. package/lib/openzeppelin-contracts/test/token/ERC20/extensions/ERC20FlashMint.test.js +164 -0
  829. package/lib/openzeppelin-contracts/test/token/ERC20/extensions/ERC20Pausable.test.js +129 -0
  830. package/lib/openzeppelin-contracts/test/token/ERC20/extensions/ERC20Permit.test.js +109 -0
  831. package/lib/openzeppelin-contracts/test/token/ERC20/extensions/ERC20Votes.test.js +546 -0
  832. package/lib/openzeppelin-contracts/test/token/ERC20/extensions/ERC20Wrapper.test.js +203 -0
  833. package/lib/openzeppelin-contracts/test/token/ERC20/extensions/ERC4626.t.sol +41 -0
  834. package/lib/openzeppelin-contracts/test/token/ERC20/extensions/ERC4626.test.js +888 -0
  835. package/lib/openzeppelin-contracts/test/token/ERC20/extensions/draft-ERC20Bridgeable.test.js +89 -0
  836. package/lib/openzeppelin-contracts/test/token/ERC20/extensions/draft-ERC20TemporaryApproval.test.js +142 -0
  837. package/lib/openzeppelin-contracts/test/token/ERC20/utils/SafeERC20.test.js +463 -0
  838. package/lib/openzeppelin-contracts/test/token/ERC6909/ERC6909.behavior.js +216 -0
  839. package/lib/openzeppelin-contracts/test/token/ERC6909/ERC6909.test.js +104 -0
  840. package/lib/openzeppelin-contracts/test/token/ERC6909/extensions/ERC6909ContentURI.test.js +52 -0
  841. package/lib/openzeppelin-contracts/test/token/ERC6909/extensions/ERC6909Metadata.test.js +62 -0
  842. package/lib/openzeppelin-contracts/test/token/ERC6909/extensions/ERC6909TokenSupply.test.js +56 -0
  843. package/lib/openzeppelin-contracts/test/token/ERC721/ERC721.behavior.js +954 -0
  844. package/lib/openzeppelin-contracts/test/token/ERC721/ERC721.test.js +23 -0
  845. package/lib/openzeppelin-contracts/test/token/ERC721/ERC721Enumerable.test.js +28 -0
  846. package/lib/openzeppelin-contracts/test/token/ERC721/extensions/ERC721Burnable.test.js +77 -0
  847. package/lib/openzeppelin-contracts/test/token/ERC721/extensions/ERC721Consecutive.t.sol +187 -0
  848. package/lib/openzeppelin-contracts/test/token/ERC721/extensions/ERC721Consecutive.test.js +228 -0
  849. package/lib/openzeppelin-contracts/test/token/ERC721/extensions/ERC721Pausable.test.js +81 -0
  850. package/lib/openzeppelin-contracts/test/token/ERC721/extensions/ERC721Royalty.test.js +57 -0
  851. package/lib/openzeppelin-contracts/test/token/ERC721/extensions/ERC721URIStorage.test.js +134 -0
  852. package/lib/openzeppelin-contracts/test/token/ERC721/extensions/ERC721Votes.test.js +194 -0
  853. package/lib/openzeppelin-contracts/test/token/ERC721/extensions/ERC721Wrapper.test.js +201 -0
  854. package/lib/openzeppelin-contracts/test/token/ERC721/utils/ERC721Holder.test.js +20 -0
  855. package/lib/openzeppelin-contracts/test/token/ERC721/utils/ERC721Utils.test.js +94 -0
  856. package/lib/openzeppelin-contracts/test/token/common/ERC2981.behavior.js +152 -0
  857. package/lib/openzeppelin-contracts/test/utils/Address.test.js +332 -0
  858. package/lib/openzeppelin-contracts/test/utils/Arrays.t.sol +416 -0
  859. package/lib/openzeppelin-contracts/test/utils/Arrays.test.js +284 -0
  860. package/lib/openzeppelin-contracts/test/utils/Base58.t.sol +24 -0
  861. package/lib/openzeppelin-contracts/test/utils/Base58.test.js +65 -0
  862. package/lib/openzeppelin-contracts/test/utils/Base64.t.sol +36 -0
  863. package/lib/openzeppelin-contracts/test/utils/Base64.test.js +79 -0
  864. package/lib/openzeppelin-contracts/test/utils/Blockhash.t.sol +101 -0
  865. package/lib/openzeppelin-contracts/test/utils/Blockhash.test.js +59 -0
  866. package/lib/openzeppelin-contracts/test/utils/Bytes.t.sol +322 -0
  867. package/lib/openzeppelin-contracts/test/utils/Bytes.test.js +371 -0
  868. package/lib/openzeppelin-contracts/test/utils/CAIP.test.js +56 -0
  869. package/lib/openzeppelin-contracts/test/utils/Calldata.test.js +22 -0
  870. package/lib/openzeppelin-contracts/test/utils/Context.behavior.js +48 -0
  871. package/lib/openzeppelin-contracts/test/utils/Context.test.js +18 -0
  872. package/lib/openzeppelin-contracts/test/utils/Create2.t.sol +17 -0
  873. package/lib/openzeppelin-contracts/test/utils/Create2.test.js +190 -0
  874. package/lib/openzeppelin-contracts/test/utils/LowLevelCall.test.js +257 -0
  875. package/lib/openzeppelin-contracts/test/utils/Memory.t.sol +63 -0
  876. package/lib/openzeppelin-contracts/test/utils/Memory.test.js +106 -0
  877. package/lib/openzeppelin-contracts/test/utils/Multicall.test.js +72 -0
  878. package/lib/openzeppelin-contracts/test/utils/Nonces.behavior.js +189 -0
  879. package/lib/openzeppelin-contracts/test/utils/Nonces.test.js +16 -0
  880. package/lib/openzeppelin-contracts/test/utils/NoncesKeyed.t.sol +51 -0
  881. package/lib/openzeppelin-contracts/test/utils/NoncesKeyed.test.js +17 -0
  882. package/lib/openzeppelin-contracts/test/utils/Packing.t.sol +993 -0
  883. package/lib/openzeppelin-contracts/test/utils/Packing.test.js +70 -0
  884. package/lib/openzeppelin-contracts/test/utils/Panic.test.js +37 -0
  885. package/lib/openzeppelin-contracts/test/utils/Pausable.test.js +90 -0
  886. package/lib/openzeppelin-contracts/test/utils/RLP.t.sol +144 -0
  887. package/lib/openzeppelin-contracts/test/utils/RLP.test.js +224 -0
  888. package/lib/openzeppelin-contracts/test/utils/ReentrancyGuard.test.js +58 -0
  889. package/lib/openzeppelin-contracts/test/utils/RelayedCall.test.js +217 -0
  890. package/lib/openzeppelin-contracts/test/utils/ShortStrings.t.sol +109 -0
  891. package/lib/openzeppelin-contracts/test/utils/ShortStrings.test.js +64 -0
  892. package/lib/openzeppelin-contracts/test/utils/SlotDerivation.t.sol +248 -0
  893. package/lib/openzeppelin-contracts/test/utils/SlotDerivation.test.js +58 -0
  894. package/lib/openzeppelin-contracts/test/utils/StorageSlot.test.js +73 -0
  895. package/lib/openzeppelin-contracts/test/utils/Strings.t.sol +50 -0
  896. package/lib/openzeppelin-contracts/test/utils/Strings.test.js +360 -0
  897. package/lib/openzeppelin-contracts/test/utils/TransientSlot.test.js +59 -0
  898. package/lib/openzeppelin-contracts/test/utils/cryptography/ECDSA.test.js +322 -0
  899. package/lib/openzeppelin-contracts/test/utils/cryptography/EIP712.test.js +105 -0
  900. package/lib/openzeppelin-contracts/test/utils/cryptography/ERC1271.behavior.js +111 -0
  901. package/lib/openzeppelin-contracts/test/utils/cryptography/ERC7739.test.js +42 -0
  902. package/lib/openzeppelin-contracts/test/utils/cryptography/ERC7739Utils.test.js +203 -0
  903. package/lib/openzeppelin-contracts/test/utils/cryptography/MerkleProof.test.js +216 -0
  904. package/lib/openzeppelin-contracts/test/utils/cryptography/MessageHashUtils.t.sol +33 -0
  905. package/lib/openzeppelin-contracts/test/utils/cryptography/MessageHashUtils.test.js +149 -0
  906. package/lib/openzeppelin-contracts/test/utils/cryptography/P256.t.sol +45 -0
  907. package/lib/openzeppelin-contracts/test/utils/cryptography/P256.test.js +182 -0
  908. package/lib/openzeppelin-contracts/test/utils/cryptography/RSA.helper.js +17 -0
  909. package/lib/openzeppelin-contracts/test/utils/cryptography/RSA.test.js +102 -0
  910. package/lib/openzeppelin-contracts/test/utils/cryptography/SigVer15_186-3.rsp +3850 -0
  911. package/lib/openzeppelin-contracts/test/utils/cryptography/SignatureChecker.test.js +427 -0
  912. package/lib/openzeppelin-contracts/test/utils/cryptography/TrieProof.test.js +659 -0
  913. package/lib/openzeppelin-contracts/test/utils/cryptography/WebAuthn.t.sol +298 -0
  914. package/lib/openzeppelin-contracts/test/utils/cryptography/ecdsa_secp256r1_sha256_p1363_test.json +3719 -0
  915. package/lib/openzeppelin-contracts/test/utils/draft-InteroperableAddress.t.sol +99 -0
  916. package/lib/openzeppelin-contracts/test/utils/draft-InteroperableAddress.test.js +170 -0
  917. package/lib/openzeppelin-contracts/test/utils/introspection/ERC165.test.js +18 -0
  918. package/lib/openzeppelin-contracts/test/utils/introspection/ERC165Checker.test.js +272 -0
  919. package/lib/openzeppelin-contracts/test/utils/introspection/SupportsInterface.behavior.js +169 -0
  920. package/lib/openzeppelin-contracts/test/utils/math/Math.t.sol +370 -0
  921. package/lib/openzeppelin-contracts/test/utils/math/Math.test.js +746 -0
  922. package/lib/openzeppelin-contracts/test/utils/math/SafeCast.test.js +159 -0
  923. package/lib/openzeppelin-contracts/test/utils/math/SignedMath.t.sol +81 -0
  924. package/lib/openzeppelin-contracts/test/utils/math/SignedMath.test.js +53 -0
  925. package/lib/openzeppelin-contracts/test/utils/structs/Accumulators.t.sol +35 -0
  926. package/lib/openzeppelin-contracts/test/utils/structs/BitMap.test.js +149 -0
  927. package/lib/openzeppelin-contracts/test/utils/structs/Checkpoints.t.sol +440 -0
  928. package/lib/openzeppelin-contracts/test/utils/structs/Checkpoints.test.js +147 -0
  929. package/lib/openzeppelin-contracts/test/utils/structs/CircularBuffer.test.js +83 -0
  930. package/lib/openzeppelin-contracts/test/utils/structs/DoubleEndedQueue.test.js +144 -0
  931. package/lib/openzeppelin-contracts/test/utils/structs/EnumerableMap.behavior.js +214 -0
  932. package/lib/openzeppelin-contracts/test/utils/structs/EnumerableMap.test.js +83 -0
  933. package/lib/openzeppelin-contracts/test/utils/structs/EnumerableSet.behavior.js +175 -0
  934. package/lib/openzeppelin-contracts/test/utils/structs/EnumerableSet.test.js +66 -0
  935. package/lib/openzeppelin-contracts/test/utils/structs/Heap.t.sol +74 -0
  936. package/lib/openzeppelin-contracts/test/utils/structs/Heap.test.js +113 -0
  937. package/lib/openzeppelin-contracts/test/utils/structs/MerkleTree.test.js +180 -0
  938. package/lib/openzeppelin-contracts/test/utils/types/Time.test.js +135 -0
  939. package/lucro.txt +1 -0
  940. package/out/Base.sol/CommonBase.json +1 -0
  941. package/out/Base.sol/ScriptBase.json +1 -0
  942. package/out/Base.sol/TestBase.json +1 -0
  943. package/out/Context.sol/Context.json +1 -0
  944. package/out/Counter.s.sol/CounterScript.json +1 -0
  945. package/out/Counter.sol/Counter.json +1 -0
  946. package/out/Counter.t.sol/CounterTest.json +1 -0
  947. package/out/ERC20.sol/ERC20.json +1 -0
  948. package/out/GbitToken.sol/GbitToken.json +1 -0
  949. package/out/Guestbook.sol/Guestbook.json +1 -0
  950. package/out/IERC20.sol/IERC20.json +1 -0
  951. package/out/IERC20Metadata.sol/IERC20Metadata.json +1 -0
  952. package/out/IMulticall3.sol/IMulticall3.json +1 -0
  953. package/out/Script.sol/Script.json +1 -0
  954. package/out/StdAssertions.sol/StdAssertions.json +1 -0
  955. package/out/StdChains.sol/StdChains.json +1 -0
  956. package/out/StdCheats.sol/StdCheats.json +1 -0
  957. package/out/StdCheats.sol/StdCheatsSafe.json +1 -0
  958. package/out/StdConstants.sol/StdConstants.json +1 -0
  959. package/out/StdError.sol/stdError.json +1 -0
  960. package/out/StdInvariant.sol/StdInvariant.json +1 -0
  961. package/out/StdJson.sol/stdJson.json +1 -0
  962. package/out/StdMath.sol/stdMath.json +1 -0
  963. package/out/StdStorage.sol/stdStorage.json +1 -0
  964. package/out/StdStorage.sol/stdStorageSafe.json +1 -0
  965. package/out/StdStyle.sol/StdStyle.json +1 -0
  966. package/out/StdToml.sol/stdToml.json +1 -0
  967. package/out/StdUtils.sol/StdUtils.json +1 -0
  968. package/out/Test.sol/Test.json +1 -0
  969. package/out/Vm.sol/Vm.json +1 -0
  970. package/out/Vm.sol/VmSafe.json +1 -0
  971. package/out/Web3HubCore.sol/Web3HubCore.json +1 -0
  972. package/out/build-info/8a1d781106536b7b.json +1 -0
  973. package/out/build-info/aac4797350a36a99.json +1 -0
  974. package/out/build-info/c34d5a7881e6beba.json +1 -0
  975. package/out/build-info/ce38d811b8078146.json +1 -0
  976. package/out/build-info/db34a3531e47e196.json +1 -0
  977. package/out/console.sol/console.json +1 -0
  978. package/out/draft-IERC6093.sol/IERC1155Errors.json +1 -0
  979. package/out/draft-IERC6093.sol/IERC20Errors.json +1 -0
  980. package/out/draft-IERC6093.sol/IERC721Errors.json +1 -0
  981. package/out/safeconsole.sol/safeconsole.json +1 -0
  982. package/package.json +25 -0
  983. package/remappings.txt +1 -0
  984. package/script/Counter.s.sol +19 -0
  985. package/src/Counter.sol +14 -0
  986. package/src/GbitToken.sol +72 -0
  987. package/src/Guestbook.sol +28 -0
  988. package/src/Web3HubCore.sol +42 -0
  989. package/test/Counter.t.sol +24 -0
@@ -0,0 +1,1656 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // OpenZeppelin Contracts (last updated v5.2.0) (utils/Packing.sol)
3
+ // This file was procedurally generated from scripts/generate/templates/Packing.js.
4
+
5
+ pragma solidity ^0.8.20;
6
+
7
+ /**
8
+ * @dev Helper library packing and unpacking multiple values into bytesXX.
9
+ *
10
+ * Example usage:
11
+ *
12
+ * ```solidity
13
+ * library MyPacker {
14
+ * type MyType is bytes32;
15
+ *
16
+ * function _pack(address account, bytes4 selector, uint64 period) external pure returns (MyType) {
17
+ * bytes12 subpack = Packing.pack_4_8(selector, bytes8(period));
18
+ * bytes32 pack = Packing.pack_20_12(bytes20(account), subpack);
19
+ * return MyType.wrap(pack);
20
+ * }
21
+ *
22
+ * function _unpack(MyType self) external pure returns (address, bytes4, uint64) {
23
+ * bytes32 pack = MyType.unwrap(self);
24
+ * return (
25
+ * address(Packing.extract_32_20(pack, 0)),
26
+ * Packing.extract_32_4(pack, 20),
27
+ * uint64(Packing.extract_32_8(pack, 24))
28
+ * );
29
+ * }
30
+ * }
31
+ * ```
32
+ *
33
+ * _Available since v5.1._
34
+ */
35
+ // solhint-disable func-name-mixedcase
36
+ library Packing {
37
+ error OutOfRangeAccess();
38
+
39
+ function pack_1_1(bytes1 left, bytes1 right) internal pure returns (bytes2 result) {
40
+ assembly ("memory-safe") {
41
+ left := and(left, shl(248, not(0)))
42
+ right := and(right, shl(248, not(0)))
43
+ result := or(left, shr(8, right))
44
+ }
45
+ }
46
+
47
+ function pack_2_2(bytes2 left, bytes2 right) internal pure returns (bytes4 result) {
48
+ assembly ("memory-safe") {
49
+ left := and(left, shl(240, not(0)))
50
+ right := and(right, shl(240, not(0)))
51
+ result := or(left, shr(16, right))
52
+ }
53
+ }
54
+
55
+ function pack_2_4(bytes2 left, bytes4 right) internal pure returns (bytes6 result) {
56
+ assembly ("memory-safe") {
57
+ left := and(left, shl(240, not(0)))
58
+ right := and(right, shl(224, not(0)))
59
+ result := or(left, shr(16, right))
60
+ }
61
+ }
62
+
63
+ function pack_2_6(bytes2 left, bytes6 right) internal pure returns (bytes8 result) {
64
+ assembly ("memory-safe") {
65
+ left := and(left, shl(240, not(0)))
66
+ right := and(right, shl(208, not(0)))
67
+ result := or(left, shr(16, right))
68
+ }
69
+ }
70
+
71
+ function pack_2_8(bytes2 left, bytes8 right) internal pure returns (bytes10 result) {
72
+ assembly ("memory-safe") {
73
+ left := and(left, shl(240, not(0)))
74
+ right := and(right, shl(192, not(0)))
75
+ result := or(left, shr(16, right))
76
+ }
77
+ }
78
+
79
+ function pack_2_10(bytes2 left, bytes10 right) internal pure returns (bytes12 result) {
80
+ assembly ("memory-safe") {
81
+ left := and(left, shl(240, not(0)))
82
+ right := and(right, shl(176, not(0)))
83
+ result := or(left, shr(16, right))
84
+ }
85
+ }
86
+
87
+ function pack_2_20(bytes2 left, bytes20 right) internal pure returns (bytes22 result) {
88
+ assembly ("memory-safe") {
89
+ left := and(left, shl(240, not(0)))
90
+ right := and(right, shl(96, not(0)))
91
+ result := or(left, shr(16, right))
92
+ }
93
+ }
94
+
95
+ function pack_2_22(bytes2 left, bytes22 right) internal pure returns (bytes24 result) {
96
+ assembly ("memory-safe") {
97
+ left := and(left, shl(240, not(0)))
98
+ right := and(right, shl(80, not(0)))
99
+ result := or(left, shr(16, right))
100
+ }
101
+ }
102
+
103
+ function pack_4_2(bytes4 left, bytes2 right) internal pure returns (bytes6 result) {
104
+ assembly ("memory-safe") {
105
+ left := and(left, shl(224, not(0)))
106
+ right := and(right, shl(240, not(0)))
107
+ result := or(left, shr(32, right))
108
+ }
109
+ }
110
+
111
+ function pack_4_4(bytes4 left, bytes4 right) internal pure returns (bytes8 result) {
112
+ assembly ("memory-safe") {
113
+ left := and(left, shl(224, not(0)))
114
+ right := and(right, shl(224, not(0)))
115
+ result := or(left, shr(32, right))
116
+ }
117
+ }
118
+
119
+ function pack_4_6(bytes4 left, bytes6 right) internal pure returns (bytes10 result) {
120
+ assembly ("memory-safe") {
121
+ left := and(left, shl(224, not(0)))
122
+ right := and(right, shl(208, not(0)))
123
+ result := or(left, shr(32, right))
124
+ }
125
+ }
126
+
127
+ function pack_4_8(bytes4 left, bytes8 right) internal pure returns (bytes12 result) {
128
+ assembly ("memory-safe") {
129
+ left := and(left, shl(224, not(0)))
130
+ right := and(right, shl(192, not(0)))
131
+ result := or(left, shr(32, right))
132
+ }
133
+ }
134
+
135
+ function pack_4_12(bytes4 left, bytes12 right) internal pure returns (bytes16 result) {
136
+ assembly ("memory-safe") {
137
+ left := and(left, shl(224, not(0)))
138
+ right := and(right, shl(160, not(0)))
139
+ result := or(left, shr(32, right))
140
+ }
141
+ }
142
+
143
+ function pack_4_16(bytes4 left, bytes16 right) internal pure returns (bytes20 result) {
144
+ assembly ("memory-safe") {
145
+ left := and(left, shl(224, not(0)))
146
+ right := and(right, shl(128, not(0)))
147
+ result := or(left, shr(32, right))
148
+ }
149
+ }
150
+
151
+ function pack_4_20(bytes4 left, bytes20 right) internal pure returns (bytes24 result) {
152
+ assembly ("memory-safe") {
153
+ left := and(left, shl(224, not(0)))
154
+ right := and(right, shl(96, not(0)))
155
+ result := or(left, shr(32, right))
156
+ }
157
+ }
158
+
159
+ function pack_4_24(bytes4 left, bytes24 right) internal pure returns (bytes28 result) {
160
+ assembly ("memory-safe") {
161
+ left := and(left, shl(224, not(0)))
162
+ right := and(right, shl(64, not(0)))
163
+ result := or(left, shr(32, right))
164
+ }
165
+ }
166
+
167
+ function pack_4_28(bytes4 left, bytes28 right) internal pure returns (bytes32 result) {
168
+ assembly ("memory-safe") {
169
+ left := and(left, shl(224, not(0)))
170
+ right := and(right, shl(32, not(0)))
171
+ result := or(left, shr(32, right))
172
+ }
173
+ }
174
+
175
+ function pack_6_2(bytes6 left, bytes2 right) internal pure returns (bytes8 result) {
176
+ assembly ("memory-safe") {
177
+ left := and(left, shl(208, not(0)))
178
+ right := and(right, shl(240, not(0)))
179
+ result := or(left, shr(48, right))
180
+ }
181
+ }
182
+
183
+ function pack_6_4(bytes6 left, bytes4 right) internal pure returns (bytes10 result) {
184
+ assembly ("memory-safe") {
185
+ left := and(left, shl(208, not(0)))
186
+ right := and(right, shl(224, not(0)))
187
+ result := or(left, shr(48, right))
188
+ }
189
+ }
190
+
191
+ function pack_6_6(bytes6 left, bytes6 right) internal pure returns (bytes12 result) {
192
+ assembly ("memory-safe") {
193
+ left := and(left, shl(208, not(0)))
194
+ right := and(right, shl(208, not(0)))
195
+ result := or(left, shr(48, right))
196
+ }
197
+ }
198
+
199
+ function pack_6_10(bytes6 left, bytes10 right) internal pure returns (bytes16 result) {
200
+ assembly ("memory-safe") {
201
+ left := and(left, shl(208, not(0)))
202
+ right := and(right, shl(176, not(0)))
203
+ result := or(left, shr(48, right))
204
+ }
205
+ }
206
+
207
+ function pack_6_16(bytes6 left, bytes16 right) internal pure returns (bytes22 result) {
208
+ assembly ("memory-safe") {
209
+ left := and(left, shl(208, not(0)))
210
+ right := and(right, shl(128, not(0)))
211
+ result := or(left, shr(48, right))
212
+ }
213
+ }
214
+
215
+ function pack_6_22(bytes6 left, bytes22 right) internal pure returns (bytes28 result) {
216
+ assembly ("memory-safe") {
217
+ left := and(left, shl(208, not(0)))
218
+ right := and(right, shl(80, not(0)))
219
+ result := or(left, shr(48, right))
220
+ }
221
+ }
222
+
223
+ function pack_8_2(bytes8 left, bytes2 right) internal pure returns (bytes10 result) {
224
+ assembly ("memory-safe") {
225
+ left := and(left, shl(192, not(0)))
226
+ right := and(right, shl(240, not(0)))
227
+ result := or(left, shr(64, right))
228
+ }
229
+ }
230
+
231
+ function pack_8_4(bytes8 left, bytes4 right) internal pure returns (bytes12 result) {
232
+ assembly ("memory-safe") {
233
+ left := and(left, shl(192, not(0)))
234
+ right := and(right, shl(224, not(0)))
235
+ result := or(left, shr(64, right))
236
+ }
237
+ }
238
+
239
+ function pack_8_8(bytes8 left, bytes8 right) internal pure returns (bytes16 result) {
240
+ assembly ("memory-safe") {
241
+ left := and(left, shl(192, not(0)))
242
+ right := and(right, shl(192, not(0)))
243
+ result := or(left, shr(64, right))
244
+ }
245
+ }
246
+
247
+ function pack_8_12(bytes8 left, bytes12 right) internal pure returns (bytes20 result) {
248
+ assembly ("memory-safe") {
249
+ left := and(left, shl(192, not(0)))
250
+ right := and(right, shl(160, not(0)))
251
+ result := or(left, shr(64, right))
252
+ }
253
+ }
254
+
255
+ function pack_8_16(bytes8 left, bytes16 right) internal pure returns (bytes24 result) {
256
+ assembly ("memory-safe") {
257
+ left := and(left, shl(192, not(0)))
258
+ right := and(right, shl(128, not(0)))
259
+ result := or(left, shr(64, right))
260
+ }
261
+ }
262
+
263
+ function pack_8_20(bytes8 left, bytes20 right) internal pure returns (bytes28 result) {
264
+ assembly ("memory-safe") {
265
+ left := and(left, shl(192, not(0)))
266
+ right := and(right, shl(96, not(0)))
267
+ result := or(left, shr(64, right))
268
+ }
269
+ }
270
+
271
+ function pack_8_24(bytes8 left, bytes24 right) internal pure returns (bytes32 result) {
272
+ assembly ("memory-safe") {
273
+ left := and(left, shl(192, not(0)))
274
+ right := and(right, shl(64, not(0)))
275
+ result := or(left, shr(64, right))
276
+ }
277
+ }
278
+
279
+ function pack_10_2(bytes10 left, bytes2 right) internal pure returns (bytes12 result) {
280
+ assembly ("memory-safe") {
281
+ left := and(left, shl(176, not(0)))
282
+ right := and(right, shl(240, not(0)))
283
+ result := or(left, shr(80, right))
284
+ }
285
+ }
286
+
287
+ function pack_10_6(bytes10 left, bytes6 right) internal pure returns (bytes16 result) {
288
+ assembly ("memory-safe") {
289
+ left := and(left, shl(176, not(0)))
290
+ right := and(right, shl(208, not(0)))
291
+ result := or(left, shr(80, right))
292
+ }
293
+ }
294
+
295
+ function pack_10_10(bytes10 left, bytes10 right) internal pure returns (bytes20 result) {
296
+ assembly ("memory-safe") {
297
+ left := and(left, shl(176, not(0)))
298
+ right := and(right, shl(176, not(0)))
299
+ result := or(left, shr(80, right))
300
+ }
301
+ }
302
+
303
+ function pack_10_12(bytes10 left, bytes12 right) internal pure returns (bytes22 result) {
304
+ assembly ("memory-safe") {
305
+ left := and(left, shl(176, not(0)))
306
+ right := and(right, shl(160, not(0)))
307
+ result := or(left, shr(80, right))
308
+ }
309
+ }
310
+
311
+ function pack_10_22(bytes10 left, bytes22 right) internal pure returns (bytes32 result) {
312
+ assembly ("memory-safe") {
313
+ left := and(left, shl(176, not(0)))
314
+ right := and(right, shl(80, not(0)))
315
+ result := or(left, shr(80, right))
316
+ }
317
+ }
318
+
319
+ function pack_12_4(bytes12 left, bytes4 right) internal pure returns (bytes16 result) {
320
+ assembly ("memory-safe") {
321
+ left := and(left, shl(160, not(0)))
322
+ right := and(right, shl(224, not(0)))
323
+ result := or(left, shr(96, right))
324
+ }
325
+ }
326
+
327
+ function pack_12_8(bytes12 left, bytes8 right) internal pure returns (bytes20 result) {
328
+ assembly ("memory-safe") {
329
+ left := and(left, shl(160, not(0)))
330
+ right := and(right, shl(192, not(0)))
331
+ result := or(left, shr(96, right))
332
+ }
333
+ }
334
+
335
+ function pack_12_10(bytes12 left, bytes10 right) internal pure returns (bytes22 result) {
336
+ assembly ("memory-safe") {
337
+ left := and(left, shl(160, not(0)))
338
+ right := and(right, shl(176, not(0)))
339
+ result := or(left, shr(96, right))
340
+ }
341
+ }
342
+
343
+ function pack_12_12(bytes12 left, bytes12 right) internal pure returns (bytes24 result) {
344
+ assembly ("memory-safe") {
345
+ left := and(left, shl(160, not(0)))
346
+ right := and(right, shl(160, not(0)))
347
+ result := or(left, shr(96, right))
348
+ }
349
+ }
350
+
351
+ function pack_12_16(bytes12 left, bytes16 right) internal pure returns (bytes28 result) {
352
+ assembly ("memory-safe") {
353
+ left := and(left, shl(160, not(0)))
354
+ right := and(right, shl(128, not(0)))
355
+ result := or(left, shr(96, right))
356
+ }
357
+ }
358
+
359
+ function pack_12_20(bytes12 left, bytes20 right) internal pure returns (bytes32 result) {
360
+ assembly ("memory-safe") {
361
+ left := and(left, shl(160, not(0)))
362
+ right := and(right, shl(96, not(0)))
363
+ result := or(left, shr(96, right))
364
+ }
365
+ }
366
+
367
+ function pack_16_4(bytes16 left, bytes4 right) internal pure returns (bytes20 result) {
368
+ assembly ("memory-safe") {
369
+ left := and(left, shl(128, not(0)))
370
+ right := and(right, shl(224, not(0)))
371
+ result := or(left, shr(128, right))
372
+ }
373
+ }
374
+
375
+ function pack_16_6(bytes16 left, bytes6 right) internal pure returns (bytes22 result) {
376
+ assembly ("memory-safe") {
377
+ left := and(left, shl(128, not(0)))
378
+ right := and(right, shl(208, not(0)))
379
+ result := or(left, shr(128, right))
380
+ }
381
+ }
382
+
383
+ function pack_16_8(bytes16 left, bytes8 right) internal pure returns (bytes24 result) {
384
+ assembly ("memory-safe") {
385
+ left := and(left, shl(128, not(0)))
386
+ right := and(right, shl(192, not(0)))
387
+ result := or(left, shr(128, right))
388
+ }
389
+ }
390
+
391
+ function pack_16_12(bytes16 left, bytes12 right) internal pure returns (bytes28 result) {
392
+ assembly ("memory-safe") {
393
+ left := and(left, shl(128, not(0)))
394
+ right := and(right, shl(160, not(0)))
395
+ result := or(left, shr(128, right))
396
+ }
397
+ }
398
+
399
+ function pack_16_16(bytes16 left, bytes16 right) internal pure returns (bytes32 result) {
400
+ assembly ("memory-safe") {
401
+ left := and(left, shl(128, not(0)))
402
+ right := and(right, shl(128, not(0)))
403
+ result := or(left, shr(128, right))
404
+ }
405
+ }
406
+
407
+ function pack_20_2(bytes20 left, bytes2 right) internal pure returns (bytes22 result) {
408
+ assembly ("memory-safe") {
409
+ left := and(left, shl(96, not(0)))
410
+ right := and(right, shl(240, not(0)))
411
+ result := or(left, shr(160, right))
412
+ }
413
+ }
414
+
415
+ function pack_20_4(bytes20 left, bytes4 right) internal pure returns (bytes24 result) {
416
+ assembly ("memory-safe") {
417
+ left := and(left, shl(96, not(0)))
418
+ right := and(right, shl(224, not(0)))
419
+ result := or(left, shr(160, right))
420
+ }
421
+ }
422
+
423
+ function pack_20_8(bytes20 left, bytes8 right) internal pure returns (bytes28 result) {
424
+ assembly ("memory-safe") {
425
+ left := and(left, shl(96, not(0)))
426
+ right := and(right, shl(192, not(0)))
427
+ result := or(left, shr(160, right))
428
+ }
429
+ }
430
+
431
+ function pack_20_12(bytes20 left, bytes12 right) internal pure returns (bytes32 result) {
432
+ assembly ("memory-safe") {
433
+ left := and(left, shl(96, not(0)))
434
+ right := and(right, shl(160, not(0)))
435
+ result := or(left, shr(160, right))
436
+ }
437
+ }
438
+
439
+ function pack_22_2(bytes22 left, bytes2 right) internal pure returns (bytes24 result) {
440
+ assembly ("memory-safe") {
441
+ left := and(left, shl(80, not(0)))
442
+ right := and(right, shl(240, not(0)))
443
+ result := or(left, shr(176, right))
444
+ }
445
+ }
446
+
447
+ function pack_22_6(bytes22 left, bytes6 right) internal pure returns (bytes28 result) {
448
+ assembly ("memory-safe") {
449
+ left := and(left, shl(80, not(0)))
450
+ right := and(right, shl(208, not(0)))
451
+ result := or(left, shr(176, right))
452
+ }
453
+ }
454
+
455
+ function pack_22_10(bytes22 left, bytes10 right) internal pure returns (bytes32 result) {
456
+ assembly ("memory-safe") {
457
+ left := and(left, shl(80, not(0)))
458
+ right := and(right, shl(176, not(0)))
459
+ result := or(left, shr(176, right))
460
+ }
461
+ }
462
+
463
+ function pack_24_4(bytes24 left, bytes4 right) internal pure returns (bytes28 result) {
464
+ assembly ("memory-safe") {
465
+ left := and(left, shl(64, not(0)))
466
+ right := and(right, shl(224, not(0)))
467
+ result := or(left, shr(192, right))
468
+ }
469
+ }
470
+
471
+ function pack_24_8(bytes24 left, bytes8 right) internal pure returns (bytes32 result) {
472
+ assembly ("memory-safe") {
473
+ left := and(left, shl(64, not(0)))
474
+ right := and(right, shl(192, not(0)))
475
+ result := or(left, shr(192, right))
476
+ }
477
+ }
478
+
479
+ function pack_28_4(bytes28 left, bytes4 right) internal pure returns (bytes32 result) {
480
+ assembly ("memory-safe") {
481
+ left := and(left, shl(32, not(0)))
482
+ right := and(right, shl(224, not(0)))
483
+ result := or(left, shr(224, right))
484
+ }
485
+ }
486
+
487
+ function extract_2_1(bytes2 self, uint8 offset) internal pure returns (bytes1 result) {
488
+ if (offset > 1) revert OutOfRangeAccess();
489
+ assembly ("memory-safe") {
490
+ result := and(shl(mul(8, offset), self), shl(248, not(0)))
491
+ }
492
+ }
493
+
494
+ function replace_2_1(bytes2 self, bytes1 value, uint8 offset) internal pure returns (bytes2 result) {
495
+ bytes1 oldValue = extract_2_1(self, offset);
496
+ assembly ("memory-safe") {
497
+ value := and(value, shl(248, not(0)))
498
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
499
+ }
500
+ }
501
+
502
+ function extract_4_1(bytes4 self, uint8 offset) internal pure returns (bytes1 result) {
503
+ if (offset > 3) revert OutOfRangeAccess();
504
+ assembly ("memory-safe") {
505
+ result := and(shl(mul(8, offset), self), shl(248, not(0)))
506
+ }
507
+ }
508
+
509
+ function replace_4_1(bytes4 self, bytes1 value, uint8 offset) internal pure returns (bytes4 result) {
510
+ bytes1 oldValue = extract_4_1(self, offset);
511
+ assembly ("memory-safe") {
512
+ value := and(value, shl(248, not(0)))
513
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
514
+ }
515
+ }
516
+
517
+ function extract_4_2(bytes4 self, uint8 offset) internal pure returns (bytes2 result) {
518
+ if (offset > 2) revert OutOfRangeAccess();
519
+ assembly ("memory-safe") {
520
+ result := and(shl(mul(8, offset), self), shl(240, not(0)))
521
+ }
522
+ }
523
+
524
+ function replace_4_2(bytes4 self, bytes2 value, uint8 offset) internal pure returns (bytes4 result) {
525
+ bytes2 oldValue = extract_4_2(self, offset);
526
+ assembly ("memory-safe") {
527
+ value := and(value, shl(240, not(0)))
528
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
529
+ }
530
+ }
531
+
532
+ function extract_6_1(bytes6 self, uint8 offset) internal pure returns (bytes1 result) {
533
+ if (offset > 5) revert OutOfRangeAccess();
534
+ assembly ("memory-safe") {
535
+ result := and(shl(mul(8, offset), self), shl(248, not(0)))
536
+ }
537
+ }
538
+
539
+ function replace_6_1(bytes6 self, bytes1 value, uint8 offset) internal pure returns (bytes6 result) {
540
+ bytes1 oldValue = extract_6_1(self, offset);
541
+ assembly ("memory-safe") {
542
+ value := and(value, shl(248, not(0)))
543
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
544
+ }
545
+ }
546
+
547
+ function extract_6_2(bytes6 self, uint8 offset) internal pure returns (bytes2 result) {
548
+ if (offset > 4) revert OutOfRangeAccess();
549
+ assembly ("memory-safe") {
550
+ result := and(shl(mul(8, offset), self), shl(240, not(0)))
551
+ }
552
+ }
553
+
554
+ function replace_6_2(bytes6 self, bytes2 value, uint8 offset) internal pure returns (bytes6 result) {
555
+ bytes2 oldValue = extract_6_2(self, offset);
556
+ assembly ("memory-safe") {
557
+ value := and(value, shl(240, not(0)))
558
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
559
+ }
560
+ }
561
+
562
+ function extract_6_4(bytes6 self, uint8 offset) internal pure returns (bytes4 result) {
563
+ if (offset > 2) revert OutOfRangeAccess();
564
+ assembly ("memory-safe") {
565
+ result := and(shl(mul(8, offset), self), shl(224, not(0)))
566
+ }
567
+ }
568
+
569
+ function replace_6_4(bytes6 self, bytes4 value, uint8 offset) internal pure returns (bytes6 result) {
570
+ bytes4 oldValue = extract_6_4(self, offset);
571
+ assembly ("memory-safe") {
572
+ value := and(value, shl(224, not(0)))
573
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
574
+ }
575
+ }
576
+
577
+ function extract_8_1(bytes8 self, uint8 offset) internal pure returns (bytes1 result) {
578
+ if (offset > 7) revert OutOfRangeAccess();
579
+ assembly ("memory-safe") {
580
+ result := and(shl(mul(8, offset), self), shl(248, not(0)))
581
+ }
582
+ }
583
+
584
+ function replace_8_1(bytes8 self, bytes1 value, uint8 offset) internal pure returns (bytes8 result) {
585
+ bytes1 oldValue = extract_8_1(self, offset);
586
+ assembly ("memory-safe") {
587
+ value := and(value, shl(248, not(0)))
588
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
589
+ }
590
+ }
591
+
592
+ function extract_8_2(bytes8 self, uint8 offset) internal pure returns (bytes2 result) {
593
+ if (offset > 6) revert OutOfRangeAccess();
594
+ assembly ("memory-safe") {
595
+ result := and(shl(mul(8, offset), self), shl(240, not(0)))
596
+ }
597
+ }
598
+
599
+ function replace_8_2(bytes8 self, bytes2 value, uint8 offset) internal pure returns (bytes8 result) {
600
+ bytes2 oldValue = extract_8_2(self, offset);
601
+ assembly ("memory-safe") {
602
+ value := and(value, shl(240, not(0)))
603
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
604
+ }
605
+ }
606
+
607
+ function extract_8_4(bytes8 self, uint8 offset) internal pure returns (bytes4 result) {
608
+ if (offset > 4) revert OutOfRangeAccess();
609
+ assembly ("memory-safe") {
610
+ result := and(shl(mul(8, offset), self), shl(224, not(0)))
611
+ }
612
+ }
613
+
614
+ function replace_8_4(bytes8 self, bytes4 value, uint8 offset) internal pure returns (bytes8 result) {
615
+ bytes4 oldValue = extract_8_4(self, offset);
616
+ assembly ("memory-safe") {
617
+ value := and(value, shl(224, not(0)))
618
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
619
+ }
620
+ }
621
+
622
+ function extract_8_6(bytes8 self, uint8 offset) internal pure returns (bytes6 result) {
623
+ if (offset > 2) revert OutOfRangeAccess();
624
+ assembly ("memory-safe") {
625
+ result := and(shl(mul(8, offset), self), shl(208, not(0)))
626
+ }
627
+ }
628
+
629
+ function replace_8_6(bytes8 self, bytes6 value, uint8 offset) internal pure returns (bytes8 result) {
630
+ bytes6 oldValue = extract_8_6(self, offset);
631
+ assembly ("memory-safe") {
632
+ value := and(value, shl(208, not(0)))
633
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
634
+ }
635
+ }
636
+
637
+ function extract_10_1(bytes10 self, uint8 offset) internal pure returns (bytes1 result) {
638
+ if (offset > 9) revert OutOfRangeAccess();
639
+ assembly ("memory-safe") {
640
+ result := and(shl(mul(8, offset), self), shl(248, not(0)))
641
+ }
642
+ }
643
+
644
+ function replace_10_1(bytes10 self, bytes1 value, uint8 offset) internal pure returns (bytes10 result) {
645
+ bytes1 oldValue = extract_10_1(self, offset);
646
+ assembly ("memory-safe") {
647
+ value := and(value, shl(248, not(0)))
648
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
649
+ }
650
+ }
651
+
652
+ function extract_10_2(bytes10 self, uint8 offset) internal pure returns (bytes2 result) {
653
+ if (offset > 8) revert OutOfRangeAccess();
654
+ assembly ("memory-safe") {
655
+ result := and(shl(mul(8, offset), self), shl(240, not(0)))
656
+ }
657
+ }
658
+
659
+ function replace_10_2(bytes10 self, bytes2 value, uint8 offset) internal pure returns (bytes10 result) {
660
+ bytes2 oldValue = extract_10_2(self, offset);
661
+ assembly ("memory-safe") {
662
+ value := and(value, shl(240, not(0)))
663
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
664
+ }
665
+ }
666
+
667
+ function extract_10_4(bytes10 self, uint8 offset) internal pure returns (bytes4 result) {
668
+ if (offset > 6) revert OutOfRangeAccess();
669
+ assembly ("memory-safe") {
670
+ result := and(shl(mul(8, offset), self), shl(224, not(0)))
671
+ }
672
+ }
673
+
674
+ function replace_10_4(bytes10 self, bytes4 value, uint8 offset) internal pure returns (bytes10 result) {
675
+ bytes4 oldValue = extract_10_4(self, offset);
676
+ assembly ("memory-safe") {
677
+ value := and(value, shl(224, not(0)))
678
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
679
+ }
680
+ }
681
+
682
+ function extract_10_6(bytes10 self, uint8 offset) internal pure returns (bytes6 result) {
683
+ if (offset > 4) revert OutOfRangeAccess();
684
+ assembly ("memory-safe") {
685
+ result := and(shl(mul(8, offset), self), shl(208, not(0)))
686
+ }
687
+ }
688
+
689
+ function replace_10_6(bytes10 self, bytes6 value, uint8 offset) internal pure returns (bytes10 result) {
690
+ bytes6 oldValue = extract_10_6(self, offset);
691
+ assembly ("memory-safe") {
692
+ value := and(value, shl(208, not(0)))
693
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
694
+ }
695
+ }
696
+
697
+ function extract_10_8(bytes10 self, uint8 offset) internal pure returns (bytes8 result) {
698
+ if (offset > 2) revert OutOfRangeAccess();
699
+ assembly ("memory-safe") {
700
+ result := and(shl(mul(8, offset), self), shl(192, not(0)))
701
+ }
702
+ }
703
+
704
+ function replace_10_8(bytes10 self, bytes8 value, uint8 offset) internal pure returns (bytes10 result) {
705
+ bytes8 oldValue = extract_10_8(self, offset);
706
+ assembly ("memory-safe") {
707
+ value := and(value, shl(192, not(0)))
708
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
709
+ }
710
+ }
711
+
712
+ function extract_12_1(bytes12 self, uint8 offset) internal pure returns (bytes1 result) {
713
+ if (offset > 11) revert OutOfRangeAccess();
714
+ assembly ("memory-safe") {
715
+ result := and(shl(mul(8, offset), self), shl(248, not(0)))
716
+ }
717
+ }
718
+
719
+ function replace_12_1(bytes12 self, bytes1 value, uint8 offset) internal pure returns (bytes12 result) {
720
+ bytes1 oldValue = extract_12_1(self, offset);
721
+ assembly ("memory-safe") {
722
+ value := and(value, shl(248, not(0)))
723
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
724
+ }
725
+ }
726
+
727
+ function extract_12_2(bytes12 self, uint8 offset) internal pure returns (bytes2 result) {
728
+ if (offset > 10) revert OutOfRangeAccess();
729
+ assembly ("memory-safe") {
730
+ result := and(shl(mul(8, offset), self), shl(240, not(0)))
731
+ }
732
+ }
733
+
734
+ function replace_12_2(bytes12 self, bytes2 value, uint8 offset) internal pure returns (bytes12 result) {
735
+ bytes2 oldValue = extract_12_2(self, offset);
736
+ assembly ("memory-safe") {
737
+ value := and(value, shl(240, not(0)))
738
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
739
+ }
740
+ }
741
+
742
+ function extract_12_4(bytes12 self, uint8 offset) internal pure returns (bytes4 result) {
743
+ if (offset > 8) revert OutOfRangeAccess();
744
+ assembly ("memory-safe") {
745
+ result := and(shl(mul(8, offset), self), shl(224, not(0)))
746
+ }
747
+ }
748
+
749
+ function replace_12_4(bytes12 self, bytes4 value, uint8 offset) internal pure returns (bytes12 result) {
750
+ bytes4 oldValue = extract_12_4(self, offset);
751
+ assembly ("memory-safe") {
752
+ value := and(value, shl(224, not(0)))
753
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
754
+ }
755
+ }
756
+
757
+ function extract_12_6(bytes12 self, uint8 offset) internal pure returns (bytes6 result) {
758
+ if (offset > 6) revert OutOfRangeAccess();
759
+ assembly ("memory-safe") {
760
+ result := and(shl(mul(8, offset), self), shl(208, not(0)))
761
+ }
762
+ }
763
+
764
+ function replace_12_6(bytes12 self, bytes6 value, uint8 offset) internal pure returns (bytes12 result) {
765
+ bytes6 oldValue = extract_12_6(self, offset);
766
+ assembly ("memory-safe") {
767
+ value := and(value, shl(208, not(0)))
768
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
769
+ }
770
+ }
771
+
772
+ function extract_12_8(bytes12 self, uint8 offset) internal pure returns (bytes8 result) {
773
+ if (offset > 4) revert OutOfRangeAccess();
774
+ assembly ("memory-safe") {
775
+ result := and(shl(mul(8, offset), self), shl(192, not(0)))
776
+ }
777
+ }
778
+
779
+ function replace_12_8(bytes12 self, bytes8 value, uint8 offset) internal pure returns (bytes12 result) {
780
+ bytes8 oldValue = extract_12_8(self, offset);
781
+ assembly ("memory-safe") {
782
+ value := and(value, shl(192, not(0)))
783
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
784
+ }
785
+ }
786
+
787
+ function extract_12_10(bytes12 self, uint8 offset) internal pure returns (bytes10 result) {
788
+ if (offset > 2) revert OutOfRangeAccess();
789
+ assembly ("memory-safe") {
790
+ result := and(shl(mul(8, offset), self), shl(176, not(0)))
791
+ }
792
+ }
793
+
794
+ function replace_12_10(bytes12 self, bytes10 value, uint8 offset) internal pure returns (bytes12 result) {
795
+ bytes10 oldValue = extract_12_10(self, offset);
796
+ assembly ("memory-safe") {
797
+ value := and(value, shl(176, not(0)))
798
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
799
+ }
800
+ }
801
+
802
+ function extract_16_1(bytes16 self, uint8 offset) internal pure returns (bytes1 result) {
803
+ if (offset > 15) revert OutOfRangeAccess();
804
+ assembly ("memory-safe") {
805
+ result := and(shl(mul(8, offset), self), shl(248, not(0)))
806
+ }
807
+ }
808
+
809
+ function replace_16_1(bytes16 self, bytes1 value, uint8 offset) internal pure returns (bytes16 result) {
810
+ bytes1 oldValue = extract_16_1(self, offset);
811
+ assembly ("memory-safe") {
812
+ value := and(value, shl(248, not(0)))
813
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
814
+ }
815
+ }
816
+
817
+ function extract_16_2(bytes16 self, uint8 offset) internal pure returns (bytes2 result) {
818
+ if (offset > 14) revert OutOfRangeAccess();
819
+ assembly ("memory-safe") {
820
+ result := and(shl(mul(8, offset), self), shl(240, not(0)))
821
+ }
822
+ }
823
+
824
+ function replace_16_2(bytes16 self, bytes2 value, uint8 offset) internal pure returns (bytes16 result) {
825
+ bytes2 oldValue = extract_16_2(self, offset);
826
+ assembly ("memory-safe") {
827
+ value := and(value, shl(240, not(0)))
828
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
829
+ }
830
+ }
831
+
832
+ function extract_16_4(bytes16 self, uint8 offset) internal pure returns (bytes4 result) {
833
+ if (offset > 12) revert OutOfRangeAccess();
834
+ assembly ("memory-safe") {
835
+ result := and(shl(mul(8, offset), self), shl(224, not(0)))
836
+ }
837
+ }
838
+
839
+ function replace_16_4(bytes16 self, bytes4 value, uint8 offset) internal pure returns (bytes16 result) {
840
+ bytes4 oldValue = extract_16_4(self, offset);
841
+ assembly ("memory-safe") {
842
+ value := and(value, shl(224, not(0)))
843
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
844
+ }
845
+ }
846
+
847
+ function extract_16_6(bytes16 self, uint8 offset) internal pure returns (bytes6 result) {
848
+ if (offset > 10) revert OutOfRangeAccess();
849
+ assembly ("memory-safe") {
850
+ result := and(shl(mul(8, offset), self), shl(208, not(0)))
851
+ }
852
+ }
853
+
854
+ function replace_16_6(bytes16 self, bytes6 value, uint8 offset) internal pure returns (bytes16 result) {
855
+ bytes6 oldValue = extract_16_6(self, offset);
856
+ assembly ("memory-safe") {
857
+ value := and(value, shl(208, not(0)))
858
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
859
+ }
860
+ }
861
+
862
+ function extract_16_8(bytes16 self, uint8 offset) internal pure returns (bytes8 result) {
863
+ if (offset > 8) revert OutOfRangeAccess();
864
+ assembly ("memory-safe") {
865
+ result := and(shl(mul(8, offset), self), shl(192, not(0)))
866
+ }
867
+ }
868
+
869
+ function replace_16_8(bytes16 self, bytes8 value, uint8 offset) internal pure returns (bytes16 result) {
870
+ bytes8 oldValue = extract_16_8(self, offset);
871
+ assembly ("memory-safe") {
872
+ value := and(value, shl(192, not(0)))
873
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
874
+ }
875
+ }
876
+
877
+ function extract_16_10(bytes16 self, uint8 offset) internal pure returns (bytes10 result) {
878
+ if (offset > 6) revert OutOfRangeAccess();
879
+ assembly ("memory-safe") {
880
+ result := and(shl(mul(8, offset), self), shl(176, not(0)))
881
+ }
882
+ }
883
+
884
+ function replace_16_10(bytes16 self, bytes10 value, uint8 offset) internal pure returns (bytes16 result) {
885
+ bytes10 oldValue = extract_16_10(self, offset);
886
+ assembly ("memory-safe") {
887
+ value := and(value, shl(176, not(0)))
888
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
889
+ }
890
+ }
891
+
892
+ function extract_16_12(bytes16 self, uint8 offset) internal pure returns (bytes12 result) {
893
+ if (offset > 4) revert OutOfRangeAccess();
894
+ assembly ("memory-safe") {
895
+ result := and(shl(mul(8, offset), self), shl(160, not(0)))
896
+ }
897
+ }
898
+
899
+ function replace_16_12(bytes16 self, bytes12 value, uint8 offset) internal pure returns (bytes16 result) {
900
+ bytes12 oldValue = extract_16_12(self, offset);
901
+ assembly ("memory-safe") {
902
+ value := and(value, shl(160, not(0)))
903
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
904
+ }
905
+ }
906
+
907
+ function extract_20_1(bytes20 self, uint8 offset) internal pure returns (bytes1 result) {
908
+ if (offset > 19) revert OutOfRangeAccess();
909
+ assembly ("memory-safe") {
910
+ result := and(shl(mul(8, offset), self), shl(248, not(0)))
911
+ }
912
+ }
913
+
914
+ function replace_20_1(bytes20 self, bytes1 value, uint8 offset) internal pure returns (bytes20 result) {
915
+ bytes1 oldValue = extract_20_1(self, offset);
916
+ assembly ("memory-safe") {
917
+ value := and(value, shl(248, not(0)))
918
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
919
+ }
920
+ }
921
+
922
+ function extract_20_2(bytes20 self, uint8 offset) internal pure returns (bytes2 result) {
923
+ if (offset > 18) revert OutOfRangeAccess();
924
+ assembly ("memory-safe") {
925
+ result := and(shl(mul(8, offset), self), shl(240, not(0)))
926
+ }
927
+ }
928
+
929
+ function replace_20_2(bytes20 self, bytes2 value, uint8 offset) internal pure returns (bytes20 result) {
930
+ bytes2 oldValue = extract_20_2(self, offset);
931
+ assembly ("memory-safe") {
932
+ value := and(value, shl(240, not(0)))
933
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
934
+ }
935
+ }
936
+
937
+ function extract_20_4(bytes20 self, uint8 offset) internal pure returns (bytes4 result) {
938
+ if (offset > 16) revert OutOfRangeAccess();
939
+ assembly ("memory-safe") {
940
+ result := and(shl(mul(8, offset), self), shl(224, not(0)))
941
+ }
942
+ }
943
+
944
+ function replace_20_4(bytes20 self, bytes4 value, uint8 offset) internal pure returns (bytes20 result) {
945
+ bytes4 oldValue = extract_20_4(self, offset);
946
+ assembly ("memory-safe") {
947
+ value := and(value, shl(224, not(0)))
948
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
949
+ }
950
+ }
951
+
952
+ function extract_20_6(bytes20 self, uint8 offset) internal pure returns (bytes6 result) {
953
+ if (offset > 14) revert OutOfRangeAccess();
954
+ assembly ("memory-safe") {
955
+ result := and(shl(mul(8, offset), self), shl(208, not(0)))
956
+ }
957
+ }
958
+
959
+ function replace_20_6(bytes20 self, bytes6 value, uint8 offset) internal pure returns (bytes20 result) {
960
+ bytes6 oldValue = extract_20_6(self, offset);
961
+ assembly ("memory-safe") {
962
+ value := and(value, shl(208, not(0)))
963
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
964
+ }
965
+ }
966
+
967
+ function extract_20_8(bytes20 self, uint8 offset) internal pure returns (bytes8 result) {
968
+ if (offset > 12) revert OutOfRangeAccess();
969
+ assembly ("memory-safe") {
970
+ result := and(shl(mul(8, offset), self), shl(192, not(0)))
971
+ }
972
+ }
973
+
974
+ function replace_20_8(bytes20 self, bytes8 value, uint8 offset) internal pure returns (bytes20 result) {
975
+ bytes8 oldValue = extract_20_8(self, offset);
976
+ assembly ("memory-safe") {
977
+ value := and(value, shl(192, not(0)))
978
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
979
+ }
980
+ }
981
+
982
+ function extract_20_10(bytes20 self, uint8 offset) internal pure returns (bytes10 result) {
983
+ if (offset > 10) revert OutOfRangeAccess();
984
+ assembly ("memory-safe") {
985
+ result := and(shl(mul(8, offset), self), shl(176, not(0)))
986
+ }
987
+ }
988
+
989
+ function replace_20_10(bytes20 self, bytes10 value, uint8 offset) internal pure returns (bytes20 result) {
990
+ bytes10 oldValue = extract_20_10(self, offset);
991
+ assembly ("memory-safe") {
992
+ value := and(value, shl(176, not(0)))
993
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
994
+ }
995
+ }
996
+
997
+ function extract_20_12(bytes20 self, uint8 offset) internal pure returns (bytes12 result) {
998
+ if (offset > 8) revert OutOfRangeAccess();
999
+ assembly ("memory-safe") {
1000
+ result := and(shl(mul(8, offset), self), shl(160, not(0)))
1001
+ }
1002
+ }
1003
+
1004
+ function replace_20_12(bytes20 self, bytes12 value, uint8 offset) internal pure returns (bytes20 result) {
1005
+ bytes12 oldValue = extract_20_12(self, offset);
1006
+ assembly ("memory-safe") {
1007
+ value := and(value, shl(160, not(0)))
1008
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1009
+ }
1010
+ }
1011
+
1012
+ function extract_20_16(bytes20 self, uint8 offset) internal pure returns (bytes16 result) {
1013
+ if (offset > 4) revert OutOfRangeAccess();
1014
+ assembly ("memory-safe") {
1015
+ result := and(shl(mul(8, offset), self), shl(128, not(0)))
1016
+ }
1017
+ }
1018
+
1019
+ function replace_20_16(bytes20 self, bytes16 value, uint8 offset) internal pure returns (bytes20 result) {
1020
+ bytes16 oldValue = extract_20_16(self, offset);
1021
+ assembly ("memory-safe") {
1022
+ value := and(value, shl(128, not(0)))
1023
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1024
+ }
1025
+ }
1026
+
1027
+ function extract_22_1(bytes22 self, uint8 offset) internal pure returns (bytes1 result) {
1028
+ if (offset > 21) revert OutOfRangeAccess();
1029
+ assembly ("memory-safe") {
1030
+ result := and(shl(mul(8, offset), self), shl(248, not(0)))
1031
+ }
1032
+ }
1033
+
1034
+ function replace_22_1(bytes22 self, bytes1 value, uint8 offset) internal pure returns (bytes22 result) {
1035
+ bytes1 oldValue = extract_22_1(self, offset);
1036
+ assembly ("memory-safe") {
1037
+ value := and(value, shl(248, not(0)))
1038
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1039
+ }
1040
+ }
1041
+
1042
+ function extract_22_2(bytes22 self, uint8 offset) internal pure returns (bytes2 result) {
1043
+ if (offset > 20) revert OutOfRangeAccess();
1044
+ assembly ("memory-safe") {
1045
+ result := and(shl(mul(8, offset), self), shl(240, not(0)))
1046
+ }
1047
+ }
1048
+
1049
+ function replace_22_2(bytes22 self, bytes2 value, uint8 offset) internal pure returns (bytes22 result) {
1050
+ bytes2 oldValue = extract_22_2(self, offset);
1051
+ assembly ("memory-safe") {
1052
+ value := and(value, shl(240, not(0)))
1053
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1054
+ }
1055
+ }
1056
+
1057
+ function extract_22_4(bytes22 self, uint8 offset) internal pure returns (bytes4 result) {
1058
+ if (offset > 18) revert OutOfRangeAccess();
1059
+ assembly ("memory-safe") {
1060
+ result := and(shl(mul(8, offset), self), shl(224, not(0)))
1061
+ }
1062
+ }
1063
+
1064
+ function replace_22_4(bytes22 self, bytes4 value, uint8 offset) internal pure returns (bytes22 result) {
1065
+ bytes4 oldValue = extract_22_4(self, offset);
1066
+ assembly ("memory-safe") {
1067
+ value := and(value, shl(224, not(0)))
1068
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1069
+ }
1070
+ }
1071
+
1072
+ function extract_22_6(bytes22 self, uint8 offset) internal pure returns (bytes6 result) {
1073
+ if (offset > 16) revert OutOfRangeAccess();
1074
+ assembly ("memory-safe") {
1075
+ result := and(shl(mul(8, offset), self), shl(208, not(0)))
1076
+ }
1077
+ }
1078
+
1079
+ function replace_22_6(bytes22 self, bytes6 value, uint8 offset) internal pure returns (bytes22 result) {
1080
+ bytes6 oldValue = extract_22_6(self, offset);
1081
+ assembly ("memory-safe") {
1082
+ value := and(value, shl(208, not(0)))
1083
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1084
+ }
1085
+ }
1086
+
1087
+ function extract_22_8(bytes22 self, uint8 offset) internal pure returns (bytes8 result) {
1088
+ if (offset > 14) revert OutOfRangeAccess();
1089
+ assembly ("memory-safe") {
1090
+ result := and(shl(mul(8, offset), self), shl(192, not(0)))
1091
+ }
1092
+ }
1093
+
1094
+ function replace_22_8(bytes22 self, bytes8 value, uint8 offset) internal pure returns (bytes22 result) {
1095
+ bytes8 oldValue = extract_22_8(self, offset);
1096
+ assembly ("memory-safe") {
1097
+ value := and(value, shl(192, not(0)))
1098
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1099
+ }
1100
+ }
1101
+
1102
+ function extract_22_10(bytes22 self, uint8 offset) internal pure returns (bytes10 result) {
1103
+ if (offset > 12) revert OutOfRangeAccess();
1104
+ assembly ("memory-safe") {
1105
+ result := and(shl(mul(8, offset), self), shl(176, not(0)))
1106
+ }
1107
+ }
1108
+
1109
+ function replace_22_10(bytes22 self, bytes10 value, uint8 offset) internal pure returns (bytes22 result) {
1110
+ bytes10 oldValue = extract_22_10(self, offset);
1111
+ assembly ("memory-safe") {
1112
+ value := and(value, shl(176, not(0)))
1113
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1114
+ }
1115
+ }
1116
+
1117
+ function extract_22_12(bytes22 self, uint8 offset) internal pure returns (bytes12 result) {
1118
+ if (offset > 10) revert OutOfRangeAccess();
1119
+ assembly ("memory-safe") {
1120
+ result := and(shl(mul(8, offset), self), shl(160, not(0)))
1121
+ }
1122
+ }
1123
+
1124
+ function replace_22_12(bytes22 self, bytes12 value, uint8 offset) internal pure returns (bytes22 result) {
1125
+ bytes12 oldValue = extract_22_12(self, offset);
1126
+ assembly ("memory-safe") {
1127
+ value := and(value, shl(160, not(0)))
1128
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1129
+ }
1130
+ }
1131
+
1132
+ function extract_22_16(bytes22 self, uint8 offset) internal pure returns (bytes16 result) {
1133
+ if (offset > 6) revert OutOfRangeAccess();
1134
+ assembly ("memory-safe") {
1135
+ result := and(shl(mul(8, offset), self), shl(128, not(0)))
1136
+ }
1137
+ }
1138
+
1139
+ function replace_22_16(bytes22 self, bytes16 value, uint8 offset) internal pure returns (bytes22 result) {
1140
+ bytes16 oldValue = extract_22_16(self, offset);
1141
+ assembly ("memory-safe") {
1142
+ value := and(value, shl(128, not(0)))
1143
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1144
+ }
1145
+ }
1146
+
1147
+ function extract_22_20(bytes22 self, uint8 offset) internal pure returns (bytes20 result) {
1148
+ if (offset > 2) revert OutOfRangeAccess();
1149
+ assembly ("memory-safe") {
1150
+ result := and(shl(mul(8, offset), self), shl(96, not(0)))
1151
+ }
1152
+ }
1153
+
1154
+ function replace_22_20(bytes22 self, bytes20 value, uint8 offset) internal pure returns (bytes22 result) {
1155
+ bytes20 oldValue = extract_22_20(self, offset);
1156
+ assembly ("memory-safe") {
1157
+ value := and(value, shl(96, not(0)))
1158
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1159
+ }
1160
+ }
1161
+
1162
+ function extract_24_1(bytes24 self, uint8 offset) internal pure returns (bytes1 result) {
1163
+ if (offset > 23) revert OutOfRangeAccess();
1164
+ assembly ("memory-safe") {
1165
+ result := and(shl(mul(8, offset), self), shl(248, not(0)))
1166
+ }
1167
+ }
1168
+
1169
+ function replace_24_1(bytes24 self, bytes1 value, uint8 offset) internal pure returns (bytes24 result) {
1170
+ bytes1 oldValue = extract_24_1(self, offset);
1171
+ assembly ("memory-safe") {
1172
+ value := and(value, shl(248, not(0)))
1173
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1174
+ }
1175
+ }
1176
+
1177
+ function extract_24_2(bytes24 self, uint8 offset) internal pure returns (bytes2 result) {
1178
+ if (offset > 22) revert OutOfRangeAccess();
1179
+ assembly ("memory-safe") {
1180
+ result := and(shl(mul(8, offset), self), shl(240, not(0)))
1181
+ }
1182
+ }
1183
+
1184
+ function replace_24_2(bytes24 self, bytes2 value, uint8 offset) internal pure returns (bytes24 result) {
1185
+ bytes2 oldValue = extract_24_2(self, offset);
1186
+ assembly ("memory-safe") {
1187
+ value := and(value, shl(240, not(0)))
1188
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1189
+ }
1190
+ }
1191
+
1192
+ function extract_24_4(bytes24 self, uint8 offset) internal pure returns (bytes4 result) {
1193
+ if (offset > 20) revert OutOfRangeAccess();
1194
+ assembly ("memory-safe") {
1195
+ result := and(shl(mul(8, offset), self), shl(224, not(0)))
1196
+ }
1197
+ }
1198
+
1199
+ function replace_24_4(bytes24 self, bytes4 value, uint8 offset) internal pure returns (bytes24 result) {
1200
+ bytes4 oldValue = extract_24_4(self, offset);
1201
+ assembly ("memory-safe") {
1202
+ value := and(value, shl(224, not(0)))
1203
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1204
+ }
1205
+ }
1206
+
1207
+ function extract_24_6(bytes24 self, uint8 offset) internal pure returns (bytes6 result) {
1208
+ if (offset > 18) revert OutOfRangeAccess();
1209
+ assembly ("memory-safe") {
1210
+ result := and(shl(mul(8, offset), self), shl(208, not(0)))
1211
+ }
1212
+ }
1213
+
1214
+ function replace_24_6(bytes24 self, bytes6 value, uint8 offset) internal pure returns (bytes24 result) {
1215
+ bytes6 oldValue = extract_24_6(self, offset);
1216
+ assembly ("memory-safe") {
1217
+ value := and(value, shl(208, not(0)))
1218
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1219
+ }
1220
+ }
1221
+
1222
+ function extract_24_8(bytes24 self, uint8 offset) internal pure returns (bytes8 result) {
1223
+ if (offset > 16) revert OutOfRangeAccess();
1224
+ assembly ("memory-safe") {
1225
+ result := and(shl(mul(8, offset), self), shl(192, not(0)))
1226
+ }
1227
+ }
1228
+
1229
+ function replace_24_8(bytes24 self, bytes8 value, uint8 offset) internal pure returns (bytes24 result) {
1230
+ bytes8 oldValue = extract_24_8(self, offset);
1231
+ assembly ("memory-safe") {
1232
+ value := and(value, shl(192, not(0)))
1233
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1234
+ }
1235
+ }
1236
+
1237
+ function extract_24_10(bytes24 self, uint8 offset) internal pure returns (bytes10 result) {
1238
+ if (offset > 14) revert OutOfRangeAccess();
1239
+ assembly ("memory-safe") {
1240
+ result := and(shl(mul(8, offset), self), shl(176, not(0)))
1241
+ }
1242
+ }
1243
+
1244
+ function replace_24_10(bytes24 self, bytes10 value, uint8 offset) internal pure returns (bytes24 result) {
1245
+ bytes10 oldValue = extract_24_10(self, offset);
1246
+ assembly ("memory-safe") {
1247
+ value := and(value, shl(176, not(0)))
1248
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1249
+ }
1250
+ }
1251
+
1252
+ function extract_24_12(bytes24 self, uint8 offset) internal pure returns (bytes12 result) {
1253
+ if (offset > 12) revert OutOfRangeAccess();
1254
+ assembly ("memory-safe") {
1255
+ result := and(shl(mul(8, offset), self), shl(160, not(0)))
1256
+ }
1257
+ }
1258
+
1259
+ function replace_24_12(bytes24 self, bytes12 value, uint8 offset) internal pure returns (bytes24 result) {
1260
+ bytes12 oldValue = extract_24_12(self, offset);
1261
+ assembly ("memory-safe") {
1262
+ value := and(value, shl(160, not(0)))
1263
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1264
+ }
1265
+ }
1266
+
1267
+ function extract_24_16(bytes24 self, uint8 offset) internal pure returns (bytes16 result) {
1268
+ if (offset > 8) revert OutOfRangeAccess();
1269
+ assembly ("memory-safe") {
1270
+ result := and(shl(mul(8, offset), self), shl(128, not(0)))
1271
+ }
1272
+ }
1273
+
1274
+ function replace_24_16(bytes24 self, bytes16 value, uint8 offset) internal pure returns (bytes24 result) {
1275
+ bytes16 oldValue = extract_24_16(self, offset);
1276
+ assembly ("memory-safe") {
1277
+ value := and(value, shl(128, not(0)))
1278
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1279
+ }
1280
+ }
1281
+
1282
+ function extract_24_20(bytes24 self, uint8 offset) internal pure returns (bytes20 result) {
1283
+ if (offset > 4) revert OutOfRangeAccess();
1284
+ assembly ("memory-safe") {
1285
+ result := and(shl(mul(8, offset), self), shl(96, not(0)))
1286
+ }
1287
+ }
1288
+
1289
+ function replace_24_20(bytes24 self, bytes20 value, uint8 offset) internal pure returns (bytes24 result) {
1290
+ bytes20 oldValue = extract_24_20(self, offset);
1291
+ assembly ("memory-safe") {
1292
+ value := and(value, shl(96, not(0)))
1293
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1294
+ }
1295
+ }
1296
+
1297
+ function extract_24_22(bytes24 self, uint8 offset) internal pure returns (bytes22 result) {
1298
+ if (offset > 2) revert OutOfRangeAccess();
1299
+ assembly ("memory-safe") {
1300
+ result := and(shl(mul(8, offset), self), shl(80, not(0)))
1301
+ }
1302
+ }
1303
+
1304
+ function replace_24_22(bytes24 self, bytes22 value, uint8 offset) internal pure returns (bytes24 result) {
1305
+ bytes22 oldValue = extract_24_22(self, offset);
1306
+ assembly ("memory-safe") {
1307
+ value := and(value, shl(80, not(0)))
1308
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1309
+ }
1310
+ }
1311
+
1312
+ function extract_28_1(bytes28 self, uint8 offset) internal pure returns (bytes1 result) {
1313
+ if (offset > 27) revert OutOfRangeAccess();
1314
+ assembly ("memory-safe") {
1315
+ result := and(shl(mul(8, offset), self), shl(248, not(0)))
1316
+ }
1317
+ }
1318
+
1319
+ function replace_28_1(bytes28 self, bytes1 value, uint8 offset) internal pure returns (bytes28 result) {
1320
+ bytes1 oldValue = extract_28_1(self, offset);
1321
+ assembly ("memory-safe") {
1322
+ value := and(value, shl(248, not(0)))
1323
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1324
+ }
1325
+ }
1326
+
1327
+ function extract_28_2(bytes28 self, uint8 offset) internal pure returns (bytes2 result) {
1328
+ if (offset > 26) revert OutOfRangeAccess();
1329
+ assembly ("memory-safe") {
1330
+ result := and(shl(mul(8, offset), self), shl(240, not(0)))
1331
+ }
1332
+ }
1333
+
1334
+ function replace_28_2(bytes28 self, bytes2 value, uint8 offset) internal pure returns (bytes28 result) {
1335
+ bytes2 oldValue = extract_28_2(self, offset);
1336
+ assembly ("memory-safe") {
1337
+ value := and(value, shl(240, not(0)))
1338
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1339
+ }
1340
+ }
1341
+
1342
+ function extract_28_4(bytes28 self, uint8 offset) internal pure returns (bytes4 result) {
1343
+ if (offset > 24) revert OutOfRangeAccess();
1344
+ assembly ("memory-safe") {
1345
+ result := and(shl(mul(8, offset), self), shl(224, not(0)))
1346
+ }
1347
+ }
1348
+
1349
+ function replace_28_4(bytes28 self, bytes4 value, uint8 offset) internal pure returns (bytes28 result) {
1350
+ bytes4 oldValue = extract_28_4(self, offset);
1351
+ assembly ("memory-safe") {
1352
+ value := and(value, shl(224, not(0)))
1353
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1354
+ }
1355
+ }
1356
+
1357
+ function extract_28_6(bytes28 self, uint8 offset) internal pure returns (bytes6 result) {
1358
+ if (offset > 22) revert OutOfRangeAccess();
1359
+ assembly ("memory-safe") {
1360
+ result := and(shl(mul(8, offset), self), shl(208, not(0)))
1361
+ }
1362
+ }
1363
+
1364
+ function replace_28_6(bytes28 self, bytes6 value, uint8 offset) internal pure returns (bytes28 result) {
1365
+ bytes6 oldValue = extract_28_6(self, offset);
1366
+ assembly ("memory-safe") {
1367
+ value := and(value, shl(208, not(0)))
1368
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1369
+ }
1370
+ }
1371
+
1372
+ function extract_28_8(bytes28 self, uint8 offset) internal pure returns (bytes8 result) {
1373
+ if (offset > 20) revert OutOfRangeAccess();
1374
+ assembly ("memory-safe") {
1375
+ result := and(shl(mul(8, offset), self), shl(192, not(0)))
1376
+ }
1377
+ }
1378
+
1379
+ function replace_28_8(bytes28 self, bytes8 value, uint8 offset) internal pure returns (bytes28 result) {
1380
+ bytes8 oldValue = extract_28_8(self, offset);
1381
+ assembly ("memory-safe") {
1382
+ value := and(value, shl(192, not(0)))
1383
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1384
+ }
1385
+ }
1386
+
1387
+ function extract_28_10(bytes28 self, uint8 offset) internal pure returns (bytes10 result) {
1388
+ if (offset > 18) revert OutOfRangeAccess();
1389
+ assembly ("memory-safe") {
1390
+ result := and(shl(mul(8, offset), self), shl(176, not(0)))
1391
+ }
1392
+ }
1393
+
1394
+ function replace_28_10(bytes28 self, bytes10 value, uint8 offset) internal pure returns (bytes28 result) {
1395
+ bytes10 oldValue = extract_28_10(self, offset);
1396
+ assembly ("memory-safe") {
1397
+ value := and(value, shl(176, not(0)))
1398
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1399
+ }
1400
+ }
1401
+
1402
+ function extract_28_12(bytes28 self, uint8 offset) internal pure returns (bytes12 result) {
1403
+ if (offset > 16) revert OutOfRangeAccess();
1404
+ assembly ("memory-safe") {
1405
+ result := and(shl(mul(8, offset), self), shl(160, not(0)))
1406
+ }
1407
+ }
1408
+
1409
+ function replace_28_12(bytes28 self, bytes12 value, uint8 offset) internal pure returns (bytes28 result) {
1410
+ bytes12 oldValue = extract_28_12(self, offset);
1411
+ assembly ("memory-safe") {
1412
+ value := and(value, shl(160, not(0)))
1413
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1414
+ }
1415
+ }
1416
+
1417
+ function extract_28_16(bytes28 self, uint8 offset) internal pure returns (bytes16 result) {
1418
+ if (offset > 12) revert OutOfRangeAccess();
1419
+ assembly ("memory-safe") {
1420
+ result := and(shl(mul(8, offset), self), shl(128, not(0)))
1421
+ }
1422
+ }
1423
+
1424
+ function replace_28_16(bytes28 self, bytes16 value, uint8 offset) internal pure returns (bytes28 result) {
1425
+ bytes16 oldValue = extract_28_16(self, offset);
1426
+ assembly ("memory-safe") {
1427
+ value := and(value, shl(128, not(0)))
1428
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1429
+ }
1430
+ }
1431
+
1432
+ function extract_28_20(bytes28 self, uint8 offset) internal pure returns (bytes20 result) {
1433
+ if (offset > 8) revert OutOfRangeAccess();
1434
+ assembly ("memory-safe") {
1435
+ result := and(shl(mul(8, offset), self), shl(96, not(0)))
1436
+ }
1437
+ }
1438
+
1439
+ function replace_28_20(bytes28 self, bytes20 value, uint8 offset) internal pure returns (bytes28 result) {
1440
+ bytes20 oldValue = extract_28_20(self, offset);
1441
+ assembly ("memory-safe") {
1442
+ value := and(value, shl(96, not(0)))
1443
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1444
+ }
1445
+ }
1446
+
1447
+ function extract_28_22(bytes28 self, uint8 offset) internal pure returns (bytes22 result) {
1448
+ if (offset > 6) revert OutOfRangeAccess();
1449
+ assembly ("memory-safe") {
1450
+ result := and(shl(mul(8, offset), self), shl(80, not(0)))
1451
+ }
1452
+ }
1453
+
1454
+ function replace_28_22(bytes28 self, bytes22 value, uint8 offset) internal pure returns (bytes28 result) {
1455
+ bytes22 oldValue = extract_28_22(self, offset);
1456
+ assembly ("memory-safe") {
1457
+ value := and(value, shl(80, not(0)))
1458
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1459
+ }
1460
+ }
1461
+
1462
+ function extract_28_24(bytes28 self, uint8 offset) internal pure returns (bytes24 result) {
1463
+ if (offset > 4) revert OutOfRangeAccess();
1464
+ assembly ("memory-safe") {
1465
+ result := and(shl(mul(8, offset), self), shl(64, not(0)))
1466
+ }
1467
+ }
1468
+
1469
+ function replace_28_24(bytes28 self, bytes24 value, uint8 offset) internal pure returns (bytes28 result) {
1470
+ bytes24 oldValue = extract_28_24(self, offset);
1471
+ assembly ("memory-safe") {
1472
+ value := and(value, shl(64, not(0)))
1473
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1474
+ }
1475
+ }
1476
+
1477
+ function extract_32_1(bytes32 self, uint8 offset) internal pure returns (bytes1 result) {
1478
+ if (offset > 31) revert OutOfRangeAccess();
1479
+ assembly ("memory-safe") {
1480
+ result := and(shl(mul(8, offset), self), shl(248, not(0)))
1481
+ }
1482
+ }
1483
+
1484
+ function replace_32_1(bytes32 self, bytes1 value, uint8 offset) internal pure returns (bytes32 result) {
1485
+ bytes1 oldValue = extract_32_1(self, offset);
1486
+ assembly ("memory-safe") {
1487
+ value := and(value, shl(248, not(0)))
1488
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1489
+ }
1490
+ }
1491
+
1492
+ function extract_32_2(bytes32 self, uint8 offset) internal pure returns (bytes2 result) {
1493
+ if (offset > 30) revert OutOfRangeAccess();
1494
+ assembly ("memory-safe") {
1495
+ result := and(shl(mul(8, offset), self), shl(240, not(0)))
1496
+ }
1497
+ }
1498
+
1499
+ function replace_32_2(bytes32 self, bytes2 value, uint8 offset) internal pure returns (bytes32 result) {
1500
+ bytes2 oldValue = extract_32_2(self, offset);
1501
+ assembly ("memory-safe") {
1502
+ value := and(value, shl(240, not(0)))
1503
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1504
+ }
1505
+ }
1506
+
1507
+ function extract_32_4(bytes32 self, uint8 offset) internal pure returns (bytes4 result) {
1508
+ if (offset > 28) revert OutOfRangeAccess();
1509
+ assembly ("memory-safe") {
1510
+ result := and(shl(mul(8, offset), self), shl(224, not(0)))
1511
+ }
1512
+ }
1513
+
1514
+ function replace_32_4(bytes32 self, bytes4 value, uint8 offset) internal pure returns (bytes32 result) {
1515
+ bytes4 oldValue = extract_32_4(self, offset);
1516
+ assembly ("memory-safe") {
1517
+ value := and(value, shl(224, not(0)))
1518
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1519
+ }
1520
+ }
1521
+
1522
+ function extract_32_6(bytes32 self, uint8 offset) internal pure returns (bytes6 result) {
1523
+ if (offset > 26) revert OutOfRangeAccess();
1524
+ assembly ("memory-safe") {
1525
+ result := and(shl(mul(8, offset), self), shl(208, not(0)))
1526
+ }
1527
+ }
1528
+
1529
+ function replace_32_6(bytes32 self, bytes6 value, uint8 offset) internal pure returns (bytes32 result) {
1530
+ bytes6 oldValue = extract_32_6(self, offset);
1531
+ assembly ("memory-safe") {
1532
+ value := and(value, shl(208, not(0)))
1533
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1534
+ }
1535
+ }
1536
+
1537
+ function extract_32_8(bytes32 self, uint8 offset) internal pure returns (bytes8 result) {
1538
+ if (offset > 24) revert OutOfRangeAccess();
1539
+ assembly ("memory-safe") {
1540
+ result := and(shl(mul(8, offset), self), shl(192, not(0)))
1541
+ }
1542
+ }
1543
+
1544
+ function replace_32_8(bytes32 self, bytes8 value, uint8 offset) internal pure returns (bytes32 result) {
1545
+ bytes8 oldValue = extract_32_8(self, offset);
1546
+ assembly ("memory-safe") {
1547
+ value := and(value, shl(192, not(0)))
1548
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1549
+ }
1550
+ }
1551
+
1552
+ function extract_32_10(bytes32 self, uint8 offset) internal pure returns (bytes10 result) {
1553
+ if (offset > 22) revert OutOfRangeAccess();
1554
+ assembly ("memory-safe") {
1555
+ result := and(shl(mul(8, offset), self), shl(176, not(0)))
1556
+ }
1557
+ }
1558
+
1559
+ function replace_32_10(bytes32 self, bytes10 value, uint8 offset) internal pure returns (bytes32 result) {
1560
+ bytes10 oldValue = extract_32_10(self, offset);
1561
+ assembly ("memory-safe") {
1562
+ value := and(value, shl(176, not(0)))
1563
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1564
+ }
1565
+ }
1566
+
1567
+ function extract_32_12(bytes32 self, uint8 offset) internal pure returns (bytes12 result) {
1568
+ if (offset > 20) revert OutOfRangeAccess();
1569
+ assembly ("memory-safe") {
1570
+ result := and(shl(mul(8, offset), self), shl(160, not(0)))
1571
+ }
1572
+ }
1573
+
1574
+ function replace_32_12(bytes32 self, bytes12 value, uint8 offset) internal pure returns (bytes32 result) {
1575
+ bytes12 oldValue = extract_32_12(self, offset);
1576
+ assembly ("memory-safe") {
1577
+ value := and(value, shl(160, not(0)))
1578
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1579
+ }
1580
+ }
1581
+
1582
+ function extract_32_16(bytes32 self, uint8 offset) internal pure returns (bytes16 result) {
1583
+ if (offset > 16) revert OutOfRangeAccess();
1584
+ assembly ("memory-safe") {
1585
+ result := and(shl(mul(8, offset), self), shl(128, not(0)))
1586
+ }
1587
+ }
1588
+
1589
+ function replace_32_16(bytes32 self, bytes16 value, uint8 offset) internal pure returns (bytes32 result) {
1590
+ bytes16 oldValue = extract_32_16(self, offset);
1591
+ assembly ("memory-safe") {
1592
+ value := and(value, shl(128, not(0)))
1593
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1594
+ }
1595
+ }
1596
+
1597
+ function extract_32_20(bytes32 self, uint8 offset) internal pure returns (bytes20 result) {
1598
+ if (offset > 12) revert OutOfRangeAccess();
1599
+ assembly ("memory-safe") {
1600
+ result := and(shl(mul(8, offset), self), shl(96, not(0)))
1601
+ }
1602
+ }
1603
+
1604
+ function replace_32_20(bytes32 self, bytes20 value, uint8 offset) internal pure returns (bytes32 result) {
1605
+ bytes20 oldValue = extract_32_20(self, offset);
1606
+ assembly ("memory-safe") {
1607
+ value := and(value, shl(96, not(0)))
1608
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1609
+ }
1610
+ }
1611
+
1612
+ function extract_32_22(bytes32 self, uint8 offset) internal pure returns (bytes22 result) {
1613
+ if (offset > 10) revert OutOfRangeAccess();
1614
+ assembly ("memory-safe") {
1615
+ result := and(shl(mul(8, offset), self), shl(80, not(0)))
1616
+ }
1617
+ }
1618
+
1619
+ function replace_32_22(bytes32 self, bytes22 value, uint8 offset) internal pure returns (bytes32 result) {
1620
+ bytes22 oldValue = extract_32_22(self, offset);
1621
+ assembly ("memory-safe") {
1622
+ value := and(value, shl(80, not(0)))
1623
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1624
+ }
1625
+ }
1626
+
1627
+ function extract_32_24(bytes32 self, uint8 offset) internal pure returns (bytes24 result) {
1628
+ if (offset > 8) revert OutOfRangeAccess();
1629
+ assembly ("memory-safe") {
1630
+ result := and(shl(mul(8, offset), self), shl(64, not(0)))
1631
+ }
1632
+ }
1633
+
1634
+ function replace_32_24(bytes32 self, bytes24 value, uint8 offset) internal pure returns (bytes32 result) {
1635
+ bytes24 oldValue = extract_32_24(self, offset);
1636
+ assembly ("memory-safe") {
1637
+ value := and(value, shl(64, not(0)))
1638
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1639
+ }
1640
+ }
1641
+
1642
+ function extract_32_28(bytes32 self, uint8 offset) internal pure returns (bytes28 result) {
1643
+ if (offset > 4) revert OutOfRangeAccess();
1644
+ assembly ("memory-safe") {
1645
+ result := and(shl(mul(8, offset), self), shl(32, not(0)))
1646
+ }
1647
+ }
1648
+
1649
+ function replace_32_28(bytes32 self, bytes28 value, uint8 offset) internal pure returns (bytes32 result) {
1650
+ bytes28 oldValue = extract_32_28(self, offset);
1651
+ assembly ("memory-safe") {
1652
+ value := and(value, shl(32, not(0)))
1653
+ result := xor(self, shr(mul(8, offset), xor(oldValue, value)))
1654
+ }
1655
+ }
1656
+ }