2

I have a question about the Metamask UI.

Is it possible to set custom transaction method name for metamask history to make it more user-friendly? I want to rename "Bid" (default method name) to "Made bids for cake". I can't find any docs about it, anyone knows how does it works?

Transaction method name screenshot

UPDATED

I've tried to test new contract with a few different functions, all of them named as "Unknown function" inside Metamask ext UI history (when I expected to see "Set Test Value"). Even for set function its unknown result.

How should I name function for Metamask UI correctly?

contract NamingTest {
    uint256 test;

    function set_test_value(uint256 _value) external payable {
        test = _value;
    }

    function setTestValue(uint256 _value) external payable {
        test = _value;
    }

    function settestvalue(uint256 _value) external payable {
        test = _value;
    }

    function set(uint256 _value) external payable {
        test = _value;
    }

    function getTest() external view returns (uint256) {
        return test;
    }
}   
0

This is not possible, as the Metamask UI pulls that name directly from the contract. Your only solution, for now, is to create a contract with a different function name.

If this is not your contract, then you cannot change this name on the Metamask UI.

|improve this answer|||||
  • 1
    I was hoping there was a way :) I've updated my first post with the Contract test, now I don't understand how should I name functions correctly for the MetaMask, all of it shows as Unknown function. Maybe I wrong with the code? – eleave Oct 25 '18 at 9:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.