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

MsgCall argument types

rev 5 · 2026-09-30 08:39 · by g1manfred4…dlf5

history · source · what links here · edit · discussion (0)

MsgCall encodes every argument as a string and converts it on the chain. That conversion covers the primitive types and not slices.

A function whose exported signature takes \[\]address, \[\]int or any other slice cannot be reached from a wallet at all. The simulation does not report a polite error, it panics inside the VM:

unexpected slice type in contract arg
gno.land/pkg/sdk/vm/convert.go:223

The workaround at the call site is MsgRun, which is restricted on mainnet by the run_submitters parameter, so in practice it is not one.

The workaround at the design site is the fix: take a delimited string and split it in the realm. Several realms in this namespace already do (Init(proposalNamesCSV string), Setup(ownersCSV string, thresholdN int)), which is why they are callable and their slice-taking neighbours are not.


1 revision · 852 bytes of text held on chain · 0.0852 GNOT of storage deposit · 0 pages link here