github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/tm2/pkg/std/package_test.go (about)

     1  package std_test
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/gnolang/gno/tm2/pkg/amino"
     7  	"github.com/gnolang/gno/tm2/pkg/std"
     8  	"github.com/stretchr/testify/require"
     9  )
    10  
    11  func TestAminoBaseAccount(t *testing.T) {
    12  	b := []byte(`{
    13      "address": "g1x90eh5ejc22548hjqznm2egyvn8ny36lqu460f",
    14      "coins": "4200000ugnot",
    15      "public_key": {
    16        "@type": "/tm.PubKeySecp256k1",
    17        "value": "AwMzujfppqEi8lozMVD8ORENUR8SIE06VLNP8FGL0aQ2"
    18      },
    19      "account_number": "159",
    20      "sequence": "33"
    21  }`)
    22  	acc := std.BaseAccount{}
    23  
    24  	err := amino.UnmarshalJSON(b, &acc)
    25  	require.NoError(t, err)
    26  }