MCPcopy Create free account
hub / github.com/DNAProject/DNA / getStorageParam

Function getStorageParam

smartcontract/service/native/global_params/utils.go:68–76  ·  view source on GitHub ↗
(native *native.NativeService, key []byte)

Source from the content-addressed store, hash-verified

66}
67
68func getStorageParam(native *native.NativeService, key []byte) (Params, error) {
69 item, err := utils.GetStorageItem(native, key)
70 params := Params{}
71 if err != nil || item == nil {
72 return params, err
73 }
74 err = params.Deserialization(common.NewZeroCopySource(item.Value))
75 return params, err
76}
77
78func GetStorageRole(native *native.NativeService, key []byte) (common.Address, error) {
79 item, err := utils.GetStorageItem(native, key)

Callers 3

SetGlobalParamFunction · 0.85
GetGlobalParamFunction · 0.85
CreateSnapshotFunction · 0.85

Calls 3

DeserializationMethod · 0.95
GetStorageItemFunction · 0.92
NewZeroCopySourceFunction · 0.92

Tested by

no test coverage detected