ecocredit

package module
v3.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// ModuleName is the module name constant used in many places
	ModuleName        = "ecocredit"
	RouterKey         = ModuleName
	DefaultParamspace = ModuleName

	ORMPrefix byte = 0x7
)
View Source
const GasCostPerIteration = uint64(10)

TODO: Revisit this once we have proper gas fee framework. Tracking issue https://github.com/cosmos/cosmos-sdk/discussions/9072

Variables

View Source
var (
	ErrParseFailure        = errors.Register(ModuleName, 2, "parse error")
	ErrInsufficientCredits = errors.Register(ModuleName, 3, "insufficient credit balance")
	ErrMaxLimit            = errors.Register(ModuleName, 4, "limit exceeded")
	ErrInvalidSellOrder    = errors.Register(ModuleName, 5, "invalid sell order")
	ErrInvalidBuyOrder     = errors.Register(ModuleName, 6, "invalid buy order")
)
View Source
var ModuleSchema = ormapi.ModuleSchemaDescriptor{
	SchemaFile: []*ormapi.ModuleSchemaDescriptor_FileEntry{
		{Id: 1, ProtoFileName: basketapi.File_regen_ecocredit_basket_v1_state_proto.Path()},
		{Id: 2, ProtoFileName: api.File_regen_ecocredit_v1_state_proto.Path()},
		{Id: 3, ProtoFileName: marketApi.File_regen_ecocredit_marketplace_v1_state_proto.Path()},
	},
	Prefix: []byte{ORMPrefix},
}

Functions

This section is empty.

Types

type AccountKeeper

type AccountKeeper interface {
	// NewAccount returns a new account with the next account number. Does not save the new account to the store.
	NewAccount(sdk.Context, authtypes.AccountI) authtypes.AccountI

	// GetAccount retrieves an account from the store.
	GetAccount(sdk.Context, sdk.AccAddress) authtypes.AccountI

	// GetModuleAddress retrieves a module account address from the store.
	GetModuleAddress(moduleName string) sdk.AccAddress

	// SetAccount sets an account in the store.
	SetAccount(sdk.Context, authtypes.AccountI)
}

AccountKeeper defines the expected interface needed to create and retrieve accounts.

type BankKeeper

type BankKeeper interface {
	MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error
	BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error
	SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
	SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
	SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error
	SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
	SetDenomMetaData(ctx sdk.Context, denomMetaData banktypes.Metadata)
	GetSupply(ctx sdk.Context, denom string) sdk.Coin
	GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
}

BankKeeper defines the expected interface needed to burn and send coins and to retrieve account balances.

type GovKeeper

type GovKeeper interface {
	// GetDepositParams queries governance module deposit params
	GetDepositParams(ctx sdk.Context) govv1.DepositParams
}

GovKeeper defines the expected interface needed to query governance params

Directories

Path Synopsis
types/v1
Package v1 is a reverse proxy.
Package v1 is a reverse proxy.
types/v1alpha1
Package v1alpha1 is a reverse proxy.
Package v1alpha1 is a reverse proxy.
types/v1
Package v1 is a reverse proxy.
Package v1 is a reverse proxy.
marketplace
types/v1
Package v1 is a reverse proxy.
Package v1 is a reverse proxy.
migrations
v3
v4
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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