Frames

What is a Frame?

A frame is a pre-built set of tags and attributes that can be applied to an Item all at once. Frames are created and updated by group managers.

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

Table Breakdown

Table Name: frames

Table Scope: self

Name

Type

Example

Description

frame_name

name

testframe

Frame name identifier (Primary Key).

group

name

testgroup

Group managing the frame.

default_tags

map<name, string>

[{"key": "tag1", "value": "tag1content"}]

A map of default tag names and content.

default_attributes

map<name, int64_t>

[{"key": "attr1", "value": 4}]

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

Type

Example

Description

frame_name

name

testframe

The name of the frame.

group

name

testgroup

The name of the group.

default_tags

map<name, string>

[{"key": "tag1", "value": "tag1content"}]

The default tags to apply to an Item.

default_attributes

map<name, int64_t>

[{"key": "attr1", "value": 4}]

The default attributes to apply to an Item.

Examples

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

Apply a Frame

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

Required Authority: group.manager

Action Parameters

Name

Type

Example

Description

frame_name

name

testframe

The name of the frame to apply to the Item.

serial

uint64_t

5

The serial number of the Item being applied the frame.

overwrite

bool

true

When true, will overwrite any existing tags or attributes on the Item of the same name. When false, these tag and attribute name collisions will skip the frame defaults and leave the existing data in place.

Examples

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

Quick Build an Item

Frames offer a special action called quickbuild() that will mint a new item, apply a frame, and then apply frame default override values - all in one go. This is a preferred method for rapid complex Item creation.

Required Authority: group.manager

Action Parameters

Name

Type

Example

‚Äč

frame_name

name

testframe

The name fo the frame to quick build.

to

name

testaccountb

The name of the account to receive the newly built Item.

override_tags

map<name, string>

[{"key": "tag1", "value": "overridecontent"}]

The set of tag overrides to override frame defaults.

override_attributes

map<name, int64_t>

[{"key": "attr1", "value": 3}]

The set of attribute overrides to override frame defaults.

Examples

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

Remove a Frame

To remove a frame call the rmvframe() action.

Required Authority: group.manager

Action Parameters

Name

Type

Example

Description

frame_name

name

testframe

The name of the frame to remove.

memo

string

"frame not needed"

An optional memo field.

Examples

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