fiscobcos

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2021 License: Apache-2.0 Imports: 16 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 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 TransData

func TransData(contractabi, contractAddress string, funcName string, args []interface{}, groupId, blockLimit *big.Int, extraData []byte, smcrypto bool, privKey interface{}) (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) Sign

func (tx *Transaction) Sign(priKey *ecdsa.PrivateKey, isSM bool) []byte

func (*Transaction) SignData

func (tx *Transaction) SignData(priKey interface{}) ([]byte, error)

Jump to

Keyboard shortcuts

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