processblock

package
v0.0.38 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InterfaceReg = types.NewInterfaceRegistry()

Functions

func GenerateRandomPubKey

func GenerateRandomPubKey() cryptotypes.PubKey

func GetKey

func GetKey(mnemonic string) cryptotypes.PrivKey

Types

type App

type App struct {
	*app.App
	// contains filtered or unexported fields
}

func NewTestApp

func NewTestApp() *App

func (*App) Ctx

func (a *App) Ctx() sdk.Context

func (*App) FastEpoch

func (a *App) FastEpoch()

func (*App) FundAccount

func (a *App) FundAccount(acc sdk.AccAddress, amount int64)

func (*App) FundAccountWithDenom

func (a *App) FundAccountWithDenom(acc sdk.AccAddress, amount int64, denom string)

func (*App) FundModule

func (a *App) FundModule(moduleName string, amount int64)

func (*App) FundModuleWithDenom

func (a *App) FundModuleWithDenom(moduleName string, amount int64, denom string)

func (*App) GenerateSignableKey

func (a *App) GenerateSignableKey(_ string) (addr sdk.AccAddress)

func (*App) GetAllValidators

func (a *App) GetAllValidators() []stakingtypes.Validator

func (*App) GetProposer

func (a *App) GetProposer() stakingtypes.Validator

func (*App) GetVotes

func (a *App) GetVotes() []types.VoteInfo

func (*App) NewAccount

func (a *App) NewAccount() sdk.AccAddress

func (*App) NewContract

func (a *App) NewContract(admin sdk.AccAddress, filePath string) sdk.AccAddress

func (*App) NewDelegation

func (a *App) NewDelegation(delegator sdk.AccAddress, validator sdk.ValAddress, amount int64)

func (*App) NewMinter

func (a *App) NewMinter(amount uint64)

func (*App) NewSignableAccount

func (a *App) NewSignableAccount(name string) sdk.AccAddress

func (*App) NewValidator

func (a *App) NewValidator() sdk.ValAddress

func (*App) RunBlock

func (a *App) RunBlock(txs []signing.Tx) (resultCodes []uint32)

Processes and commits a block of transactions, and return a list of response codes. Assumes all validators voted with equal weight, and there are no byzantine validators. Proposer is rotated among all validators round-robin.

func (*App) Sign

func (a *App) Sign(account sdk.AccAddress, fee int64, msgs ...sdk.Msg) xauthsigning.Tx

type Preset

type Preset struct {
	Admin            sdk.AccAddress // a signable account that's not supposed to run out of tokens
	SignableAccounts []sdk.AccAddress
	AllAccounts      []sdk.AccAddress
	AllValidators    []sdk.ValAddress
	AllContracts     []sdk.AccAddress
	AllDexMarkets    []*msgs.Market
}

func CommonPreset

func CommonPreset(app *App) *Preset

3 unsignable accounts 3 bonded validators

func DexPreset

func DexPreset(app *App, numAccounts int, numMarkets int) *Preset

func (*Preset) AdminSign

func (p *Preset) AdminSign(app *App, msgs ...sdk.Msg) signing.Tx

always with enough fee

func (*Preset) DoRegisterMarkets

func (p *Preset) DoRegisterMarkets(app *App)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL