Skip to content

Commit

Permalink
Remove event topic limit docs (#1092)
Browse files Browse the repository at this point in the history
* remove event topic limit docs

* Remove token topic limits
  • Loading branch information
sisuresh authored Nov 21, 2024
1 parent a3bee93 commit a6e3d86
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
7 changes: 1 addition & 6 deletions docs/build/guides/events/publish.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ hide_table_of_contents: true
description: Publish events from a Rust contract
---

An event can contain up to 4 topics, alongside the data it is publishing. The `data` can be any value or type you want. However, the topics must not contain:

- `Vec`
- `Map`
- `Bytes` or `BytesN` longer than 32 bytes
- `contracttype`
An event can contain topics, alongside the data it is publishing. The topics data can be any value or type you want.

```rust
// This function does nothing beside publishing events. Topics we are using are
Expand Down
4 changes: 1 addition & 3 deletions docs/build/smart-contracts/example-contracts/events.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ env.events().publish(topics, data);

### Event Topics

An event may contain up to four topics.

Topics are conveniently defined using a tuple. In the sample code two topics of `Symbol` type are used.

```rust
Expand All @@ -113,7 +111,7 @@ env.events().publish((COUNTER, symbol_short!("increment")), ...);

:::tip

The topics don't have to be made of the same type. You can mix different types as long as the total topic count stays below the limit.
The topics don't have to be made of the same type.

:::

Expand Down
2 changes: 1 addition & 1 deletion docs/learn/encyclopedia/contract-development/events.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Events are ephemeral, the data retention window is a maximum of 7 days. See the

### ContractEvent

An event may contain up to four topics. The topics don't have to be made of the same type. You can mix different types as long as the total topic count stays below the limit.
An events topics don't have to be made of the same type. You can mix different types.

An event also contains a data object of any value or type including types defined by contracts using `#[contracttype]`

Expand Down

0 comments on commit a6e3d86

Please sign in to comment.