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

No way to archive batch proposals with multiple contracts #263

Open
KholdStare opened this issue Jun 9, 2023 · 0 comments
Open

No way to archive batch proposals with multiple contracts #263

KholdStare opened this issue Jun 9, 2023 · 0 comments

Comments

@KholdStare
Copy link

KholdStare commented Jun 9, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant