Documentation ¶
Index ¶
- Constants
- func AbiParsing(jsonFilePath string) (string, error)
- func Bech32toValidatorAddress(validators []string) ([]sdk.ValAddress, error)
- func BytecodeParsing(jsonFilePath string) (string, error)
- func ConvertEvmChainId(chainId string) (*big.Int, error)
- func CtxHttpClient(methodType string, url string, reqBody []byte, ctx context.Context) ([]byte, error)
- func DenomAdd(amount string) string
- func DenomRemove(amount string) string
- func From0xHexStringToIBignt(hexString string) *big.Int
- func FromBigIntToString(v *big.Int) string
- func FromByte20AddressToCosmosAddr(address common.Address) (sdk.AccAddress, error)
- func FromInt64ToString(value int64) string
- func FromIntToString(value int) string
- func FromStringHexToHash(hashString string) common.Hash
- func FromStringToBigInt(v string) (*big.Int, error)
- func FromStringToByte20Address(address string) common.Address
- func FromStringToInt(value string) int
- func FromStringToInt64(value string) int64
- func FromStringToTypeHexString(value string) string
- func FromStringToUint64(value string) uint64
- func FromUint64ToString(value uint64) string
- func GasLimitAdjustment(gasUsed uint64, gasAdjustment string) (string, error)
- func GetAbiPack(callName string, abi string, bytecode string, args ...interface{}) ([]byte, error)
- func GetAbiUnpack(callName string, abi string, bytecode string, data []byte) ([]interface{}, error)
- func GetAddrByPrivKey(priv cryptotypes.PrivKey) (sdk.AccAddress, error)
- func GetBindMetaData(abi, bytecode string) *bind.MetaData
- func GrpcUrlParsing(normalUrl string) string
- func JsonMarshalData(jsonData interface{}) ([]byte, error)
- func JsonMarshalDataIndent(jsonData interface{}) ([]byte, error)
- func JsonUnmarshal(jsonStruct interface{}, jsonFilePath string) (interface{}, error)
- func JsonUnmarshalData(jsonStruct interface{}, byteValue []byte) interface{}
- func LogErr(errType xgoerrors.XGoError, errDesc ...interface{}) error
- func LogInfo(log ...interface{})
- func MakeEncodingConfig() params.EncodingConfig
- func MakeQueryLabels(labels ...string) string
- func MakeQueryLcdUrl(metadata string) string
- func MulBigInt(val1 *big.Int, val2 *big.Int) *big.Int
- func MulUint64(val1 uint64, val2 uint64) uint64
- func NewClient() (cmclient.Context, error)
- func NewFactory(clientCtx cmclient.Context) tx.Factory
- func NewKeyring(backendType string, keyringPath string) (keyring.Keyring, error)
- func SaveJsonPretty(jsonByte []byte, saveTxPath string) error
- func ToString(value interface{}, defaultValue string) string
- func ToStringTrim(value interface{}, defaultValue string) string
- type EvmClient
Constants ¶
View Source
const ( BackendFile = "file" BackendMemory = "memory" )
View Source
const ( DefaultEvmGasLimit = "21000" DefaultSolidityValue = "0" DefaultEvmTxReceiptTimeout = 100 )
Variables ¶
This section is empty.
Functions ¶
func AbiParsing ¶
func Bech32toValidatorAddress ¶
func Bech32toValidatorAddress(validators []string) ([]sdk.ValAddress, error)
func BytecodeParsing ¶
func CtxHttpClient ¶ added in v0.0.5
func CtxHttpClient(methodType string, url string, reqBody []byte, ctx context.Context) ([]byte, error)
Make new http client for inquiring several information.
func DenomRemove ¶
func From0xHexStringToIBignt ¶ added in v0.0.6
func FromBigIntToString ¶
func FromByte20AddressToCosmosAddr ¶
func FromByte20AddressToCosmosAddr(address common.Address) (sdk.AccAddress, error)
func FromInt64ToString ¶ added in v0.0.5
func FromIntToString ¶
func FromStringHexToHash ¶
func FromStringToInt ¶
func FromStringToInt64 ¶
func FromStringToTypeHexString ¶ added in v0.0.6
func FromStringToUint64 ¶
func FromUint64ToString ¶
func GasLimitAdjustment ¶
func GetAbiPack ¶ added in v0.0.6
For invoke(as execute) contract, parameters are packed by using ABI.
func GetAbiUnpack ¶ added in v0.0.6
After call(as query) solidity contract, the response of chain is unpacked by ABI.
func GetAddrByPrivKey ¶
func GetAddrByPrivKey(priv cryptotypes.PrivKey) (sdk.AccAddress, error)
func GetBindMetaData ¶ added in v0.0.7
func GrpcUrlParsing ¶
func JsonMarshalData ¶
func JsonMarshalDataIndent ¶ added in v0.0.6
func JsonUnmarshal ¶
func JsonUnmarshalData ¶
func JsonUnmarshalData(jsonStruct interface{}, byteValue []byte) interface{}
func MakeEncodingConfig ¶ added in v0.0.2
func MakeEncodingConfig() params.EncodingConfig
func MakeQueryLabels ¶ added in v0.0.5
func MakeQueryLcdUrl ¶ added in v0.0.5
func NewFactory ¶
Provide cosmos sdk tx factory.
func NewKeyring ¶
Provide cosmos sdk keyring
func SaveJsonPretty ¶
func ToStringTrim ¶ added in v0.0.6
Types ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.