diff --git a/.openzeppelin/optimism.json b/.openzeppelin/optimism.json index 7192bca..d1433e2 100644 --- a/.openzeppelin/optimism.json +++ b/.openzeppelin/optimism.json @@ -231,7 +231,7 @@ "label": "attester", "offset": 0, "slot": "151", - "type": "t_contract(GitcoinAttester)6700", + "type": "t_contract(GitcoinAttester)6503", "contract": "GitcoinVerifier", "src": "contracts/GitcoinVerifier.sol:21" }, @@ -289,7 +289,7 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_contract(GitcoinAttester)6700": { + "t_contract(GitcoinAttester)6503": { "label": "contract GitcoinAttester", "numberOfBytes": "20" }, @@ -447,6 +447,678 @@ } } } + }, + "38802172d292593a826b81783e72f2e20dc7c1aa4d04aea697a8cc739bcd5da7": { + "address": "0x423cd60ab053F1b63D6F78c8c0c63e20F009d669", + "txHash": "0xbc177d74d11d7e8646b33dcf01bff5152ee9117e0ad601a1f14eb3a4c374ca44", + "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": "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)2310", + "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)2310": { + "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" + } + } + } + }, + "90e2b67209504512d49f2eb6948e6ef0c65273140fc40cc7becbf0856ad14e33": { + "address": "0x7bbdb063a824F4e2f22f2F44300d98fd9dEA09Fc", + "txHash": "0xab416512109863cb16a80b9a2e39cdf812305b7f8c0375af36a16e0e4acfd43f", + "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": "eas", + "offset": 0, + "slot": "151", + "type": "t_contract(IEAS)2310", + "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)9708", + "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)2310": { + "label": "contract IEAS", + "numberOfBytes": "20" + }, + "t_contract(IGitcoinResolver)9708": { + "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" + } + } + } + }, + "99324d8a4c0405f84990c4f269299dd73f34f7a1ce7c3d6df818d577be86491c": { + "address": "0xC2687F3E1A9A0eDcF132ef9B6EdcEA254DF1C5C8", + "txHash": "0xc7651e2acdbe8a60048c0cc8a006c69a202fb3857f5a5fd1c545b1ca23222ec6", + "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)6844", + "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)7373_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)6844": { + "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)7373_storage)": { + "label": "mapping(address => struct IGitcoinResolver.CachedScore)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_bytes32)": { + "label": "mapping(bytes32 => bytes32)", + "numberOfBytes": "32" + }, + "t_struct(CachedScore)7373_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" + } + } + } + }, + "0ef2af0b0f4788d85266f5a44d062f688d6c3e400e794b81992bf18717fee332": { + "address": "0xB8263711E2Cf1218De9034C684BA15C3e1f51Cb1", + "txHash": "0x9120f14daf13a890840842e1d488db1ecf3d607c4b0396474f5f98bd4c9d4e90", + "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" + } + } + } } } } diff --git a/.openzeppelin/unknown-59144.json b/.openzeppelin/unknown-59144.json index 841ee33..cbd5e7c 100644 --- a/.openzeppelin/unknown-59144.json +++ b/.openzeppelin/unknown-59144.json @@ -30,6 +30,11 @@ "address": "0xc94aBf0292Ac04AAC18C251d9C8169a8dd2BBbDC", "txHash": "0x934cd2fee81283a73fece2c02e82a5468feb918065efd217af38b50fcbcf2ca7", "kind": "uups" + }, + { + "address": "0x423cd60ab053F1b63D6F78c8c0c63e20F009d669", + "txHash": "0xefa11171bdeb09c97b1ac76f1b60fdb471ea184627d682d83133629e8af3d023", + "kind": "uups" } ], "impls": { @@ -232,7 +237,7 @@ "label": "_gitcoinAttester", "offset": 0, "slot": "153", - "type": "t_contract(GitcoinAttester)6571", + "type": "t_contract(GitcoinAttester)6503", "contract": "GitcoinResolver", "src": "contracts/GitcoinResolver.sol:41" }, @@ -266,7 +271,7 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_contract(GitcoinAttester)6571": { + "t_contract(GitcoinAttester)6503": { "label": "contract GitcoinAttester", "numberOfBytes": "20" }, @@ -760,6 +765,530 @@ } } } + }, + "90e2b67209504512d49f2eb6948e6ef0c65273140fc40cc7becbf0856ad14e33": { + "address": "0xFc40a800757C6436B6Fc314F9C83Bb2DDC384D8B", + "txHash": "0x62337e128ce4caf17c58c366432bdd499ace0ba68de01913a921d1ec4e61efc6", + "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": "eas", + "offset": 0, + "slot": "151", + "type": "t_contract(IEAS)2310", + "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)9708", + "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)2310": { + "label": "contract IEAS", + "numberOfBytes": "20" + }, + "t_contract(IGitcoinResolver)9708": { + "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" + } + } + } + }, + "99324d8a4c0405f84990c4f269299dd73f34f7a1ce7c3d6df818d577be86491c": { + "address": "0xdf5cECD9D8f17366023ecc011Ac8130b94524eBA", + "txHash": "0xa37f78e5bb1406ddcb67102ffc43e1a205a13de65108838a97c508cdd3066d7e", + "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)6844", + "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)7373_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)6844": { + "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)7373_storage)": { + "label": "mapping(address => struct IGitcoinResolver.CachedScore)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_bytes32)": { + "label": "mapping(bytes32 => bytes32)", + "numberOfBytes": "32" + }, + "t_struct(CachedScore)7373_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" + } + } + } + }, + "38802172d292593a826b81783e72f2e20dc7c1aa4d04aea697a8cc739bcd5da7": { + "address": "0x8a0d8Fb8C26e972090382AE6965Cc839fee6c1A5", + "txHash": "0xbd4089952dd0ca9e31d3e661fbdb7844d29a534832af81fbceb1e12dc7aefeba", + "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": "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)2310", + "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)2310": { + "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" + } + } + } } } } diff --git a/deployments/abi/GitcoinAttester.json b/deployments/abi/GitcoinAttester.json index 8ab2c10..91420fa 100644 --- a/deployments/abi/GitcoinAttester.json +++ b/deployments/abi/GitcoinAttester.json @@ -29,6 +29,7 @@ "0xa": [ "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)", @@ -37,6 +38,7 @@ "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()", @@ -110,6 +112,7 @@ "0xe708": [ "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)", @@ -118,6 +121,7 @@ "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()", @@ -125,9 +129,9 @@ "function proxiableUUID() view returns (bytes32)", "function removeVerifier(address _verifier)", "function renounceOwnership()", - "function revokeAttestations(tuple(bytes32 schema, tuple(bytes32 uid, uint256 value)[] data)[] multiRevocationRequest) payable", + "function revokeAttestations((bytes32 schema, (bytes32 uid, uint256 value)[] data)[] multiRevocationRequest) payable", "function setEASAddress(address _easContractAddress)", - "function submitAttestations(tuple(bytes32 schema, tuple(address recipient, uint64 expirationTime, bool revocable, bytes32 refUID, bytes data, uint256 value)[] data)[] multiAttestationRequest) payable returns (bytes32[])", + "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)", diff --git a/deployments/abi/GitcoinPassportDecoder.json b/deployments/abi/GitcoinPassportDecoder.json index 2ee0caa..b4b7b9b 100644 --- a/deployments/abi/GitcoinPassportDecoder.json +++ b/deployments/abi/GitcoinPassportDecoder.json @@ -200,5 +200,117 @@ "function unpause()", "function upgradeTo(address newImplementation)", "function upgradeToAndCall(address newImplementation, bytes data) payable" + ], + "0xa": [ + "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 (tuple(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 (tuple(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" + ], + "0xe708": [ + "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/abi/GitcoinResolver.json b/deployments/abi/GitcoinResolver.json index 8d7134d..fa48e35 100644 --- a/deployments/abi/GitcoinResolver.json +++ b/deployments/abi/GitcoinResolver.json @@ -41,28 +41,39 @@ "0xa": [ "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 attest(tuple(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 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(tuple(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(tuple(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 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(tuple(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 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)", @@ -153,25 +164,30 @@ "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(tuple(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 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(tuple(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(tuple(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 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(tuple(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 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)", diff --git a/deployments/abi/GitcoinVerifier.json b/deployments/abi/GitcoinVerifier.json index 770aa4a..c1d34bc 100644 --- a/deployments/abi/GitcoinVerifier.json +++ b/deployments/abi/GitcoinVerifier.json @@ -28,6 +28,9 @@ "function withdrawFees(uint256 _amount)" ], "0xa": [ + "error InsufficientFee()", + "error InvalidNonce()", + "error InvalidSignature()", "event AdminChanged(address previousAdmin, address newAdmin)", "event BeaconUpgraded(address indexed beacon)", "event Initialized(uint8 version)", @@ -49,8 +52,8 @@ "function unpause()", "function upgradeTo(address newImplementation)", "function upgradeToAndCall(address newImplementation, bytes data) payable", - "function verifyAndAttest(tuple(tuple(bytes32 schema, tuple(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()" + "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)" ], "0xe704": [ "error InsufficientFee()", diff --git a/deployments/onchainInfo.json b/deployments/onchainInfo.json index d4e2e3a..66b4174 100644 --- a/deployments/onchainInfo.json +++ b/deployments/onchainInfo.json @@ -122,6 +122,9 @@ "score": { "uid": "0x6ab5d34260fca0cfcf0e76e96d439cace6aa7c3c019d7c4580ed52c6845e9c89" } + }, + "GitcoinPassportDecoder": { + "address": "0x5558D441779Eca04A329BcD6b47830D2C6607769" } }, "0xe704": { @@ -212,6 +215,9 @@ }, "GitcoinVeraxPortal": { "address": "0xCAa9E817f02486cE076560B77A86235Ef91c5d5D" + }, + "GitcoinPassportDecoder": { + "address": "0x423cd60ab053F1b63D6F78c8c0c63e20F009d669" } } } \ No newline at end of file diff --git a/deployments/providerBitMapInfo.json b/deployments/providerBitMapInfo.json index 0a11f6b..8cb255f 100644 --- a/deployments/providerBitMapInfo.json +++ b/deployments/providerBitMapInfo.json @@ -1 +1 @@ -[{"bit":0,"index":0,"name":"SelfStakingBronze"},{"bit":1,"index":0,"name":"SelfStakingSilver"},{"bit":2,"index":0,"name":"SelfStakingGold"},{"bit":3,"index":0,"name":"CommunityStakingBronze"},{"bit":4,"index":0,"name":"CommunityStakingSilver"},{"bit":5,"index":0,"name":"CommunityStakingGold"},{"bit":6,"index":0,"name":"GitcoinContributorStatistics#numGrantsContributeToGte#1"},{"bit":7,"index":0,"name":"GitcoinContributorStatistics#numGrantsContributeToGte#10"},{"bit":8,"index":0,"name":"GitcoinContributorStatistics#numGrantsContributeToGte#25"},{"bit":9,"index":0,"name":"GitcoinContributorStatistics#numGrantsContributeToGte#100"},{"bit":10,"index":0,"name":"GitcoinContributorStatistics#totalContributionAmountGte#10"},{"bit":11,"index":0,"name":"GitcoinContributorStatistics#totalContributionAmountGte#100"},{"bit":12,"index":0,"name":"GitcoinContributorStatistics#totalContributionAmountGte#1000"},{"bit":13,"index":0,"name":"GitcoinContributorStatistics#numGr14ContributionsGte#1"},{"bit":14,"index":0,"name":"GitcoinContributorStatistics#numRoundsContributedToGte#1"},{"bit":15,"index":0,"name":"twitterAccountAgeGte#180"},{"bit":16,"index":0,"name":"twitterAccountAgeGte#365"},{"bit":17,"index":0,"name":"twitterAccountAgeGte#730"},{"bit":18,"index":0,"name":"Discord"},{"bit":19,"index":0,"name":"Google"},{"bit":20,"index":0,"name":"githubAccountCreationGte#90"},{"bit":21,"index":0,"name":"githubAccountCreationGte#180"},{"bit":22,"index":0,"name":"githubAccountCreationGte#365"},{"bit":23,"index":0,"name":"githubContributionActivityGte#30"},{"bit":24,"index":0,"name":"githubContributionActivityGte#60"},{"bit":25,"index":0,"name":"githubContributionActivityGte#120"},{"bit":26,"index":0,"name":"Facebook"},{"bit":27,"index":0,"name":"FacebookProfilePicture"},{"bit":28,"index":0,"name":"Linkedin"},{"bit":29,"index":0,"name":"Ens"},{"bit":30,"index":0,"name":"Brightid"},{"bit":31,"index":0,"name":"Poh"},{"bit":32,"index":0,"name":"ethPossessionsGte#1"},{"bit":33,"index":0,"name":"ethPossessionsGte#10"},{"bit":34,"index":0,"name":"ethPossessionsGte#32"},{"bit":35,"index":0,"name":"FirstEthTxnProvider"},{"bit":36,"index":0,"name":"EthGTEOneTxnProvider"},{"bit":37,"index":0,"name":"EthGasProvider"},{"bit":38,"index":0,"name":"SnapshotVotesProvider"},{"bit":39,"index":0,"name":"SnapshotProposalsProvider"},{"bit":40,"index":0,"name":"NFT"},{"bit":41,"index":0,"name":"ZkSync"},{"bit":42,"index":0,"name":"ZkSyncEra"},{"bit":43,"index":0,"name":"Lens"},{"bit":44,"index":0,"name":"GnosisSafe"},{"bit":45,"index":0,"name":"Coinbase"},{"bit":46,"index":0,"name":"GuildMember"},{"bit":47,"index":0,"name":"GuildAdmin"},{"bit":48,"index":0,"name":"GuildPassportMember"},{"bit":49,"index":0,"name":"Hypercerts"},{"bit":50,"index":0,"name":"PHIActivitySilver"},{"bit":51,"index":0,"name":"PHIActivityGold"},{"bit":52,"index":0,"name":"HolonymGovIdProvider"},{"bit":53,"index":0,"name":"IdenaState#Newbie"},{"bit":54,"index":0,"name":"IdenaState#Verified"},{"bit":55,"index":0,"name":"IdenaState#Human"},{"bit":56,"index":0,"name":"IdenaStake#1k"},{"bit":57,"index":0,"name":"IdenaStake#10k"},{"bit":58,"index":0,"name":"IdenaStake#100k"},{"bit":59,"index":0,"name":"IdenaAge#5"},{"bit":60,"index":0,"name":"IdenaAge#10"},{"bit":61,"index":0,"name":"CivicCaptchaPass"},{"bit":62,"index":0,"name":"CivicUniquenessPass"},{"bit":63,"index":0,"name":"CivicLivenessPass"},{"bit":64,"index":0,"name":"CyberProfilePremium"},{"bit":65,"index":0,"name":"CyberProfilePaid"},{"bit":66,"index":0,"name":"CyberProfileOrgMember"},{"bit":67,"index":0,"name":"GrantsStack3Projects"},{"bit":68,"index":0,"name":"GrantsStack5Projects"},{"bit":69,"index":0,"name":"GrantsStack7Projects"},{"bit":70,"index":0,"name":"GrantsStack2Programs"},{"bit":71,"index":0,"name":"GrantsStack4Programs"},{"bit":72,"index":0,"name":"GrantsStack6Programs"},{"bit":73,"index":0,"name":"TrustaLabs"},{"bit":74,"index":0,"name":"BeginnerCommunityStaker"},{"bit":75,"index":0,"name":"ExperiencedCommunityStaker"},{"bit":76,"index":0,"name":"TrustedCitizen"},{"bit":77,"index":0,"name":"CoinbaseDualVerification"}] \ No newline at end of file +[{"bit":0,"index":0,"name":"SelfStakingBronze"},{"bit":1,"index":0,"name":"SelfStakingSilver"},{"bit":2,"index":0,"name":"SelfStakingGold"},{"bit":3,"index":0,"name":"CommunityStakingBronze"},{"bit":4,"index":0,"name":"CommunityStakingSilver"},{"bit":5,"index":0,"name":"CommunityStakingGold"},{"bit":6,"index":0,"name":"GitcoinContributorStatistics#numGrantsContributeToGte#1"},{"bit":7,"index":0,"name":"GitcoinContributorStatistics#numGrantsContributeToGte#10"},{"bit":8,"index":0,"name":"GitcoinContributorStatistics#numGrantsContributeToGte#25"},{"bit":9,"index":0,"name":"GitcoinContributorStatistics#numGrantsContributeToGte#100"},{"bit":10,"index":0,"name":"GitcoinContributorStatistics#totalContributionAmountGte#10"},{"bit":11,"index":0,"name":"GitcoinContributorStatistics#totalContributionAmountGte#100"},{"bit":12,"index":0,"name":"GitcoinContributorStatistics#totalContributionAmountGte#1000"},{"bit":13,"index":0,"name":"GitcoinContributorStatistics#numGr14ContributionsGte#1"},{"bit":14,"index":0,"name":"GitcoinContributorStatistics#numRoundsContributedToGte#1"},{"bit":15,"index":0,"name":"twitterAccountAgeGte#180"},{"bit":16,"index":0,"name":"twitterAccountAgeGte#365"},{"bit":17,"index":0,"name":"twitterAccountAgeGte#730"},{"bit":18,"index":0,"name":"Discord"},{"bit":19,"index":0,"name":"Google"},{"bit":20,"index":0,"name":"githubAccountCreationGte#90"},{"bit":21,"index":0,"name":"githubAccountCreationGte#180"},{"bit":22,"index":0,"name":"githubAccountCreationGte#365"},{"bit":23,"index":0,"name":"githubContributionActivityGte#30"},{"bit":24,"index":0,"name":"githubContributionActivityGte#60"},{"bit":25,"index":0,"name":"githubContributionActivityGte#120"},{"bit":26,"index":0,"name":"Facebook"},{"bit":27,"index":0,"name":"FacebookProfilePicture"},{"bit":28,"index":0,"name":"Linkedin"},{"bit":29,"index":0,"name":"Ens"},{"bit":30,"index":0,"name":"Brightid"},{"bit":31,"index":0,"name":"Poh"},{"bit":32,"index":0,"name":"ethPossessionsGte#1"},{"bit":33,"index":0,"name":"ethPossessionsGte#10"},{"bit":34,"index":0,"name":"ethPossessionsGte#32"},{"bit":35,"index":0,"name":"FirstEthTxnProvider"},{"bit":36,"index":0,"name":"EthGTEOneTxnProvider"},{"bit":37,"index":0,"name":"EthGasProvider"},{"bit":38,"index":0,"name":"SnapshotVotesProvider"},{"bit":39,"index":0,"name":"SnapshotProposalsProvider"},{"bit":40,"index":0,"name":"NFT"},{"bit":41,"index":0,"name":"ZkSync"},{"bit":42,"index":0,"name":"ZkSyncEra"},{"bit":43,"index":0,"name":"Lens"},{"bit":44,"index":0,"name":"GnosisSafe"},{"bit":45,"index":0,"name":"Coinbase"},{"bit":46,"index":0,"name":"GuildMember"},{"bit":47,"index":0,"name":"GuildAdmin"},{"bit":48,"index":0,"name":"GuildPassportMember"},{"bit":49,"index":0,"name":"Hypercerts"},{"bit":50,"index":0,"name":"PHIActivitySilver"},{"bit":51,"index":0,"name":"PHIActivityGold"},{"bit":52,"index":0,"name":"HolonymGovIdProvider"},{"bit":53,"index":0,"name":"IdenaState#Newbie"},{"bit":54,"index":0,"name":"IdenaState#Verified"},{"bit":55,"index":0,"name":"IdenaState#Human"},{"bit":56,"index":0,"name":"IdenaStake#1k"},{"bit":57,"index":0,"name":"IdenaStake#10k"},{"bit":58,"index":0,"name":"IdenaStake#100k"},{"bit":59,"index":0,"name":"IdenaAge#5"},{"bit":60,"index":0,"name":"IdenaAge#10"},{"bit":61,"index":0,"name":"CivicCaptchaPass"},{"bit":62,"index":0,"name":"CivicUniquenessPass"},{"bit":63,"index":0,"name":"CivicLivenessPass"},{"bit":64,"index":0,"name":"CyberProfilePremium"},{"bit":65,"index":0,"name":"CyberProfilePaid"},{"bit":66,"index":0,"name":"CyberProfileOrgMember"},{"bit":67,"index":0,"name":"GrantsStack3Projects"},{"bit":68,"index":0,"name":"GrantsStack5Projects"},{"bit":69,"index":0,"name":"GrantsStack7Projects"},{"bit":70,"index":0,"name":"GrantsStack2Programs"},{"bit":71,"index":0,"name":"GrantsStack4Programs"},{"bit":72,"index":0,"name":"GrantsStack6Programs"},{"bit":73,"index":0,"name":"TrustaLabs"},{"bit":74,"index":0,"name":"BeginnerCommunityStaker"},{"bit":75,"index":0,"name":"ExperiencedCommunityStaker"},{"bit":76,"index":0,"name":"TrustedCitizen"},{"bit":77,"index":0,"name":"CoinbaseDualVerification"},{"bit":78,"index":0,"name":"ETHEnthusiast"},{"bit":79,"index":0,"name":"ETHAdvocate"},{"bit":80,"index":0,"name":"ETHPioneer"},{"bit":81,"index":0,"name":"ETHMaxi"}] \ No newline at end of file diff --git a/docs/08-upgrade-contracts.md b/docs/08-upgrade-contracts.md new file mode 100644 index 0000000..df1298a --- /dev/null +++ b/docs/08-upgrade-contracts.md @@ -0,0 +1,19 @@ +# Upgrade + +Each contract should a script that can be used to upgrade the contract. This script will deploy the new contract and generate calldata that should be used by the multsig to upgrade the contract. When the multisig approves the upgrade, it is calling the `upgradeTo` function and passing the address of the newly deployed contract. + +e.g. + +```bash +npx hardhat run scripts/upgradeAttester.ts --network optimism +``` + +Once deployed you should verify the contract on etherscan. + +```bash +npx hardhat verify 0x423cd60ab053F1b63D6F78c8c0c63e20F009d669 --network optimism +``` + +Then copy the `./deployments` directory over to the passport application. + +Finally copy the calldata from the deployment script output and paste it into the multisig UI. diff --git a/package.json b/package.json index a28bbb3..7517ad0 100644 --- a/package.json +++ b/package.json @@ -21,13 +21,13 @@ "typescript": "^5.0.4" }, "dependencies": { - "@nomicfoundation/hardhat-ethers": "^3.0.4", + "@nomicfoundation/hardhat-ethers": "^3.0.5", "@nomicfoundation/hardhat-verify": "^1.0.4", "@openzeppelin/contracts": "^4.8.2", "@openzeppelin/contracts-upgradeable": "^4.9.2", "@openzeppelin/upgrades-core": "^1.27.3", "@typechain/ethers-v6": "^0.4.0", - "ethers": "^6.6.3", + "ethers": "^6.6.4", "uuid": "^9.0.1" } } diff --git a/scripts/data/providerBitMapInfo.json b/scripts/data/providerBitMapInfo.json deleted file mode 100644 index 1e1a259..0000000 --- a/scripts/data/providerBitMapInfo.json +++ /dev/null @@ -1,116 +0,0 @@ -[ - { "bit": 0, "index": 0, "name": "SelfStakingBronze" }, - { "bit": 1, "index": 0, "name": "SelfStakingSilver" }, - { "bit": 2, "index": 0, "name": "SelfStakingGold" }, - { "bit": 3, "index": 0, "name": "CommunityStakingBronze" }, - { "bit": 4, "index": 0, "name": "CommunityStakingSilver" }, - { "bit": 5, "index": 0, "name": "CommunityStakingGold" }, - { - "bit": 6, - "index": 0, - "name": "GitcoinContributorStatistics#numGrantsContributeToGte#1" - }, - { - "bit": 7, - "index": 0, - "name": "GitcoinContributorStatistics#numGrantsContributeToGte#10" - }, - { - "bit": 8, - "index": 0, - "name": "GitcoinContributorStatistics#numGrantsContributeToGte#25" - }, - { - "bit": 9, - "index": 0, - "name": "GitcoinContributorStatistics#numGrantsContributeToGte#100" - }, - { - "bit": 10, - "index": 0, - "name": "GitcoinContributorStatistics#totalContributionAmountGte#10" - }, - { - "bit": 11, - "index": 0, - "name": "GitcoinContributorStatistics#totalContributionAmountGte#100" - }, - { - "bit": 12, - "index": 0, - "name": "GitcoinContributorStatistics#totalContributionAmountGte#1000" - }, - { - "bit": 13, - "index": 0, - "name": "GitcoinContributorStatistics#numGr14ContributionsGte#1" - }, - { - "bit": 14, - "index": 0, - "name": "GitcoinContributorStatistics#numRoundsContributedToGte#1" - }, - { "bit": 15, "index": 0, "name": "twitterAccountAgeGte#180" }, - { "bit": 16, "index": 0, "name": "twitterAccountAgeGte#365" }, - { "bit": 17, "index": 0, "name": "twitterAccountAgeGte#730" }, - { "bit": 18, "index": 0, "name": "Discord" }, - { "bit": 19, "index": 0, "name": "Google" }, - { "bit": 20, "index": 0, "name": "githubAccountCreationGte#90" }, - { "bit": 21, "index": 0, "name": "githubAccountCreationGte#180" }, - { "bit": 22, "index": 0, "name": "githubAccountCreationGte#365" }, - { "bit": 23, "index": 0, "name": "githubContributionActivityGte#30" }, - { "bit": 24, "index": 0, "name": "githubContributionActivityGte#60" }, - { "bit": 25, "index": 0, "name": "githubContributionActivityGte#120" }, - { "bit": 26, "index": 0, "name": "Facebook" }, - { "bit": 27, "index": 0, "name": "FacebookProfilePicture" }, - { "bit": 28, "index": 0, "name": "Linkedin" }, - { "bit": 29, "index": 0, "name": "Ens" }, - { "bit": 30, "index": 0, "name": "Brightid" }, - { "bit": 31, "index": 0, "name": "Poh" }, - { "bit": 32, "index": 0, "name": "ethPossessionsGte#1" }, - { "bit": 33, "index": 0, "name": "ethPossessionsGte#10" }, - { "bit": 34, "index": 0, "name": "ethPossessionsGte#32" }, - { "bit": 35, "index": 0, "name": "FirstEthTxnProvider" }, - { "bit": 36, "index": 0, "name": "EthGTEOneTxnProvider" }, - { "bit": 37, "index": 0, "name": "EthGasProvider" }, - { "bit": 38, "index": 0, "name": "SnapshotVotesProvider" }, - { "bit": 39, "index": 0, "name": "SnapshotProposalsProvider" }, - { "bit": 40, "index": 0, "name": "NFT" }, - { "bit": 41, "index": 0, "name": "ZkSync" }, - { "bit": 42, "index": 0, "name": "ZkSyncEra" }, - { "bit": 43, "index": 0, "name": "Lens" }, - { "bit": 44, "index": 0, "name": "GnosisSafe" }, - { "bit": 45, "index": 0, "name": "Coinbase" }, - { "bit": 46, "index": 0, "name": "GuildMember" }, - { "bit": 47, "index": 0, "name": "GuildAdmin" }, - { "bit": 48, "index": 0, "name": "GuildPassportMember" }, - { "bit": 49, "index": 0, "name": "Hypercerts" }, - { "bit": 50, "index": 0, "name": "PHIActivitySilver" }, - { "bit": 51, "index": 0, "name": "PHIActivityGold" }, - { "bit": 52, "index": 0, "name": "HolonymGovIdProvider" }, - { "bit": 53, "index": 0, "name": "IdenaState#Newbie" }, - { "bit": 54, "index": 0, "name": "IdenaState#Verified" }, - { "bit": 55, "index": 0, "name": "IdenaState#Human" }, - { "bit": 56, "index": 0, "name": "IdenaStake#1k" }, - { "bit": 57, "index": 0, "name": "IdenaStake#10k" }, - { "bit": 58, "index": 0, "name": "IdenaStake#100k" }, - { "bit": 59, "index": 0, "name": "IdenaAge#5" }, - { "bit": 60, "index": 0, "name": "IdenaAge#10" }, - { "bit": 61, "index": 0, "name": "CivicCaptchaPass" }, - { "bit": 62, "index": 0, "name": "CivicUniquenessPass" }, - { "bit": 63, "index": 0, "name": "CivicLivenessPass" }, - { "bit": 64, "index": 0, "name": "CyberProfilePremium" }, - { "bit": 65, "index": 0, "name": "CyberProfilePaid" }, - { "bit": 66, "index": 0, "name": "CyberProfileOrgMember" }, - { "bit": 67, "index": 0, "name": "GrantsStack3Projects" }, - { "bit": 68, "index": 0, "name": "GrantsStack5Projects" }, - { "bit": 69, "index": 0, "name": "GrantsStack7Projects" }, - { "bit": 70, "index": 0, "name": "GrantsStack2Programs" }, - { "bit": 71, "index": 0, "name": "GrantsStack4Programs" }, - { "bit": 72, "index": 0, "name": "GrantsStack6Programs" }, - { "bit": 73, "index": 0, "name": "TrustaLabs" }, - { "bit": 74, "index": 0, "name": "BeginnerCommunityStaker" }, - { "bit": 75, "index": 0, "name": "ExperiencedCommunityStaker" }, - { "bit": 76, "index": 0, "name": "TrustedCitizen" }, - { "bit": 77, "index": 0, "name": "CoinbaseDualVerification" } -] diff --git a/scripts/prepareCallddataForVerifierWithdrawFees.ts b/scripts/prepareCallddataForVerifierWithdrawFees.ts new file mode 100644 index 0000000..bbed610 --- /dev/null +++ b/scripts/prepareCallddataForVerifierWithdrawFees.ts @@ -0,0 +1,37 @@ +import hre, { ethers } from "hardhat"; +import { + confirmContinue, + assertEnvironment, + getVerifierAddress +} from "./lib/utils"; + +assertEnvironment(); + +export async function main() { + const ethAmount = "16.091447181969673068"; + const ethAmountInWei = ethers.parseEther(ethAmount); + + await confirmContinue({ + contract: "GitcoinVerifier", + network: hre.network.name, + chainId: hre.network.config.chainId, + ethAmount: ethAmount, + ethAmountInWei: ethAmountInWei + }); + + const verifierAddress = getVerifierAddress(); + const GitcoinVerifier = await ethers.getContractFactory("GitcoinVerifier"); + const gitcoinVerifier = GitcoinVerifier.attach(verifierAddress); + + const withdrawFeesData = gitcoinVerifier.interface.encodeFunctionData( + "withdrawFees", + [ethAmountInWei] + ); + + console.log({ withdrawFeesData }); +} + +main().catch((error) => { + console.error(error); + process.exitCode = 1; +}); diff --git a/scripts/setupDecoder.ts b/scripts/setupDecoder.ts index 923d3a1..9f227a9 100644 --- a/scripts/setupDecoder.ts +++ b/scripts/setupDecoder.ts @@ -8,8 +8,7 @@ import { getThisChainInfo } from "./lib/utils"; import { getSchemaUID } from "@ethereum-attestation-service/eas-sdk"; -import providerBitMapInfo from "./data/providerBitMapInfo.json"; -import newBitMap from "../deployments/providerBitMapInfo.json"; +import providerBitMapInfo from "../deployments/providerBitMapInfo.json"; assertEnvironment(); @@ -18,7 +17,6 @@ export async function main() { const maxScoreAge = ethers.toBigInt(90 * 24 * 3600); // 90 days const threshold = ethers.toBigInt(200000); // that means 20.0000 - const GitcoinPassportDecoder = await ethers.getContractFactory( "GitcoinPassportDecoder" ); @@ -148,7 +146,6 @@ export async function main() { const currentVersion = await passportDecoder.currentVersion(); console.log("currentVersion", currentVersion); - console.log(" providers: ", providers); console.log(`🚀 writing providers to blockchain...`); const tx = await passportDecoder.addProviders(providers); diff --git a/scripts/upgradeAttester.ts b/scripts/upgradeAttester.ts index 321dd63..7734626 100644 --- a/scripts/upgradeAttester.ts +++ b/scripts/upgradeAttester.ts @@ -4,7 +4,7 @@ import { assertEnvironment, updateDeploymentsFile, getAbi, - getAttesterAddress, + getAttesterAddress } from "./lib/utils"; assertEnvironment(); @@ -13,12 +13,11 @@ export async function main() { await confirmContinue({ contract: "GitcoinAttester", network: hre.network.name, - chainId: hre.network.config.chainId, + chainId: hre.network.config.chainId }); - const GitcoinAttesterUpdate = await ethers.getContractFactory( - "GitcoinAttesterUpdate" - ); + const GitcoinAttesterUpdate = + await ethers.getContractFactory("GitcoinAttester"); const attesterAddress = getAttesterAddress(); @@ -27,13 +26,11 @@ export async function main() { GitcoinAttesterUpdate, { kind: "uups", - redeployImplementation: "always", + redeployImplementation: "always" } ); - console.log( - `✅ Deployed Upgraded GitcoinAttesterUpdate. ${preparedUpgradeAddress}` - ); + console.log(`✅ Deployed Upgraded GitcoinAttester ${preparedUpgradeAddress}`); const GitcoinAttester = await ethers.getContractFactory("GitcoinAttester"); const gitcoinAttester = GitcoinAttester.attach(attesterAddress); diff --git a/yarn.lock b/yarn.lock index a8fe8ff..41165fb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@adraffy/ens-normalize@1.9.2": - version "1.9.2" - resolved "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.9.2.tgz" - integrity sha512-0h+FrQDqe2Wn+IIGFkTCd4aAwTJ+7834Ek1COohCyV26AXhwQ7WQaz+4F/nLOeVl/3BtWHOHLPsq46V8YB46Eg== +"@adraffy/ens-normalize@1.10.0": + version "1.10.0" + resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.10.0.tgz#d2a39395c587e092d77cbbc80acf956a54f38bf7" + integrity sha512-nA9XHtlAkYfJxY7bce8DcN7eKxWWCWkU+1GR9d+U6MbNpfwQp8TI7vqOsBsMcHoT4mBu2kypKoSKnghEzOOq5Q== "@aws-crypto/sha256-js@1.2.2": version "1.2.2" @@ -508,16 +508,23 @@ tweetnacl "^1.0.3" tweetnacl-util "^0.15.1" -"@noble/hashes@1.1.2": - version "1.1.2" - resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-1.1.2.tgz" - integrity sha512-KYRCASVTv6aeUi1tsF8/vpyR7zpfs3FUzy2Jqm+MU+LmUKhQ0y2FpfwqkCcxSg2ua4GALJd8k2R76WxwZGbQpA== +"@noble/curves@1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.2.0.tgz#92d7e12e4e49b23105a2555c6984d41733d65c35" + integrity sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw== + dependencies: + "@noble/hashes" "1.3.2" "@noble/hashes@1.2.0", "@noble/hashes@~1.2.0": version "1.2.0" resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz" integrity sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ== +"@noble/hashes@1.3.2": + version "1.3.2" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.2.tgz#6f26dbc8fbc7205873ce3cee2f690eba0d421b39" + integrity sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ== + "@noble/secp256k1@1.7.1", "@noble/secp256k1@~1.7.0": version "1.7.1" resolved "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-1.7.1.tgz" @@ -822,10 +829,10 @@ deep-eql "^4.0.1" ordinal "^1.0.3" -"@nomicfoundation/hardhat-ethers@^3.0.4": - version "3.0.4" - resolved "https://registry.npmjs.org/@nomicfoundation/hardhat-ethers/-/hardhat-ethers-3.0.4.tgz" - integrity sha512-k9qbLoY7qn6C6Y1LI0gk2kyHXil2Tauj4kGzQ8pgxYXIGw8lWn8tuuL72E11CrlKaXRUvOgF0EXrv/msPI2SbA== +"@nomicfoundation/hardhat-ethers@^3.0.5": + version "3.0.5" + resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-ethers/-/hardhat-ethers-3.0.5.tgz#0422c2123dec7c42e7fb2be8e1691f1d9708db56" + integrity sha512-RNFe8OtbZK6Ila9kIlHp0+S80/0Bu/3p41HUpaRIoHLm6X3WekTd83vob3rE54Duufu1edCiBDxspBzi2rxHHw== dependencies: debug "^4.1.1" lodash.isequal "^4.5.0" @@ -2504,14 +2511,14 @@ ethers@^5.7.1, ethers@^5.7.2: "@ethersproject/web" "5.7.1" "@ethersproject/wordlists" "5.7.0" -ethers@^6.6.3: - version "6.6.3" - resolved "https://registry.npmjs.org/ethers/-/ethers-6.6.3.tgz" - integrity sha512-g8wLXeRWSGDD0T+wsL3pvyc3aYnmxEEAwH8LSoDTDRhRsmJeNs9YMXlNU7ax2caO+zHkeI9MkHiz6rwxEjN4Mw== +ethers@^6.6.4: + version "6.10.0" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-6.10.0.tgz#20f3c63c60d59a993f8090ad423d8a3854b3b1cd" + integrity sha512-nMNwYHzs6V1FR3Y4cdfxSQmNgZsRj1RiTU25JwvnJLmyzw9z3SKxNc2XKDuiXXo/v9ds5Mp9m6HBabgYQQ26tA== dependencies: - "@adraffy/ens-normalize" "1.9.2" - "@noble/hashes" "1.1.2" - "@noble/secp256k1" "1.7.1" + "@adraffy/ens-normalize" "1.10.0" + "@noble/curves" "1.2.0" + "@noble/hashes" "1.3.2" "@types/node" "18.15.13" aes-js "4.0.0-beta.5" tslib "2.4.0"