@tokamak-network/thanos-contracts
Version:
1 lines • 33.2 kB
JSON
{"abi":[],"bytecode":{"object":"0x602d6037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea164736f6c634300080f000a","sourceMap":"1247:2685:261:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;1247:2685:261;;;;;;;;;;;;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x73000000000000000000000000000000000000000030146080604052600080fdfea164736f6c634300080f000a","sourceMap":"1247:2685:261:-:0;;;;;;;;","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.15+commit.e14f2714\"},\"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 ERC1967 implementation slot: ```solidity contract ERC1967 { 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; } } ```\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/tokamak-contracts/USDC/L1/libraries/StorageSlot.sol\":\"StorageSlot\"},\"evmVersion\":\"london\",\"libraries\":{\"src/tokamak-contracts/USDC/L2/tokamak-USDC/v2/FiatTokenV2_2.sol:SignatureChecker\":\"0x4200000000000000000000000000000000000776\"},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[\":@lib-keccak/=lib/lib-keccak/contracts/lib/\",\":@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/\",\":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/\",\":@openzeppelin/contracts_v3.1.0/=lib/openzeppelin-contracts_v3.1.0/contracts/\",\":@openzeppelin/contracts_v5.0.1/=lib/openzeppelin-contracts_v5.0.1/contracts/\",\":@rari-capital/solmate/=lib/solmate/\",\":@solady-test/=lib/lib-keccak/lib/solady/test/\",\":@solady/=lib/solady/src/\",\":automate/=lib/automate/contracts/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/openzeppelin-contracts_v5.0.1/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":gelato/=lib/automate/contracts/\",\":hardhat/=lib/automate/node_modules/hardhat/\",\":kontrol-cheatcodes/=lib/kontrol-cheatcodes/src/\",\":lib-keccak/=lib/lib-keccak/contracts/\",\":openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin-contracts_v3.1.0/=lib/openzeppelin-contracts_v3.1.0/contracts/\",\":openzeppelin-contracts_v5.0.1/=lib/openzeppelin-contracts_v5.0.1/\",\":prb-test/=lib/automate/lib/prb-test/src/\",\":prb/-est/=lib/automate/lib/prb-test/src/\",\":safe-contracts/=lib/safe-contracts/contracts/\",\":solady/=lib/solady/\",\":solmate/=lib/solmate/src/\"]},\"sources\":{\"src/tokamak-contracts/USDC/L1/libraries/StorageSlot.sol\":{\"keccak256\":\"0x787e1146303d8c96198e87b7af989cbebd915244bee4020d9f159de952e98b4f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://49f31c7732b2b886b9b6718745627936007aa23e8d6d309c316f8a60b936131a\",\"dweb:/ipfs/QmXVu5oFjH7eTM4oKrsiHAW5BrEk5d86RvZ2xMWBZvdw4G\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.15+commit.e14f2714"},"language":"Solidity","output":{"abi":[],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["@lib-keccak/=lib/lib-keccak/contracts/lib/","@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/","@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/","@openzeppelin/contracts_v3.1.0/=lib/openzeppelin-contracts_v3.1.0/contracts/","@openzeppelin/contracts_v5.0.1/=lib/openzeppelin-contracts_v5.0.1/contracts/","@rari-capital/solmate/=lib/solmate/","@solady-test/=lib/lib-keccak/lib/solady/test/","@solady/=lib/solady/src/","automate/=lib/automate/contracts/","ds-test/=lib/forge-std/lib/ds-test/src/","erc4626-tests/=lib/openzeppelin-contracts_v5.0.1/lib/erc4626-tests/","forge-std/=lib/forge-std/src/","gelato/=lib/automate/contracts/","hardhat/=lib/automate/node_modules/hardhat/","kontrol-cheatcodes/=lib/kontrol-cheatcodes/src/","lib-keccak/=lib/lib-keccak/contracts/","openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/","openzeppelin-contracts/=lib/openzeppelin-contracts/","openzeppelin-contracts_v3.1.0/=lib/openzeppelin-contracts_v3.1.0/contracts/","openzeppelin-contracts_v5.0.1/=lib/openzeppelin-contracts_v5.0.1/","prb-test/=lib/automate/lib/prb-test/src/","prb/-est/=lib/automate/lib/prb-test/src/","safe-contracts/=lib/safe-contracts/contracts/","solady/=lib/solady/","solmate/=lib/solmate/src/"],"optimizer":{"enabled":true,"runs":999999},"metadata":{"bytecodeHash":"none"},"compilationTarget":{"src/tokamak-contracts/USDC/L1/libraries/StorageSlot.sol":"StorageSlot"},"evmVersion":"london","libraries":{"src/tokamak-contracts/USDC/L2/tokamak-USDC/v2/FiatTokenV2_2.sol:SignatureChecker":"0x4200000000000000000000000000000000000776"}},"sources":{"src/tokamak-contracts/USDC/L1/libraries/StorageSlot.sol":{"keccak256":"0x787e1146303d8c96198e87b7af989cbebd915244bee4020d9f159de952e98b4f","urls":["bzz-raw://49f31c7732b2b886b9b6718745627936007aa23e8d6d309c316f8a60b936131a","dweb:/ipfs/QmXVu5oFjH7eTM4oKrsiHAW5BrEk5d86RvZ2xMWBZvdw4G"],"license":"MIT"}},"version":1},"storageLayout":{"storage":[],"types":{}},"userdoc":{"version":1,"kind":"user"},"devdoc":{"version":1,"kind":"dev","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 ERC1967 implementation slot: ```solidity contract ERC1967 { 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; } } ```"},"ast":{"absolutePath":"src/tokamak-contracts/USDC/L1/libraries/StorageSlot.sol","id":120349,"exportedSymbols":{"StorageSlot":[120348]},"nodeType":"SourceUnit","src":"193:3740:261","nodes":[{"id":120240,"nodeType":"PragmaDirective","src":"193:23:261","nodes":[],"literals":["solidity","^","0.8",".0"]},{"id":120348,"nodeType":"ContractDefinition","src":"1247:2685:261","nodes":[{"id":120244,"nodeType":"StructDefinition","src":"1273:49:261","nodes":[],"canonicalName":"StorageSlot.AddressSlot","members":[{"constant":false,"id":120243,"mutability":"mutable","name":"value","nameLocation":"1310:5:261","nodeType":"VariableDeclaration","scope":120244,"src":"1302:13:261","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":120242,"name":"address","nodeType":"ElementaryTypeName","src":"1302:7:261","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"name":"AddressSlot","nameLocation":"1280:11:261","scope":120348,"visibility":"public"},{"id":120247,"nodeType":"StructDefinition","src":"1328:46:261","nodes":[],"canonicalName":"StorageSlot.BooleanSlot","members":[{"constant":false,"id":120246,"mutability":"mutable","name":"value","nameLocation":"1362:5:261","nodeType":"VariableDeclaration","scope":120247,"src":"1357:10:261","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":120245,"name":"bool","nodeType":"ElementaryTypeName","src":"1357:4:261","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"internal"}],"name":"BooleanSlot","nameLocation":"1335:11:261","scope":120348,"visibility":"public"},{"id":120250,"nodeType":"StructDefinition","src":"1380:49:261","nodes":[],"canonicalName":"StorageSlot.Bytes32Slot","members":[{"constant":false,"id":120249,"mutability":"mutable","name":"value","nameLocation":"1417:5:261","nodeType":"VariableDeclaration","scope":120250,"src":"1409:13:261","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":120248,"name":"bytes32","nodeType":"ElementaryTypeName","src":"1409:7:261","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"visibility":"internal"}],"name":"Bytes32Slot","nameLocation":"1387:11:261","scope":120348,"visibility":"public"},{"id":120253,"nodeType":"StructDefinition","src":"1435:49:261","nodes":[],"canonicalName":"StorageSlot.Uint256Slot","members":[{"constant":false,"id":120252,"mutability":"mutable","name":"value","nameLocation":"1472:5:261","nodeType":"VariableDeclaration","scope":120253,"src":"1464:13:261","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":120251,"name":"uint256","nodeType":"ElementaryTypeName","src":"1464:7:261","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"name":"Uint256Slot","nameLocation":"1442:11:261","scope":120348,"visibility":"public"},{"id":120256,"nodeType":"StructDefinition","src":"1490:47:261","nodes":[],"canonicalName":"StorageSlot.StringSlot","members":[{"constant":false,"id":120255,"mutability":"mutable","name":"value","nameLocation":"1525:5:261","nodeType":"VariableDeclaration","scope":120256,"src":"1518:12:261","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"},"typeName":{"id":120254,"name":"string","nodeType":"ElementaryTypeName","src":"1518:6:261","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"visibility":"internal"}],"name":"StringSlot","nameLocation":"1497:10:261","scope":120348,"visibility":"public"},{"id":120259,"nodeType":"StructDefinition","src":"1543:45:261","nodes":[],"canonicalName":"StorageSlot.BytesSlot","members":[{"constant":false,"id":120258,"mutability":"mutable","name":"value","nameLocation":"1576:5:261","nodeType":"VariableDeclaration","scope":120259,"src":"1570:11:261","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"},"typeName":{"id":120257,"name":"bytes","nodeType":"ElementaryTypeName","src":"1570:5:261","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"visibility":"internal"}],"name":"BytesSlot","nameLocation":"1550:9:261","scope":120348,"visibility":"public"},{"id":120270,"nodeType":"FunctionDefinition","src":"1686:190:261","nodes":[],"body":{"id":120269,"nodeType":"Block","src":"1770:106:261","nodes":[],"statements":[{"AST":{"nodeType":"YulBlock","src":"1832:38:261","statements":[{"nodeType":"YulAssignment","src":"1846:14:261","value":{"name":"slot","nodeType":"YulIdentifier","src":"1856:4:261"},"variableNames":[{"name":"r.slot","nodeType":"YulIdentifier","src":"1846:6:261"}]}]},"documentation":"@solidity memory-safe-assembly","evmVersion":"london","externalReferences":[{"declaration":120266,"isOffset":false,"isSlot":true,"src":"1846:6:261","suffix":"slot","valueSize":1},{"declaration":120262,"isOffset":false,"isSlot":false,"src":"1856:4:261","valueSize":1}],"id":120268,"nodeType":"InlineAssembly","src":"1823:47:261"}]},"documentation":{"id":120260,"nodeType":"StructuredDocumentation","src":"1594:87:261","text":" @dev Returns an `AddressSlot` with member `value` located at `slot`."},"implemented":true,"kind":"function","modifiers":[],"name":"getAddressSlot","nameLocation":"1695:14:261","parameters":{"id":120263,"nodeType":"ParameterList","parameters":[{"constant":false,"id":120262,"mutability":"mutable","name":"slot","nameLocation":"1718:4:261","nodeType":"VariableDeclaration","scope":120270,"src":"1710:12:261","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":120261,"name":"bytes32","nodeType":"ElementaryTypeName","src":"1710:7:261","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"visibility":"internal"}],"src":"1709:14:261"},"returnParameters":{"id":120267,"nodeType":"ParameterList","parameters":[{"constant":false,"id":120266,"mutability":"mutable","name":"r","nameLocation":"1767:1:261","nodeType":"VariableDeclaration","scope":120270,"src":"1747:21:261","stateVariable":false,"storageLocation":"storage","typeDescriptions":{"typeIdentifier":"t_struct$_AddressSlot_$120244_storage_ptr","typeString":"struct StorageSlot.AddressSlot"},"typeName":{"id":120265,"nodeType":"UserDefinedTypeName","pathNode":{"id":120264,"name":"AddressSlot","nodeType":"IdentifierPath","referencedDeclaration":120244,"src":"1747:11:261"},"referencedDeclaration":120244,"src":"1747:11:261","typeDescriptions":{"typeIdentifier":"t_struct$_AddressSlot_$120244_storage_ptr","typeString":"struct StorageSlot.AddressSlot"}},"visibility":"internal"}],"src":"1746:23:261"},"scope":120348,"stateMutability":"pure","virtual":false,"visibility":"internal"},{"id":120281,"nodeType":"FunctionDefinition","src":"1974:190:261","nodes":[],"body":{"id":120280,"nodeType":"Block","src":"2058:106:261","nodes":[],"statements":[{"AST":{"nodeType":"YulBlock","src":"2120:38:261","statements":[{"nodeType":"YulAssignment","src":"2134:14:261","value":{"name":"slot","nodeType":"YulIdentifier","src":"2144:4:261"},"variableNames":[{"name":"r.slot","nodeType":"YulIdentifier","src":"2134:6:261"}]}]},"documentation":"@solidity memory-safe-assembly","evmVersion":"london","externalReferences":[{"declaration":120277,"isOffset":false,"isSlot":true,"src":"2134:6:261","suffix":"slot","valueSize":1},{"declaration":120273,"isOffset":false,"isSlot":false,"src":"2144:4:261","valueSize":1}],"id":120279,"nodeType":"InlineAssembly","src":"2111:47:261"}]},"documentation":{"id":120271,"nodeType":"StructuredDocumentation","src":"1882:87:261","text":" @dev Returns an `BooleanSlot` with member `value` located at `slot`."},"implemented":true,"kind":"function","modifiers":[],"name":"getBooleanSlot","nameLocation":"1983:14:261","parameters":{"id":120274,"nodeType":"ParameterList","parameters":[{"constant":false,"id":120273,"mutability":"mutable","name":"slot","nameLocation":"2006:4:261","nodeType":"VariableDeclaration","scope":120281,"src":"1998:12:261","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":120272,"name":"bytes32","nodeType":"ElementaryTypeName","src":"1998:7:261","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"visibility":"internal"}],"src":"1997:14:261"},"returnParameters":{"id":120278,"nodeType":"ParameterList","parameters":[{"constant":false,"id":120277,"mutability":"mutable","name":"r","nameLocation":"2055:1:261","nodeType":"VariableDeclaration","scope":120281,"src":"2035:21:261","stateVariable":false,"storageLocation":"storage","typeDescriptions":{"typeIdentifier":"t_struct$_BooleanSlot_$120247_storage_ptr","typeString":"struct StorageSlot.BooleanSlot"},"typeName":{"id":120276,"nodeType":"UserDefinedTypeName","pathNode":{"id":120275,"name":"BooleanSlot","nodeType":"IdentifierPath","referencedDeclaration":120247,"src":"2035:11:261"},"referencedDeclaration":120247,"src":"2035:11:261","typeDescriptions":{"typeIdentifier":"t_struct$_BooleanSlot_$120247_storage_ptr","typeString":"struct StorageSlot.BooleanSlot"}},"visibility":"internal"}],"src":"2034:23:261"},"scope":120348,"stateMutability":"pure","virtual":false,"visibility":"internal"},{"id":120292,"nodeType":"FunctionDefinition","src":"2262:190:261","nodes":[],"body":{"id":120291,"nodeType":"Block","src":"2346:106:261","nodes":[],"statements":[{"AST":{"nodeType":"YulBlock","src":"2408:38:261","statements":[{"nodeType":"YulAssignment","src":"2422:14:261","value":{"name":"slot","nodeType":"YulIdentifier","src":"2432:4:261"},"variableNames":[{"name":"r.slot","nodeType":"YulIdentifier","src":"2422:6:261"}]}]},"documentation":"@solidity memory-safe-assembly","evmVersion":"london","externalReferences":[{"declaration":120288,"isOffset":false,"isSlot":true,"src":"2422:6:261","suffix":"slot","valueSize":1},{"declaration":120284,"isOffset":false,"isSlot":false,"src":"2432:4:261","valueSize":1}],"id":120290,"nodeType":"InlineAssembly","src":"2399:47:261"}]},"documentation":{"id":120282,"nodeType":"StructuredDocumentation","src":"2170:87:261","text":" @dev Returns an `Bytes32Slot` with member `value` located at `slot`."},"implemented":true,"kind":"function","modifiers":[],"name":"getBytes32Slot","nameLocation":"2271:14:261","parameters":{"id":120285,"nodeType":"ParameterList","parameters":[{"constant":false,"id":120284,"mutability":"mutable","name":"slot","nameLocation":"2294:4:261","nodeType":"VariableDeclaration","scope":120292,"src":"2286:12:261","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":120283,"name":"bytes32","nodeType":"ElementaryTypeName","src":"2286:7:261","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"visibility":"internal"}],"src":"2285:14:261"},"returnParameters":{"id":120289,"nodeType":"ParameterList","parameters":[{"constant":false,"id":120288,"mutability":"mutable","name":"r","nameLocation":"2343:1:261","nodeType":"VariableDeclaration","scope":120292,"src":"2323:21:261","stateVariable":false,"storageLocation":"storage","typeDescriptions":{"typeIdentifier":"t_struct$_Bytes32Slot_$120250_storage_ptr","typeString":"struct StorageSlot.Bytes32Slot"},"typeName":{"id":120287,"nodeType":"UserDefinedTypeName","pathNode":{"id":120286,"name":"Bytes32Slot","nodeType":"IdentifierPath","referencedDeclaration":120250,"src":"2323:11:261"},"referencedDeclaration":120250,"src":"2323:11:261","typeDescriptions":{"typeIdentifier":"t_struct$_Bytes32Slot_$120250_storage_ptr","typeString":"struct StorageSlot.Bytes32Slot"}},"visibility":"internal"}],"src":"2322:23:261"},"scope":120348,"stateMutability":"pure","virtual":false,"visibility":"internal"},{"id":120303,"nodeType":"FunctionDefinition","src":"2550:190:261","nodes":[],"body":{"id":120302,"nodeType":"Block","src":"2634:106:261","nodes":[],"statements":[{"AST":{"nodeType":"YulBlock","src":"2696:38:261","statements":[{"nodeType":"YulAssignment","src":"2710:14:261","value":{"name":"slot","nodeType":"YulIdentifier","src":"2720:4:261"},"variableNames":[{"name":"r.slot","nodeType":"YulIdentifier","src":"2710:6:261"}]}]},"documentation":"@solidity memory-safe-assembly","evmVersion":"london","externalReferences":[{"declaration":120299,"isOffset":false,"isSlot":true,"src":"2710:6:261","suffix":"slot","valueSize":1},{"declaration":120295,"isOffset":false,"isSlot":false,"src":"2720:4:261","valueSize":1}],"id":120301,"nodeType":"InlineAssembly","src":"2687:47:261"}]},"documentation":{"id":120293,"nodeType":"StructuredDocumentation","src":"2458:87:261","text":" @dev Returns an `Uint256Slot` with member `value` located at `slot`."},"implemented":true,"kind":"function","modifiers":[],"name":"getUint256Slot","nameLocation":"2559:14:261","parameters":{"id":120296,"nodeType":"ParameterList","parameters":[{"constant":false,"id":120295,"mutability":"mutable","name":"slot","nameLocation":"2582:4:261","nodeType":"VariableDeclaration","scope":120303,"src":"2574:12:261","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":120294,"name":"bytes32","nodeType":"ElementaryTypeName","src":"2574:7:261","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"visibility":"internal"}],"src":"2573:14:261"},"returnParameters":{"id":120300,"nodeType":"ParameterList","parameters":[{"constant":false,"id":120299,"mutability":"mutable","name":"r","nameLocation":"2631:1:261","nodeType":"VariableDeclaration","scope":120303,"src":"2611:21:261","stateVariable":false,"storageLocation":"storage","typeDescriptions":{"typeIdentifier":"t_struct$_Uint256Slot_$120253_storage_ptr","typeString":"struct StorageSlot.Uint256Slot"},"typeName":{"id":120298,"nodeType":"UserDefinedTypeName","pathNode":{"id":120297,"name":"Uint256Slot","nodeType":"IdentifierPath","referencedDeclaration":120253,"src":"2611:11:261"},"referencedDeclaration":120253,"src":"2611:11:261","typeDescriptions":{"typeIdentifier":"t_struct$_Uint256Slot_$120253_storage_ptr","typeString":"struct StorageSlot.Uint256Slot"}},"visibility":"internal"}],"src":"2610:23:261"},"scope":120348,"stateMutability":"pure","virtual":false,"visibility":"internal"},{"id":120314,"nodeType":"FunctionDefinition","src":"2837:188:261","nodes":[],"body":{"id":120313,"nodeType":"Block","src":"2919:106:261","nodes":[],"statements":[{"AST":{"nodeType":"YulBlock","src":"2981:38:261","statements":[{"nodeType":"YulAssignment","src":"2995:14:261","value":{"name":"slot","nodeType":"YulIdentifier","src":"3005:4:261"},"variableNames":[{"name":"r.slot","nodeType":"YulIdentifier","src":"2995:6:261"}]}]},"documentation":"@solidity memory-safe-assembly","evmVersion":"london","externalReferences":[{"declaration":120310,"isOffset":false,"isSlot":true,"src":"2995:6:261","suffix":"slot","valueSize":1},{"declaration":120306,"isOffset":false,"isSlot":false,"src":"3005:4:261","valueSize":1}],"id":120312,"nodeType":"InlineAssembly","src":"2972:47:261"}]},"documentation":{"id":120304,"nodeType":"StructuredDocumentation","src":"2746:86:261","text":" @dev Returns an `StringSlot` with member `value` located at `slot`."},"implemented":true,"kind":"function","modifiers":[],"name":"getStringSlot","nameLocation":"2846:13:261","parameters":{"id":120307,"nodeType":"ParameterList","parameters":[{"constant":false,"id":120306,"mutability":"mutable","name":"slot","nameLocation":"2868:4:261","nodeType":"VariableDeclaration","scope":120314,"src":"2860:12:261","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":120305,"name":"bytes32","nodeType":"ElementaryTypeName","src":"2860:7:261","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"visibility":"internal"}],"src":"2859:14:261"},"returnParameters":{"id":120311,"nodeType":"ParameterList","parameters":[{"constant":false,"id":120310,"mutability":"mutable","name":"r","nameLocation":"2916:1:261","nodeType":"VariableDeclaration","scope":120314,"src":"2897:20:261","stateVariable":false,"storageLocation":"storage","typeDescriptions":{"typeIdentifier":"t_struct$_StringSlot_$120256_storage_ptr","typeString":"struct StorageSlot.StringSlot"},"typeName":{"id":120309,"nodeType":"UserDefinedTypeName","pathNode":{"id":120308,"name":"StringSlot","nodeType":"IdentifierPath","referencedDeclaration":120256,"src":"2897:10:261"},"referencedDeclaration":120256,"src":"2897:10:261","typeDescriptions":{"typeIdentifier":"t_struct$_StringSlot_$120256_storage_ptr","typeString":"struct StorageSlot.StringSlot"}},"visibility":"internal"}],"src":"2896:22:261"},"scope":120348,"stateMutability":"pure","virtual":false,"visibility":"internal"},{"id":120325,"nodeType":"FunctionDefinition","src":"3137:202:261","nodes":[],"body":{"id":120324,"nodeType":"Block","src":"3227:112:261","nodes":[],"statements":[{"AST":{"nodeType":"YulBlock","src":"3289:44:261","statements":[{"nodeType":"YulAssignment","src":"3303:20:261","value":{"name":"store.slot","nodeType":"YulIdentifier","src":"3313:10:261"},"variableNames":[{"name":"r.slot","nodeType":"YulIdentifier","src":"3303:6:261"}]}]},"documentation":"@solidity memory-safe-assembly","evmVersion":"london","externalReferences":[{"declaration":120321,"isOffset":false,"isSlot":true,"src":"3303:6:261","suffix":"slot","valueSize":1},{"declaration":120317,"isOffset":false,"isSlot":true,"src":"3313:10:261","suffix":"slot","valueSize":1}],"id":120323,"nodeType":"InlineAssembly","src":"3280:53:261"}]},"documentation":{"id":120315,"nodeType":"StructuredDocumentation","src":"3031:101:261","text":" @dev Returns an `StringSlot` representation of the string storage pointer `store`."},"implemented":true,"kind":"function","modifiers":[],"name":"getStringSlot","nameLocation":"3146:13:261","parameters":{"id":120318,"nodeType":"ParameterList","parameters":[{"constant":false,"id":120317,"mutability":"mutable","name":"store","nameLocation":"3175:5:261","nodeType":"VariableDeclaration","scope":120325,"src":"3160:20:261","stateVariable":false,"storageLocation":"storage","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"},"typeName":{"id":120316,"name":"string","nodeType":"ElementaryTypeName","src":"3160:6:261","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"visibility":"internal"}],"src":"3159:22:261"},"returnParameters":{"id":120322,"nodeType":"ParameterList","parameters":[{"constant":false,"id":120321,"mutability":"mutable","name":"r","nameLocation":"3224:1:261","nodeType":"VariableDeclaration","scope":120325,"src":"3205:20:261","stateVariable":false,"storageLocation":"storage","typeDescriptions":{"typeIdentifier":"t_struct$_StringSlot_$120256_storage_ptr","typeString":"struct StorageSlot.StringSlot"},"typeName":{"id":120320,"nodeType":"UserDefinedTypeName","pathNode":{"id":120319,"name":"StringSlot","nodeType":"IdentifierPath","referencedDeclaration":120256,"src":"3205:10:261"},"referencedDeclaration":120256,"src":"3205:10:261","typeDescriptions":{"typeIdentifier":"t_struct$_StringSlot_$120256_storage_ptr","typeString":"struct StorageSlot.StringSlot"}},"visibility":"internal"}],"src":"3204:22:261"},"scope":120348,"stateMutability":"pure","virtual":false,"visibility":"internal"},{"id":120336,"nodeType":"FunctionDefinition","src":"3435:186:261","nodes":[],"body":{"id":120335,"nodeType":"Block","src":"3515:106:261","nodes":[],"statements":[{"AST":{"nodeType":"YulBlock","src":"3577:38:261","statements":[{"nodeType":"YulAssignment","src":"3591:14:261","value":{"name":"slot","nodeType":"YulIdentifier","src":"3601:4:261"},"variableNames":[{"name":"r.slot","nodeType":"YulIdentifier","src":"3591:6:261"}]}]},"documentation":"@solidity memory-safe-assembly","evmVersion":"london","externalReferences":[{"declaration":120332,"isOffset":false,"isSlot":true,"src":"3591:6:261","suffix":"slot","valueSize":1},{"declaration":120328,"isOffset":false,"isSlot":false,"src":"3601:4:261","valueSize":1}],"id":120334,"nodeType":"InlineAssembly","src":"3568:47:261"}]},"documentation":{"id":120326,"nodeType":"StructuredDocumentation","src":"3345:85:261","text":" @dev Returns an `BytesSlot` with member `value` located at `slot`."},"implemented":true,"kind":"function","modifiers":[],"name":"getBytesSlot","nameLocation":"3444:12:261","parameters":{"id":120329,"nodeType":"ParameterList","parameters":[{"constant":false,"id":120328,"mutability":"mutable","name":"slot","nameLocation":"3465:4:261","nodeType":"VariableDeclaration","scope":120336,"src":"3457:12:261","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"},"typeName":{"id":120327,"name":"bytes32","nodeType":"ElementaryTypeName","src":"3457:7:261","typeDescriptions":{"typeIdentifier":"t_bytes32","typeString":"bytes32"}},"visibility":"internal"}],"src":"3456:14:261"},"returnParameters":{"id":120333,"nodeType":"ParameterList","parameters":[{"constant":false,"id":120332,"mutability":"mutable","name":"r","nameLocation":"3512:1:261","nodeType":"VariableDeclaration","scope":120336,"src":"3494:19:261","stateVariable":false,"storageLocation":"storage","typeDescriptions":{"typeIdentifier":"t_struct$_BytesSlot_$120259_storage_ptr","typeString":"struct StorageSlot.BytesSlot"},"typeName":{"id":120331,"nodeType":"UserDefinedTypeName","pathNode":{"id":120330,"name":"BytesSlot","nodeType":"IdentifierPath","referencedDeclaration":120259,"src":"3494:9:261"},"referencedDeclaration":120259,"src":"3494:9:261","typeDescriptions":{"typeIdentifier":"t_struct$_BytesSlot_$120259_storage_ptr","typeString":"struct StorageSlot.BytesSlot"}},"visibility":"internal"}],"src":"3493:21:261"},"scope":120348,"stateMutability":"pure","virtual":false,"visibility":"internal"},{"id":120347,"nodeType":"FunctionDefinition","src":"3731:199:261","nodes":[],"body":{"id":120346,"nodeType":"Block","src":"3818:112:261","nodes":[],"statements":[{"AST":{"nodeType":"YulBlock","src":"3880:44:261","statements":[{"nodeType":"YulAssignment","src":"3894:20:261","value":{"name":"store.slot","nodeType":"YulIdentifier","src":"3904:10:261"},"variableNames":[{"name":"r.slot","nodeType":"YulIdentifier","src":"3894:6:261"}]}]},"documentation":"@solidity memory-safe-assembly","evmVersion":"london","externalReferences":[{"declaration":120343,"isOffset":false,"isSlot":true,"src":"3894:6:261","suffix":"slot","valueSize":1},{"declaration":120339,"isOffset":false,"isSlot":true,"src":"3904:10:261","suffix":"slot","valueSize":1}],"id":120345,"nodeType":"InlineAssembly","src":"3871:53:261"}]},"documentation":{"id":120337,"nodeType":"StructuredDocumentation","src":"3627:99:261","text":" @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`."},"implemented":true,"kind":"function","modifiers":[],"name":"getBytesSlot","nameLocation":"3740:12:261","parameters":{"id":120340,"nodeType":"ParameterList","parameters":[{"constant":false,"id":120339,"mutability":"mutable","name":"store","nameLocation":"3767:5:261","nodeType":"VariableDeclaration","scope":120347,"src":"3753:19:261","stateVariable":false,"storageLocation":"storage","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"},"typeName":{"id":120338,"name":"bytes","nodeType":"ElementaryTypeName","src":"3753:5:261","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"visibility":"internal"}],"src":"3752:21:261"},"returnParameters":{"id":120344,"nodeType":"ParameterList","parameters":[{"constant":false,"id":120343,"mutability":"mutable","name":"r","nameLocation":"3815:1:261","nodeType":"VariableDeclaration","scope":120347,"src":"3797:19:261","stateVariable":false,"storageLocation":"storage","typeDescriptions":{"typeIdentifier":"t_struct$_BytesSlot_$120259_storage_ptr","typeString":"struct StorageSlot.BytesSlot"},"typeName":{"id":120342,"nodeType":"UserDefinedTypeName","pathNode":{"id":120341,"name":"BytesSlot","nodeType":"IdentifierPath","referencedDeclaration":120259,"src":"3797:9:261"},"referencedDeclaration":120259,"src":"3797:9:261","typeDescriptions":{"typeIdentifier":"t_struct$_BytesSlot_$120259_storage_ptr","typeString":"struct StorageSlot.BytesSlot"}},"visibility":"internal"}],"src":"3796:21:261"},"scope":120348,"stateMutability":"pure","virtual":false,"visibility":"internal"}],"abstract":false,"baseContracts":[],"canonicalName":"StorageSlot","contractDependencies":[],"contractKind":"library","documentation":{"id":120241,"nodeType":"StructuredDocumentation","src":"218:1028:261","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 ERC1967 implementation slot:\n ```solidity\n contract ERC1967 {\n bytes32 internal constant _IMPLEMENTATION_SLOT =\n 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 ```"},"fullyImplemented":true,"linearizedBaseContracts":[120348],"name":"StorageSlot","nameLocation":"1255:11:261","scope":120349,"usedErrors":[]}],"license":"MIT"},"id":261}