diff --git a/examples/gno.land/r/profile/integration0_test.gno b/examples/gno.land/r/profile/integration0_test.gno index a42682fb15b..a1af5c47292 100644 --- a/examples/gno.land/r/profile/integration0_test.gno +++ b/examples/gno.land/r/profile/integration0_test.gno @@ -8,6 +8,9 @@ import ( func main() { fmt.Println("test") + // various data types + // avatar + // ip address } // Output: diff --git a/examples/gno.land/r/profile/profile.gno b/examples/gno.land/r/profile/profile.gno index 7702377b487..fc2374fc847 100644 --- a/examples/gno.land/r/profile/profile.gno +++ b/examples/gno.land/r/profile/profile.gno @@ -6,6 +6,8 @@ import ( "gno.land/r/users" ) +// FIXME: manage privacy? + func newProfile(addr std.Address) *Profile { now := std.GetTime() return &Profile{ @@ -32,6 +34,8 @@ func (p *Profile) save() { func (p *Profile) update(dict map[string]interface{}) { for k, v := range dict { // TODO: additional checks here + // TODO: check v.Type() + // TODO: check v.Len() if k == "address" || k == "created" || k == "updated" { panic("reserved profile key") } diff --git a/examples/gno.land/r/profile/profiles.gno b/examples/gno.land/r/profile/profiles.gno index 89d929f38d9..d0a218607c2 100644 --- a/examples/gno.land/r/profile/profiles.gno +++ b/examples/gno.land/r/profile/profiles.gno @@ -11,6 +11,7 @@ import ( var profiles *avl.MutTree // std.Address.String() -> *Profile func Update(dict map[string]interface{}) { + // FIXME: ask a price per stored data length? currentUser := std.GetOrigCaller() profile := getOrCreateProfileByAddress(currentUser) profile.update(dict)