diff --git a/tm2/pkg/std/account.go b/tm2/pkg/std/account.go index 604444b4046..c70f43d22e9 100644 --- a/tm2/pkg/std/account.go +++ b/tm2/pkg/std/account.go @@ -5,6 +5,11 @@ import ( "github.com/gnolang/gno/tm2/pkg/crypto" "github.com/gnolang/gno/tm2/pkg/errors" + + _ "github.com/gnolang/gno/tm2/pkg/crypto/ed25519" + _ "github.com/gnolang/gno/tm2/pkg/crypto/mock" + _ "github.com/gnolang/gno/tm2/pkg/crypto/multisig" + _ "github.com/gnolang/gno/tm2/pkg/crypto/secp256k1" ) // Account is an interface used to store coins at a given address within state. diff --git a/tm2/pkg/std/package_test.go b/tm2/pkg/std/package_test.go new file mode 100644 index 00000000000..0a21188737b --- /dev/null +++ b/tm2/pkg/std/package_test.go @@ -0,0 +1,26 @@ +package std_test + +import ( + "testing" + + "github.com/gnolang/gno/tm2/pkg/amino" + "github.com/gnolang/gno/tm2/pkg/std" + "github.com/stretchr/testify/require" +) + +func TestAminoBaseAccount(t *testing.T) { + b := []byte(`{ + "address": "g1x90eh5ejc22548hjqznm2egyvn8ny36lqu460f", + "coins": "4200000ugnot", + "public_key": { + "@type": "/tm.PubKeySecp256k1", + "value": "AwMzujfppqEi8lozMVD8ORENUR8SIE06VLNP8FGL0aQ2" + }, + "account_number": "159", + "sequence": "33" +}`) + acc := std.BaseAccount{} + + err := amino.UnmarshalJSON(b, &acc) + require.NoError(t, err) +}