developer

package
v0.6.11 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeveloperManager

type DeveloperManager struct {
	// contains filtered or unexported fields
}

func NewDeveloperManager

func NewDeveloperManager(key sdk.StoreKey, holder param.ParamKeeper, vote vote.VoteKeeper, acc account.AccountKeeper, price price.PriceKeeper) DeveloperManager

NewDeveloperManager - create new developer manager

func (DeveloperManager) AppTransferIDA

func (dm DeveloperManager) AppTransferIDA(ctx sdk.Context, appname, signer linotypes.AccountKey, amount linotypes.MiniIDA, from, to linotypes.AccountKey) sdk.Error

AppTransferIDA - transfer IDA back or from app, by app.

func (DeveloperManager) BurnIDA

func (dm DeveloperManager) BurnIDA(ctx sdk.Context, app, user linotypes.AccountKey, amount linotypes.MiniDollar) (linotypes.Coin, sdk.Error)

BurnIDA - Burn some @p amount of IDA on @p user's account, burned IDA will be converted to LINO and saved onto the user's account. Return the amount of coins removed from reserve pool. The coins can has been . NOTE: cannot burn @p amount so little that can only can only buy less than 1 coin, i.e. zero.

func (DeveloperManager) DoesDeveloperExist

func (dm DeveloperManager) DoesDeveloperExist(ctx sdk.Context, username linotypes.AccountKey) bool

DoesDeveloperExist - check if given developer exists and not deleted before.

func (DeveloperManager) ExportToFile

func (dm DeveloperManager) ExportToFile(ctx sdk.Context, cdc *codec.Codec, filepath string) error

func (DeveloperManager) GetAffiliated

func (dm DeveloperManager) GetAffiliated(ctx sdk.Context, app linotypes.AccountKey) []linotypes.AccountKey

GetAffiliated returns all affiliated account of app.

func (DeveloperManager) GetAffiliatingApp

func (dm DeveloperManager) GetAffiliatingApp(ctx sdk.Context, username linotypes.AccountKey) (linotypes.AccountKey, sdk.Error)

GetAffiliatingApp - get username's affiliating app, or username itself is an app.

func (DeveloperManager) GetDeveloper

func (dm DeveloperManager) GetDeveloper(ctx sdk.Context, username linotypes.AccountKey) (model.Developer, sdk.Error)

func (DeveloperManager) GetIDA

func (DeveloperManager) GetIDABank

func (dm DeveloperManager) GetIDABank(ctx sdk.Context, app, user linotypes.AccountKey) (model.IDABank, sdk.Error)

func (DeveloperManager) GetIDAStats

func (DeveloperManager) GetLiveDevelopers

func (dm DeveloperManager) GetLiveDevelopers(ctx sdk.Context) []model.Developer

GetLiveDevelopers - returns all developers that are live(not deregistered).

func (DeveloperManager) GetMiniIDAPrice

func (dm DeveloperManager) GetMiniIDAPrice(ctx sdk.Context, app linotypes.AccountKey) (linotypes.MiniDollar, sdk.Error)

func (DeveloperManager) GetReservePool

func (dm DeveloperManager) GetReservePool(ctx sdk.Context) model.ReservePool

func (DeveloperManager) IDAConvertFromLino added in v0.6.10

func (dm DeveloperManager) IDAConvertFromLino(ctx sdk.Context, username, appname linotypes.AccountKey, amount linotypes.Coin) sdk.Error

func (DeveloperManager) ImportFromFile

func (dm DeveloperManager) ImportFromFile(ctx sdk.Context, cdc *codec.Codec, filepath string) error

Import from file

func (DeveloperManager) InitGenesis

func (dm DeveloperManager) InitGenesis(ctx sdk.Context, reservePoolAmount linotypes.Coin) sdk.Error

InitGenesis - init developer manager

func (DeveloperManager) IssueIDA

func (dm DeveloperManager) IssueIDA(ctx sdk.Context, appname linotypes.AccountKey, idaName string, idaPrice int64) sdk.Error

IssueIDA - Application issue IDA

func (DeveloperManager) MintIDA

func (dm DeveloperManager) MintIDA(ctx sdk.Context, appname linotypes.AccountKey, amount linotypes.Coin) sdk.Error

MintIDA - mint some IDA by converting LINO to IDA (internally MiniDollar).

func (DeveloperManager) MonthlyDistributeDevInflation added in v0.6.0

func (dm DeveloperManager) MonthlyDistributeDevInflation(ctx sdk.Context) sdk.Error

DistributeDevInflation - distribute monthly app inflation.

func (DeveloperManager) MoveIDA

func (dm DeveloperManager) MoveIDA(ctx sdk.Context, app, from, to linotypes.AccountKey, amount linotypes.MiniDollar) sdk.Error

MoveIDA - app move ida, authorization check applied. 1. amount must > 0. 2. from's bank is not frozen.

func (DeveloperManager) RegisterDeveloper

func (dm DeveloperManager) RegisterDeveloper(ctx sdk.Context, username linotypes.AccountKey, website, description, appMetaData string) sdk.Error

RegisterDeveloper - register a developer. Stateful validation: 1. account exists. 2. has never been a developer. 3. VoteDuty is simply a voter, not a validator candidate. 4. not an affiliated account. 4. has minimum LS.

func (DeveloperManager) ReportConsumption

func (dm DeveloperManager) ReportConsumption(ctx sdk.Context, app linotypes.AccountKey, consumption linotypes.MiniDollar) sdk.Error

ReportConsumption - add consumption to a developer.

func (DeveloperManager) UnregisterDeveloper

func (dm DeveloperManager) UnregisterDeveloper(ctx sdk.Context, username linotypes.AccountKey) sdk.Error

UnregisterDeveloper - unregister a developer validation: 1. Developer exists. 2. No IDA issued or IDA revoked. TODO: remove all affiliated accounts. mark developer as deleted.

func (DeveloperManager) UpdateAffiliated

func (dm DeveloperManager) UpdateAffiliated(ctx sdk.Context, appname, username linotypes.AccountKey, activate bool) sdk.Error

UpdateAffiliated - add or remove an affiliated account.

func (DeveloperManager) UpdateDeveloper

func (dm DeveloperManager) UpdateDeveloper(ctx sdk.Context, username linotypes.AccountKey, website, description, appMetadata string) sdk.Error

UpdateDeveloper - update developer. 1. developer must not be deleted.

func (DeveloperManager) UpdateIDAAuth

func (dm DeveloperManager) UpdateIDAAuth(ctx sdk.Context, app, username linotypes.AccountKey, active bool) sdk.Error

UpdateAuthorization - update app's authorization on user.

Jump to

Keyboard shortcuts

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