Add description of how to use the yield router in README.md file#16
Open
gigileungyingchi wants to merge 2 commits intodevelopfrom
Open
Add description of how to use the yield router in README.md file#16gigileungyingchi wants to merge 2 commits intodevelopfrom
gigileungyingchi wants to merge 2 commits intodevelopfrom
Conversation
c7e1007 to
946582e
Compare
s6thgehr
reviewed
Oct 7, 2023
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) |
Contributor
There was a problem hiding this comment.
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``` |
Contributor
There was a problem hiding this comment.
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. |
Contributor
There was a problem hiding this comment.
state_address is not the address of the input yield account but of sunrise state
946582e to
078373e
Compare
s6thgehr
reviewed
Oct 9, 2023
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``` |
Contributor
There was a problem hiding this comment.
<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. |
078373e to
9bf741c
Compare
s6thgehr
previously approved these changes
Oct 12, 2023
9bf741c to
2386d83
Compare
2386d83 to
eeb252b
Compare
eeb252b to
0012cd7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.