Skip to content

List Metadata

Every EFP List has associated key-value metadata called List Metadata.

List Metadata is stored onchain alongside List Records in the same contract, but in a different format (key-value pairs).

Data is stored with a string key and bytes value, for each EFP List.

Only the Manager of the EFP List can set or update the metadata for a list.

This allows Managers to store list-specific configuration or preference data.

Global keys

Global Keys must be made up of lowercase letters, numbers and the hyphen (-) character.

There are currently two global keys defined for List Metadata:

KeyDescription
managerThe Ethereum address of the Manager role associated with the EFP List, which is able to edit List Records.
userThe Ethereum address of the User role associated with the EFP List, which is the Ethereum account that is following the Ethereum accounts in the list.

”manager”

The manager key is used to store the Manager role associated with an EFP List.

The manager is represented as a 20-byte address.

Byte(s)DescriptionValue
0-19Address (20 bytes)0x00000000000000000000000000000000DeaDBeef

Code

// set the manager for the EFP list
efpListMetadata.setValue(tokenId, "manager", abi.encodePacked(manager));

By reading the manager key for a given List, a client can determine the Manager associated with that list.

address manager = abi.decode(efpListMetadata.getValue(tokenId, "manager"), (address));

”user”

The user key is used to store the User role associated with an EFP List.

The user is represented as a 20-byte address.

Byte(s)DescriptionValue
0-19Address (20 bytes)0x00000000000000000000000000000000DeaDBeef

Code

with example code shown below:

// set the user for the EFP List
efpListMetadata.setValue(tokenId, "user", abi.encodePacked(user));

By reading the user key for a given EFP List, a client can determine the User associated with that list.

address user = abi.decode(efpListMetadata.getValue(tokenId, "user"), (address));

Future

This pattern can be extended to support other list-specific metadata such as a name or description.

Custom Keys

The format for custom keys are undefined at this time but will be defined in the future.