Comment on page
Registering Your Contract's Method Names
OneKey uses the Parity on-chain registry of function signatures to display method names on the confirm screen. For many common method names, like token methods, this allows OneKey to successfully look up the method names by their method signature. However, sometimes you're using a method that is not in that on-chain registry, and OneKey will simply display
Contract Interactionto the user.
To add your contract's function names to this registry so it shows in the OneKey interface, follow the below steps.
- 2.Connect OneKey
- 3.Use etherscan's write contract feature to input the string value (without quotes or spaces) to the register functionFor example:
- 4.Click "write"
- 5.Approve the transaction in OneKey (you only pay gas)
ethers.utils.keccak256('getOwners()') => 0xa0e67e2bdc0a6d8a09ccd6c353c9df590807ad66ff5e6630c4f31a86dfa84821
- Set the correct compiler version based on the contract.
- Use remix's write functionality to add to the registry.
Last modified 1yr ago