I'm not exactly sure, as I have never played the game. If by "infinite golden hammer", you mean to have the hammer for as long as you want, there will most likely be two values, one that tells you you have the golden hammer and one that tells you for how long you have left to use it. These values, since being very similar in action to each other, should be very close to each other in RAM. Although, there might be a possibility that it is not as close as I would think.
You will have to search either when you have the golden hammer and when you do not have it or the time value that decreases when you have it. So, let's say you want to search for the time. You start the search. The value will most likely be 0 or some negative number, if I'm not mistaking. When you get the golden hammer, search for Greater Than Previous Value, since the value mentioned before will most likely be 0 or negative, it is now a greater number than before. Now, after the search, wait a second. If you wait less than a second, the value might only change every second instead of milliseconds or however much it changes. Thus, to be safe, it is best to wait at least a second or more. Now, pause the game either by using the controls or if the Dolphin emulator allows you to pause emulation. The time has decreased instead of increasing, so search for Less Than Previous Value. Keep searching for less than previous value, until your time with the golden hammer has run out. It is best advised that you use the golden hammer first without trying to search for the address and countdown the seconds or approximate intervals you will be using to search for the address until the time runs out. This is to make sure you don't accidentally search for the value when you're not supposed to. If you accidentally search when you're not supposed to, you will have to redo the whole search all over again. Once your time has run out after searching for the address and your results list is pretty big, redo the same steps as before. Search for Greater Than Previous Value and then as the value decreases, search for Less Than Previous Value. If you still have a big list, you should know what to do. You should eventually be left with just a few or several addresses at the most, if not just a single address.
As Bully has mentioned in a post before, there are secrets to searching for addresses, some that never change I can not explain this to you how that works, as I've never done it before because I've never been taught or learned how to do it, but I suppose if you open up a thread and ask, you'll get your answer.
Hope this helped and I hope you are able to make the code and if not that code, then maybe some others.
Have any questions? Just post below and I or someone like Bully will be glad to help.