forked from cerc-io/laconicd-deprecated
dxns bond module test (#4)
* WIP : added bond module tx and query cli commands * added bond module invariant * update the go.mod * addressed the pr changes * update to proto files * refactor: move the proto package version from `v1` to `v1beta1` for vulcanize modules * WIP : addin the unit test scripts to bond module * refactor: refactored the test cases for bond module * refactor: refactored the bond module test cases 1. refactored grpc gateway endpoints of bond module 2. added test cases to cli query , cli tx and grpc end points * addressed the pr comments 1. changed query-by-owner to by-owner in cli cmd 2. changed bonds-by-owner route to by-owner in bond module
This commit is contained in:
@@ -2,6 +2,8 @@ package app
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/cosmos/cosmos-sdk/crypto/keys/ed25519"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"time"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/simapp"
|
||||
@@ -58,3 +60,15 @@ func Setup(isCheckTx bool) *EthermintApp {
|
||||
|
||||
return app
|
||||
}
|
||||
|
||||
// CreateRandomAccounts will generate random accounts
|
||||
func CreateRandomAccounts(accNum int) []sdk.AccAddress {
|
||||
// createRandomAccounts is a strategy used by addTestAddrs() in order to generated addresses in random order.
|
||||
testAddrs := make([]sdk.AccAddress, accNum)
|
||||
for i := 0; i < accNum; i++ {
|
||||
pk := ed25519.GenPrivKey().PubKey()
|
||||
testAddrs[i] = sdk.AccAddress(pk.Address())
|
||||
}
|
||||
|
||||
return testAddrs
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user