0g-chain/tests/e2e/e2e_grpc_client_util_test.go

23 lines
553 B
Go
Raw Normal View History

package e2e_test
import (
2024-04-24 11:41:25 +00:00
"math/big"
sdk "github.com/cosmos/cosmos-sdk/types"
)
func (suite *IntegrationTestSuite) TestGrpcClientUtil_Account() {
// ARRANGE
2024-04-24 11:41:25 +00:00
// setup 0g account
zgChainAcc := suite.ZgChain.NewFundedAccount("account-test", sdk.NewCoins(a0gi(big.NewInt(1e5))))
// ACT
2024-04-24 11:41:25 +00:00
rsp, err := suite.ZgChain.Grpc.BaseAccount(zgChainAcc.SdkAddress.String())
// ASSERT
suite.Require().NoError(err)
2024-04-24 11:41:25 +00:00
suite.Equal(zgChainAcc.SdkAddress.String(), rsp.Address)
suite.Greater(rsp.AccountNumber, uint64(1))
suite.Equal(uint64(0), rsp.Sequence)
}