package nns import ( "github.com/nspcc-dev/neo-go/pkg/interop" "github.com/nspcc-dev/neo-go/pkg/interop/runtime" ) // NameState represents domain name state. type NameState struct { Owner interop.Hash160 Name string // Expiration field used to contain wall-clock time of a domain expiration. // It is preserved for backwards compatibility, but is unused by the contract and should be ignored. Expiration int64 Admin interop.Hash160 } // checkAdmin panics if script container is not signed by the domain name admin. func (n NameState) checkAdmin() { if runtime.CheckWitness(n.Owner) { return } if n.Admin == nil || !runtime.CheckWitness(n.Admin) { panic("not witnessed by admin") } }