Add eth filter RPC endpoints and FilterChanges type. (#3150)
This commit is contained in:
@@ -73,6 +73,13 @@ const types: DefinitionsTypes = {
|
||||
Null: 'Null'
|
||||
}
|
||||
},
|
||||
EthFilterChanges: {
|
||||
_enum: {
|
||||
Logs: 'Vec<EthLog>',
|
||||
Hashes: 'Vec<H256>',
|
||||
Empty: 'Null'
|
||||
}
|
||||
},
|
||||
EthFilterTopic: {
|
||||
_enum: {
|
||||
Single: 'EthFilterTopicInner',
|
||||
|
||||
@@ -131,6 +131,20 @@ export const rpc: DefinitionsRpc = {
|
||||
],
|
||||
type: 'Bytes'
|
||||
},
|
||||
getFilterChanges: {
|
||||
description: 'Returns filter changes since last poll.',
|
||||
params: [
|
||||
{ name: 'index', type: 'U256' }
|
||||
],
|
||||
type: 'EthFilterChanges'
|
||||
},
|
||||
getFilterLogs: {
|
||||
description: 'Returns all logs matching given filter (in a range \'from\' - \'to\').',
|
||||
params: [
|
||||
{ name: 'index', type: 'U256' }
|
||||
],
|
||||
type: 'Vec<EthLog>'
|
||||
},
|
||||
getLogs: {
|
||||
description: 'Returns logs matching given filter object.',
|
||||
params: [
|
||||
@@ -239,6 +253,23 @@ export const rpc: DefinitionsRpc = {
|
||||
params: [],
|
||||
type: 'bool'
|
||||
},
|
||||
newBlockFilter: {
|
||||
description: 'Returns id of new block filter.',
|
||||
params: [],
|
||||
type: 'U256'
|
||||
},
|
||||
newFilter: {
|
||||
description: 'Returns id of new filter.',
|
||||
params: [
|
||||
{ name: 'filter', type: 'EthFilter' }
|
||||
],
|
||||
type: 'U256'
|
||||
},
|
||||
newPendingTransactionFilter: {
|
||||
description: 'Returns id of new block filter.',
|
||||
params: [],
|
||||
type: 'U256'
|
||||
},
|
||||
protocolVersion: {
|
||||
description: 'Returns protocol version encoded as a string (quotes are necessary).',
|
||||
params: [],
|
||||
@@ -292,5 +323,12 @@ export const rpc: DefinitionsRpc = {
|
||||
description: 'Returns an object with data about the sync status or false.',
|
||||
params: [],
|
||||
type: 'EthSyncStatus'
|
||||
},
|
||||
uninstallFilter: {
|
||||
description: 'Uninstalls filter.',
|
||||
params: [
|
||||
{ name: 'index', type: 'U256' }
|
||||
],
|
||||
type: 'bool'
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user