Documentation ¶
Index ¶
- Constants
- func CheckGasLimit(gasUsed uint64) bool
- func ConsumeKeyHistoryIterGasUsed(gasUsed uint64) (uint64, error)
- func ConsumeKvIteratorGasUsed(gasUsed uint64) (uint64, error)
- func ContractGasUsed(gasUsed uint64, method string, contractName string, byteCode []byte) (uint64, error)
- func CreateKeyHistoryIterGasUsed(gasUsed uint64) (uint64, error)
- func CreateKvIteratorGasUsed(gasUsed uint64) (uint64, error)
- func DelStateGasUsed(gasUsed uint64, value []byte) (uint64, error)
- func EmitEventGasUsed(gasUsed uint64, contractEvent *common.ContractEvent) (uint64, error)
- func GetArgsGasUsed(gasUsed uint64, args map[string]string) (uint64, error)
- func GetBatchStateGasUsed(gasUsed uint64, payload []byte) (uint64, error)
- func GetSenderAddressGasUsed(gasUsed uint64) (uint64, error)
- func GetStateGasUsed(gasUsed uint64, value []byte) (uint64, error)
- func InitFuncGasUsed(gasUsed, configDefaultGas uint64) (uint64, error)
- func InitFuncGasUsedOld(gasUsed uint64, parameters map[string][]byte, keys ...string) (uint64, error)
- func PutStateGasUsed(gasUsed uint64, contractName, key, field string, value []byte) (uint64, error)
Constants ¶
View Source
const ( // function list gas price GetArgsGasPrice uint64 = 1 // GetArgsGasPrice GetStateGasPrice uint64 = 1 // GetStateGasPrice GetBatchStateGasPrice uint64 = 1 // GetBatchStateGasPrice PutStateGasPrice uint64 = 10 // PutStateGasPrice DelStateGasPrice uint64 = 10 // DelStateGasPrice GetCreatorOrgIdGasPrice uint64 = 1 // GetCreatorOrgIdGasPrice GetCreatorRoleGasPrice uint64 = 1 // GetCreatorRoleGasPrice GetCreatorPkGasPrice uint64 = 1 // GetCreatorPkGasPrice GetSenderOrgIdGasPrice uint64 = 1 //GetSenderOrgIdGasPrice GetSenderRoleGasPrice uint64 = 1 //GetSenderRoleGasPrice GetSenderPkGasPrice uint64 = 1 //GetSenderPkGasPrice GetBlockHeightGasPrice uint64 = 1 //GetBlockHeightGasPrice GetTxIdGasPrice uint64 = 1 //GetTxIdGasPrice GetTimeStampPrice uint64 = 1 //GetTimeStampPrice EmitEventGasPrice uint64 = 5 //EmitEventGasPrice LogGasPrice uint64 = 5 //LogGasPrice KvIteratorCreateGasPrice uint64 = 1 //KvIteratorCreateGasPrice KvPreIteratorCreateGasPrice uint64 = 1 //KvPreIteratorCreateGasPrice KvIteratorHasNextGasPrice uint64 = 1 //KvIteratorHasNextGasPrice KvIteratorNextGasPrice uint64 = 1 //KvIteratorNextGasPrice KvIteratorCloseGasPrice uint64 = 1 //KvIteratorCloseGasPrice KeyHistoryIterCreateGasPrice uint64 = 1 //KeyHistoryIterCreateGasPrice KeyHistoryIterHasNextGasPrice uint64 = 1 //KeyHistoryIterHasNextGasPrice KeyHistoryIterNextGasPrice uint64 = 1 //KeyHistoryIterNextGasPrice KeyHistoryIterCloseGasPrice uint64 = 1 //KeyHistoryIterCloseGasPrice GetSenderAddressGasPrice uint64 = 1 //GetSenderAddressGasPrice // special parameters passed to contract ContractParamCreatorOrgId = "__creator_org_id__" //ContractParamCreatorOrgId ContractParamCreatorRole = "__creator_role__" //ContractParamCreatorRole ContractParamCreatorPk = "__creator_pk__" //ContractParamCreatorPk ContractParamSenderOrgId = "__sender_org_id__" //ContractParamSenderOrgId ContractParamSenderRole = "__sender_role__" //ContractParamSenderRole ContractParamSenderPk = "__sender_pk__" //ContractParamSenderPk ContractParamBlockHeight = "__block_height__" //ContractParamBlockHeight ContractParamTxId = "__tx_id__" //ContractParamTxId ContractParamTxTimeStamp = "__tx_time_stamp__" //ContractParamTxTimeStamp )
nolint: revive
Variables ¶
This section is empty.
Functions ¶
func ConsumeKeyHistoryIterGasUsed ¶
ConsumeKeyHistoryIterGasUsed returns consume key history iter gas used
func ConsumeKvIteratorGasUsed ¶
ConsumeKvIteratorGasUsed returns kv iter gas used
func ContractGasUsed ¶
func ContractGasUsed(gasUsed uint64, method string, contractName string, byteCode []byte) (uint64, error)
ContractGasUsed returns contract gas used
func CreateKeyHistoryIterGasUsed ¶
CreateKeyHistoryIterGasUsed returns create key history iter gas used
func CreateKvIteratorGasUsed ¶
CreateKvIteratorGasUsed create kv iter gas used
func DelStateGasUsed ¶
DelStateGasUsed returns del state gas used
func EmitEventGasUsed ¶
func EmitEventGasUsed(gasUsed uint64, contractEvent *common.ContractEvent) (uint64, error)
EmitEventGasUsed returns emit event gas used
func GetArgsGasUsed ¶
GetArgsGasUsed returns get args gas used
func GetBatchStateGasUsed ¶
GetBatchStateGasUsed returns get batch state gas used
func GetSenderAddressGasUsed ¶
GetSenderAddressGasUsed returns get sender address gas used
func GetStateGasUsed ¶
GetStateGasUsed returns get state gas used
func InitFuncGasUsed ¶
InitFuncGasUsed returns init func gas used
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.