Documentation
¶
Index ¶
- Constants
- func CheckContractDeployed(t *testing.T, fullnodeClient sdk.FullNodeClient, address address.Address) (contractDeployed bool)
- func FindGitRoot() (string, error)
- func GetTronNodeIpAddress() string
- func SignAndDeployContract(t *testing.T, fullnodeClient sdk.FullNodeClient, keystore loop.Keystore, ...) string
- func StartTronNode(genesisAddress string) error
- func StopTronNode() error
- func WaitForInflightTxs(logger logger.Logger, txmgr *txm.TronTxm, timeout time.Duration)
- func WaitForTransactionInfo(t *testing.T, client sdk.FullNodeClient, txHash string, waitSecs int) *soliditynode.TransactionInfo
- type TestKey
- type TestKeystore
Constants ¶
View Source
const ( // Local RPCs DefaultInternalFullNodeUrl = "http://host.docker.internal:16667/wallet" DefaultInternalSolidityNodeUrl = "http://host.docker.internal:16668/walletsolidity" FullNodePort = "16667" SolidityNodePort = "16668" // Testnet RPCs // Urls can be found at https://developers.tron.network/reference/background ShastaFullNodeUrl = "https://api.shasta.trongrid.io/wallet" ShastaSolidityNodeUrl = "https://api.shasta.trongrid.io/walletsolidity" NileFullNodeUrl = "https://nile.trongrid.io/wallet" NileSolidityNodeUrl = "https://nile.trongrid.io/walletsolidity" // Configs for TXM DevnetFeeLimit = 1_000_000_000 DevnetMaxWaitTime = 30 //seconds DevnetPollFrequency = 1 //seconds DevnetOcrTransmissionFrequency = 5 * time.Second TestnetFeeLimit = 10_000_000_000 TestnetMaxWaitTime = 90 //seconds TestnetPollFrequency = 5 //seconds TestnetOcrTransmissionFrequency = 10 * time.Second // Testing network names Shasta = "shasta" Nile = "nile" Devnet = "devnet" )
View Source
const TRON_OCR2_AGGREGATOR_ABI = "" /* 18826-byte string literal not displayed */
todo: import and parse from elsewhere (manifest?)
Variables ¶
This section is empty.
Functions ¶
func CheckContractDeployed ¶
func FindGitRoot ¶
Finds the closest git repo root, assuming that a directory with a .git directory is a git repo.
func GetTronNodeIpAddress ¶
func GetTronNodeIpAddress() string
func SignAndDeployContract ¶
func StartTronNode ¶
func StopTronNode ¶
func StopTronNode() error
func WaitForInflightTxs ¶
func WaitForTransactionInfo ¶
func WaitForTransactionInfo(t *testing.T, client sdk.FullNodeClient, txHash string, waitSecs int) *soliditynode.TransactionInfo
Types ¶
type TestKey ¶
type TestKey struct {
ID uuid.UUID // Version 4 "random" for unique id not derived from key data
// to simplify lookups we also store the address
Address address.Address
// we only store privkey as pubkey/address can be derived from it
// privkey in this struct is always in plaintext
PrivateKey *ecdsa.PrivateKey
}
func NewKeyFromECDSA ¶
func NewKeyFromECDSA(privateKeyECDSA *ecdsa.PrivateKey) *TestKey
type TestKeystore ¶
type TestKeystore struct {
Keys map[string]*ecdsa.PrivateKey
}
func NewTestKeystore ¶
func NewTestKeystore(address string, privateKey *ecdsa.PrivateKey) *TestKeystore
Click to show internal directories.
Click to hide internal directories.