Frames

What is a Frame?

A frame is a pre-built set of tags and attributes that can be applied to an NFT all at once. Frames are created and updated by group managers, and offer actions for clearing frames from NFTs as well.

Note the Frames Layer requires both the Tags Layer and Attributes Layer as dependencies.

Table Breakdown

Table Name: frames

Table Scope: self

Field Name

Field Type

Description

frame_name

name

Frame name identifier (Primary Key).

group

name

Group managing the frame.

default_tags

map<name, string>

A map of default tag names and content.

default_attributes

map<name, int64_t>

A map of default attribute names and points.

Additional Indices

bygroup

Create a Frame

To create a new frame call the newframe() action.

Required Authority: group.manager

Action Parameters

  • name frame_name: The name identifier of the frame.

  • name group: The name of the group that manages the frame.

  • map<name, string> default tags: The list of pre-built tag names and tag contents.

  • map<name, int64_t> default_attributes: The list of pre-built attribute names and points.

Examples

Cleos
Marble CLI
Cleos
cleos push action {account} newframe '[ {params} ]' -p {manager}
Marble CLI
marble make frame ...

Apply a Frame

To apply a frame to an NFT call the applyframe() action.

Required Authority: group.manager

Action Parameters

  • name frame_name: The name of the frame to apply to the NFT.

  • uint64_t serial: The NFT to be affected.

  • bool overwrite: When true will overwrite any existing tags or attributes of the same name with the default value defined in the frame. When false, these tags and attribute name collisions will be skipped over instead of overwritten.

Examples

Cleos
Marble CLI
Cleos
cleos push action {account} newframe '[ {params} ]' -p {manager}
Marble CLI
marble ...

Remove a Frame

To remove a frame call the rmvframe() action.

Action Parameters

  • name frame_name: The name of the frame to remove.

  • string memo: An optional memo field.

Examples

Cleos
Marble CLI
Cleos
cleos push action {account} rmvframe '[ {params} ]' -p {manager}
Marble CLI
marble remove ...