diff --git a/src/app/components/RuntimeTransactionMethod/index.tsx b/src/app/components/RuntimeTransactionMethod/index.tsx index 995cdc2d8..af4b9db0c 100644 --- a/src/app/components/RuntimeTransactionMethod/index.tsx +++ b/src/app/components/RuntimeTransactionMethod/index.tsx @@ -149,10 +149,31 @@ export const getRuntimeTransactionMethodFilteringParam = ( case 'any': return {} case 'accounts.Transfer': + // Searching for transfers is tricky, because there are some + // transactions which are in fact evm.Calls, but are still + // considered to be transfers based on some heuristics. + // The Nexus API provides a special value in order to allow searching + // for them. Their documentation says: + // + // 'native_transfers': Returns transactions "likely to be native transfers". + // These include accounts.Transfer transactions and evm.Calls with an empty 'body' field. + // + // For more details, see the API spec at + // https://github.com/oasisprotocol/nexus/blob/main/api/spec/v1.yaml return { method: 'native_transfers' } case 'evm.Call': + // Searching for contract calls is tricky, because some of them + // should be classified as transfers. (See above.) + // The Nexus API provides a special value for excluding these + // from the search. Their documentation says: + // + // 'evm.Call_no_native': Returns EVM calls that are "not likely to be native transfers". + // + // For more details, see the API spec at + // https://github.com/oasisprotocol/nexus/blob/main/api/spec/v1.yaml return { method: 'evm.Call_no_native' } default: + // For other (normal) methods, we can simply pass on the wanted method name. return { method } } }