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

access/v1 package

Function

IsAuthorized

func IsAuthorized(role string, caller address) bool

IsAuthorized reports whether caller is the address currently mapped to role.

Parameters:

  • role: role name to trim and look up
  • caller: address to compare with the mapped role address

Returns:

  • authorized: true when role exists and caller matches its address; false when the role is absent or does not match

Params

Command

gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/access/v1.IsAuthorized(,)"

Result