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

Add get proposal endpoint #170

Merged
merged 2 commits into from
Oct 19, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add README
  • Loading branch information
shahnami committed Oct 18, 2022
commit 8eed349dfbb3953c991b06228339cb4f1f69aa35
16 changes: 12 additions & 4 deletions packages/admin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ To create an `upgrade` action proposal, provide the proxy contract network and a

```js
const newImplementation = '0x3E5e9111Ae8eB78Fe1CC3bb8915d5D461F3Ef9A9';
const newImplementationAbi = '[...]'
const newImplementationAbi = '[...]';
const contract = { network: 'rinkeby', address: '0x28a8746e75304c0780E011BEd21C72cD78cd535E' };
await client.proposeUpgrade({ newImplementation, newImplementationAbi }, contract);
```
Expand All @@ -73,7 +73,7 @@ If your proxies do not implement the [EIP1967 admin slot](https://eips.ethereum.
```js
const newImplementation = '0x3E5e9111Ae8eB78Fe1CC3bb8915d5D461F3Ef9A9';
const proxyAdmin = '0x2fC100f1BeA4ACCD5dA5e5ed725D763c90e8ca96';
const newImplementationAbi = '[...]'
const newImplementationAbi = '[...]';
const contract = { network: 'rinkeby', address: '0x28a8746e75304c0780E011BEd21C72cD78cd535E' };
await client.proposeUpgrade({ newImplementation, newImplementationAbi, proxyAdmin }, contract);
```
Expand All @@ -85,7 +85,7 @@ const newImplementation = '0x3E5e9111Ae8eB78Fe1CC3bb8915d5D461F3Ef9A9';
const via = '0xF608FA64c4fF8aDdbEd106E69f3459effb4bC3D1';
const viaType = 'Gnosis Safe'; // or 'Gnosis Multisig', or 'EOA'
const contract = { network: 'rinkeby', address: '0x28a8746e75304c0780E011BEd21C72cD78cd535E' };
const newImplementationAbi = '[...]'
const newImplementationAbi = '[...]';
await client.proposeUpgrade({ newImplementation, newImplementationAbi, via, viaType }, contract);
```

Expand Down Expand Up @@ -115,6 +115,14 @@ const proposals = await client.listProposals();

You can filter your active proposals by `isActive` property present on each proposal in the list response. By default, only unarchived proposals are returned, but you can override this by adding an `includeArchived: true` option in the call.

### Retrieve a proposal

You can retrieve a proposal given its contract and proposal ids:

```js
await client.getProposal(contractId, proposalId);
```

### Archiving proposals

You can archive or unarchive a proposal given its contract and proposal ids:
Expand Down Expand Up @@ -146,7 +154,7 @@ await client.addContract({
address: '0x28a8746e75304c0780E011BEd21C72cD78cd535E',
name: 'My contract',
abi: '[...]',
natSpec: '{devdoc:{...}, userdoc: {...}}'
natSpec: '{devdoc:{...}, userdoc: {...}}',
});
```

Expand Down