Documentation ¶
Index ¶
Constants ¶
View Source
const EnvEthereumRpcUrl = `FLU_ETHEREUM_RPC_URL`
Variables ¶
This section is empty.
Functions ¶
func MockRpcClient ¶
func MockRpcClient(rpcMethods_ map[string]interface{}, callMethods_ map[string]map[string]interface{}) (*ethclient.Client, error)
MockRpcClient to return an eth client connected to an endpoint that mocks the given methods. rpcMethods [methodName]response to provide a list of Ethereum RPC methods and how they should be mocked. callMethods[methodName]response to provide a list of eth_call contract methods and how they should respond.
Types ¶
type TestStructure ¶
type TestStructure struct { Transfer struct { Transaction ethTypes.Hash `json:"transaction"` Log struct { Data string `json:"data"` Address ethTypes.Address `json:"address"` Topics []ethTypes.Hash `json:"topics"` } `json:"log"` Application int `json:"application"` } `json:"transfer"` Transaction struct { To ethTypes.Address `json:"to"` From ethTypes.Address `json:"from"` Hash ethTypes.Hash `json:"hash"` } `json:"transaction"` ExpectedSender string `json:"expected_sender"` ExpectedRecipient string `json:"expected_recipient"` ExpectedFees string `json:"expected_fees"` TokenDecimals int `json:"token_decimals"` ContractAddress string `json:"contract_address"` }
Click to show internal directories.
Click to hide internal directories.