DataTypes

Git Source

A standard library of data types.

Structs

MigrateData

struct MigrateData {
    address account;
    string handle;
    string uri;
    address[] toAddresses;
    bytes32 linkType;
}

CreateCharacterData

struct CreateCharacterData {
    address to;
    string handle;
    string uri;
    address linkModule;
    bytes linkModuleInitData;
}

createThenLinkCharacterData

struct createThenLinkCharacterData {
    uint256 fromCharacterId;
    address to;
    bytes32 linkType;
}

linkNoteData

struct linkNoteData {
    uint256 fromCharacterId;
    uint256 toCharacterId;
    uint256 toNoteId;
    bytes32 linkType;
    bytes data;
}

unlinkNoteData

struct unlinkNoteData {
    uint256 fromCharacterId;
    uint256 toCharacterId;
    uint256 toNoteId;
    bytes32 linkType;
}

linkCharacterData

struct linkCharacterData {
    uint256 fromCharacterId;
    uint256 toCharacterId;
    bytes32 linkType;
    bytes data;
}

unlinkCharacterData

struct unlinkCharacterData {
    uint256 fromCharacterId;
    uint256 toCharacterId;
    bytes32 linkType;
}

linkERC721Data

struct linkERC721Data {
    uint256 fromCharacterId;
    address tokenAddress;
    uint256 tokenId;
    bytes32 linkType;
    bytes data;
}

unlinkERC721Data

struct unlinkERC721Data {
    uint256 fromCharacterId;
    address tokenAddress;
    uint256 tokenId;
    bytes32 linkType;
}

linkAddressData

struct linkAddressData {
    uint256 fromCharacterId;
    address ethAddress;
    bytes32 linkType;
    bytes data;
}

unlinkAddressData

struct unlinkAddressData {
    uint256 fromCharacterId;
    address ethAddress;
    bytes32 linkType;
}

linkAnyUriData

struct linkAnyUriData {
    uint256 fromCharacterId;
    string toUri;
    bytes32 linkType;
    bytes data;
}

unlinkAnyUriData

struct unlinkAnyUriData {
    uint256 fromCharacterId;
    string toUri;
    bytes32 linkType;
}

linkLinklistData

struct linkLinklistData {
    uint256 fromCharacterId;
    uint256 toLinkListId;
    bytes32 linkType;
    bytes data;
}

unlinkLinklistData

struct unlinkLinklistData {
    uint256 fromCharacterId;
    uint256 toLinkListId;
    bytes32 linkType;
}

setLinkModule4CharacterData

struct setLinkModule4CharacterData {
    uint256 characterId;
    address linkModule;
    bytes linkModuleInitData;
}

setLinkModule4NoteData

struct setLinkModule4NoteData {
    uint256 characterId;
    uint256 noteId;
    address linkModule;
    bytes linkModuleInitData;
}

setLinkModule4LinklistData

struct setLinkModule4LinklistData {
    uint256 linklistId;
    address linkModule;
    bytes linkModuleInitData;
}

setLinkModule4ERC721Data

struct setLinkModule4ERC721Data {
    address tokenAddress;
    uint256 tokenId;
    address linkModule;
    bytes linkModuleInitData;
}

setLinkModule4AddressData

struct setLinkModule4AddressData {
    address account;
    address linkModule;
    bytes linkModuleInitData;
}

setMintModule4NoteData

struct setMintModule4NoteData {
    uint256 characterId;
    uint256 noteId;
    address mintModule;
    bytes mintModuleInitData;
}

linkCharactersInBatchData

struct linkCharactersInBatchData {
    uint256 fromCharacterId;
    uint256[] toCharacterIds;
    bytes[] data;
    address[] toAddresses;
    bytes32 linkType;
}

LinkData

struct LinkData {
    uint256 linklistId;
    uint256 linkItemType;
    uint256 linkingCharacterId;
    address linkingAddress;
    uint256 linkingLinklistId;
    bytes32 linkKey;
}

PostNoteData

struct PostNoteData {
    uint256 characterId;
    string contentUri;
    address linkModule;
    bytes linkModuleInitData;
    address mintModule;
    bytes mintModuleInitData;
    bool locked;
}

MintNoteData

struct MintNoteData {
    uint256 characterId;
    uint256 noteId;
    address to;
    bytes mintModuleData;
}

Character

struct Character {
    uint256 characterId;
    string handle;
    string uri;
    uint256 noteCount;
    address socialToken;
    address linkModule;
}

Note

A struct containing data associated with each new note.

struct Note {
    bytes32 linkItemType;
    bytes32 linkKey;
    string contentUri;
    address linkModule;
    address mintModule;
    address mintNFT;
    bool deleted;
    bool locked;
}

Properties

NameTypeDescription
linkItemTypebytes32The link type of this note, if the note is a note with link.
linkKeybytes32If linkKey is not empty, it is a note with link(eg.a comment to a character or a note).
contentUristring
linkModuleaddressThe address of the current link module of this note, can be empty.
mintModuleaddressThe address of the current mint module of this note, can be empty.
mintNFTaddressThe address of the mintNFT associated with this note, if any.
deletedboolWhether the note is deleted.
lockedboolWhether the note is locked. If the note is locked, its owner can't set not uri anymore.

CharacterLinkStruct

struct CharacterLinkStruct {
    uint256 fromCharacterId;
    uint256 toCharacterId;
    bytes32 linkType;
}

NoteStruct

struct NoteStruct {
    uint256 characterId;
    uint256 noteId;
}

ERC721Struct

struct ERC721Struct {
    address tokenAddress;
    uint256 erc721TokenId;
}

Operators4Note

struct Operators4Note {
    EnumerableSet.AddressSet blocklist;
    EnumerableSet.AddressSet allowlist;
}

Properties

NameTypeDescription
blocklistEnumerableSet.AddressSetThe list of blocklist addresses.
allowlistEnumerableSet.AddressSetThe list of allowlist addresses.

EIP712Signature

A struct containing the necessary information to reconstruct an EIP-712 typed data signature.

struct EIP712Signature {
    address signer;
    uint8 v;
    bytes32 r;
    bytes32 s;
    uint256 deadline;
}

Properties

NameTypeDescription
signeraddressThe address of the signer.
vuint8The signature's recovery parameter.
rbytes32The signature's r parameter.
sbytes32The signature's s parameter
deadlineuint256The signature's deadline.