Request for User Interface for Transparent Contracts (now Diamonds)

Nick Mudge
Coinmonks
Published in
2 min readJan 31, 2020

--

NOTE: The Diamond Standard has been released. Make a user interface for that instead. See here: https://github.com/ethereum/EIPs/issues/2535

The transparent contract standard, ERC1538, is an upgradeable contract architecture that provides the following functionality:

  1. A way to add, replace and remove multiple functions of a contract atomically (at the same time).
  2. Standard events to show what functions are added, replaced and removed from a contract, and why the changes are made.
  3. A standard way to query a contract to discover and retrieve information about all functions exposed by it.
  4. Solves the 24KB maximum contract size limitation, making the maximum contract size of a transparent contract practically unlimited. This standard makes the worry about contract size a thing of the past.
  5. Enables an upgradeable contract to become immutable in the future if desired.

Point number 2 above means that a user interface can show all the upgrades a contract has had, which includes function changes and written descriptions of the changes.

Point number 3 above means that a transparent contract stores within itself its own ABI — (the list of function names and arguments provided by the contract.). In the past user interfaces for contracts would ask the user to provide the ABI. With this standard this is no longer needed since transparent contracts provide their ABI.

A transparent contract works by forwarding all (or most) function calls to other (delegate) contracts. So looking purely at the ABI or source code of a transparent contract doesn’t tell you what it does. You have to look at the delegate contracts that it forwards function calls to. It would be great if a user interface was created to bring together all the delegate contract functions and source code so the the full functionality of a transparent contract can be viewed.

Here are things I would like to see in a user interface for transparent contracts:

  1. Automatically show all the functions provided by a transparent contract.
  2. Automatically show the address and source code for each delegate contract used by the transparent contract. Visually associate each function provided by the transparent contract with its delegate contract and source code. Source code can be retrieved using etherscan.io’s API.
  3. Show a complete history of upgrades to the transparent contract. The history should show every function that has been added, replaced and removed. The history should show the text description (commit message) of each upgrade. The history should show every change of delegate contract address with a link to or access to source code.
  4. The user interface should enable users to call any of the functions provided by a transparent contract and show return values.
  5. Provide user interface functionality for the owner of a transparent contract to add/replace/delete functions — that is, perform upgrades.
  6. Give access to or show the source code of a transparent contract.

--

--

Nick Mudge
Coinmonks

Ethereum contract programmer, security auditor and standards author. Author of the diamond standard.