Update bsip-0040.md

bsip53
Stefan Schießl 2018-07-28 23:38:48 +02:00 committed by GitHub
parent ef397f0be1
commit bcfa32f90c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -82,6 +82,7 @@ List of possible asserts are:
| `length` | [`min`, `max`] | stateless |
| `limit` | [`max_cumsum`, `interval_in_sec`] | [`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.
@ -111,6 +112,9 @@ The assert that needs to pass is now `current_cumsum + incoming value <= max_cum
#### `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).
#### `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
Assume account A and B and some unrelated key K. Furthermore A has a custom active authority in the following way:
```