fiscobcos

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GAS_PRICE = new(big.Int).SetInt64(22000000000)
	GAS_LIMIT = new(big.Int).SetInt64(4300000)

	ChainId = new(big.Int).SetInt64(1)
)

Functions

func Hash added in v1.1.3

func Hash(tx *Transaction) common.Hash

func ParesData added in v1.1.2

func ParesData(contractabi, funcName string, args []interface{}, smcrypto bool) (string, error)

func ParseMethod

func ParseMethod(data []byte, contractabi string, sm bool) (funcName string, constant bool, err error)

func ParseTrans

func ParseTrans(data string, contractAbi string, sm bool) (contractAddress, funcName string, constant bool, err error)

func SM3HashNonSig added in v1.1.3

func SM3HashNonSig(tx *Transaction) []byte

func TransData

func TransData(contractabi, contractAddress string, funcName string, args []interface{}, groupId, blockLimit *big.Int, extraData []byte, smcrypto bool, privKey key.PrivateKeyProvider) (string, bool, error)

Types

type Transaction

type Transaction struct {
	// contains filtered or unexported fields
}

func NewTransaction

func NewTransaction(nonce *big.Int, to common.Address, amount *big.Int, gasLimit *big.Int, gasPrice *big.Int, blockLimit *big.Int, data []byte, chainId *big.Int, groupId *big.Int, extraData []byte, smcrypto bool) *Transaction

NewTransaction returns a new transaction

func (*Transaction) DecodeRLP

func (tx *Transaction) DecodeRLP(s *rlp.Stream) error

DecodeRLP implements rlp.Decoder

func (*Transaction) EncodeRLP

func (tx *Transaction) EncodeRLP(w io.Writer) error

EncodeRLP implements rlp.Encoder

func (*Transaction) SignData

func (tx *Transaction) SignData(priKey key.PrivateKeyProvider) ([]byte, error)

Jump to

Keyboard shortcuts

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