Versions in this module Expand all Collapse all v0 v0.9.0 Sep 26, 2019 Changes in this version + const AddressLength + const BlockConfirmSignLength + const HashLength + var Big0 = big.NewInt(0) + var Big1 = big.NewInt(1) + var Big2 = big.NewInt(2) + var Big256 = big.NewInt(256) + var Big257 = big.NewInt(257) + var Big3 = big.NewInt(3) + var Big32 = big.NewInt(32) + var SystemContractList = []string + func AbsolutePath(datadir string, filename string) string + func BoolToBytes(b bool) []byte + func Bytes2Hex(d []byte) string + func BytesCombine(pBytes ...[]byte) []byte + func BytesToFloat32(bytes []byte) float32 + func BytesToFloat64(bytes []byte) float64 + func BytesToInt32(b []byte) int32 + func BytesToInt64(b []byte) int64 + func CallResAsBool(bts []byte) bool + func CallResAsInt32(bts []byte) int32 + func CallResAsInt64(bts []byte) int64 + func CallResAsString(bts []byte) string + func CallResAsUint64(bts []byte) uint64 + func CopyBytes(b []byte) (copiedBytes []byte) + func CurrentGoRoutineID() string + func EmptyHash(h Hash) bool + func ErrPrintln(a ...interface{}) + func FileExist(filePath string) bool + func Float32ToBytes(float float32) []byte + func Float64ToBytes(float float64) []byte + func FromHex(s string) []byte + func GenCallData(funcName string, params []interface{}) []byte + func GetCurrentInterpreterType() string + func Hex2Bytes(str string) []byte + func Hex2BytesFixed(str string, flen int) []byte + func InitSystemconfig(root NodeInfo) + func InnerCall(conAddr Address, funcName string, params []interface{}) ([]byte, error) + func Int16ToBytes(n int16) []byte + func Int32ToBytes(n int32) []byte + func Int64ToBytes(n int64) []byte + func Int8ToBytes(n int8) []byte + func IntToBytes(n int) []byte + func IsHexAddress(s string) bool + func IsHexZeroAddress(s string) bool + func LeftPadBytes(slice []byte, l int) []byte + func LoadJSON(file string, val interface{}) error + func MakeName(name, version string) string + func PaddingLeft(src []byte, bytes int) []byte + func PrintDepricationWarning(str string) + func Report(extra ...interface{}) + func RightPadBytes(slice []byte, l int) []byte + func SetCurrentInterpreterType(cit string) + func SetInnerCallFunc(f func(Address, []byte) ([]byte, error)) + func SetSysContractCallFunc(f func(*SystemConfig)) + func ToBytes(source interface{}) ([]byte, error) + func ToHex(b []byte) string + func Uint16ToBytes(n uint16) []byte + func Uint32ToBytes(n uint32) []byte + func Uint64ToBytes(n uint64) []byte + func Uint8ToBytes(n uint8) []byte + func UintToBytes(n uint) []byte + func WasmCallResultCompatibleSolInt64(res []byte) []byte + func WasmCallResultCompatibleSolString(res []byte) []byte + type Address [AddressLength]byte + func BigToAddress(b *big.Int) Address + func BytesToAddress(b []byte) Address + func HexToAddress(s string) Address + func (a *Address) Scan(src interface{}) error + func (a *Address) SetBytes(b []byte) + func (a *Address) UnmarshalJSON(input []byte) error + func (a *Address) UnmarshalText(input []byte) error + func (a Address) Big() *big.Int + func (a Address) Bytes() []byte + func (a Address) Format(s fmt.State, c rune) + func (a Address) Hash() Hash + func (a Address) Hex() string + func (a Address) HexWithNoPrefix() string + func (a Address) MarshalText() ([]byte, error) + func (a Address) String() string + func (a Address) Value() (driver.Value, error) + type BlockConfirmSign [BlockConfirmSignLength]byte + func NewBlockConfirmSign(signSlice []byte) *BlockConfirmSign + func (sig *BlockConfirmSign) String() string + type CBFTProduceBlockCfg struct + BlockInterval int32 + ProduceDuration int32 + type CommonResult struct + Data []NodeInfo + RetCode int32 + RetMsg string + type Hash [HashLength]byte + func BigToHash(b *big.Int) Hash + func BytesToHash(b []byte) Hash + func HexToHash(s string) Hash + func (h *Hash) Scan(src interface{}) error + func (h *Hash) SetBytes(b []byte) + func (h *Hash) UnmarshalJSON(input []byte) error + func (h *Hash) UnmarshalText(input []byte) error + func (h Hash) Big() *big.Int + func (h Hash) Bytes() []byte + func (h Hash) Format(s fmt.State, c rune) + func (h Hash) Generate(rand *rand.Rand, size int) reflect.Value + func (h Hash) Hex() string + func (h Hash) HexWithNoPrefix() string + func (h Hash) MarshalText() ([]byte, error) + func (h Hash) String() string + func (h Hash) TerminalString() string + func (h Hash) Value() (driver.Value, error) + type MixedcaseAddress struct + func NewMixedcaseAddress(addr Address) MixedcaseAddress + func NewMixedcaseAddressFromString(hexaddr string) (*MixedcaseAddress, error) + func (ma *MixedcaseAddress) Address() Address + func (ma *MixedcaseAddress) MarshalJSON() ([]byte, error) + func (ma *MixedcaseAddress) Original() string + func (ma *MixedcaseAddress) String() string + func (ma *MixedcaseAddress) UnmarshalJSON(input []byte) error + func (ma *MixedcaseAddress) ValidChecksum() bool + type NodeInfo struct + DelayNum uint64 + Desc string + ExternalIP string + InternalIP string + Name string + Owner string + P2pPort int32 + PublicKey string + RpcPort int32 + Status int32 + Types int32 + type PrettyAge time.Time + func (t PrettyAge) String() string + type PrettyDuration time.Duration + func (d PrettyDuration) String() string + type StorageSize float64 + func (s StorageSize) String() string + func (s StorageSize) TerminalString() string + type SystemConfig struct + ContractAddress map[string]Address + HighsetNumber *big.Int + Nodes []NodeInfo + SysParam *SystemParameter + SystemConfigMu *sync.RWMutex + var SysCfg *SystemConfig + func (sc *SystemConfig) GetBlockGasLimit() int64 + func (sc *SystemConfig) GetCBFTTime() CBFTProduceBlockCfg + func (sc *SystemConfig) GetConsensusNodes() []NodeInfo + func (sc *SystemConfig) GetConsensusNodesFilterDelay(number uint64) []NodeInfo + func (sc *SystemConfig) GetContractAddress(name string) Address + func (sc *SystemConfig) GetDeletedNodes() []NodeInfo + func (sc *SystemConfig) GetGasContractGas() Address + func (sc *SystemConfig) GetGasContractName() string + func (sc *SystemConfig) GetHighsetNumber() *big.Int + func (sc *SystemConfig) GetNormalNodes() []NodeInfo + func (sc *SystemConfig) GetTxGasLimit() int64 + func (sc *SystemConfig) IfCheckContractDeployPermission() int64 + func (sc *SystemConfig) IsProduceEmptyBlock() bool + func (sc *SystemConfig) IsValidJoinNode(publicKey string) bool + func (sc *SystemConfig) UpdateSystemConfig() + type SystemParameter struct + BlockGasLimit int64 + CBFTTime CBFTProduceBlockCfg + CheckContractDeployPermission int64 + GasContractAddr Address + GasContractName string + IsProduceEmptyBlock bool + TxGasLimit int64 + type UnprefixedAddress Address + func (a *UnprefixedAddress) UnmarshalText(input []byte) error + func (a UnprefixedAddress) MarshalText() ([]byte, error) + type UnprefixedHash Hash + func (h *UnprefixedHash) UnmarshalText(input []byte) error + func (h UnprefixedHash) MarshalText() ([]byte, error)