basic

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusIllegalArgument = module.StatusReverted + iota
	StatusNotFound
)
View Source
const (
	Revision0 = iota
	Revision1
	Revision2
	Revision3
	Revision4
	Revision5
	Revision6
	Revision7
	Revision8
	Revision9
	RevisionReserved
)
View Source
const (
	DefaultRevision = Revision4
	MaxRevision     = RevisionReserved - 1
	LatestRevision  = Revision8
)

Variables

View Source
var Platform base.Platform = &platform{}

Functions

func NewChainScore

func NewChainScore(cc contract.CallContext, from module.Address, value *big.Int) (contract.SystemScore, error)

Types

type Chain added in v0.9.6

type Chain struct {
	Revision                 common.HexInt32 `json:"revision"`
	AuditEnabled             common.HexInt16 `json:"auditEnabled"`
	DeployerWhiteListEnabled common.HexInt16 `json:"deployerWhiteListEnabled"`
	Fee                      struct {
		StepPrice common.HexInt    `json:"stepPrice"`
		StepLimit *json.RawMessage `json:"stepLimit"`
		StepCosts *json.RawMessage `json:"stepCosts"`
	} `json:"fee"`
	ValidatorList      []*common.Address `json:"validatorList"`
	MemberList         []*common.Address `json:"memberList"`
	BlockInterval      *common.HexInt64  `json:"blockInterval"`
	CommitTimeout      *common.HexInt64  `json:"commitTimeout"`
	TimestampThreshold *common.HexInt64  `json:"timestampThreshold"`
	RoundLimitFactor   *common.HexInt64  `json:"roundLimitFactor"`
	MinimizeBlockGen   *common.HexInt16  `json:"minimizeBlockGen"`
	DepositTerm        *common.HexInt64  `json:"depositTerm"`
	DepositIssueRate   *common.HexInt64  `json:"depositIssueRate"`
	FeeSharingEnabled  *common.HexInt16  `json:"feeSharingEnabled"`
}

type ChainScore

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

func (*ChainScore) Ex_acceptScore

func (s *ChainScore) Ex_acceptScore(txHash []byte) error

func (*ChainScore) Ex_addDeployer

func (s *ChainScore) Ex_addDeployer(address module.Address) error

func (*ChainScore) Ex_addLicense

func (s *ChainScore) Ex_addLicense(contentId string) error

func (*ChainScore) Ex_addMember

func (s *ChainScore) Ex_addMember(address module.Address) error

func (*ChainScore) Ex_blockScore

func (s *ChainScore) Ex_blockScore(address module.Address) error

Governance score would check the verification of the address

func (*ChainScore) Ex_closeBTPNetwork added in v1.3.0

func (s *ChainScore) Ex_closeBTPNetwork(id *common.HexInt) error

func (*ChainScore) Ex_disableScore

func (s *ChainScore) Ex_disableScore(address module.Address) error

Destroy : Allowed from score owner

func (*ChainScore) Ex_enableScore

func (s *ChainScore) Ex_enableScore(address module.Address) error

func (*ChainScore) Ex_getBTPNetworkTypeID added in v1.3.0

func (s *ChainScore) Ex_getBTPNetworkTypeID(name string) (int64, error)

func (*ChainScore) Ex_getBTPPublicKey added in v1.3.0

func (s *ChainScore) Ex_getBTPPublicKey(address module.Address, name string) ([]byte, error)

func (*ChainScore) Ex_getDeployers

func (s *ChainScore) Ex_getDeployers() ([]interface{}, error)

func (*ChainScore) Ex_getMaxStepLimit

func (s *ChainScore) Ex_getMaxStepLimit(contextType string) (*big.Int, error)

func (*ChainScore) Ex_getMembers

func (s *ChainScore) Ex_getMembers() ([]interface{}, error)

func (*ChainScore) Ex_getMinimizeBlockGen

func (s *ChainScore) Ex_getMinimizeBlockGen() (bool, error)

func (*ChainScore) Ex_getRevision

func (s *ChainScore) Ex_getRevision() (int64, error)

User calls icx_call : Functions which can be called by anyone.

func (*ChainScore) Ex_getRoundLimitFactor

func (s *ChainScore) Ex_getRoundLimitFactor() (int64, error)

func (*ChainScore) Ex_getScoreStatus

func (s *ChainScore) Ex_getScoreStatus(address module.Address) (map[string]interface{}, error)

func (*ChainScore) Ex_getServiceConfig

func (s *ChainScore) Ex_getServiceConfig() (int64, error)

func (*ChainScore) Ex_getStepCost

func (s *ChainScore) Ex_getStepCost(t string) (*big.Int, error)

func (*ChainScore) Ex_getStepCosts

func (s *ChainScore) Ex_getStepCosts() (map[string]interface{}, error)

func (*ChainScore) Ex_getStepPrice

func (s *ChainScore) Ex_getStepPrice() (*big.Int, error)

func (*ChainScore) Ex_getSystemDepositUsage added in v1.2.9

func (s *ChainScore) Ex_getSystemDepositUsage() (*big.Int, error)

func (*ChainScore) Ex_getTimestampThreshold

func (s *ChainScore) Ex_getTimestampThreshold() (int64, error)

func (*ChainScore) Ex_getUseSystemDeposit added in v1.2.9

func (s *ChainScore) Ex_getUseSystemDeposit(address module.Address) (bool, error)

func (*ChainScore) Ex_getValidators

func (s *ChainScore) Ex_getValidators() ([]interface{}, error)

func (*ChainScore) Ex_grantValidator

func (s *ChainScore) Ex_grantValidator(address module.Address) error

func (*ChainScore) Ex_isDeployer

func (s *ChainScore) Ex_isDeployer(address module.Address) (int, error)

func (*ChainScore) Ex_openBTPNetwork added in v1.3.0

func (s *ChainScore) Ex_openBTPNetwork(networkTypeName string, name string, owner module.Address) (int64, error)

func (*ChainScore) Ex_rejectScore

func (s *ChainScore) Ex_rejectScore(txHash []byte) error

func (*ChainScore) Ex_removeDeployer

func (s *ChainScore) Ex_removeDeployer(address module.Address) error

func (*ChainScore) Ex_removeLicense

func (s *ChainScore) Ex_removeLicense(contentId string) error

func (*ChainScore) Ex_removeMember

func (s *ChainScore) Ex_removeMember(address module.Address) error

func (*ChainScore) Ex_revokeValidator

func (s *ChainScore) Ex_revokeValidator(address module.Address) error

func (*ChainScore) Ex_sendBTPMessage added in v1.3.0

func (s *ChainScore) Ex_sendBTPMessage(networkId *common.HexInt, message []byte) error

func (*ChainScore) Ex_setBTPPublicKey added in v1.3.0

func (s *ChainScore) Ex_setBTPPublicKey(name string, pubKey []byte) error

func (*ChainScore) Ex_setDeployerWhiteListEnabled

func (s *ChainScore) Ex_setDeployerWhiteListEnabled(yn bool) error

func (*ChainScore) Ex_setMaxStepLimit

func (s *ChainScore) Ex_setMaxStepLimit(contextType string, cost *common.HexInt) error

func (*ChainScore) Ex_setMinimizeBlockGen

func (s *ChainScore) Ex_setMinimizeBlockGen(b bool) error

func (*ChainScore) Ex_setRevision

func (s *ChainScore) Ex_setRevision(code int64) error

Governance functions : Functions which can be called by governance SCORE.

func (*ChainScore) Ex_setRoundLimitFactor

func (s *ChainScore) Ex_setRoundLimitFactor(f *common.HexInt) error

func (*ChainScore) Ex_setStepCost

func (s *ChainScore) Ex_setStepCost(costType string, cost *common.HexInt) error

func (*ChainScore) Ex_setStepPrice

func (s *ChainScore) Ex_setStepPrice(price *common.HexInt) error

func (*ChainScore) Ex_setTimestampThreshold

func (s *ChainScore) Ex_setTimestampThreshold(threshold int64) error

func (*ChainScore) Ex_setUseSystemDeposit added in v1.2.9

func (s *ChainScore) Ex_setUseSystemDeposit(address module.Address, yn bool) error

func (*ChainScore) Ex_unblockScore

func (s *ChainScore) Ex_unblockScore(address module.Address) error

Governance score would check the verification of the address

func (*ChainScore) GetAPI

func (s *ChainScore) GetAPI() *scoreapi.Info

func (*ChainScore) Install

func (s *ChainScore) Install(param []byte) error

func (*ChainScore) Update

func (s *ChainScore) Update(param []byte) error

Jump to

Keyboard shortcuts

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