Skip to content

UI JSON ABI Signature Import doesn't seem to work #24

@Philogy

Description

@Philogy

I'm trying to import signatures into the signature DB by directly pasting a JSON ABI into the import UI however it doesn't seem to work:

The ABI I'm trying to import

[
  {
    "type": "constructor",
    "name": "__init__",
    "inputs": [],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "initialize",
    "inputs": [
      {
        "name": "owners",
        "type": "tuple[10]",
        "components": [
          {
            "name": "0",
            "type": "address"
          },
          {
            "name": "1",
            "type": "uint256"
          }
        ]
      },
      {
        "name": "quorum_pct",
        "type": "uint256"
      },
      {
        "name": "gov_token",
        "type": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "distribute_governance_token",
    "inputs": [
      {
        "name": "receivers",
        "type": "tuple[10]",
        "components": [
          {
            "name": "0",
            "type": "address"
          },
          {
            "name": "1",
            "type": "uint256"
          }
        ]
      },
      {
        "name": "quorum_pct",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "update_weights",
    "inputs": [],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "add_owner",
    "inputs": [
      {
        "name": "owner",
        "type": "address"
      },
      {
        "name": "distribute_amount",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "remove_owner",
    "inputs": [
      {
        "name": "owner",
        "type": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "replace_owner",
    "inputs": [
      {
        "name": "owner",
        "type": "address"
      },
      {
        "name": "new_owner",
        "type": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "change_quorum",
    "inputs": [
      {
        "name": "quorum_pct",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "submit_transaction",
    "inputs": [
      {
        "name": "destination",
        "type": "address"
      },
      {
        "name": "value",
        "type": "uint256"
      },
      {
        "name": "data",
        "type": "bytes"
      },
      {
        "name": "data_length",
        "type": "uint16"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "confirm_transaction",
    "inputs": [
      {
        "name": "tx_id",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "revoke_confirmation",
    "inputs": [
      {
        "name": "tx_id",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "execute_transaction",
    "inputs": [
      {
        "name": "tx_id",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "is_confirmed",
    "inputs": [
      {
        "name": "tx_id",
        "type": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "get_owners",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address[10]"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "get_weight",
    "inputs": [
      {
        "name": "owner",
        "type": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "get_total_weight",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "get_confirmations",
    "inputs": [
      {
        "name": "tx_id",
        "type": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "address[10]"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "event",
    "name": "Approval",
    "inputs": [
      {
        "name": "owner",
        "type": "address",
        "indexed": true
      },
      {
        "name": "spender",
        "type": "address",
        "indexed": true
      },
      {
        "name": "value",
        "type": "uint256",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "Transfer",
    "inputs": [
      {
        "name": "from",
        "type": "address",
        "indexed": true
      },
      {
        "name": "to",
        "type": "address",
        "indexed": true
      },
      {
        "name": "value",
        "type": "uint256",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "Confirmation",
    "inputs": [
      {
        "name": "owner",
        "type": "address",
        "indexed": true
      },
      {
        "name": "tx_id",
        "type": "uint256",
        "indexed": true
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "Revocation",
    "inputs": [
      {
        "name": "owner",
        "type": "address",
        "indexed": true
      },
      {
        "name": "tx_id",
        "type": "uint256",
        "indexed": true
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "Submission",
    "inputs": [
      {
        "name": "tx_id",
        "type": "uint256",
        "indexed": true
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "Execution",
    "inputs": [
      {
        "name": "tx_id",
        "type": "uint256",
        "indexed": true
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "ExecutionFailure",
    "inputs": [
      {
        "name": "tx_id",
        "type": "uint256",
        "indexed": true
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "OwnerAddition",
    "inputs": [
      {
        "name": "owner",
        "type": "address",
        "indexed": true
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "OwnerRemoval",
    "inputs": [
      {
        "name": "owner",
        "type": "address",
        "indexed": true
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "QuorumChange",
    "inputs": [
      {
        "name": "quorum_pct",
        "type": "uint256",
        "indexed": true
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "Transaction",
    "inputs": [
      {
        "name": "destination",
        "type": "address",
        "indexed": false
      },
      {
        "name": "value",
        "type": "uint256",
        "indexed": false
      },
      {
        "name": "data",
        "type": "bytes",
        "indexed": false
      },
      {
        "name": "data_length",
        "type": "uint16",
        "indexed": false
      },
      {
        "name": "executed",
        "type": "bool",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "RawCallBuffer",
    "inputs": [
      {
        "name": "input_len",
        "type": "uint256",
        "indexed": false
      },
      {
        "name": "output_len",
        "type": "uint256",
        "indexed": false
      },
      {
        "name": "buf",
        "type": "tuple",
        "components": [
          {
            "name": "offset",
            "type": "uint256"
          },
          {
            "name": "len",
            "type": "uint256"
          }
        ],
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "MemoryBufferWriter",
    "inputs": [
      {
        "name": "buf",
        "type": "tuple",
        "components": [
          {
            "name": "offset",
            "type": "uint256"
          },
          {
            "name": "len",
            "type": "uint256"
          }
        ],
        "indexed": false
      },
      {
        "name": "cur",
        "type": "tuple",
        "components": [
          {
            "name": "cur",
            "type": "uint256"
          },
          {
            "name": "len",
            "type": "uint256"
          }
        ],
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "Context",
    "inputs": [],
    "anonymous": false
  }
]

When I click submit I get the Imported 0 functions and 0 events! Skipped 0 functions and 0 events. message, despite there definitely being functions and selectors in the ABI the DB isn't aware of yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions