Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

validation.gno

0.22 Kb · 13 lines
 1package lotto
 2
 3func assertValidAddress(addr address) {
 4	if !addr.IsValid() {
 5		panic("invalid address")
 6	}
 7}
 8
 9func assertListLimit(limit int) {
10	if limit < 1 || limit > 100 {
11		panic("limit must be between 1 and 100")
12	}
13}