Rename RPC method to reserve authority and fix proto lint errors (#17)

- Rename RPC method to reserve authority from `ReserveName` to `ReserveAuthority`
  and `GetBondsModuleBalance` to `GetBondModuleBalance`
- Run lint formatter
- Fix proto lint errors and regenerate proto bindings

Reviewed-on: deep-stack/laconic2d#17
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
This commit is contained in:
2024-03-07 11:25:15 +00:00
committed by ashwin
parent 33b6cce362
commit aed2d6d4c6
52 changed files with 3052 additions and 2979 deletions
+3 -3
View File
@@ -106,7 +106,7 @@ func (ets *E2ETestSuite) TestGetAuctionGrpc() {
sr.Contains(string(resp), tc.errorMsg)
} else {
sr.NoError(err)
var auction auctiontypes.QueryAuctionResponse
var auction auctiontypes.QueryGetAuctionResponse
err = val.ClientCtx.Codec.UnmarshalJSON(resp, &auction)
sr.NoError(err)
sr.Equal(auctionId, auction.Auction.Id)
@@ -151,7 +151,7 @@ func (ets *E2ETestSuite) TestGetBidsGrpc() {
sr.Contains(string(resp), tc.errorMsg)
} else {
sr.NoError(err)
var bids auctiontypes.QueryBidsResponse
var bids auctiontypes.QueryGetBidsResponse
err = val.ClientCtx.Codec.UnmarshalJSON(resp, &bids)
sr.NoError(err)
sr.Equal(auctionId, bids.Bids[0].AuctionId)
@@ -196,7 +196,7 @@ func (ets *E2ETestSuite) TestGetBidGrpc() {
sr.Contains(string(resp), tc.errorMsg)
} else {
sr.NoError(err)
var bid auctiontypes.QueryBidResponse
var bid auctiontypes.QueryGetBidResponse
err = val.ClientCtx.Codec.UnmarshalJSON(resp, &bid)
sr.NoError(err)
}
+1 -1
View File
@@ -58,7 +58,7 @@ func (ets *E2ETestSuite) TestGRPCGetBonds() {
if tc.expErr {
sr.Contains(string(resp), tc.errorMsg)
} else {
var response bondtypes.QueryGetBondsResponse
var response bondtypes.QueryBondsResponse
err := val.ClientCtx.Codec.UnmarshalJSON(resp, &response)
sr.NoError(err)
sr.NotZero(len(response.GetBonds()))
+1 -1
View File
@@ -40,7 +40,7 @@ func (ets *E2ETestSuite) TestGetQueryBondList() {
cmd := cli.GetQueryBondList()
out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args)
sr.NoError(err)
var queryResponse bondtypes.QueryGetBondsResponse
var queryResponse bondtypes.QueryBondsResponse
err = clientCtx.Codec.UnmarshalJSON(out.Bytes(), &queryResponse)
sr.NoError(err)
sr.NotZero(len(queryResponse.GetBonds()))
+1 -1
View File
@@ -113,7 +113,7 @@ func (ets *E2ETestSuite) createBond() string {
}
out, err = clitestutil.ExecTestCLICmd(clientCtx, cmd, args)
sr.NoError(err)
var queryResponse bondtypes.QueryGetBondsResponse
var queryResponse bondtypes.QueryBondsResponse
err = val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &queryResponse)
sr.NoError(err)
+2 -2
View File
@@ -263,7 +263,7 @@ func (ets *E2ETestSuite) TestGRPCQueryGetRecordById() {
if tc.expectErr {
require.Contains(string(resp), tc.errorMsg)
} else {
var response registrytypes.QueryRecordByIdResponse
var response registrytypes.QueryGetRecordResponse
err := val.ClientCtx.Codec.UnmarshalJSON(resp, &response)
sr.NoError(err)
record := response.GetRecord()
@@ -317,7 +317,7 @@ func (ets *E2ETestSuite) TestGRPCQueryGetRecordByBondId() {
if tc.expectErr {
require.Contains(string(resp), tc.errorMsg)
} else {
var response registrytypes.QueryRecordsByBondIdResponse
var response registrytypes.QueryGetRecordsByBondIdResponse
err := val.ClientCtx.Codec.UnmarshalJSON(resp, &response)
sr.NoError(err)
records := response.GetRecords()
+3 -3
View File
@@ -132,7 +132,7 @@ func (ets *E2ETestSuite) createBond() string {
}
out, err = clitestutil.ExecTestCLICmd(clientCtx, cmd, args)
sr.NoError(err)
var queryResponse bondtypes.QueryGetBondsResponse
var queryResponse bondtypes.QueryBondsResponse
err = val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &queryResponse)
sr.NoError(err)
@@ -146,7 +146,7 @@ func (ets *E2ETestSuite) reserveName(authorityName string) {
sr := ets.Require()
clientCtx := val.ClientCtx
cmd := cli.GetCmdReserveName()
cmd := cli.GetCmdReserveAuthority()
args := []string{
authorityName,
fmt.Sprintf("--owner=%s", ets.accountAddress),
@@ -174,7 +174,7 @@ func (ets *E2ETestSuite) createNameRecord(authorityName string) {
// reserving the name
clientCtx := val.ClientCtx
cmd := cli.GetCmdReserveName()
cmd := cli.GetCmdReserveAuthority()
args := []string{
authorityName,
fmt.Sprintf("--owner=%s", ets.accountAddress),