service

package
v0.0.0-...-12b389a Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const ENVIRONMENT_KEY_NAME = "WRITER_KEY"
View Source
const RelayABI = "" /* 12212-byte string literal not displayed */

Variables

View Source
var GAS_LIMIT uint64 = 0

Functions

func GetTransaction

func GetTransaction(rawTx string) (*types.Transaction, error)

GetTransaction ...

func HandleError

func HandleError(id json.RawMessage, err error) *rpc.JsonrpcMessage

HandleError

func Hash

func Hash(from string, to *common.Address, encodedFunction []byte, gasLimit, nonce string) []byte

Hash ...

func Sign

func Sign(hash []byte, privateKey *ecdsa.PrivateKey) ([]byte, error)

Sign ...

func SignPayload

func SignPayload(_privateKey, signingAddr string, destinationAddress *common.Address, encodedFunction []byte, gasLimit, nonce uint64) ([]byte, error)

SignPayload ...

Types

type RelaySignerService

type RelaySignerService struct {
	// The service's configuration
	Config *model.Config
}

RelaySignerService is the main service

func (*RelaySignerService) DecreaseGasUsed

func (service *RelaySignerService) DecreaseGasUsed(id json.RawMessage) bool

DecreaseGasUsed by node

func (*RelaySignerService) GetTransactionCount

func (service *RelaySignerService) GetTransactionCount(id json.RawMessage, from string) *rpc.JsonrpcMessage

GetTransactionCount of account

func (*RelaySignerService) GetTransactionReceipt

func (service *RelaySignerService) GetTransactionReceipt(id json.RawMessage, transactionID string) *rpc.JsonrpcMessage

GetTransactionReceipt from blockchain

func (*RelaySignerService) Init

func (service *RelaySignerService) Init(_config *model.Config) error

Init configuration parameters

func (*RelaySignerService) ProcessNewBlocks

func (service *RelaySignerService) ProcessNewBlocks(done <-chan interface{})

func (*RelaySignerService) SendMetatransaction

func (service *RelaySignerService) SendMetatransaction(id json.RawMessage, to *common.Address, gasLimit uint64, signingData []byte, v uint8, r, s [32]byte) *rpc.JsonrpcMessage

SendMetatransaction to blockchain

func (*RelaySignerService) VerifyGasLimit

func (service *RelaySignerService) VerifyGasLimit(gasLimit uint64, id json.RawMessage) (bool, error)

VerifyGasLimit sent a transaction

func (*RelaySignerService) VerifySender

func (service *RelaySignerService) VerifySender(sender common.Address, id json.RawMessage) (bool, error)

VerifySender sent a transaction

Jump to

Keyboard shortcuts

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