From eeee8852cdedbde42dfd1837831ea58ddcfb7993 Mon Sep 17 00:00:00 2001 From: Erik Marks <25517051+rekmarks@users.noreply.github.com> Date: Mon, 14 Dec 2020 15:21:15 -0800 Subject: [PATCH] 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. --- app/scripts/controllers/permissions/enums.js | 21 ++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/app/scripts/controllers/permissions/enums.js b/app/scripts/controllers/permissions/enums.js index cfb595144..510fad1b3 100644 --- a/app/scripts/controllers/permissions/enums.js +++ b/app/scripts/controllers/permissions/enums.js @@ -39,15 +39,11 @@ export const LOG_METHOD_TYPES = { export const LOG_LIMIT = 100 export const SAFE_METHODS = [ - 'web3_sha3', - 'web3_clientVersion', - 'net_listening', - 'net_peerCount', - 'net_version', 'eth_blockNumber', 'eth_call', 'eth_chainId', 'eth_coinbase', + 'eth_decrypt', 'eth_estimateGas', 'eth_gasPrice', 'eth_getBalance', @@ -56,9 +52,11 @@ export const SAFE_METHODS = [ 'eth_getBlockTransactionCountByHash', 'eth_getBlockTransactionCountByNumber', 'eth_getCode', + 'eth_getEncryptionPublicKey', 'eth_getFilterChanges', 'eth_getFilterLogs', 'eth_getLogs', + 'eth_getProof', 'eth_getStorageAt', 'eth_getTransactionByBlockHashAndIndex', 'eth_getTransactionByBlockNumberAndIndex', @@ -79,8 +77,6 @@ export const SAFE_METHODS = [ 'eth_sendRawTransaction', 'eth_sendTransaction', 'eth_sign', - 'personal_sign', - 'personal_ecRecover', 'eth_signTypedData', 'eth_signTypedData_v1', 'eth_signTypedData_v3', @@ -89,9 +85,14 @@ export const SAFE_METHODS = [ 'eth_submitWork', 'eth_syncing', 'eth_uninstallFilter', - 'eth_getEncryptionPublicKey', - 'eth_decrypt', + 'metamask_getProviderState', 'metamask_watchAsset', + 'net_listening', + 'net_peerCount', + 'net_version', + 'personal_ecRecover', + 'personal_sign', 'wallet_watchAsset', - 'metamask_getProviderState', + 'web3_clientVersion', + 'web3_sha3', ]