Update bsip-0040.md
This commit is contained in:
parent
ef397f0be1
commit
bcfa32f90c
1 changed files with 4 additions and 0 deletions
|
@ -82,6 +82,7 @@ List of possible asserts are:
|
||||||
| `length` | [`min`, `max`] | stateless |
|
| `length` | [`min`, `max`] | stateless |
|
||||||
| `limit` | [`max_cumsum`, `interval_in_sec`] | [`current_cumsum`, `interval_began`] |
|
| `limit` | [`max_cumsum`, `interval_in_sec`] | [`current_cumsum`, `interval_began`] |
|
||||||
| `limit_monthly` | [`max_cumsum`, `interval_in_months`] | [`current_cumsum`, `interval_began`] |
|
| `limit_monthly` | [`max_cumsum`, `interval_in_months`] | [`current_cumsum`, `interval_began`] |
|
||||||
|
| `contains` | [`list`, `of`, `allowed`, `fields`] | stateless |
|
||||||
|
|
||||||
All asserts apply to `int`, `string` and `object_ids`. There is no type converstion, incompatible type means assert failure. Any more sophisticated data types are not included yet.
|
All asserts apply to `int`, `string` and `object_ids`. There is no type converstion, incompatible type means assert failure. Any more sophisticated data types are not included yet.
|
||||||
|
|
||||||
|
@ -111,6 +112,9 @@ The assert that needs to pass is now `current_cumsum + incoming value <= max_cum
|
||||||
#### `limit_monthly`
|
#### `limit_monthly`
|
||||||
Statefull assert, only `int` type arguments. Analogue to `limit`, but `interval_began` is initially set to `month(valid_from)` and set to `month(now)` on update, additionally the time assert is `month(now) >= interval_began + interval_in_months` (include logic for month overflow when year changes).
|
Statefull assert, only `int` type arguments. Analogue to `limit`, but `interval_began` is initially set to `month(valid_from)` and set to `month(now)` on update, additionally the time assert is `month(now) >= interval_began + interval_in_months` (include logic for month overflow when year changes).
|
||||||
|
|
||||||
|
#### `contains_only`
|
||||||
|
Stateless assert, only for dictionary type objects like `options`. The `argument` of the operation is a dictionary type objects and is only allowed to contain the attributes in the data list.
|
||||||
|
|
||||||
### Simple Example
|
### Simple Example
|
||||||
Assume account A and B and some unrelated key K. Furthermore A has a custom active authority in the following way:
|
Assume account A and B and some unrelated key K. Furthermore A has a custom active authority in the following way:
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue