Documentation ¶
Index ¶
- Variables
- func CreateTestContractCreationTransaction(signer fchtypes.Signer, shard uint32, nonce, gasLimit uint64, ...) (*fchtypes.Transaction, error)
- func CreateTestStakingTransaction(payloadMaker func() (stakingTypes.Directive, interface{}), ...) (*stakingTypes.StakingTransaction, error)
- func CreateTestTransaction(signer fchtypes.Signer, fromShard, toShard uint32, nonce, gasLimit uint64, ...) (*fchtypes.Transaction, error)
- func GenerateHost(address string, port string) (p2p.Host, *bls.PublicKey, error)
- func GeneratePeer(address string, port string) (p2p.Peer, error)
- func GeneratePrivateKey() (privateKey libp2p_crypto.PrivKey, publicKey libp2p_crypto.PubKey, err error)
- func GetMessageFromStakingTx(tx *stakingTypes.StakingTransaction) (map[string]interface{}, error)
- type Host
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Hosts - host combinations Hosts []Host // Topics - p2p topics Topics []string // Bootnodes - p2p bootnodes Bootnodes []string )
Functions ¶
func CreateTestContractCreationTransaction ¶
func CreateTestContractCreationTransaction( signer fchtypes.Signer, shard uint32, nonce, gasLimit uint64, gasPrice, amount *big.Int, data []byte, ) (*fchtypes.Transaction, error)
CreateTestContractCreationTransaction creates a pre-signed contract creation transaction
func CreateTestStakingTransaction ¶
func CreateTestStakingTransaction( payloadMaker func() (stakingTypes.Directive, interface{}), key *ecdsa.PrivateKey, nonce, gasLimit uint64, gasPrice *big.Int, ) (*stakingTypes.StakingTransaction, error)
CreateTestStakingTransaction creates a pre-signed staking transaction
func CreateTestTransaction ¶
func CreateTestTransaction( signer fchtypes.Signer, fromShard, toShard uint32, nonce, gasLimit uint64, gasPrice, amount *big.Int, data []byte, ) (*fchtypes.Transaction, error)
CreateTestTransaction creates a pre-signed transaction
func GenerateHost ¶
GenerateHost - test helper to generate a new host
func GeneratePeer ¶
GeneratePeer - test helper to generate a new peer
func GeneratePrivateKey ¶
func GeneratePrivateKey() (privateKey libp2p_crypto.PrivKey, publicKey libp2p_crypto.PubKey, err error)
GeneratePrivateKey - test helper to generate a new private key to be used for p2p
func GetMessageFromStakingTx ¶
func GetMessageFromStakingTx(tx *stakingTypes.StakingTransaction) (map[string]interface{}, error)
GetMessageFromStakingTx gets the staking message, as seen by the rpc layer
Types ¶
Click to show internal directories.
Click to hide internal directories.