Versions in this module Expand all Collapse all v1 v1.0.0 Jul 27, 2023 Changes in this version + type Block interface + GetTransactions func() []Transaction + Hash func() string + Number func() uint64 + ParentHash func() string + Timestamp func() uint64 + type BlockChain interface + GetBlockByNumber func(blockNumber uint64) (Block, error) + GetBlockNumber func() (uint64, error) + GetHotFeeDiscount func(address string) decimal.Decimal + GetTokenAllowance func(tokenAddress, proxyAddress, address string) decimal.Decimal + GetTokenBalance func(tokenAddress, address string) decimal.Decimal + GetTransaction func(ID string) (Transaction, error) + GetTransactionAndReceipt func(ID string) (Transaction, TransactionReceipt, error) + GetTransactionReceipt func(ID string) (TransactionReceipt, error) + IsValidSignature func(address string, message string, signature string) (bool, error) + SendRawTransaction func(tx interface{}) (string, error) + SendTransaction func(txAttributes map[string]interface{}, privateKey []byte) (transactionHash string, err error) + type Hydro interface + type HydroProtocol interface + GenerateOrderData func(version, expiredAtSeconds, salt int64, ...) string + GetMatchOrderCallData func(*Order, []*Order, []*big.Int) []byte + GetOrderHash func(*Order) []byte + IsValidOrderSignature func(address string, orderID string, signature string) bool + type IReceiptLog interface + GetAddress func() string + GetBlockHash func() string + GetBlockNum func() int + GetData func() string + GetLogIndex func() int + GetRemoved func() bool + GetTopics func() []string + GetTransactionHash func() string + GetTransactionIndex func() int + type MockBlockchain struct + func (m *MockBlockchain) GetBlockByNumber(blockNumber uint64) (Block, error) + func (m *MockBlockchain) GetBlockNumber() (uint64, error) + func (m *MockBlockchain) GetHotFeeDiscount(address string) decimal.Decimal + func (m *MockBlockchain) GetTokenAllowance(tokenAddress, proxyAddress, address string) decimal.Decimal + func (m *MockBlockchain) GetTokenBalance(tokenAddress string, address string) decimal.Decimal + func (m *MockBlockchain) GetTransaction(ID string) (Transaction, error) + func (m *MockBlockchain) GetTransactionAndReceipt(ID string) (Transaction, TransactionReceipt, error) + func (m *MockBlockchain) GetTransactionReceipt(ID string) (TransactionReceipt, error) + func (m *MockBlockchain) IsValidSignature(address string, message string, signature string) (bool, error) + func (m *MockBlockchain) SendRawTransaction(tx interface{}) (string, error) + func (m *MockBlockchain) SendTransaction(txAttributes map[string]interface{}, privateKey []byte) (transactionHash string, err error) + type MockHydro struct + func NewMockHydro() *MockHydro + type MockHydroProtocol struct + func (m *MockHydroProtocol) GenerateOrderData(version, expiredAtSeconds, salt int64, ...) string + func (m *MockHydroProtocol) GetMatchOrderCallData(takerOrder *Order, makerOrders []*Order, baseTokenFilledAmounts []*big.Int) []byte + func (m *MockHydroProtocol) GetOrderHash(order *Order) []byte + type Order struct + BaseTokenAddress string + BaseTokenAmount *big.Int + Data string + GasTokenAmount *big.Int + QuoteTokenAddress string + QuoteTokenAmount *big.Int + Relayer string + Signature string + Trader string + func NewOrderWithData(trader, relayer, baseTokenAddress, quoteTokenAddress string, ...) *Order + type OrderAddressSet struct + BaseToken string + QuoteToken string + Relayer string + type OrderParam struct + BaseTokenAmount *big.Int + Data string + GasTokenAmount *big.Int + QuoteTokenAmount *big.Int + Signature *OrderSignature + Trader string + type OrderSignature struct + Config [32]byte + R [32]byte + S [32]byte + type Transaction interface + GetBlockHash func() string + GetBlockNumber func() uint64 + GetFrom func() string + GetGas func() int + GetGasPrice func() big.Int + GetHash func() string + GetTo func() string + GetValue func() big.Int + type TransactionReceipt interface + GetBlockHash func() string + GetBlockNumber func() uint64 + GetLogs func() []IReceiptLog + GetResult func() bool + GetTxHash func() string + GetTxIndex func() int