Consensys / ethql

A GraphQL interface to Ethereum :fire:
Apache License 2.0
623 stars 85 forks source link

101: Implement Block->transactionRoles field. #17

Closed akhila-raju closed 6 years ago

akhila-raju commented 6 years ago

This fields retrieves only the transactions whose from and to addresses match the ones provided as arguments.

block(number: 1234) {
  transactionsRoles(from: "0x1234...", to: "0x3456...") {
  }
}

^^ This query would only return those transactions whose from and to addresses matched the provided ones.

It is possible to provide only the from or to address when fetching this field, in which case all transactions where the address appears in the appropriate field are returned.

If the user doesn't care about directionality (i.e. which address is source and which is target), they should use the transactionsParticipants field instead.

[ch101]