Documentation ¶
Index ¶
- Constants
- func KeyOfAdmins() string
- func KeyOfFee(method string) string
- type Context
- type Contract
- func (c *Contract) AddAdmins(ctx contract.KContext) (*contract.Response, error)
- func (c *Contract) DelAdmins(ctx contract.KContext) (*contract.Response, error)
- func (c *Contract) Get(ctx contract.KContext) (*contract.Response, error)
- func (c *Contract) GetFee(ctx contract.KContext) (*contract.Response, error)
- func (c *Contract) QueryAdmins(ctx contract.KContext) (*contract.Response, error)
- func (c *Contract) Save(ctx contract.KContext) (*contract.Response, error)
- func (c *Contract) SetFee(ctx contract.KContext) (*contract.Response, error)
- type Evidence
- type Manager
- type SaveMethodFeeConfig
- type XEvidenceConfig
Constants ¶
View Source
const ( XEvidence = "$XEvidence" Success = 200 Save = "Save" Get = "Get" AddAdmins = "AddAdmins" DelAdmins = "DelAdmins" QueryAdmins = "QueryAdmins" SetFee = "SetFee" GetFee = "GetFee" )
View Source
const (
ConfigName = "engine.yaml"
)
Variables ¶
This section is empty.
Functions ¶
func KeyOfAdmins ¶
func KeyOfAdmins() string
Types ¶
type Context ¶
type Contract ¶
type Contract struct {
// contains filtered or unexported fields
}
Contract struct represents the Xuperos contract interface.
func NewContract ¶
func NewContract(ctx *Context, cfg *XEvidenceConfig) *Contract
NewContract creates a new instance of the Xuperos contract.
func (*Contract) QueryAdmins ¶
type SaveMethodFeeConfig ¶
type SaveMethodFeeConfig struct { // content 字段长度阈值,小于此值手续费为 FeeForLengthThreshold LengthThreshold int64 `json:"lengthThreshold"` FeeForLengthThreshold int64 `json:"feeForLengthThreshold"` // content 字段长度超过 LengthThreshold 时,长度每增加 LengthIncrement,手续费增加 FeeIncrement LengthIncrement int64 `json:"lengthIncrement"` FeeIncrement int64 `json:"feeIncrement"` // content 字段最大长度 MaxLength int64 `json:"maxLength"` }
type XEvidenceConfig ¶
type XEvidenceConfig struct { // 通过配置升级过程中,可以接受 LastSaveMethodFeeConfig // 网络升级结束后,使用 CurrentSaveMethodFeeConfig XEvidenceSaveMethodFeeConfig *SaveMethodFeeConfig XEvidenceAdmins map[string]bool XEvidenceMethodFee map[string]int64 }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.