1 line
33 KiB
JSON
1 line
33 KiB
JSON
{"abi":[],"bytecode":{"object":"0x6080806040523460175760399081601c823930815050f35b5f80fdfe5f80fdfea26469706673582212202e387bbfb65c746166ae82d0b98fc4e357001449cc0db79b08b42ef8dde2d37264736f6c634300081e0033","sourceMap":"1407:2774:48:-:0;;;;;;;;;;;;;;;;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x5f80fdfea26469706673582212202e387bbfb65c746166ae82d0b98fc4e357001449cc0db79b08b42ef8dde2d37264736f6c634300081e0033","sourceMap":"1407:2774:48:-:0;;","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.30+commit.73712a01\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Library for reading and writing primitive types to specific storage slots. Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. This library helps with reading and writing to such slots without the need for inline assembly. The functions in this library return Slot structs that contain a `value` member that can be used to read or write. Example usage to set ERC-1967 implementation slot: ```solidity contract ERC1967 { // Define the slot. Alternatively, use the SlotDerivation library to derive the slot. bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; function _getImplementation() internal view returns (address) { return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; } function _setImplementation(address newImplementation) internal { require(newImplementation.code.length > 0); StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; } } ``` TIP: Consider using this library along with {SlotDerivation}.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"node_modules/@openzeppelin/contracts/utils/StorageSlot.sol\":\"StorageSlot\"},\"evmVersion\":\"prague\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@ensdomains/=node_modules/@ensdomains/\",\":@openzeppelin/=node_modules/@openzeppelin/\",\":forge-std/=lib/forge-std/src/\",\":hardhat/=node_modules/hardhat/\"],\"viaIR\":true},\"sources\":{\"node_modules/@openzeppelin/contracts/utils/StorageSlot.sol\":{\"keccak256\":\"0xcf74f855663ce2ae00ed8352666b7935f6cddea2932fdf2c3ecd30a9b1cd0e97\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9f660b1f351b757dfe01438e59888f31f33ded3afcf5cb5b0d9bf9aa6f320a8b\",\"dweb:/ipfs/QmarDJ5hZEgBtCmmrVzEZWjub9769eD686jmzb2XpSU1cM\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.30+commit.73712a01"},"language":"Solidity","output":{"abi":[],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@ensdomains/=node_modules/@ensdomains/","@openzeppelin/=node_modules/@openzeppelin/","forge-std/=lib/forge-std/src/","hardhat/=node_modules/hardhat/"],"optimizer":{"enabled":true,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"node_modules/@openzeppelin/contracts/utils/StorageSlot.sol":"StorageSlot"},"evmVersion":"prague","libraries":{},"viaIR":true},"sources":{"node_modules/@openzeppelin/contracts/utils/StorageSlot.sol":{"keccak256":"0xcf74f855663ce2ae00ed8352666b7935f6cddea2932fdf2c3ecd30a9b1cd0e97","urls":["bzz-raw://9f660b1f351b757dfe01438e59888f31f33ded3afcf5cb5b0d9bf9aa6f320a8b","dweb:/ipfs/QmarDJ5hZEgBtCmmrVzEZWjub9769eD686jmzb2XpSU1cM"],"license":"MIT"}},"version":1},"ast":{"absolutePath":"node_modules/@openzeppelin/contracts/utils/StorageSlot.sol","id":13575,"exportedSymbols":{"StorageSlot":[13574]},"nodeType":"SourceUnit","src":"193:3989:48","nodes":[{"id":13452,"nodeType":"PragmaDirective","src":"193:24:48","nodes":[],"literals":["solidity","^","0.8",".20"]},{"id":13574,"nodeType":"ContractDefinition","src":"1407:2774:48","nodes":[{"id":13456,"nodeType":"StructDefinition","src":"1433:49:48","nodes":[],"canonicalName":"StorageSlot.AddressSlot","members":[{"constant":false,"id":13455,"mutability":"mutable","name":"value","nameLocation":"1470:5:48","nodeType":"VariableDeclaration","scope":13456,"src":"1462:13:48","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":13454,"name":"address","nodeType":"ElementaryTypeName","src":"1462:7:48","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"name":"AddressSlot","nameLocation":"1440:11:48","scope":13574,"visibility":"public"},{"id":13459,"nodeType":"StructDefinition","src":"1488:46:48","nodes":[],"canonicalName":"StorageSlot.BooleanSlot","members":[{"constant":false,"id":13458,"mutability":"mutable","name":"value","nameLocation":"1522:5:48","nodeType":"VariableDeclaration","scope":13459,"src":"1517:10:48","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":13457,"name":"bool","nodeType":"ElementaryTypeName","src":"1517:4:48","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"internal"}],"name":"BooleanSlot","nameLocation":"1495:11:48","scope":13574,"visibility":"public"},{"id":13462,"nodeType":"StructDefinition","src":"1540:49:48","nodes":[],"canonicalName":"StorageSlot.Bytes32Slot","members":[{"constant":false,"id":13461,"mutability":"mutable","name":"value","nameLocation":"1577:5:48","nodeType":"VariableDeclaration","scope":13462,"src":"1569:13:48","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":13460,"name":"bytes32","nodeType":"ElementaryTypeName","src":"1569:7:48","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"visibility":"internal"}],"name":"Bytes32Slot","nameLocation":"1547:11:48","scope":13574,"visibility":"public"},{"id":13465,"nodeType":"StructDefinition","src":"1595:49:48","nodes":[],"canonicalName":"StorageSlot.Uint256Slot","members":[{"constant":false,"id":13464,"mutability":"mutable","name":"value","nameLocation":"1632:5:48","nodeType":"VariableDeclaration","scope":13465,"src":"1624:13:48","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":13463,"name":"uint256","nodeType":"ElementaryTypeName","src":"1624:7:48","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"name":"Uint256Slot","nameLocation":"1602:11:48","scope":13574,"visibility":"public"},{"id":13468,"nodeType":"StructDefinition","src":"1650:47:48","nodes":[],"canonicalName":"StorageSlot.Int256Slot","members":[{"constant":false,"id":13467,"mutability":"mutable","name":"value","nameLocation":"1685:5:48","nodeType":"VariableDeclaration","scope":13468,"src":"1678:12:48","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"},"typeName":{"id":13466,"name":"int256","nodeType":"ElementaryTypeName","src":"1678:6:48","typeDescriptions":{"typeIdentifier":"t_int256","typeString":"int256"}},"visibility":"internal"}],"name":"Int256Slot","nameLocation":"1657:10:48","scope":13574,"visibility":"public"},{"id":13471,"nodeType":"StructDefinition","src":"1703:47:48","nodes":[],"canonicalName":"StorageSlot.StringSlot","members":[{"constant":false,"id":13470,"mutability":"mutable","name":"value","nameLocation":"1738:5:48","nodeType":"VariableDeclaration","scope":13471,"src":"1731:12:48","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"},"typeName":{"id":13469,"name":"string","nodeType":"ElementaryTypeName","src":"1731:6:48","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"visibility":"internal"}],"name":"StringSlot","nameLocation":"1710:10:48","scope":13574,"visibility":"public"},{"id":13474,"nodeType":"StructDefinition","src":"1756:45:48","nodes":[],"canonicalName":"StorageSlot.BytesSlot","members":[{"constant":false,"id":13473,"mutability":"mutable","name":"value","nameLocation":"1789:5:48","nodeType":"VariableDeclaration","scope":13474,"src":"1783:11:48","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"},"typeName":{"id":13472,"name":"bytes","nodeType":"ElementaryTypeName","src":"1783:5:48","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"visibility":"internal"}],"name":"BytesSlot","nameLocation":"1763:9:48","scope":13574,"visibility":"public"},{"id":13485,"nodeType":"FunctionDefinition","src":"1899:163:48","nodes":[],"body":{"id":13484,"nodeType":"Block","src":"1983:79:48","nodes":[],"statements":[{"AST":{"nativeSrc":"2018:38:48","nodeType":"YulBlock","src":"2018:38:48","statements":[{"nativeSrc":"2032:14:48","nodeType":"YulAssignment","src":"2032:14:48","value":{"name":"slot","nativeSrc":"2042:4:48","nodeType":"YulIdentifier","src":"2042:4:48"},"variableNames":[{"name":"r.slot","nativeSrc":"2032:6:48","nodeType":"YulIdentifier","src":"2032:6:48"}]}]},"evmVersion":"prague","externalReferences":[{"declaration":13481,"isOffset":false,"isSlot":true,"src":"2032:6:48","suffix":"slot","valueSize":1},{"declaration":13477,"isOffset":false,"isSlot":false,"src":"2042:4:48","valueSize":1}],"flags":["memory-safe"],"id":13483,"nodeType":"InlineAssembly","src":"1993:63:48"}]},"documentation":{"id":13475,"nodeType":"StructuredDocumentation","src":"1807:87:48","text":" @dev Returns an `AddressSlot` with member `value` located at `slot`."},"implemented":true,"kind":"function","modifiers":[],"name":"getAddressSlot","nameLocation":"1908:14:48","parameters":{"id":13478,"nodeType":"ParameterList","parameters":[{"constant":false,"id":13477,"mutability":"mutable","name":"slot","nameLocation":"1931:4:48","nodeType":"VariableDeclaration","scope":13485,"src":"1923:12:48","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":13476,"name":"bytes32","nodeType":"ElementaryTypeName","src":"1923:7:48","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"visibility":"internal"}],"src":"1922:14:48"},"returnParameters":{"id":13482,"nodeType":"ParameterList","parameters":[{"constant":false,"id":13481,"mutability":"mutable","name":"r","nameLocation":"1980:1:48","nodeType":"VariableDeclaration","scope":13485,"src":"1960:21:48","stateVariable":false,"storageLocation":"storage","typeDescriptions":{"typeIdentifier":"t_struct$_AddressSlot_$13456_storage_ptr","typeString":"struct StorageSlot.AddressSlot"},"typeName":{"id":13480,"nodeType":"UserDefinedTypeName","pathNode":{"id":13479,"name":"AddressSlot","nameLocations":["1960:11:48"],"nodeType":"IdentifierPath","referencedDeclaration":13456,"src":"1960:11:48"},"referencedDeclaration":13456,"src":"1960:11:48","typeDescriptions":{"typeIdentifier":"t_struct$_AddressSlot_$13456_storage_ptr","typeString":"struct StorageSlot.AddressSlot"}},"visibility":"internal"}],"src":"1959:23:48"},"scope":13574,"stateMutability":"pure","virtual":false,"visibility":"internal"},{"id":13496,"nodeType":"FunctionDefinition","src":"2159:163:48","nodes":[],"body":{"id":13495,"nodeType":"Block","src":"2243:79:48","nodes":[],"statements":[{"AST":{"nativeSrc":"2278:38:48","nodeType":"YulBlock","src":"2278:38:48","statements":[{"nativeSrc":"2292:14:48","nodeType":"YulAssignment","src":"2292:14:48","value":{"name":"slot","nativeSrc":"2302:4:48","nodeType":"YulIdentifier","src":"2302:4:48"},"variableNames":[{"name":"r.slot","nativeSrc":"2292:6:48","nodeType":"YulIdentifier","src":"2292:6:48"}]}]},"evmVersion":"prague","externalReferences":[{"declaration":13492,"isOffset":false,"isSlot":true,"src":"2292:6:48","suffix":"slot","valueSize":1},{"declaration":13488,"isOffset":false,"isSlot":false,"src":"2302:4:48","valueSize":1}],"flags":["memory-safe"],"id":13494,"nodeType":"InlineAssembly","src":"2253:63:48"}]},"documentation":{"id":13486,"nodeType":"StructuredDocumentation","src":"2068:86:48","text":" @dev Returns a `BooleanSlot` with member `value` located at `slot`."},"implemented":true,"kind":"function","modifiers":[],"name":"getBooleanSlot","nameLocation":"2168:14:48","parameters":{"id":13489,"nodeType":"ParameterList","parameters":[{"constant":false,"id":13488,"mutability":"mutable","name":"slot","nameLocation":"2191:4:48","nodeType":"VariableDeclaration","scope":13496,"src":"2183:12:48","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":13487,"name":"bytes32","nodeType":"ElementaryTypeName","src":"2183:7:48","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"visibility":"internal"}],"src":"2182:14:48"},"returnParameters":{"id":13493,"nodeType":"ParameterList","parameters":[{"constant":false,"id":13492,"mutability":"mutable","name":"r","nameLocation":"2240:1:48","nodeType":"VariableDeclaration","scope":13496,"src":"2220:21:48","stateVariable":false,"storageLocation":"storage","typeDescriptions":{"typeIdentifier":"t_struct$_BooleanSlot_$13459_storage_ptr","typeString":"struct StorageSlot.BooleanSlot"},"typeName":{"id":13491,"nodeType":"UserDefinedTypeName","pathNode":{"id":13490,"name":"BooleanSlot","nameLocations":["2220:11:48"],"nodeType":"IdentifierPath","referencedDeclaration":13459,"src":"2220:11:48"},"referencedDeclaration":13459,"src":"2220:11:48","typeDescriptions":{"typeIdentifier":"t_struct$_BooleanSlot_$13459_storage_ptr","typeString":"struct StorageSlot.BooleanSlot"}},"visibility":"internal"}],"src":"2219:23:48"},"scope":13574,"stateMutability":"pure","virtual":false,"visibility":"internal"},{"id":13507,"nodeType":"FunctionDefinition","src":"2419:163:48","nodes":[],"body":{"id":13506,"nodeType":"Block","src":"2503:79:48","nodes":[],"statements":[{"AST":{"nativeSrc":"2538:38:48","nodeType":"YulBlock","src":"2538:38:48","statements":[{"nativeSrc":"2552:14:48","nodeType":"YulAssignment","src":"2552:14:48","value":{"name":"slot","nativeSrc":"2562:4:48","nodeType":"YulIdentifier","src":"2562:4:48"},"variableNames":[{"name":"r.slot","nativeSrc":"2552:6:48","nodeType":"YulIdentifier","src":"2552:6:48"}]}]},"evmVersion":"prague","externalReferences":[{"declaration":13503,"isOffset":false,"isSlot":true,"src":"2552:6:48","suffix":"slot","valueSize":1},{"declaration":13499,"isOffset":false,"isSlot":false,"src":"2562:4:48","valueSize":1}],"flags":["memory-safe"],"id":13505,"nodeType":"InlineAssembly","src":"2513:63:48"}]},"documentation":{"id":13497,"nodeType":"StructuredDocumentation","src":"2328:86:48","text":" @dev Returns a `Bytes32Slot` with member `value` located at `slot`."},"implemented":true,"kind":"function","modifiers":[],"name":"getBytes32Slot","nameLocation":"2428:14:48","parameters":{"id":13500,"nodeType":"ParameterList","parameters":[{"constant":false,"id":13499,"mutability":"mutable","name":"slot","nameLocation":"2451:4:48","nodeType":"VariableDeclaration","scope":13507,"src":"2443:12:48","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":13498,"name":"bytes32","nodeType":"ElementaryTypeName","src":"2443:7:48","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"visibility":"internal"}],"src":"2442:14:48"},"returnParameters":{"id":13504,"nodeType":"ParameterList","parameters":[{"constant":false,"id":13503,"mutability":"mutable","name":"r","nameLocation":"2500:1:48","nodeType":"VariableDeclaration","scope":13507,"src":"2480:21:48","stateVariable":false,"storageLocation":"storage","typeDescriptions":{"typeIdentifier":"t_struct$_Bytes32Slot_$13462_storage_ptr","typeString":"struct StorageSlot.Bytes32Slot"},"typeName":{"id":13502,"nodeType":"UserDefinedTypeName","pathNode":{"id":13501,"name":"Bytes32Slot","nameLocations":["2480:11:48"],"nodeType":"IdentifierPath","referencedDeclaration":13462,"src":"2480:11:48"},"referencedDeclaration":13462,"src":"2480:11:48","typeDescriptions":{"typeIdentifier":"t_struct$_Bytes32Slot_$13462_storage_ptr","typeString":"struct StorageSlot.Bytes32Slot"}},"visibility":"internal"}],"src":"2479:23:48"},"scope":13574,"stateMutability":"pure","virtual":false,"visibility":"internal"},{"id":13518,"nodeType":"FunctionDefinition","src":"2679:163:48","nodes":[],"body":{"id":13517,"nodeType":"Block","src":"2763:79:48","nodes":[],"statements":[{"AST":{"nativeSrc":"2798:38:48","nodeType":"YulBlock","src":"2798:38:48","statements":[{"nativeSrc":"2812:14:48","nodeType":"YulAssignment","src":"2812:14:48","value":{"name":"slot","nativeSrc":"2822:4:48","nodeType":"YulIdentifier","src":"2822:4:48"},"variableNames":[{"name":"r.slot","nativeSrc":"2812:6:48","nodeType":"YulIdentifier","src":"2812:6:48"}]}]},"evmVersion":"prague","externalReferences":[{"declaration":13514,"isOffset":false,"isSlot":true,"src":"2812:6:48","suffix":"slot","valueSize":1},{"declaration":13510,"isOffset":false,"isSlot":false,"src":"2822:4:48","valueSize":1}],"flags":["memory-safe"],"id":13516,"nodeType":"InlineAssembly","src":"2773:63:48"}]},"documentation":{"id":13508,"nodeType":"StructuredDocumentation","src":"2588:86:48","text":" @dev Returns a `Uint256Slot` with member `value` located at `slot`."},"implemented":true,"kind":"function","modifiers":[],"name":"getUint256Slot","nameLocation":"2688:14:48","parameters":{"id":13511,"nodeType":"ParameterList","parameters":[{"constant":false,"id":13510,"mutability":"mutable","name":"slot","nameLocation":"2711:4:48","nodeType":"VariableDeclaration","scope":13518,"src":"2703:12:48","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":13509,"name":"bytes32","nodeType":"ElementaryTypeName","src":"2703:7:48","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"visibility":"internal"}],"src":"2702:14:48"},"returnParameters":{"id":13515,"nodeType":"ParameterList","parameters":[{"constant":false,"id":13514,"mutability":"mutable","name":"r","nameLocation":"2760:1:48","nodeType":"VariableDeclaration","scope":13518,"src":"2740:21:48","stateVariable":false,"storageLocation":"storage","typeDescriptions":{"typeIdentifier":"t_struct$_Uint256Slot_$13465_storage_ptr","typeString":"struct StorageSlot.Uint256Slot"},"typeName":{"id":13513,"nodeType":"UserDefinedTypeName","pathNode":{"id":13512,"name":"Uint256Slot","nameLocations":["2740:11:48"],"nodeType":"IdentifierPath","referencedDeclaration":13465,"src":"2740:11:48"},"referencedDeclaration":13465,"src":"2740:11:48","typeDescriptions":{"typeIdentifier":"t_struct$_Uint256Slot_$13465_storage_ptr","typeString":"struct StorageSlot.Uint256Slot"}},"visibility":"internal"}],"src":"2739:23:48"},"scope":13574,"stateMutability":"pure","virtual":false,"visibility":"internal"},{"id":13529,"nodeType":"FunctionDefinition","src":"2938:161:48","nodes":[],"body":{"id":13528,"nodeType":"Block","src":"3020:79:48","nodes":[],"statements":[{"AST":{"nativeSrc":"3055:38:48","nodeType":"YulBlock","src":"3055:38:48","statements":[{"nativeSrc":"3069:14:48","nodeType":"YulAssignment","src":"3069:14:48","value":{"name":"slot","nativeSrc":"3079:4:48","nodeType":"YulIdentifier","src":"3079:4:48"},"variableNames":[{"name":"r.slot","nativeSrc":"3069:6:48","nodeType":"YulIdentifier","src":"3069:6:48"}]}]},"evmVersion":"prague","externalReferences":[{"declaration":13525,"isOffset":false,"isSlot":true,"src":"3069:6:48","suffix":"slot","valueSize":1},{"declaration":13521,"isOffset":false,"isSlot":false,"src":"3079:4:48","valueSize":1}],"flags":["memory-safe"],"id":13527,"nodeType":"InlineAssembly","src":"3030:63:48"}]},"documentation":{"id":13519,"nodeType":"StructuredDocumentation","src":"2848:85:48","text":" @dev Returns a `Int256Slot` with member `value` located at `slot`."},"implemented":true,"kind":"function","modifiers":[],"name":"getInt256Slot","nameLocation":"2947:13:48","parameters":{"id":13522,"nodeType":"ParameterList","parameters":[{"constant":false,"id":13521,"mutability":"mutable","name":"slot","nameLocation":"2969:4:48","nodeType":"VariableDeclaration","scope":13529,"src":"2961:12:48","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":13520,"name":"bytes32","nodeType":"ElementaryTypeName","src":"2961:7:48","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"visibility":"internal"}],"src":"2960:14:48"},"returnParameters":{"id":13526,"nodeType":"ParameterList","parameters":[{"constant":false,"id":13525,"mutability":"mutable","name":"r","nameLocation":"3017:1:48","nodeType":"VariableDeclaration","scope":13529,"src":"2998:20:48","stateVariable":false,"storageLocation":"storage","typeDescriptions":{"typeIdentifier":"t_struct$_Int256Slot_$13468_storage_ptr","typeString":"struct StorageSlot.Int256Slot"},"typeName":{"id":13524,"nodeType":"UserDefinedTypeName","pathNode":{"id":13523,"name":"Int256Slot","nameLocations":["2998:10:48"],"nodeType":"IdentifierPath","referencedDeclaration":13468,"src":"2998:10:48"},"referencedDeclaration":13468,"src":"2998:10:48","typeDescriptions":{"typeIdentifier":"t_struct$_Int256Slot_$13468_storage_ptr","typeString":"struct StorageSlot.Int256Slot"}},"visibility":"internal"}],"src":"2997:22:48"},"scope":13574,"stateMutability":"pure","virtual":false,"visibility":"internal"},{"id":13540,"nodeType":"FunctionDefinition","src":"3195:161:48","nodes":[],"body":{"id":13539,"nodeType":"Block","src":"3277:79:48","nodes":[],"statements":[{"AST":{"nativeSrc":"3312:38:48","nodeType":"YulBlock","src":"3312:38:48","statements":[{"nativeSrc":"3326:14:48","nodeType":"YulAssignment","src":"3326:14:48","value":{"name":"slot","nativeSrc":"3336:4:48","nodeType":"YulIdentifier","src":"3336:4:48"},"variableNames":[{"name":"r.slot","nativeSrc":"3326:6:48","nodeType":"YulIdentifier","src":"3326:6:48"}]}]},"evmVersion":"prague","externalReferences":[{"declaration":13536,"isOffset":false,"isSlot":true,"src":"3326:6:48","suffix":"slot","valueSize":1},{"declaration":13532,"isOffset":false,"isSlot":false,"src":"3336:4:48","valueSize":1}],"flags":["memory-safe"],"id":13538,"nodeType":"InlineAssembly","src":"3287:63:48"}]},"documentation":{"id":13530,"nodeType":"StructuredDocumentation","src":"3105:85:48","text":" @dev Returns a `StringSlot` with member `value` located at `slot`."},"implemented":true,"kind":"function","modifiers":[],"name":"getStringSlot","nameLocation":"3204:13:48","parameters":{"id":13533,"nodeType":"ParameterList","parameters":[{"constant":false,"id":13532,"mutability":"mutable","name":"slot","nameLocation":"3226:4:48","nodeType":"VariableDeclaration","scope":13540,"src":"3218:12:48","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":13531,"name":"bytes32","nodeType":"ElementaryTypeName","src":"3218:7:48","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"visibility":"internal"}],"src":"3217:14:48"},"returnParameters":{"id":13537,"nodeType":"ParameterList","parameters":[{"constant":false,"id":13536,"mutability":"mutable","name":"r","nameLocation":"3274:1:48","nodeType":"VariableDeclaration","scope":13540,"src":"3255:20:48","stateVariable":false,"storageLocation":"storage","typeDescriptions":{"typeIdentifier":"t_struct$_StringSlot_$13471_storage_ptr","typeString":"struct StorageSlot.StringSlot"},"typeName":{"id":13535,"nodeType":"UserDefinedTypeName","pathNode":{"id":13534,"name":"StringSlot","nameLocations":["3255:10:48"],"nodeType":"IdentifierPath","referencedDeclaration":13471,"src":"3255:10:48"},"referencedDeclaration":13471,"src":"3255:10:48","typeDescriptions":{"typeIdentifier":"t_struct$_StringSlot_$13471_storage_ptr","typeString":"struct StorageSlot.StringSlot"}},"visibility":"internal"}],"src":"3254:22:48"},"scope":13574,"stateMutability":"pure","virtual":false,"visibility":"internal"},{"id":13551,"nodeType":"FunctionDefinition","src":"3468:175:48","nodes":[],"body":{"id":13550,"nodeType":"Block","src":"3558:85:48","nodes":[],"statements":[{"AST":{"nativeSrc":"3593:44:48","nodeType":"YulBlock","src":"3593:44:48","statements":[{"nativeSrc":"3607:20:48","nodeType":"YulAssignment","src":"3607:20:48","value":{"name":"store.slot","nativeSrc":"3617:10:48","nodeType":"YulIdentifier","src":"3617:10:48"},"variableNames":[{"name":"r.slot","nativeSrc":"3607:6:48","nodeType":"YulIdentifier","src":"3607:6:48"}]}]},"evmVersion":"prague","externalReferences":[{"declaration":13547,"isOffset":false,"isSlot":true,"src":"3607:6:48","suffix":"slot","valueSize":1},{"declaration":13543,"isOffset":false,"isSlot":true,"src":"3617:10:48","suffix":"slot","valueSize":1}],"flags":["memory-safe"],"id":13549,"nodeType":"InlineAssembly","src":"3568:69:48"}]},"documentation":{"id":13541,"nodeType":"StructuredDocumentation","src":"3362:101:48","text":" @dev Returns an `StringSlot` representation of the string storage pointer `store`."},"implemented":true,"kind":"function","modifiers":[],"name":"getStringSlot","nameLocation":"3477:13:48","parameters":{"id":13544,"nodeType":"ParameterList","parameters":[{"constant":false,"id":13543,"mutability":"mutable","name":"store","nameLocation":"3506:5:48","nodeType":"VariableDeclaration","scope":13551,"src":"3491:20:48","stateVariable":false,"storageLocation":"storage","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"},"typeName":{"id":13542,"name":"string","nodeType":"ElementaryTypeName","src":"3491:6:48","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"visibility":"internal"}],"src":"3490:22:48"},"returnParameters":{"id":13548,"nodeType":"ParameterList","parameters":[{"constant":false,"id":13547,"mutability":"mutable","name":"r","nameLocation":"3555:1:48","nodeType":"VariableDeclaration","scope":13551,"src":"3536:20:48","stateVariable":false,"storageLocation":"storage","typeDescriptions":{"typeIdentifier":"t_struct$_StringSlot_$13471_storage_ptr","typeString":"struct StorageSlot.StringSlot"},"typeName":{"id":13546,"nodeType":"UserDefinedTypeName","pathNode":{"id":13545,"name":"StringSlot","nameLocations":["3536:10:48"],"nodeType":"IdentifierPath","referencedDeclaration":13471,"src":"3536:10:48"},"referencedDeclaration":13471,"src":"3536:10:48","typeDescriptions":{"typeIdentifier":"t_struct$_StringSlot_$13471_storage_ptr","typeString":"struct StorageSlot.StringSlot"}},"visibility":"internal"}],"src":"3535:22:48"},"scope":13574,"stateMutability":"pure","virtual":false,"visibility":"internal"},{"id":13562,"nodeType":"FunctionDefinition","src":"3738:159:48","nodes":[],"body":{"id":13561,"nodeType":"Block","src":"3818:79:48","nodes":[],"statements":[{"AST":{"nativeSrc":"3853:38:48","nodeType":"YulBlock","src":"3853:38:48","statements":[{"nativeSrc":"3867:14:48","nodeType":"YulAssignment","src":"3867:14:48","value":{"name":"slot","nativeSrc":"3877:4:48","nodeType":"YulIdentifier","src":"3877:4:48"},"variableNames":[{"name":"r.slot","nativeSrc":"3867:6:48","nodeType":"YulIdentifier","src":"3867:6:48"}]}]},"evmVersion":"prague","externalReferences":[{"declaration":13558,"isOffset":false,"isSlot":true,"src":"3867:6:48","suffix":"slot","valueSize":1},{"declaration":13554,"isOffset":false,"isSlot":false,"src":"3877:4:48","valueSize":1}],"flags":["memory-safe"],"id":13560,"nodeType":"InlineAssembly","src":"3828:63:48"}]},"documentation":{"id":13552,"nodeType":"StructuredDocumentation","src":"3649:84:48","text":" @dev Returns a `BytesSlot` with member `value` located at `slot`."},"implemented":true,"kind":"function","modifiers":[],"name":"getBytesSlot","nameLocation":"3747:12:48","parameters":{"id":13555,"nodeType":"ParameterList","parameters":[{"constant":false,"id":13554,"mutability":"mutable","name":"slot","nameLocation":"3768:4:48","nodeType":"VariableDeclaration","scope":13562,"src":"3760:12:48","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":13553,"name":"bytes32","nodeType":"ElementaryTypeName","src":"3760:7:48","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"visibility":"internal"}],"src":"3759:14:48"},"returnParameters":{"id":13559,"nodeType":"ParameterList","parameters":[{"constant":false,"id":13558,"mutability":"mutable","name":"r","nameLocation":"3815:1:48","nodeType":"VariableDeclaration","scope":13562,"src":"3797:19:48","stateVariable":false,"storageLocation":"storage","typeDescriptions":{"typeIdentifier":"t_struct$_BytesSlot_$13474_storage_ptr","typeString":"struct StorageSlot.BytesSlot"},"typeName":{"id":13557,"nodeType":"UserDefinedTypeName","pathNode":{"id":13556,"name":"BytesSlot","nameLocations":["3797:9:48"],"nodeType":"IdentifierPath","referencedDeclaration":13474,"src":"3797:9:48"},"referencedDeclaration":13474,"src":"3797:9:48","typeDescriptions":{"typeIdentifier":"t_struct$_BytesSlot_$13474_storage_ptr","typeString":"struct StorageSlot.BytesSlot"}},"visibility":"internal"}],"src":"3796:21:48"},"scope":13574,"stateMutability":"pure","virtual":false,"visibility":"internal"},{"id":13573,"nodeType":"FunctionDefinition","src":"4007:172:48","nodes":[],"body":{"id":13572,"nodeType":"Block","src":"4094:85:48","nodes":[],"statements":[{"AST":{"nativeSrc":"4129:44:48","nodeType":"YulBlock","src":"4129:44:48","statements":[{"nativeSrc":"4143:20:48","nodeType":"YulAssignment","src":"4143:20:48","value":{"name":"store.slot","nativeSrc":"4153:10:48","nodeType":"YulIdentifier","src":"4153:10:48"},"variableNames":[{"name":"r.slot","nativeSrc":"4143:6:48","nodeType":"YulIdentifier","src":"4143:6:48"}]}]},"evmVersion":"prague","externalReferences":[{"declaration":13569,"isOffset":false,"isSlot":true,"src":"4143:6:48","suffix":"slot","valueSize":1},{"declaration":13565,"isOffset":false,"isSlot":true,"src":"4153:10:48","suffix":"slot","valueSize":1}],"flags":["memory-safe"],"id":13571,"nodeType":"InlineAssembly","src":"4104:69:48"}]},"documentation":{"id":13563,"nodeType":"StructuredDocumentation","src":"3903:99:48","text":" @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`."},"implemented":true,"kind":"function","modifiers":[],"name":"getBytesSlot","nameLocation":"4016:12:48","parameters":{"id":13566,"nodeType":"ParameterList","parameters":[{"constant":false,"id":13565,"mutability":"mutable","name":"store","nameLocation":"4043:5:48","nodeType":"VariableDeclaration","scope":13573,"src":"4029:19:48","stateVariable":false,"storageLocation":"storage","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"},"typeName":{"id":13564,"name":"bytes","nodeType":"ElementaryTypeName","src":"4029:5:48","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"visibility":"internal"}],"src":"4028:21:48"},"returnParameters":{"id":13570,"nodeType":"ParameterList","parameters":[{"constant":false,"id":13569,"mutability":"mutable","name":"r","nameLocation":"4091:1:48","nodeType":"VariableDeclaration","scope":13573,"src":"4073:19:48","stateVariable":false,"storageLocation":"storage","typeDescriptions":{"typeIdentifier":"t_struct$_BytesSlot_$13474_storage_ptr","typeString":"struct StorageSlot.BytesSlot"},"typeName":{"id":13568,"nodeType":"UserDefinedTypeName","pathNode":{"id":13567,"name":"BytesSlot","nameLocations":["4073:9:48"],"nodeType":"IdentifierPath","referencedDeclaration":13474,"src":"4073:9:48"},"referencedDeclaration":13474,"src":"4073:9:48","typeDescriptions":{"typeIdentifier":"t_struct$_BytesSlot_$13474_storage_ptr","typeString":"struct StorageSlot.BytesSlot"}},"visibility":"internal"}],"src":"4072:21:48"},"scope":13574,"stateMutability":"pure","virtual":false,"visibility":"internal"}],"abstract":false,"baseContracts":[],"canonicalName":"StorageSlot","contractDependencies":[],"contractKind":"library","documentation":{"id":13453,"nodeType":"StructuredDocumentation","src":"219:1187:48","text":" @dev Library for reading and writing primitive types to specific storage slots.\n Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n This library helps with reading and writing to such slots without the need for inline assembly.\n The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n Example usage to set ERC-1967 implementation slot:\n ```solidity\n contract ERC1967 {\n // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n function _getImplementation() internal view returns (address) {\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n }\n function _setImplementation(address newImplementation) internal {\n require(newImplementation.code.length > 0);\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n }\n }\n ```\n TIP: Consider using this library along with {SlotDerivation}."},"fullyImplemented":true,"linearizedBaseContracts":[13574],"name":"StorageSlot","nameLocation":"1415:11:48","scope":13575,"usedErrors":[],"usedEvents":[]}],"license":"MIT"},"id":48} |