Add eth_getProof to safe methods (#10070)

`eth_getProof` is an unpermissioned, read-only RPC method for getting account-related Merkle proofs, specified here: https://eips.ethereum.org/EIPS/eip-1186

It's been supported by major Ethereum clients, and Infura, for some time. By adding it to the safe methods list, we enable this method for our users.
feature/default_network_editable
Erik Marks 4 years ago committed by Mark Stacey
parent f311d31736
commit 62b00f62db
  1. 19
      app/scripts/controllers/permissions/enums.js

@ -32,15 +32,11 @@ export const LOG_METHOD_TYPES = {
export const LOG_LIMIT = 100 export const LOG_LIMIT = 100
export const SAFE_METHODS = [ export const SAFE_METHODS = [
'web3_sha3',
'web3_clientVersion',
'net_listening',
'net_peerCount',
'net_version',
'eth_blockNumber', 'eth_blockNumber',
'eth_call', 'eth_call',
'eth_chainId', 'eth_chainId',
'eth_coinbase', 'eth_coinbase',
'eth_decrypt',
'eth_estimateGas', 'eth_estimateGas',
'eth_gasPrice', 'eth_gasPrice',
'eth_getBalance', 'eth_getBalance',
@ -49,9 +45,11 @@ export const SAFE_METHODS = [
'eth_getBlockTransactionCountByHash', 'eth_getBlockTransactionCountByHash',
'eth_getBlockTransactionCountByNumber', 'eth_getBlockTransactionCountByNumber',
'eth_getCode', 'eth_getCode',
'eth_getEncryptionPublicKey',
'eth_getFilterChanges', 'eth_getFilterChanges',
'eth_getFilterLogs', 'eth_getFilterLogs',
'eth_getLogs', 'eth_getLogs',
'eth_getProof',
'eth_getStorageAt', 'eth_getStorageAt',
'eth_getTransactionByBlockHashAndIndex', 'eth_getTransactionByBlockHashAndIndex',
'eth_getTransactionByBlockNumberAndIndex', 'eth_getTransactionByBlockNumberAndIndex',
@ -72,8 +70,6 @@ export const SAFE_METHODS = [
'eth_sendRawTransaction', 'eth_sendRawTransaction',
'eth_sendTransaction', 'eth_sendTransaction',
'eth_sign', 'eth_sign',
'personal_sign',
'personal_ecRecover',
'eth_signTypedData', 'eth_signTypedData',
'eth_signTypedData_v1', 'eth_signTypedData_v1',
'eth_signTypedData_v3', 'eth_signTypedData_v3',
@ -83,7 +79,12 @@ export const SAFE_METHODS = [
'eth_syncing', 'eth_syncing',
'eth_uninstallFilter', 'eth_uninstallFilter',
'metamask_watchAsset', 'metamask_watchAsset',
'net_listening',
'net_peerCount',
'net_version',
'personal_ecRecover',
'personal_sign',
'wallet_watchAsset', 'wallet_watchAsset',
'eth_getEncryptionPublicKey', 'web3_clientVersion',
'eth_decrypt', 'web3_sha3',
] ]

Loading…
Cancel
Save