Events

What is an Event?

The Events Layer adds the ability to attach timestamps to individual Items.

Table Breakdown

Table Name: events

Table Scope: item.serial

Name

Type

Example

Description

event_name

name

createtime

The name of the event.

event_time

time_point_sec

2020-05-30T10:58:05

The time of the event.

locked

bool

false

The locked state of the event.

Create a New Event

Create a new Event with the newevent() action.

Required Authority: group.manager

Action Parameters

Name

Type

Example

Description

serial

uint64_t

5

The serial number of the Item to assign the event.

event_name

name

minttime

The name of the event.

custom_event_time

optional<time_point_sec>

2020-05-30T10:58:05

The custom event time to set for the event.

Examples

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

Update an Event Time

Update an event timestamp with the seteventtime() action.

Required Authority: group.manager

Action Parameters

Name

Type

Example

Description

serial

uint64_t

5

The serial number of the Item to affect.

event_name

name

cooldown

The name of the event to affect.

new_event_time

time_point_sec

2020-05-30T10:58:05

The new event time to set for the event.

Examples

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

Lock an Event

Lock an event with the lockevent() action.

Required Authority: group.manager

Action Parameters

Name

Type

Example

Description

serial

uint64_t

5

The serial number of the Item with the event to lock.

event_name

name

cooldown

The name of the event to lock.

Examples

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

Remove an Event

Remove an event with the rmvevent() action.

Required Authority: group.manager

Action Parameters

Name

Type

Example

Description

serial

uint64_t

5

The serial number of the Item with the event to remove.

event_name

name

cooldown

The name of the event to remove.

Examples

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