From 7ba8abdf6c11db652e10dc67b14c69826bdae47b Mon Sep 17 00:00:00 2001 From: Gerald Iakobinyi-Pich1 Date: Wed, 4 Sep 2024 09:37:41 +0300 Subject: [PATCH 1/3] feat: have deployed Verifier and Attester to Shape --- .openzeppelin/unknown-11011.json | 10 + .openzeppelin/unknown-360.json | 283 +++++++++++++++++++++++++++ deployments/abi/GitcoinAttester.json | 29 +++ deployments/abi/GitcoinVerifier.json | 28 +++ deployments/onchainInfo.json | 39 +++- hardhat.config.ts | 17 ++ 6 files changed, 404 insertions(+), 2 deletions(-) create mode 100644 .openzeppelin/unknown-360.json diff --git a/.openzeppelin/unknown-11011.json b/.openzeppelin/unknown-11011.json index b0e21ff..b6c5328 100644 --- a/.openzeppelin/unknown-11011.json +++ b/.openzeppelin/unknown-11011.json @@ -20,6 +20,16 @@ "address": "0x2050256A91cbABD7C42465aA0d5325115C1dEB43", "txHash": "0xd835b0e5a44c0fc7f0b9413cf2703a8d007591d70f7937e66010724efc2d7c98", "kind": "uups" + }, + { + "address": "0x39571bBD5a4c5d1a5184004c63F45FE426dB85Ea", + "txHash": "0x65cbb44dad810c8f558b39754403601eac96992dc2f133435efc96f788858da7", + "kind": "uups" + }, + { + "address": "0x3508ea66D2ccCEcD3aa9215b6471868431CF2AdC", + "txHash": "0x8d40a450448b3588766188fdef9788c21e006ade4c3bbf0b86446e73f08e22e4", + "kind": "uups" } ], "impls": { diff --git a/.openzeppelin/unknown-360.json b/.openzeppelin/unknown-360.json new file mode 100644 index 0000000..a6c4086 --- /dev/null +++ b/.openzeppelin/unknown-360.json @@ -0,0 +1,283 @@ +{ + "manifestVersion": "3.2", + "proxies": [ + { + "address": "0xCc90105D4A2aa067ee768120AdA19886021dF422", + "txHash": "0xecbf0dbf2e3975060fce1481cee9a2740d127bbaf19ef1bba0eda50653846153", + "kind": "uups" + }, + { + "address": "0x16db23c4b99bbC9A6Bf55dF7a787C9AEFD261185", + "txHash": "0x657e7714272f79e8f03892ec28b7abcd49b0c563fc67b15074be0f74928c89bc", + "kind": "uups" + } + ], + "impls": { + "38802172d292593a826b81783e72f2e20dc7c1aa4d04aea697a8cc739bcd5da7": { + "address": "0x5aeC6db5FC9490120f209a313EbB8d15C91b1604", + "txHash": "0x31d23f41816a2e8826c5161e9baf537544665c00660b04ff87daff661abba2a8", + "layout": { + "solcVersion": "0.8.20", + "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": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "_paused", + "offset": 0, + "slot": "101", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" + }, + { + "label": "verifiers", + "offset": 0, + "slot": "151", + "type": "t_mapping(t_address,t_bool)", + "contract": "GitcoinAttester", + "src": "contracts/GitcoinAttester.sol:17" + }, + { + "label": "eas", + "offset": 0, + "slot": "152", + "type": "t_contract(IEAS)368", + "contract": "GitcoinAttester", + "src": "contracts/GitcoinAttester.sol:20" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "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_contract(IEAS)368": { + "label": "contract IEAS", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "0ef2af0b0f4788d85266f5a44d062f688d6c3e400e794b81992bf18717fee332": { + "address": "0xf58Bb56E6e6EA7834478b470615e037df825C442", + "txHash": "0x94f3d4150ebdd6198a2ef28e056c53f3050e9924fb51c6098e52f76b49668074", + "layout": { + "solcVersion": "0.8.19", + "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": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "_paused", + "offset": 0, + "slot": "101", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" + }, + { + "label": "attester", + "offset": 0, + "slot": "151", + "type": "t_contract(GitcoinAttester)6912", + "contract": "GitcoinVerifier", + "src": "contracts/GitcoinVerifier.sol:25" + }, + { + "label": "issuer", + "offset": 0, + "slot": "152", + "type": "t_address", + "contract": "GitcoinVerifier", + "src": "contracts/GitcoinVerifier.sol:28" + }, + { + "label": "DOMAIN_SEPARATOR", + "offset": 0, + "slot": "153", + "type": "t_bytes32", + "contract": "GitcoinVerifier", + "src": "contracts/GitcoinVerifier.sol:31" + }, + { + "label": "name", + "offset": 0, + "slot": "154", + "type": "t_string_storage", + "contract": "GitcoinVerifier", + "src": "contracts/GitcoinVerifier.sol:34" + }, + { + "label": "recipientNonces", + "offset": 0, + "slot": "155", + "type": "t_mapping(t_address,t_uint256)", + "contract": "GitcoinVerifier", + "src": "contracts/GitcoinVerifier.sol:37" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "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_contract(GitcoinAttester)6912": { + "label": "contract GitcoinAttester", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + } + } +} diff --git a/deployments/abi/GitcoinAttester.json b/deployments/abi/GitcoinAttester.json index 5be747c..d572b93 100644 --- a/deployments/abi/GitcoinAttester.json +++ b/deployments/abi/GitcoinAttester.json @@ -369,5 +369,34 @@ "function upgradeTo(address newImplementation)", "function upgradeToAndCall(address newImplementation, bytes data) payable", "function verifiers(address) view returns (bool)" + ], + "0x168": [ + "event AdminChanged(address previousAdmin, address newAdmin)", + "event BeaconUpgraded(address indexed beacon)", + "event EASSet(address eas)", + "event Initialized(uint8 version)", + "event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)", + "event Paused(address account)", + "event Unpaused(address account)", + "event Upgraded(address indexed implementation)", + "event VerifierAdded(address verifier)", + "event VerifierRemoved(address verifier)", + "function addVerifier(address _verifier)", + "function eas() view returns (address)", + "function initialize()", + "function owner() view returns (address)", + "function pause()", + "function paused() view returns (bool)", + "function proxiableUUID() view returns (bytes32)", + "function removeVerifier(address _verifier)", + "function renounceOwnership()", + "function revokeAttestations((bytes32 schema, (bytes32 uid, uint256 value)[] data)[] multiRevocationRequest) payable", + "function setEASAddress(address _easContractAddress)", + "function submitAttestations((bytes32 schema, (address recipient, uint64 expirationTime, bool revocable, bytes32 refUID, bytes data, uint256 value)[] data)[] multiAttestationRequest) payable returns (bytes32[])", + "function transferOwnership(address newOwner)", + "function unpause()", + "function upgradeTo(address newImplementation)", + "function upgradeToAndCall(address newImplementation, bytes data) payable", + "function verifiers(address) view returns (bool)" ] } \ No newline at end of file diff --git a/deployments/abi/GitcoinVerifier.json b/deployments/abi/GitcoinVerifier.json index b119da5..87d3bc4 100644 --- a/deployments/abi/GitcoinVerifier.json +++ b/deployments/abi/GitcoinVerifier.json @@ -368,5 +368,33 @@ "function upgradeToAndCall(address newImplementation, bytes data) payable", "function verifyAndAttest(((bytes32 schema, (address recipient, uint64 expirationTime, bool revocable, bytes32 refUID, bytes data, uint256 value)[] data)[] multiAttestationRequest, uint256 nonce, uint256 fee) attestationRequest, uint8 v, bytes32 r, bytes32 s) payable returns (bytes32[])", "function withdrawFees(uint256 _amount)" + ], + "0x168": [ + "error InsufficientFee()", + "error InvalidNonce()", + "error InvalidSignature()", + "event AdminChanged(address previousAdmin, address newAdmin)", + "event BeaconUpgraded(address indexed beacon)", + "event Initialized(uint8 version)", + "event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)", + "event Paused(address account)", + "event Unpaused(address account)", + "event Upgraded(address indexed implementation)", + "function attester() view returns (address)", + "function initialize(address _issuer, address _attester)", + "function issuer() view returns (address)", + "function name() view returns (string)", + "function owner() view returns (address)", + "function pause()", + "function paused() view returns (bool)", + "function proxiableUUID() view returns (bytes32)", + "function recipientNonces(address) view returns (uint256)", + "function renounceOwnership()", + "function transferOwnership(address newOwner)", + "function unpause()", + "function upgradeTo(address newImplementation)", + "function upgradeToAndCall(address newImplementation, bytes data) payable", + "function verifyAndAttest(((bytes32 schema, (address recipient, uint64 expirationTime, bool revocable, bytes32 refUID, bytes data, uint256 value)[] data)[] multiAttestationRequest, uint256 nonce, uint256 fee) attestationRequest, uint8 v, bytes32 r, bytes32 s) payable returns (bytes32[])", + "function withdrawFees(uint256 _amount)" ] } \ No newline at end of file diff --git a/deployments/onchainInfo.json b/deployments/onchainInfo.json index b411db2..372624e 100644 --- a/deployments/onchainInfo.json +++ b/deployments/onchainInfo.json @@ -425,10 +425,10 @@ "address": "0x4200000000000000000000000000000000000020" }, "GitcoinAttester": { - "address": "0xCc90105D4A2aa067ee768120AdA19886021dF422" + "address": "0x39571bBD5a4c5d1a5184004c63F45FE426dB85Ea" }, "GitcoinVerifier": { - "address": "0x16db23c4b99bbC9A6Bf55dF7a787C9AEFD261185" + "address": "0x3508ea66D2ccCEcD3aa9215b6471868431CF2AdC" }, "GitcoinResolver": { "address": "0x90E2C4472Df225e8D31f44725B75FFaA244d5D33" @@ -447,5 +447,40 @@ "uid": "0x24620f482734b3806102678e4b8bb68baafb1adc1ec29e524bcd69c85f15b915" } } + }, + "0x168": { + "description": "Shape", + "issuer": { + "address": "0x804233b96cbd6d81efeb6517347177ef7bD488ED" + }, + "EAS": { + "address": "0x4200000000000000000000000000000000000021" + }, + "EASSchemaRegistry": { + "address": "0x4200000000000000000000000000000000000020" + }, + "GitcoinAttester": { + "address": "0xCc90105D4A2aa067ee768120AdA19886021dF422" + }, + "GitcoinVerifier": { + "address": "0x16db23c4b99bbC9A6Bf55dF7a787C9AEFD261185" + }, + "GitcoinResolver": { + "address": "" + }, + "GitcoinPassportDecoder": { + "address": "" + }, + "easSchemas": { + "namingSchema": { + "uid": "" + }, + "passport": { + "uid": "" + }, + "score": { + "uid": "" + } + } } } \ No newline at end of file diff --git a/hardhat.config.ts b/hardhat.config.ts index b2b583d..7c47549 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -147,6 +147,14 @@ let config: HardhatUserConfig = { apiURL: "https://shape-sepolia-explorer.alchemy.com/api", browserURL: "https://shape-sepolia-explorer.alchemy.com/" } + }, + { + network: "shape", + chainId: 360, + urls: { + apiURL: "https://internal-shaper-explorer.alchemypreview.com/api", + browserURL: "https://internal-shaper-explorer.alchemypreview.com/" + } } ] }, @@ -318,6 +326,15 @@ if (process.env.DEPLOYER_PRIVATE_KEY && process.env.DEPLOYER_ADDRESS) { gasPrice: 9068663 }; } + if (process.env.SHAPE_PROVIDER_URL) { + config.networks["shape"] = { + url: process.env.SHAPE_PROVIDER_URL as string, + accounts: [process.env.DEPLOYER_PRIVATE_KEY as string], + chainId: 360, + from: process.env.DEPLOYER_ADDRESS as string, + gasPrice: 9068663 + }; + } } } From 1197bec0a1f82c81b88dc7f012024ea5d2d1b3d4 Mon Sep 17 00:00:00 2001 From: Gerald Iakobinyi-Pich1 Date: Wed, 4 Sep 2024 09:48:18 +0300 Subject: [PATCH 2/3] feat: have deployed the resolver contract --- .openzeppelin/unknown-360.json | 206 +++++++++++++++++++++++++++ deployments/abi/GitcoinResolver.json | 42 ++++++ deployments/onchainInfo.json | 2 +- 3 files changed, 249 insertions(+), 1 deletion(-) diff --git a/.openzeppelin/unknown-360.json b/.openzeppelin/unknown-360.json index a6c4086..9d61e96 100644 --- a/.openzeppelin/unknown-360.json +++ b/.openzeppelin/unknown-360.json @@ -10,6 +10,11 @@ "address": "0x16db23c4b99bbC9A6Bf55dF7a787C9AEFD261185", "txHash": "0x657e7714272f79e8f03892ec28b7abcd49b0c563fc67b15074be0f74928c89bc", "kind": "uups" + }, + { + "address": "0x90E2C4472Df225e8D31f44725B75FFaA244d5D33", + "txHash": "0x65add6a8a56f619aff5cfefd33f2d07b162d348c5330a6e5d1e35690d9242561", + "kind": "uups" } ], "impls": { @@ -278,6 +283,207 @@ }, "namespaces": {} } + }, + "99324d8a4c0405f84990c4f269299dd73f34f7a1ce7c3d6df818d577be86491c": { + "address": "0x2999eF5C943B1F7085c299EFD30556DaF48879dC", + "txHash": "0x2aafb2115f8282874d41ee549bf1d9f82201e3a0e137d7564d32f7f0a4e2de0e", + "layout": { + "solcVersion": "0.8.19", + "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": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "_paused", + "offset": 0, + "slot": "101", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" + }, + { + "label": "userAttestations", + "offset": 0, + "slot": "151", + "type": "t_mapping(t_address,t_mapping(t_bytes32,t_bytes32))", + "contract": "GitcoinResolver", + "src": "contracts/GitcoinResolver.sol:37" + }, + { + "label": "_eas", + "offset": 0, + "slot": "152", + "type": "t_contract(IEAS)2310", + "contract": "GitcoinResolver", + "src": "contracts/GitcoinResolver.sol:40" + }, + { + "label": "_gitcoinAttester", + "offset": 0, + "slot": "153", + "type": "t_contract(GitcoinAttester)6912", + "contract": "GitcoinResolver", + "src": "contracts/GitcoinResolver.sol:43" + }, + { + "label": "allowlist", + "offset": 0, + "slot": "154", + "type": "t_mapping(t_address,t_bool)", + "contract": "GitcoinResolver", + "src": "contracts/GitcoinResolver.sol:46" + }, + { + "label": "scores", + "offset": 0, + "slot": "155", + "type": "t_mapping(t_address,t_struct(CachedScore)8657_storage)", + "contract": "GitcoinResolver", + "src": "contracts/GitcoinResolver.sol:49" + }, + { + "label": "scoreSchema", + "offset": 0, + "slot": "156", + "type": "t_bytes32", + "contract": "GitcoinResolver", + "src": "contracts/GitcoinResolver.sol:52" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "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_contract(GitcoinAttester)6912": { + "label": "contract GitcoinAttester", + "numberOfBytes": "20" + }, + "t_contract(IEAS)2310": { + "label": "contract IEAS", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_bytes32,t_bytes32))": { + "label": "mapping(address => mapping(bytes32 => bytes32))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(CachedScore)8657_storage)": { + "label": "mapping(address => struct IGitcoinResolver.CachedScore)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_bytes32)": { + "label": "mapping(bytes32 => bytes32)", + "numberOfBytes": "32" + }, + "t_struct(CachedScore)8657_storage": { + "label": "struct IGitcoinResolver.CachedScore", + "members": [ + { + "label": "score", + "type": "t_uint32", + "offset": 0, + "slot": "0" + }, + { + "label": "time", + "type": "t_uint64", + "offset": 4, + "slot": "0" + }, + { + "label": "expirationTime", + "type": "t_uint64", + "offset": 12, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } } } } diff --git a/deployments/abi/GitcoinResolver.json b/deployments/abi/GitcoinResolver.json index f14076b..73650c4 100644 --- a/deployments/abi/GitcoinResolver.json +++ b/deployments/abi/GitcoinResolver.json @@ -529,5 +529,47 @@ "function upgradeTo(address newImplementation)", "function upgradeToAndCall(address newImplementation, bytes data) payable", "function userAttestations(address, bytes32) view returns (bytes32)" + ], + "0x168": [ + "error AccessDenied()", + "error InsufficientValue()", + "error InvalidAttester()", + "error InvalidEAS()", + "error NotAllowlisted()", + "error NotPayable()", + "event AdminChanged(address previousAdmin, address newAdmin)", + "event BeaconUpgraded(address indexed beacon)", + "event Initialized(uint8 version)", + "event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)", + "event Paused(address account)", + "event ScoreSchemaSet(bytes32 schema)", + "event Unpaused(address account)", + "event Upgraded(address indexed implementation)", + "function _eas() view returns (address)", + "function _gitcoinAttester() view returns (address)", + "function addToAllowlist(address addr)", + "function allowlist(address) view returns (bool)", + "function attest((bytes32 uid, bytes32 schema, uint64 time, uint64 expirationTime, uint64 revocationTime, bytes32 refUID, address recipient, address attester, bool revocable, bytes data) attestation) payable returns (bool)", + "function getCachedScore(address user) view returns ((uint32 score, uint64 time, uint64 expirationTime))", + "function getUserAttestation(address user, bytes32 schema) view returns (bytes32)", + "function initialize(address eas, address gitcoinAttester)", + "function isPayable() pure returns (bool)", + "function multiAttest((bytes32 uid, bytes32 schema, uint64 time, uint64 expirationTime, uint64 revocationTime, bytes32 refUID, address recipient, address attester, bool revocable, bytes data)[] attestations, uint256[]) payable returns (bool)", + "function multiRevoke((bytes32 uid, bytes32 schema, uint64 time, uint64 expirationTime, uint64 revocationTime, bytes32 refUID, address recipient, address attester, bool revocable, bytes data)[] attestations, uint256[]) payable returns (bool)", + "function owner() view returns (address)", + "function pause()", + "function paused() view returns (bool)", + "function proxiableUUID() view returns (bytes32)", + "function removeFromAllowlist(address addr)", + "function renounceOwnership()", + "function revoke((bytes32 uid, bytes32 schema, uint64 time, uint64 expirationTime, uint64 revocationTime, bytes32 refUID, address recipient, address attester, bool revocable, bytes data) attestation) payable returns (bool)", + "function scoreSchema() view returns (bytes32)", + "function scores(address) view returns (uint32 score, uint64 time, uint64 expirationTime)", + "function setScoreSchema(bytes32 _schema)", + "function transferOwnership(address newOwner)", + "function unpause()", + "function upgradeTo(address newImplementation)", + "function upgradeToAndCall(address newImplementation, bytes data) payable", + "function userAttestations(address, bytes32) view returns (bytes32)" ] } \ No newline at end of file diff --git a/deployments/onchainInfo.json b/deployments/onchainInfo.json index 372624e..d9804fa 100644 --- a/deployments/onchainInfo.json +++ b/deployments/onchainInfo.json @@ -466,7 +466,7 @@ "address": "0x16db23c4b99bbC9A6Bf55dF7a787C9AEFD261185" }, "GitcoinResolver": { - "address": "" + "address": "0x90E2C4472Df225e8D31f44725B75FFaA244d5D33" }, "GitcoinPassportDecoder": { "address": "" From 8a60b7b9917940d1a56cacfbc59cee3c0bdba9c1 Mon Sep 17 00:00:00 2001 From: Gerald Iakobinyi-Pich1 Date: Wed, 4 Sep 2024 09:58:55 +0300 Subject: [PATCH 3/3] feat: have deployed schemas and decoder --- .openzeppelin/unknown-360.json | 214 ++++++++++++++++++++ deployments/abi/GitcoinPassportDecoder.json | 56 +++++ deployments/onchainInfo.json | 6 +- 3 files changed, 273 insertions(+), 3 deletions(-) diff --git a/.openzeppelin/unknown-360.json b/.openzeppelin/unknown-360.json index 9d61e96..9b987dd 100644 --- a/.openzeppelin/unknown-360.json +++ b/.openzeppelin/unknown-360.json @@ -15,6 +15,11 @@ "address": "0x90E2C4472Df225e8D31f44725B75FFaA244d5D33", "txHash": "0x65add6a8a56f619aff5cfefd33f2d07b162d348c5330a6e5d1e35690d9242561", "kind": "uups" + }, + { + "address": "0x2443D22Db6d25D141A1138D80724e3Eee54FD4C2", + "txHash": "0x3ae84d972a5137d19cc074aadfaaca27426fff8a8556f9e601c465437343bd5d", + "kind": "uups" } ], "impls": { @@ -484,6 +489,215 @@ }, "namespaces": {} } + }, + "90e2b67209504512d49f2eb6948e6ef0c65273140fc40cc7becbf0856ad14e33": { + "address": "0x5e3fDCbCEB58104E8547D5810EB2ED0Fb42eADf4", + "txHash": "0xea9c85120807ee5b60a3d09f016e76860c561e348b99101ce30b53ac6f21049f", + "layout": { + "solcVersion": "0.8.20", + "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": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "_paused", + "offset": 0, + "slot": "101", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" + }, + { + "label": "eas", + "offset": 0, + "slot": "151", + "type": "t_contract(IEAS)368", + "contract": "GitcoinPassportDecoder", + "src": "contracts/GitcoinPassportDecoder.sol:25" + }, + { + "label": "providerVersions", + "offset": 0, + "slot": "152", + "type": "t_mapping(t_uint32,t_array(t_string_storage)dyn_storage)", + "contract": "GitcoinPassportDecoder", + "src": "contracts/GitcoinPassportDecoder.sol:28" + }, + { + "label": "reversedMappingVersions", + "offset": 0, + "slot": "153", + "type": "t_mapping(t_uint32,t_mapping(t_string_memory_ptr,t_uint8))", + "contract": "GitcoinPassportDecoder", + "src": "contracts/GitcoinPassportDecoder.sol:31" + }, + { + "label": "currentVersion", + "offset": 0, + "slot": "154", + "type": "t_uint32", + "contract": "GitcoinPassportDecoder", + "src": "contracts/GitcoinPassportDecoder.sol:34" + }, + { + "label": "gitcoinResolver", + "offset": 4, + "slot": "154", + "type": "t_contract(IGitcoinResolver)6523", + "contract": "GitcoinPassportDecoder", + "src": "contracts/GitcoinPassportDecoder.sol:37" + }, + { + "label": "passportSchemaUID", + "offset": 0, + "slot": "155", + "type": "t_bytes32", + "contract": "GitcoinPassportDecoder", + "src": "contracts/GitcoinPassportDecoder.sol:40" + }, + { + "label": "scoreSchemaUID", + "offset": 0, + "slot": "156", + "type": "t_bytes32", + "contract": "GitcoinPassportDecoder", + "src": "contracts/GitcoinPassportDecoder.sol:43" + }, + { + "label": "maxScoreAge", + "offset": 0, + "slot": "157", + "type": "t_uint64", + "contract": "GitcoinPassportDecoder", + "src": "contracts/GitcoinPassportDecoder.sol:46" + }, + { + "label": "threshold", + "offset": 0, + "slot": "158", + "type": "t_uint256", + "contract": "GitcoinPassportDecoder", + "src": "contracts/GitcoinPassportDecoder.sol:49" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_string_storage)dyn_storage": { + "label": "string[]", + "numberOfBytes": "32" + }, + "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_contract(IEAS)368": { + "label": "contract IEAS", + "numberOfBytes": "20" + }, + "t_contract(IGitcoinResolver)6523": { + "label": "contract IGitcoinResolver", + "numberOfBytes": "20" + }, + "t_mapping(t_string_memory_ptr,t_uint8)": { + "label": "mapping(string => uint8)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint32,t_array(t_string_storage)dyn_storage)": { + "label": "mapping(uint32 => string[])", + "numberOfBytes": "32" + }, + "t_mapping(t_uint32,t_mapping(t_string_memory_ptr,t_uint8))": { + "label": "mapping(uint32 => mapping(string => uint8))", + "numberOfBytes": "32" + }, + "t_string_memory_ptr": { + "label": "string", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } } } } diff --git a/deployments/abi/GitcoinPassportDecoder.json b/deployments/abi/GitcoinPassportDecoder.json index 5a79c61..3a32d31 100644 --- a/deployments/abi/GitcoinPassportDecoder.json +++ b/deployments/abi/GitcoinPassportDecoder.json @@ -648,5 +648,61 @@ "function unpause()", "function upgradeTo(address newImplementation)", "function upgradeToAndCall(address newImplementation, bytes data) payable" + ], + "0x168": [ + "error AttestationExpired(uint64 expirationTime)", + "error AttestationNotFound()", + "error EmptyProvider()", + "error ProviderAlreadyExists(string provider)", + "error ScoreDoesNotMeetThreshold(uint256 score)", + "error ZeroMaxScoreAge()", + "error ZeroThreshold()", + "error ZeroValue()", + "event AdminChanged(address previousAdmin, address newAdmin)", + "event BeaconUpgraded(address indexed beacon)", + "event EASSet(address easAddress)", + "event Initialized(uint8 version)", + "event MaxScoreAgeSet(uint256 maxScoreAge)", + "event NewVersionCreated()", + "event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)", + "event Paused(address account)", + "event ProvidersAdded(string[] providers)", + "event ResolverSet(address resolverAddress)", + "event SchemaSet(bytes32 schemaUID)", + "event ThresholdSet(uint256 threshold)", + "event Unpaused(address account)", + "event Upgraded(address indexed implementation)", + "function addProviders(string[] providers)", + "function createNewVersion(string[] providers)", + "function currentVersion() view returns (uint32)", + "function eas() view returns (address)", + "function getAttestation(bytes32 attestationUID) view returns ((bytes32 uid, bytes32 schema, uint64 time, uint64 expirationTime, uint64 revocationTime, bytes32 refUID, address recipient, address attester, bool revocable, bytes data))", + "function getPassport(address user) view returns ((string provider, bytes32 hash, uint64 time, uint64 expirationTime)[])", + "function getProviders(uint32 version) view returns (string[])", + "function getScore(address user) view returns (uint256)", + "function gitcoinResolver() view returns (address)", + "function initialize()", + "function isHuman(address user) view returns (bool)", + "function maxScoreAge() view returns (uint64)", + "function owner() view returns (address)", + "function passportSchemaUID() view returns (bytes32)", + "function pause()", + "function paused() view returns (bool)", + "function providerVersions(uint32, uint256) view returns (string)", + "function proxiableUUID() view returns (bytes32)", + "function renounceOwnership()", + "function reversedMappingVersions(uint32, string) view returns (uint8)", + "function scoreSchemaUID() view returns (bytes32)", + "function setEASAddress(address _easContractAddress)", + "function setGitcoinResolver(address _gitcoinResolver)", + "function setMaxScoreAge(uint64 _maxScoreAge)", + "function setPassportSchemaUID(bytes32 _schemaUID)", + "function setScoreSchemaUID(bytes32 _schemaUID)", + "function setThreshold(uint256 _threshold)", + "function threshold() view returns (uint256)", + "function transferOwnership(address newOwner)", + "function unpause()", + "function upgradeTo(address newImplementation)", + "function upgradeToAndCall(address newImplementation, bytes data) payable" ] } \ No newline at end of file diff --git a/deployments/onchainInfo.json b/deployments/onchainInfo.json index d9804fa..8d3aa12 100644 --- a/deployments/onchainInfo.json +++ b/deployments/onchainInfo.json @@ -469,17 +469,17 @@ "address": "0x90E2C4472Df225e8D31f44725B75FFaA244d5D33" }, "GitcoinPassportDecoder": { - "address": "" + "address": "0x2443D22Db6d25D141A1138D80724e3Eee54FD4C2" }, "easSchemas": { "namingSchema": { "uid": "" }, "passport": { - "uid": "" + "uid": "0x8ae6ee946bf1c936584cacc969bf7e9d0b274631c818df7e45c246051b364341" }, "score": { - "uid": "" + "uid": "0x24620f482734b3806102678e4b8bb68baafb1adc1ec29e524bcd69c85f15b915" } } }