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
If a realm has an exported variable of a custom struct type, which has exported methods with primitive arguments on it, these methods should be exposed to the MsgCall API in the following way:
package rlm
// pkgpath is gno.land/r/leon/rlmtypeFoostruct {
numint
}
varMyFoo=&Foo{ num: 0 }
func (f*Foo) UpdateNum(newNumint) { // should be exposedf.num=newNum
}
func (f*Foo) unexportedMethod() { // should not be exposed...
}
func (f*Foo) ExportedComplexArgMethod(slice []*int) { // should not be exposed...
}
Users should be able to call the UpdateNum method like so:
while not being able to call MyFoo.unexportedMethod() & MyFoo.ExportedComplexArgMethod().
The other issue is how to manage flags in gnokey; currently, the pkgpath and func flags are separate. Another semantic issue is that there is a distinction between functions and methods. Possibly, this can be solved with an -endpoint flag, which could have this usage:
Description
If a realm has an exported variable of a custom struct type, which has exported methods with primitive arguments on it, these methods should be exposed to the
MsgCall
API in the following way:Users should be able to call the
UpdateNum
method like so:while not being able to call
MyFoo.unexportedMethod()
&MyFoo.ExportedComplexArgMethod()
.The other issue is how to manage flags in
gnokey
; currently, thepkgpath
andfunc
flags are separate. Another semantic issue is that there is a distinction between functions and methods. Possibly, this can be solved with an-endpoint
flag, which could have this usage:I am not sure that this is the right way to use it in
gnokey
, so I am open to other suggestions.The text was updated successfully, but these errors were encountered: