Skip to content

Commit

Permalink
feat: XP NFT contract audit suggestions (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
andresaiello authored Aug 28, 2024
1 parent 3980860 commit db688da
Show file tree
Hide file tree
Showing 6 changed files with 756 additions and 112 deletions.
311 changes: 311 additions & 0 deletions packages/zevm-app-contracts/.openzeppelin/unknown-7001.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,311 @@
{
"manifestVersion": "3.2",
"admin": {
"address": "0x9cb34a07CE042E3CFA0194E5eF230Bc8F39072C4",
"txHash": "0x9034e811691ff8bd1f34f17b6827d5d84c8d9c88f352fd947d6a6cd0e0d12fdc"
},
"proxies": [
{
"address": "0x5c25b6f4D2b7a550a80561d3Bf274C953aC8be7d",
"txHash": "0x4e9308b8661aba7d1de8a41be4534ec418eb1c5fad60d1ba4fdd75c79f19a168",
"kind": "transparent"
}
],
"impls": {
"33876915c0f68ba29fef566a0ae95e50929726653f8e7778086f57c4b331ca56": {
"address": "0x1838B9563A984d8222122892BfDE3cFEeB21b29B",
"txHash": "0x5c925f3bb960fc76ae2c28e1f45d1d76431e09c89f5bded7267a518e892f3e1a",
"layout": {
"solcVersion": "0.8.9",
"storage": [
{
"label": "_initialized",
"offset": 0,
"slot": "0",
"type": "t_uint8",
"contract": "Initializable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63",
"retypedFrom": "bool"
},
{
"label": "_initializing",
"offset": 1,
"slot": "0",
"type": "t_bool",
"contract": "Initializable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68"
},
{
"label": "__gap",
"offset": 0,
"slot": "1",
"type": "t_array(t_uint256)50_storage",
"contract": "ContextUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36"
},
{
"label": "__gap",
"offset": 0,
"slot": "51",
"type": "t_array(t_uint256)50_storage",
"contract": "ERC165Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41"
},
{
"label": "_name",
"offset": 0,
"slot": "101",
"type": "t_string_storage",
"contract": "ERC721Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:25"
},
{
"label": "_symbol",
"offset": 0,
"slot": "102",
"type": "t_string_storage",
"contract": "ERC721Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:28"
},
{
"label": "_owners",
"offset": 0,
"slot": "103",
"type": "t_mapping(t_uint256,t_address)",
"contract": "ERC721Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:31"
},
{
"label": "_balances",
"offset": 0,
"slot": "104",
"type": "t_mapping(t_address,t_uint256)",
"contract": "ERC721Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:34"
},
{
"label": "_tokenApprovals",
"offset": 0,
"slot": "105",
"type": "t_mapping(t_uint256,t_address)",
"contract": "ERC721Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:37"
},
{
"label": "_operatorApprovals",
"offset": 0,
"slot": "106",
"type": "t_mapping(t_address,t_mapping(t_address,t_bool))",
"contract": "ERC721Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:40"
},
{
"label": "__gap",
"offset": 0,
"slot": "107",
"type": "t_array(t_uint256)44_storage",
"contract": "ERC721Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:477"
},
{
"label": "_owner",
"offset": 0,
"slot": "151",
"type": "t_address",
"contract": "OwnableUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22"
},
{
"label": "__gap",
"offset": 0,
"slot": "152",
"type": "t_array(t_uint256)49_storage",
"contract": "OwnableUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94"
},
{
"label": "_pendingOwner",
"offset": 0,
"slot": "201",
"type": "t_address",
"contract": "Ownable2StepUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol:27"
},
{
"label": "__gap",
"offset": 0,
"slot": "202",
"type": "t_array(t_uint256)49_storage",
"contract": "Ownable2StepUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol:70"
},
{
"label": "_hashedName",
"offset": 0,
"slot": "251",
"type": "t_bytes32",
"contract": "EIP712Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:40",
"renamedFrom": "_HASHED_NAME"
},
{
"label": "_hashedVersion",
"offset": 0,
"slot": "252",
"type": "t_bytes32",
"contract": "EIP712Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:42",
"renamedFrom": "_HASHED_VERSION"
},
{
"label": "_name",
"offset": 0,
"slot": "253",
"type": "t_string_storage",
"contract": "EIP712Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:44"
},
{
"label": "_version",
"offset": 0,
"slot": "254",
"type": "t_string_storage",
"contract": "EIP712Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:45"
},
{
"label": "__gap",
"offset": 0,
"slot": "255",
"type": "t_array(t_uint256)48_storage",
"contract": "EIP712Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:204"
},
{
"label": "lastUpdateTimestampByTokenId",
"offset": 0,
"slot": "303",
"type": "t_mapping(t_uint256,t_uint256)",
"contract": "ZetaXP",
"src": "contracts/xp-nft/xpNFT.sol:22"
},
{
"label": "tagByTokenId",
"offset": 0,
"slot": "304",
"type": "t_mapping(t_uint256,t_bytes32)",
"contract": "ZetaXP",
"src": "contracts/xp-nft/xpNFT.sol:23"
},
{
"label": "tokenByUserTag",
"offset": 0,
"slot": "305",
"type": "t_mapping(t_address,t_mapping(t_bytes32,t_uint256))",
"contract": "ZetaXP",
"src": "contracts/xp-nft/xpNFT.sol:24"
},
{
"label": "baseTokenURI",
"offset": 0,
"slot": "306",
"type": "t_string_storage",
"contract": "ZetaXP",
"src": "contracts/xp-nft/xpNFT.sol:27"
},
{
"label": "signerAddress",
"offset": 0,
"slot": "307",
"type": "t_address",
"contract": "ZetaXP",
"src": "contracts/xp-nft/xpNFT.sol:28"
},
{
"label": "_currentTokenId",
"offset": 0,
"slot": "308",
"type": "t_uint256",
"contract": "ZetaXP",
"src": "contracts/xp-nft/xpNFT.sol:31"
}
],
"types": {
"t_address": {
"label": "address",
"numberOfBytes": "20"
},
"t_array(t_uint256)44_storage": {
"label": "uint256[44]",
"numberOfBytes": "1408"
},
"t_array(t_uint256)48_storage": {
"label": "uint256[48]",
"numberOfBytes": "1536"
},
"t_array(t_uint256)49_storage": {
"label": "uint256[49]",
"numberOfBytes": "1568"
},
"t_array(t_uint256)50_storage": {
"label": "uint256[50]",
"numberOfBytes": "1600"
},
"t_bool": {
"label": "bool",
"numberOfBytes": "1"
},
"t_bytes32": {
"label": "bytes32",
"numberOfBytes": "32"
},
"t_mapping(t_address,t_bool)": {
"label": "mapping(address => bool)",
"numberOfBytes": "32"
},
"t_mapping(t_address,t_mapping(t_address,t_bool))": {
"label": "mapping(address => mapping(address => bool))",
"numberOfBytes": "32"
},
"t_mapping(t_address,t_mapping(t_bytes32,t_uint256))": {
"label": "mapping(address => mapping(bytes32 => uint256))",
"numberOfBytes": "32"
},
"t_mapping(t_address,t_uint256)": {
"label": "mapping(address => uint256)",
"numberOfBytes": "32"
},
"t_mapping(t_bytes32,t_uint256)": {
"label": "mapping(bytes32 => uint256)",
"numberOfBytes": "32"
},
"t_mapping(t_uint256,t_address)": {
"label": "mapping(uint256 => address)",
"numberOfBytes": "32"
},
"t_mapping(t_uint256,t_bytes32)": {
"label": "mapping(uint256 => bytes32)",
"numberOfBytes": "32"
},
"t_mapping(t_uint256,t_uint256)": {
"label": "mapping(uint256 => uint256)",
"numberOfBytes": "32"
},
"t_string_storage": {
"label": "string",
"numberOfBytes": "32"
},
"t_uint256": {
"label": "uint256",
"numberOfBytes": "32"
},
"t_uint8": {
"label": "uint8",
"numberOfBytes": "1"
}
},
"namespaces": {}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.7;
pragma solidity 0.8.9;

import "../xpNFT.sol";

Expand Down
Loading

0 comments on commit db688da

Please sign in to comment.