utils

package
v1.67.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2022 License: BSD-3-Clause Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallContractAndSign

func CallContractAndSign(txCreateInfo *TxCreateInfo, action *evmtypes.EVMContractAction, contractAddr string) (string, []byte, error)

func CreateAndSignEvmTx

func CreateAndSignEvmTx(chainID int32, action proto.Message, execer, privateKeyStr, expire string, fee int64) (string, []byte, error)

func CreateContractAndSign

func CreateContractAndSign(txCreateInfo *TxCreateInfo, code, abi, parameter, contractName string) (string, []byte, error)

func ParseFileInJson

func ParseFileInJson(file string, result interface{}) error

func SendSignTxs2Chain33

func SendSignTxs2Chain33(filePath, rpcUrl string)

func WriteContractFile

func WriteContractFile(fileName string, content string)

func WriteToFileInJson

func WriteToFileInJson(fileName string, content interface{})

Types

type Chain33OfflineTx

type Chain33OfflineTx struct {
	ContractAddr  string
	TxHash        string
	SignedRawTx   string
	OperationName string
	Interval      time.Duration
}

type TxCreateInfo

type TxCreateInfo struct {
	PrivateKey string
	Expire     string
	Note       string
	Fee        int64
	ParaName   string
	ChainID    int32
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL