Documentation ¶
Index ¶
- Variables
- type Connection
- func (c *Connection) Client() *tron.GrpcClient
- func (c *Connection) Close()
- func (c *Connection) Connect() error
- func (c *Connection) EnsureHasBytecode(contractAddress string) error
- func (c *Connection) Keypair() *secp256k1.Keypair
- func (c *Connection) LatestBlock() (*big.Int, error)
- func (c *Connection) WaitForBlock(block *big.Int) error
Constants ¶
This section is empty.
Variables ¶
View Source
var BlockRetryInterval = time.Second * 5
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func NewConnection ¶
func NewConnection(endpoint string, kp *secp256k1.Keypair, log log.Logger, gasLimit, gasPrice *big.Int) *Connection
NewConnection returns an uninitialized connection, must call Connection.Connect() before using.
func (*Connection) Client ¶
func (c *Connection) Client() *tron.GrpcClient
func (*Connection) Close ¶
func (c *Connection) Close()
Close terminates the client connection and stops any running routines
func (*Connection) Connect ¶
func (c *Connection) Connect() error
Connect starts the ethereum WS connection
func (*Connection) EnsureHasBytecode ¶
func (c *Connection) EnsureHasBytecode(contractAddress string) error
EnsureHasBytecode asserts if contract code exists at the specified address
func (*Connection) Keypair ¶
func (c *Connection) Keypair() *secp256k1.Keypair
func (*Connection) LatestBlock ¶
func (c *Connection) LatestBlock() (*big.Int, error)
LatestBlock returns the latest block from the current chain
func (*Connection) WaitForBlock ¶
func (c *Connection) WaitForBlock(block *big.Int) error
WaitForBlock will poll for the block number until the current block is equal or greater than
Click to show internal directories.
Click to hide internal directories.