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

27 public docs for registry contracts #29

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

lilPlumberBoy
Copy link
Contributor

For #27

Added mainnet address for registry contract, added explanation
of external functions
Added documentation for Pool Regitry functions, still need to
add in outputs for underlying pool functions
Added explanation for functions related to metapools.
@lilPlumberBoy lilPlumberBoy self-assigned this Mar 28, 2022
@lilPlumberBoy lilPlumberBoy linked an issue Mar 28, 2022 that may be closed by this pull request
Copy link

@hammeiam hammeiam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a couple of small changes, but overall looks nice and thorough!


## Pool Registry

This contract holds the funtions to get deployment addresses and related info for all Saddle Pools

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

funtions typo

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe also mention that they can get the latest address from the masterRegistry by looking up formatBytes32String('PoolRegistry')

saddle-registry.md Outdated Show resolved Hide resolved

### Pool Registry Public Variables:

* `poolsIndexOfPlusOne(address poolAddress)`: Resolves an address input to the current pool vitual price.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vitual typo

Copy link
Contributor

@arthur-zhuk arthur-zhuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good stuff

@penandlim
Copy link
Contributor

I think we should use solidity-docgen for the official docs and turn this page into a more fleshed out example usages including events.

Added Master registry and pool registry auto generated pages
as well as updated the registry page with more general info.
Changed all scripts from python to typescript, added example of
filtering all emitted events from the contract by topic.
@lilPlumberBoy lilPlumberBoy requested a review from hammeiam April 5, 2022 17:10

// Get PoolDataAtIndex for each pool index and append to list
let poolDataList = [];
for (let i = 0; i < registryLength; i++) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

registryLength is a string here


```typescript
const hre = require("hardhat");
const { ethers } = require("@nomiclabs/hardhat-ethers");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hardhat shouldn't be necessary in these demo scripts, we can just use ethers directly import ethers from 'ethers'

```typescript
const hre = require("hardhat");
const { ethers } = require("@nomiclabs/hardhat-ethers");
const toNumber = hre.ethers.utils.toNumber

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused


### Pool Registry Interactions

The Pool Registry's functions allow you to fetch pool data is, as well as listen for pool events:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

review this copy


## Pool Registry <br>

This contract holds the funtions to get deployment addresses and related info for all Saddle Pools. It allows for listening to events related to registry actions such as removing/adding pools, as well as any updates to existing pools. <br>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo funtions


}
```
* Get all events that the PoolRegistry has ever produced

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can omit this since fetching contract events isn't specific to any one contract.

@arthur-zhuk
Copy link
Contributor

Could this be good marketing material too?

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

Successfully merging this pull request may close these issues.

Public docs for registry contracts
4 participants