# `gno.land/p/moul/addrset/v1` A set of blockchain addresses, **backed by a B+ tree** (`gno.land/p/nt/bptree`). The B+ tree successor to [`p/moul/addrset/v0`](https://github.com/moul/gno-contracts/tree/main/p/moul/addrset/v0) (AVL-backed). **v1 because the backing data structure — and thus the on-chain storage layout — changed** (a compatibility change ⇒ new version). A B+ tree packs many entries per persisted node, so a stored address costs ~0.9 KB vs the AVL backing's ~2.0 KB, and inserts spend materially less gas — prefer v1 for persisted realm state. ```go import "gno.land/p/moul/addrset/v1" var set addrset.Set // zero value is an empty, usable set set.Add(addr) // true (newly added) set.Has(addr) // true set.Remove(addr) // true (was present) set.IterateByOffset(0, 10, func(a address) bool { return false }) ``` **Differences from v1:** the `Tree()` escape hatch is removed (the backing store never leaks); and — because the B+ tree mutates in place — do not Add/Remove from inside an iteration callback, and do not copy a non-zero `Set` by value. --- Part of **[moul/gno-contracts](https://github.com/moul/gno-contracts)** — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage. **Dependency graph:** ![gno.land/p/moul/addrset/v1 dependency graph](https://raw.githubusercontent.com/moul/gno-contracts/main/_assets/gno.land/p/moul/addrset/v1/deps.png) Provenance: imported — see [https://github.com/moul/gno-contracts/pull/2](https://github.com/moul/gno-contracts/pull/2) for context and metadata. > ⚠️ **Disclaimer:** provided as-is, without warranty; not security-audited. Full disclaimer: [DISCLAIMER](https://github.com/moul/gno-contracts/blob/main/DISCLAIMER.md).