github.com/stafiprotocol/go-substrate-rpc-client@v1.4.7/types/ucompact_test.go (about) 1 package types 2 3 import ( 4 "math/big" 5 "testing" 6 7 "github.com/ethereum/go-ethereum/common/hexutil" 8 ) 9 10 func TestUCompact_Encode(t *testing.T) { 11 a := NewUCompact(big.NewInt(100)) 12 13 re, err := EncodeToBytes(a) 14 if err != nil { 15 t.Fatal(err) 16 } 17 18 t.Log("re", hexutil.Encode(re)) 19 }