Home Reference Source Repository
public class | source

Sender

Sender class allows for sending Ethereum transactions and returns Transaction objects that can be then watched for events (see Transaction#watch).

Static Member Summary

Static Public Members
public static get

Maximum Gas to be spent in an Ethereum transaction

Constructor Summary

Public Constructor
public

constructor(marketplace: FincontractMarketplace, web3: Web3)

Constructs Sender object with the usual context for interacting with the FincontractMarketplace smart contract instance.

Method Summary

Public Methods
public

send(name: String, args: Array): Transaction

Sends a transaction to the blockchain using the smart contract instance set within constructor.

Static Public Members

public static get GasLimit: Number source

Maximum Gas to be spent in an Ethereum transaction

Public Constructors

public constructor(marketplace: FincontractMarketplace, web3: Web3) source

Constructs Sender object with the usual context for interacting with the FincontractMarketplace smart contract instance.

Params:

NameTypeAttributeDescription
marketplace FincontractMarketplace

a Fincontracts smart contract instance

web3 Web3

a web3 instance connected to Ethereum node

Public Methods

public send(name: String, args: Array): Transaction source

Sends a transaction to the blockchain using the smart contract instance set within constructor. Name argument is used to retrieve correct function and the arguments are then fed as the arguments of the transaction. Transaction sometimes is lost for unknown reasons. In this case, it will be resent until it's on the list of pending transactions.

Params:

NameTypeAttributeDescription
name String

a name of the transaction to be sent

args Array

arguments to be fed to that transaction

Return:

Transaction

transaction object with Transaction.sent set to the promise of the sent transaction