You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Resolve resolves given name (not more then three redirects are allowed).
func Resolve(name string, typ RecordType) []string {
ctx := storage.GetReadOnlyContext()
return resolve(ctx, nil, name, typ, 2)
}
// Resolve resolves the given record type for the given domain (with no more
// than three redirects).
func (c *ContractReader) Resolve(name string, typ RecordType) (string, error) {
return unwrap.UTF8String(c.invoker.Call(c.hash, "resolve", name, int64(typ)))
}
Comment to `unwrap.UTF8String(...)
// UTF8String expects correct execution (HALT state) with a single stack item
// returned. A string is extracted from this item and checked for UTF-8
// correctness, valid strings are then returned.
Is it sure it is valid?
The text was updated successfully, but these errors were encountered:
masterSplinter01
changed the title
Non-consistent Resolve return types
NNS-contract Resolve return types
Feb 5, 2023
Actually, #2693, #2687 and nspcc-dev/neofs-contract#266 are about to change this and unify the NNS implementation through the neofs-contract and neo-go.
Method of nns-contract
Resolve
returns[]string
https://github.com/nspcc-dev/neofs-contract/blob/master/nns/nns_contract.go#L444
Neo-go
wrapperResolve
requires onestring
https://github.com/nspcc-dev/neo-go/blob/master/pkg/rpcclient/nns/contract.go#L59
Comment to `unwrap.UTF8String(...)
Is it sure it is valid?
The text was updated successfully, but these errors were encountered: