Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support custom MUD system ABI #2275

Open
k1rill-fedoseev opened this issue Sep 30, 2024 · 0 comments
Open

Support custom MUD system ABI #2275

k1rill-fedoseev opened this issue Sep 30, 2024 · 0 comments
Labels
need design For issues that wait for design updates

Comments

@k1rill-fedoseev
Copy link
Collaborator

Each MUD world has a bunch of "systems" contracts associated with it. Systems act pretty much like proxy implementations, but MUD has its own way of storing them, which will work better with a separate tab on MUD contract specifically.

For example, the tab might look like:

Image

99% of functions are write-only, but in some rare cases we might see read functions too. I suggest to display them under the same tab, and put the buttons Read/Write/Simulate accordingly.

API example:

// /api/v2/mud/world/<address>/systems
{
  "items": [
    {
      "name": "sy.AccessManagement",
      "address": "0x17ffdeff94ed0b80c493a179d4b3b09d6d71f627"
    },
    {
      "name": "sy.BalanceTransfer",
      "address": "0xa274b9a7e743cd8df3c6fd0abd47ed55fc943bc3"
    },
    // ...
  ]
}

// /api/v2/mud/world/<address>/systems/<system_address>
{
  "name": "sy.AccessManagement",
  "abi": [
    {
      "inputs": [
        {
          "name": "resourceId",
          "type": "bytes32"
        },
        {
          "name": "grantee",
          "type": "address"
        }
      ],
      "name": "grantAccess",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    ...
  ]
}
@k1rill-fedoseev k1rill-fedoseev added the need design For issues that wait for design updates label Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need design For issues that wait for design updates
Projects
None yet
Development

No branches or pull requests

1 participant