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

urlshort/v0 package

Overview

Package urlshort is a simple on-chain URL alias registry.

Callers register an `alias -> url` mapping they own. An alias can only be claimed once; the owner may later update the target URL, but nobody else can overwrite an alias they do not own. A per-alias click counter is bumped every time the alias is resolved through Render("/<alias>").

Function

Lookup

func Lookup(alias string) (string, bool)

Lookup returns the target url for an alias and whether it exists. It is a read-only helper and does NOT increment the click counter.

Param

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/moul/x/daily/urlshort/v0.Lookup()"

Result