Metadata: Terms & Restricted Countries
Besides its immutable sale parameters, every bench has an editable metadata string, stored in the bench's registry directory entry (up to 1014 bytes). Myth Bench uses it as a JSON object with the following optional keys:
| Key | Type | Description |
|---|---|---|
tc | string (URL) | Terms & Conditions link |
bc | string[] | Restricted countries, as ISO 3166-1 alpha-2 codes (e.g. ["US", "KP"]) |
Example: {"tc":"https://example.com/token-sale-terms","bc":["US"]}
The SDK validates metadata objects (validateMeta): only these two keys are accepted, bc must be a non-empty array of strings when present, and the object may not be empty.
Terms & Conditions
When set, the frontend shows a prominent "Make sure to read: Distribution Terms & Conditions" notice linking to the URL on the bench page.
Restricted countries
When set, the frontend geolocates visitors by IP address (browser side) and shows a "Restricted Access" page instead of the bench to visitors from the listed countries.
Country restrictions are enforced by the myth.finance frontend only. They are not enforced by the smart contract: anyone can interact with a bench directly, and other frontends may not honour the list. Sellers remain responsible for the compliance of their sales.
Setting and updating metadata
Metadata is set at creation, and can be updated or removed at any time by the bench owner, from the "Manage" page or with the SDK (setMeta). Updates go through the registry (set_meta), which verifies that the caller is the bench's owner. Passing an empty string removes the metadata.
Metadata is not part of the bench contract's own state: it is read through the registry (get_meta, get_state_with_meta, log_bench_states_with_meta).