Module: lib/blockchains/ethereum/transactions

Module to process Ethereum transactions for Whiteflag

Source:

Methods

(inner) extractMessage(transaction, timestamp) → {Promise}

Extracts Whiteflag message from Ethereum transaction data

Parameters:
Name Type Description
transaction Object
timestamp number

the block time

Source:
Returns:

resolves to a Whiteflag message

Type
Promise

(inner) initTransactions(ethConfig, ethState, web3) → {Promise}

Initialises Ethereum Transactions processing

Parameters:
Name Type Description
ethConfig Object

the Ethereum blockchain configuration

ethState Object

the Ethereum blockchain state

web3 Object

the Ethereum Web3 instance

Source:
Returns:

resolve if succesfully initialised

Type
Promise

(inner) sendTransaction(account, toAddress, value, data) → {Promise}

Sends a transaction on the Ethereum blockchain

Parameters:
Name Type Description
account Object

the account used to send the transaction

toAddress string

the address to send the transaction to

value string

the value to be sent in ether

data string

the data to be sent

Source:
Returns:

resolve to transaction hash and block number

Type
Promise