-
Notifications
You must be signed in to change notification settings - Fork 0
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 description of how to use the yield router in README.md file #16
base: develop
Are you sure you want to change the base?
Conversation
c7e1007
to
946582e
Compare
README.md
Outdated
|
||
## Usage (latest version -- Yield Router) | ||
There is a state account owned by the yield controller program which stores the following data: | ||
- `sunrise_state`: public key of the input yield account which holds funds to be sent to PDAs that will transfer fund to various climate projects (e.g. the offset bridge) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think sunrise_state is not the public key of the input yield account but a pda that holds data about sunrise stake state.
README.md
Outdated
- `total_spent`: total amount of fund sent to various climate projects | ||
|
||
This state account needs to be first registered on chain, this only needs to be performed once for a yield controller program. To do so, one can use the `register_state` instruction by calling the `packages/yield-router/registerState.ts` script as follow: | ||
```ANCHOR_PROVIDER_URL=[anchor_provide_url] STATE_ADDRESS=[state_address] OUTPUT_YIELD_ADDRESS=[output_yield_address] yarn ts-node packages/yield-router/registerState.ts``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is more common to use curly braces { } or angle brackets < > instead of square brackets [ ] to indicate variables, e.g. ANCHOR_PROVIDER_URL=<anchor_provider_url>
There is a typo for all "anchor_provideR_url"
README.md
Outdated
|
||
This state account needs to be first registered on chain, this only needs to be performed once for a yield controller program. To do so, one can use the `register_state` instruction by calling the `packages/yield-router/registerState.ts` script as follow: | ||
```ANCHOR_PROVIDER_URL=[anchor_provide_url] STATE_ADDRESS=[state_address] OUTPUT_YIELD_ADDRESS=[output_yield_address] yarn ts-node packages/yield-router/registerState.ts``` | ||
where `state_address` is the public key of the input yield account and `output_yield_address` is the address of the public key of the first PDA of a climate project. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
state_address is not the address of the input yield account but of sunrise state
946582e
to
078373e
Compare
README.md
Outdated
- `total_spent`: total amount of fund sent to various climate projects | ||
|
||
This state account needs to be first registered on chain, this only needs to be performed once for a yield controller program. To do so, one can use the `register_state` instruction by calling the `packages/yield-router/registerState.ts` script as follow: | ||
```ANCHOR_PROVIDER_URL=<anchor_provider_url> STATE_ADDRESS=<state_address> OUTPUT_YIELD_ADDRESS=[output_yield_address] yarn ts-node packages/yield-router/registerState.ts``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<output_yield_address> instead of [output_yield_address]
README.md
Outdated
|
||
This state account needs to be first registered on chain, this only needs to be performed once for a yield controller program. To do so, one can use the `register_state` instruction by calling the `packages/yield-router/registerState.ts` script as follow: | ||
```ANCHOR_PROVIDER_URL=<anchor_provider_url> STATE_ADDRESS=<state_address> OUTPUT_YIELD_ADDRESS=[output_yield_address] yarn ts-node packages/yield-router/registerState.ts``` | ||
where `state_address` is the public key of the state account from which the input yield account can ebe derived and `output_yield_address` is the address of the public key of the first PDA of a climate project. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: ebe -> be
078373e
to
9bf741c
Compare
9bf741c
to
2386d83
Compare
2386d83
to
eeb252b
Compare
eeb252b
to
0012cd7
Compare
No description provided.