Skip to content
This repository was archived by the owner on Aug 20, 2025. It is now read-only.
This repository was archived by the owner on Aug 20, 2025. It is now read-only.

No way to archive batch proposals with multiple contracts #263

@KholdStare

Description

@KholdStare

I have created a batch proposal that interacts with several contracts, and looks like this:

{
  proposalId: '1a8d8b0a-13c0-45e6-a4f2-bebb83d02f2f',
  contractId: 'mumbai-batch',
  createdAt: '2023-06-08T21:44:39.474Z',
  title: 'pause all contracts',
  type: 'batch',
  via: 'REDACTED',
  viaType: 'EOA',
  description: 'pause all contracts',
  metadata: {},
  contract: { name: 'batch', address: 'mumbai-batch', network: 'mumbai' },
  isActive: false,
  isArchived: true,
  steps: [
    [Object], [Object],
    [Object], [Object],
    [Object], [Object],
    [Object], [Object],
    [Object], [Object]
  ],
  contractIds: [
    'REDACTED',
    'REDACTED',
    'REDACTED',
    'REDACTED',
    'REDACTED',
    'REDACTED',
    'REDACTED',
    'REDACTED',
    'REDACTED',
    'REDACTED'
  ],
  url: 'REDACTED'
}

I redacted some addresses. Note that contractId is mumbai-batch since it's actually several contracts in contractIds.

However the archive endpoint and the typescript function in the defender-admin-client only accept a single contract id. See https://docs.openzeppelin.com/defender/admin-api-reference#proposals-archive-endpoint

When I try to archive the proposal with the given mumbai-batch contractId I get this error:

  request: {
    path: '/admin/contracts/mumbai-batch/proposals/1a8d8b0a-13c0-45e6-a4f2-bebb83d02f2f/archived',
    method: 'PUT'
  },
  response: {
    status: 404,
    statusText: 'Not Found',
    data: { message: 'contract with id mumbai-batch not found.' }
  }

I feel like proposals are more general and should not live under the contracts path. it should be possible to refer to a proposal solely by its id.

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