简单的js hook
// ==UserScript== // @name ethereum request // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author You // @match http://localhost:3000/ // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== // @grant none // ==/UserScript== (function() { 'use strict'; var old = window.ethereum.request window.ethereum.request = function(method,params){ console.log("method:",method); console.log("params:",params); console.log("old:",old); return old.call(this,method,params); }; // Your code here... })();