Flex Kit Attributes
setAttributes(bytes32 _issuerAndAttr, bytes32 _attrValue, address _account, bytes calldata _sigAccount)
// Sign message from account authorizing issuer to post info about account
const msg = `I authorize ${issuer.address.toLowerCase()} to attest to my address ${account.address.toLowerCase()}`;
const sigAccount = await account.signMessage(msg);
// [Optional] If unknown, get the attribute key unique to the issuer
const attrKey = await flexKit
.connect(issuer)
getAttributeKey(issuer.address, ethers.utils.id("USER_TYPE"));
// Write that the account is of user_type "admin".
flexKit
.connect(issuer)
.setAttributes(
attrKey,
ethers.utils.id("ADMIN"),
account.address,
sigAccount
)setQueryFee(bytes32 _rawAttrName, uint256 _amount)
setRevokedAttributes(bytes32 _attrName, bool _status)
withdraw()
getAttributeKey(address _issuer, bytes32 _attrName)
Querying Attributes
Last updated