contracts-imtbl/deployments/bsc_test/solcInputs/0f8deec237bf5f05ad838036ecf818f6.json
CounterFire2023 67a25b6850 add sth
2024-11-26 10:55:42 +08:00

36 lines
1.6 KiB
JSON

{
"language": "Solidity",
"sources": {
"contracts/test/TestSlot.sol": {
"content": "// SPDX-License-Identifier: Apache 2.0\npragma solidity 0.8.19;\ncontract TestSlot {\n uint public count = 123;\n address public owner = msg.sender;\n bool public isTrue = true;\n uint16 public u16 = 31;\n bytes32 private password;\n uint public constant someConst = 123;\n bytes32[3] public data;\n struct User {\n uint id;\n bytes32 password;\n }\n User[] private users;\n mapping(uint => User) private idToUser;\n constructor(bytes32 _password) {\n password = _password;\n }\n function addUser(bytes32 _password) public {\n User memory user = User({id: users.length, password: _password});\n users.push(user);\n idToUser[user.id] = user;\n }\n function getArrayLocation(uint slot, uint index, uint elementSize) public pure returns (uint) {\n return uint(keccak256(abi.encodePacked(slot))) + (index * elementSize);\n }\n function getMapLocation(uint slot, uint key) public pure returns (uint) {\n return uint(keccak256(abi.encodePacked(key, slot)));\n }\n}\n"
}
},
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"viaIR": true,
"outputSelection": {
"*": {
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"metadata",
"devdoc",
"userdoc",
"storageLayout",
"evm.gasEstimates"
],
"": [
"ast"
]
}
},
"metadata": {
"useLiteralContent": true
}
}
}