Working with userDefinedData
Setting a config
//internal map that stores from hash(data) -> configId
mapping(uint256 => uint256) public configs;
function setConfig(
string memory configDesc,
SelfUtils.UnformattedVerificationConfigV2 config
) public {
//create the key
uint256 key = uint256(keccak256(bytes(configDesc)));
//create the hub compliant config struct
SelfStructs.VerificationConfigV2 verificationConfig =
SelfUtils.formatVerificationConfigV2(_verificationConfig);
//register and get the id
uint256 verificationConfigId =
IIdentityVerificationHubV2(identityVerificationHubV2Address)
.setVerificationConfigV2(verificationConfig);
//set it in the key
configs[key] = verificationConfigId;
}Change the getConfigId in the SelfVerificationRoot
getConfigId in the SelfVerificationRootLast updated